Sometimes you end up somewhere with your laptop where you just can't find any open WiFi. Іноді ви в кінцевому підсумку десь з ноутбуком, де ви просто не можете знайти будь-які відкриті WiFi. Luckily you have a Nokia N95 and a Bluetooth adapter. На щастя, у вас є Nokia N95 і адаптером Bluetooth. I'm going to show you how to tether your N95 to your laptop via Bluetooth the quick and dirty command line way, as well as the prettier GUI way. Я збираюся показати вам, як прив'язати ваш N95 до ноутбука через Bluetooth швидкий і брудний шлях командного рядка, а також тим красивіше GUI способом. In these examples I am running Fedora 9 and Gnome. У цих прикладах, які я йду Fedora 9 і Gnome.
Warning: You probably only want to do this if you have a decent data plan. Увага: Ви, мабуть, тільки хочу, щоб це зробити, якщо у вас є гідні передачі даних. Using 3G data can result in a very large bill! Використання даних 3G може привести до дуже великий рахунок!
- The first thing you need to do is make sure your N95 is paired with your laptop. Перше, що вам потрібно зробити, це переконатися, що N95 є в парі з ноутбуком. This is far easier than I expected. Це набагато простіше, ніж я очікував. As long as you have the gnome-bluetooth package installed, it's as simple as initiating the pairing from your phone and entering the same passkey on both the phone and the computer when prompted. До тих пір, поки у вас є GNOME Bluetooth-пакет встановлений, то він такий же простий, як ініціювання пару телефону та введення ключа доступу само як на телефон і комп'ютер, при появі запиту. You also need to have the ppp package and the wvdial package installed. Вам також необхідно мати пакет ППС і WvDial пакет. If you don't, you can simply run, as root in a terminal window, yum install ppp wvdial (or use whatever package manager comes w/ your Linux distro). Якщо ви цього не зробите, ви можете просто запустити, а коріння у вікні терміналу, Yum WvDial установці PPP (або використовувати будь-який менеджер пакетів приходить W / ваш дистрибутив Linux).
- Now that both devices are paired, open a terminal window and run hcitool scan to discover your phones Bluetooth MAC address. Тепер, коли хлопці обох пристроїв, відкрийте вікно терміналу і запустіть сканування hcitool відкрити свою телефонів Bluetooth MAC адреси. This section applies to both the command line and GUI parts of this tutorial. Цей розділ відноситься як до командного рядку і графічного інтерфейсу частина цього підручника.
[user@radon ~]$ hcitool scan [користувач @ радону ~] $ hcitool сканування
Scanning … Сканування ...
00:22:66:9F:83:37 N95 00:22:66:9 F: 83:37 N95 - Next we use sdptool to find out the channel for the Dial-Up Networking service. Наступний ми використовуємо sdptool з'ясувати канал для Dial-Up Networking Service.
[user@radon ~]$ sdptool browse 00:22:66:9F:83:37 [користувач @ радону ~] $ sdptool переглядати 00:22:66:9 F: 83:37
Browsing 00:22:66:9F:83:37 … Перегляд 00:22:66:9 F: 83:37 ...
Service Name: Dial-Up Networking Ім'я служби: Віддалений доступ до мережі
Service RecHandle: 0×1004a Служба RecHandle: 0 × 1004A
Service Class ID List: Service Class ID List:
“Dialup Networking” (0×1103) "Віддалений доступ до мережі" (0 × 1103)
Protocol Descriptor List: Протокол Descriptor List:
“L2CAP” (0×0100) "L2CAP" (0 × 0100)
“RFCOMM” (0×0003) "RFCOMM" (0 × 0003)
Channel: 2 Джерело: 2
Language Base Attr List: Мова бази Attr List:
code_ISO639: 0×454e code_ISO639: 0 × 454e
encoding: 0×6a Кодування: 0 × 6a
base_offset: 0×100 base_offset: 0 × 100
Profile Descriptor List: Профіль Список Descriptor:
“Dialup Networking” (0×1103) "Віддалений доступ до мережі" (0 × 1103)
Version: 0×0100 Версія: 0 × 0100 - There will probably be a few screens of output. Там, ймовірно, буде кілька екранів продукції. I have only included the relevant part in the above example. У мене тільки включити відповідну частину в наведеному вище прикладі. Note that the Dial-Up Networking service is on channel 2 . Зверніть увагу, що Dial-Up Networking Service знаходиться на каналі 2.
- Using your favorite text editor, as root, edit /etc/bluetooth/rfcomm.conf and make it look like the following, substituting your phones MAC address and channel number. Використовуючи ваш улюблений редактор тексту, як корінь, відредагувати файл / ETC / Bluetooth / rfcomm.conf і роблять його схожим на наступний, замінюючи ваших телефонів MAC-адресу і номер каналу.
- Save your rfcomm.conf and exit your text editor. Збережіть ваші rfcomm.conf і вийдете з текстового редактора.
- As root, restart the bluetooth service: Як корінь, Bluetooth перезапустити сервіс:
[root@radon ~]# service Bluetooth restart [Root @ радону ~] # перезапустити службу Bluetooth
Stopping Bluetooth services: [ OK ] Зупинка Bluetooth послуги: [OK]
Starting Bluetooth services: [ OK ] Починаючи Bluetooth послуги: [OK] - We have now created a Bluetooth serial port at /dev/rfcomm0 that will be persistent through reboots. Ми вже створили Bluetooth Serial Port в / dev/rfcomm0 який буде стійким шляхом перезавантаження. This is the port you will use as a “modem” during the rest of the configuration. Це порт, який ви будете використовувати в якості "модем" протягом решти конфігурації.
# #
# RFCOMM configuration file. # RFCOMM конфігураційного файлу.
# #rfcomm0 { rfcomm0 (
bind yes; зв'язати да;
device 00:22:66:9F:83:37; Пристрій 00:22:66:9 F: 83:37;
channel 2; 2 каналу;
} )
Now we move on to the quick and dirty command line setup. Тепер ми переходимо до швидкої встановлювати або брудні командного рядка. Feel free to skip to the GUI setup below if you aren't very comfortable with the command line. Чи не соромтеся, щоб перейти до налаштування GUI нижче, якщо ви не дуже зручно з командним рядком.
Command Line Method Командний рядок метод
GUI Method GUI методу
Command Line Method Командний рядок метод
- Edit /etc/wvdial.conf and make it look like this: Змінити / ETC / wvdial.conf і щоб він виглядав так:
- I'm using Rogers Wireless in Canada and the above is the minimum configuration that works for me. Я використовую Rogers Wireless в Канаді і вище мінімальної конфігурацією, яка працює для мене. Literally Username = user and Password = pass. Буквально = Ім'я користувача і пароль = пас. You may need to make changes to the Username, Password, and Phone lines. Ви, можливо, буде потрібно внести зміни Ім'я користувача, пароль і телефонні лінії. Contact your wireless provider for the correct details. Зверніться до постачальника послуг мобільного зв'язку правильні деталі.
- I also had to create a script called /etc/ppp/ip-up.local to make the automatic DNS configuration work. Мені також довелося створити скрипт називається / ETC / ППС / IP-up.local зробити автоматичну настройку DNS роботу. Here's my ip-up.local: Ось мій IP-up.local:
- Unfortunately I have not been able to connect as a normal user in this configuration so you'll have to connect as root. На жаль, я не змогла підключити як звичайний користувач у цій конфігурації, тому вам доведеться підключити як корінь.
[root@radon ~]# wvdial Bluetooth [Root @ радону ~] # WvDial Bluetooth
–> WvDial: Internet dialer version 1.60 -> WvDial: Internet Dialer версії 1.60
–> Cannot get information for serial port. -> Не вдається отримати інформацію для послідовного порту.
–> Initializing modem. -> Ініціалізації модему.
–> Sending: ATZ -> Sending: ATZ
ATZ АТЗ
OK OK–> Sending: ATM0 -> Sending: ATM0
ATM0 ATM0
OK OK
–> Modem initialized. -> Модем ініціалізується.
–> Sending: ATDT*99***1# -> Sending: ATDT * 99 *** 1 #
–> Waiting for carrier. -> В очікуванні перевізника.
ATDT*99***1# ATDT * 99 *** 1 #
CONNECT CONNECT
~[7f]}#@!}!} } }2}#}$@#}!}$}%\}”}&} }*} } g}%~ ~ [7f ]}#@!}!})) 2 }#}$@#}!}$}% \ }"}&} *))))% G ~
–> Carrier detected. -> Carrier виявлено. Starting PPP immediately. Запуск PPP негайно.
–> Starting pppd at Sun Oct 19 16:48:56 2008 -> Починаючи PPPD в Нед жовтня 19 16:48:56 2008
–> Pid of pppd: 8028 -> Pid з PPPD: 8028
–> Using interface ppp0 -> Використання інтерфейсу ppp0
–> local IP address 172.28.53.106 -> Local IP адреса 172.28.53.106
–> remote IP address 10.6.6.6 -> Віддалений IP-адреса 10.6.6.6
–> primary DNS address 207.181.101.4 -> Первинний DNS адреса 207.181.101.4
–> secondary DNS address 207.181.101.5 -> Вторинний DNS адреса 207.181.101.5 - I removed the lines containing unprintable characters, but otherwise you should see something very similar to above. Я видалив рядки, що містять недрукованих символів, але в іншому випадку ви повинні побачити щось дуже схоже на вище. Note that wvdial stays in the foreground. Зверніть увагу, що WvDial залишається на передньому плані. This is so you can disconnect by simply pressing Ctrl-C. Це пояснюється тим, ви можете відключити, просто натиснувши Ctrl-C.
- You can verify that you are online by switching to a new terminal window and running ifconfig. Ви можете переконатися, що Ви в мережі шляхом переходу на нове вікно терміналу і запуск Ifconfig.
[root@radon ~]# ifconfig [Root @ радону ~] # Ifconfig
lo Link encap:Local Loopback Lo ENCAP URL: Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 INET Поштова адреса: 127.0.0.1 Mask: 255.0.0.0
inet6 addr: ::1/128 Scope:Host inet6 Поштова адреса::: 1 / 128 Scope: Host
UP LOOPBACK RUNNING MTU:16436 Metric:1 UP LOOPBACK RUNNING MTU: 16436 Metric: 1
RX packets:12767 errors:0 dropped:0 overruns:0 frame:0 RX Packets: 12767 помилок: 0 Dropped: 0 перевитрата: 0 Frame: 0
TX packets:12767 errors:0 dropped:0 overruns:0 carrier:0 TX Packets: 12767 помилок: 0 Dropped: 0 перевитрата: 0 перевізника: 0
collisions:0 txqueuelen:0 колізії: 0 txqueuelen: 0
RX bytes:714652 (697.9 KiB) TX bytes:714652 (697.9 KiB) RX байти: 714652 (697,9 КБ) TX байти: 714652 (697,9 КБ)ppp0 Link encap:Point-to-Point Protocol ppp0 Link ENCAP: точка-точка протоколу
inet addr:172.28.53.106 PtP:10.6.6.6 Mask:255.255.255.255 INET Поштова адреса: 172.28.53.106 PtP: 10.6.6.6 Mask: 255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 POINTOPOINT UP NOARP RUNNING MULTICAST MTU: 1500 Metric: 1
RX packets:4 errors:0 dropped:0 overruns:0 frame:0 RX Packets: 4 помилки: 0 Dropped: 0 перевитрата: 0 Frame: 0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 TX Packets: 5 помилок: 0 Dropped: 0 перевитрата: 0 перевізника: 0
collisions:0 txqueuelen:3 колізії: 0 txqueuelen: 3
RX bytes:64 (64.0 b) TX bytes:94 (94.0 b) RX байти: 64 (64.0 B) TX байти: 94 (94,0 б)[root@radon ~]# ping simplehelp.net [Root @ радону ~] # Ping simplehelp.net
PING simplehelp.net (74.52.95.42) 56(84) bytes of data. PING simplehelp.net (74.52.95.42) 56 (84) байт даних.
64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=1 ttl=46 time=110 ms 64 байт з 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq = 1 TTL = 46 время = 110 мс
64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=2 ttl=46 time=102 ms 64 байт з 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq = 2 TTL = 46 время = 102 мс
64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=3 ttl=46 time=164 ms 64 байт з 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq = 3 TTL = 46 время = 164 мс
64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=4 ttl=46 time=130 ms 64 байт з 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq = 4 TTL = 46 время = 130 мс
64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=5 ttl=46 time=149 ms 64 байт з 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq = 5 TTL = 46 время = 149 мс
^C ^ C
— simplehelp.net ping statistics — - Simplehelp.net Статистика Ping --
5 packets transmitted, 5 received, 0% packet loss, time 4513ms 5 пакетів, що передаються, отримав 5, 0% втрат пакетів, час 4513ms
rtt min/avg/max/mdev = 102.061/131.349/164.376/23.190 ms КН хв / середн / макс / mdev = 102.061/131.349/164.376/23.190 мс - Once you are finished online, don't forget to switch back to the terminal where you ran wvdial and press Ctrl-C. Як тільки Ви закінчили онлайн, не забудьте переключити назад на термінал, де ви побігли WvDial та натисніть Ctrl-C.
^CCaught signal 2: Attempting to exit gracefully… ^ CCaught сигналу 2: Спроба виходу витончено ...
–> Terminating on signal 15 -> Переривання по сигналу 15
–> Connect time 5.8 minutes. -> Connect Time 5,8 хвилини.
–> Disconnecting at Sun Oct 19 16:54:48 2008 -> Відключення в Нед жовтня 19 16:54:48 2008
Modem = /dev/rfcomm0 Modem = / dev/rfcomm0
Baud = 460800 Baud = 460800
SetVolume = 0 SetVolume = 0
Dial Command = ATDT Dial Command = ATDT
Init1 = ATZ Init1 = ATZ
Init3 = ATM0 Init3 = ATM0
FlowControl = CRTSCTS FlowControl = CRTSCTS[Dialer Bluetooth] [Dialer Bluetooth]
Username = user Ім'я користувача = користувач
Password = pass Пароль = пас
Phone = *99***1# Phone = * 99 *** 1 #
Stupid Mode = 1 Stupid Mode = 1
Init1 = ATZ Init1 = ATZ
Inherits = Modem0 Inherits = Modem0
#!/bin/bash #! / BIN / Bash
# #PATH=/sbin:/usr/sbin:/bin:/usr/bin PATH = / sbin: / USR / sbin: / ОГРН: / USR / Bin
export PATH Експорт PATH
echo “# created by pppd” > /etc/resolv.conf Ехо "# створені PPPD"> / ETC / resolv.conf
echo “nameserver ${DNS1}” >> /etc/resolv.conf Ехо "імен DNS1 $ ()">> / ETC / resolv.conf
echo “nameserver ${DNS2}” >> /etc/resolv.conf Ехо "імен $ () DNS2">> / ETC / resolv.conf
chmod go+r /etc/resolv.conf CHMOD ГО + R / ETC / resolv.conf
Don't forget to chmod 755 /etc/ppp/ip-up.local Не забудьте CHMOD 755 / ETC / ППС / IP-up.local
Now, if all that command line stuff scares you, here's how to make it work using Gnome's GUI: Тепер, якщо всі ці матеріали командного рядка лякає тебе, от як зробити її роботу, використовуючи графічний інтерфейс Gnome's:
- Click System -> Administration -> Network Клацніть "Система -> Адміністрування -> Мережа
- You will be asked to enter your root password. Вам буде запропоновано ввести пароль адміністратора. Enter it and click OK . Введіть її та натисніть кнопку ОК.
- Now you can see a list of installed network devices. Тепер ви можете отримати доступ до встановлених мережевих пристроїв. Click on the Hardware tab. Перейдіть на вкладку Обладнання.
- Now click the New button, select Modem , and click OK . Тепер натисніть кнопку Створити, виберіть модем, і натисніть кнопку ОК.
- Change the Modem Device to /dev/rfcomm0. Змінити модемне пристрій в / dev/rfcomm0. If /dev/rfcomm0 is not available in the list, just type it in. Click OK . Якщо / dev/rfcomm0 немає у списку, введіть його дюйма Натисніть кнопку ОК.
- Now click the Devices tab. Тепер перейдіть на вкладку Пристрої.
- Click the New button, select Modem connection, and click Forward . Натисніть кнопку Створити, виберіть зв'язку модем, і натисніть кнопку Вперед.
- All I needed to do to make my Rogers Wireless connection work was enter *99***1# as the Phone Number, user as the Login Name, and pass as the Password. Усе мені потрібно зробити, щоб мої зв'язки Rogers Wireless робота наберіть * 99 *** 1 # в якості номера телефону, користувач як ім'я Увійти, щоб передати в якості пароля. I also chose to name this connection Bluetooth. Я також вибрав для назви цієї зв'язку Bluetooth. Click Forward . Натисніть кнопку Вперед.
- I left these options at their defaults. Я залишив ці параметри за замовчуванням,. Click Forward . Натисніть кнопку Вперед.
- We've finished creating the connection. Ми закінчили створення з'єднання. Click Apply . Натисніть кнопку "Застосувати".
- Click the X in the top right corner to close this window. Натисніть кнопку "Х" у верхньому правому куті, щоб закрити це вікно.
- Click Yes to save the changes. Натисніть Так, щоб зберегти зміни.
- Click OK . Натисніть кнопку ОК. No, we won't need to restart the computer. Ні, нам не буде потрібно перезавантажити комп'ютер.
- So, let's use our newly created connection. Отже, давайте використовувати нашу новостворене підключення. Click System -> Administration -> Network Device Control . Клацніть "Система -> Адміністрування -> Мережні пристрої управління.
- Select the Bluetooth connection you just created and click Activate . Виберіть підключення Bluetooth ви тільки що створили і натисніть Активувати.
- Notice how the Bluetooth connection has changed from Inactive to Active . Зверніть увагу, що з'єднання Bluetooth змінилася з неактивних активним.
- Open Firefox and visit http://www.simplehelp.net. Відкрийте Firefox і перейдіть http://www.simplehelp.net.
- When you are finished online, go back to the Network Device Control window, select the Active Bluetooth connection and click Deactivate . Коли ви закінчите онлайн, повернутися до вікна Network Device Control, вибрати активне з'єднання Bluetooth і натисніть Вимкнути.
- Verify that the Bluetooth connection is indeed Inactive, then close the Network Device Control window. Переконайтеся, що з'єднання Bluetooth дійсно Неактивні, потім закрийте пристрій управління мережею вікно.
- Some of you may be wondering why I chose not to use Network Manager. Деякі з вас можуть здивуватися, чому я вирішив не використовувати Network Manager. It's quite simply due to the fact that mobile broadband support in Network Manager is in it's infancy and I found it to be virtually unusable. Це досить просто пояснюється тим, що мобільні широкополосні підтримки в Network Manager в його дитинстві, і я знайшов його практично непридатним для використання. Once Network Manager's mobile broadband support becomes better, I'll rewrite this tutorial based on it. Як тільки мобільні широкосмугові мережі підтримки менеджера стає краще, я перепишу цього керівництва на його основі.














































0 Responses 0 Відповіді
Stay in touch with the conversation, subscribe to the Залишайтеся на зв'язку при розмові, підпишіться на RSS feed for comments on this post RSS-канал для коментарів на цю посаду . .