How to tether your Nokia N95s Internet connection to your laptop via Bluetooth in Linux Kā piesiet Nokia N95s interneta savienojumu ar jūsu portatīvo datoru, izmantojot Bluetooth Linux

by Ken Murray on October 27, 2008 by Ken Murray 2008 October 27,

LinuxSymbian

Sometimes you end up somewhere with your laptop where you just can't find any open WiFi. Dažreiz jūs galu galā kaut kur ar savu portatīvo datoru, ja jūs vienkārši nevarat atrast visas atvērtās WiFi. Luckily you have a Nokia N95 and a Bluetooth adapter. Par laimi, jums ir Nokia N95 un Bluetooth adapteris. 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. Es esmu, kas parādīs, kā piesiet savu N95 uz savu portatīvo datoru, izmantojot Bluetooth ātri un netīro komandrindas veidā, kā arī prettier GUI veidā. In these examples I am running Fedora 9 and Gnome. Šajos piemēros es esmu darbojas Fedora 9 un Gnome.

Warning: You probably only want to do this if you have a decent data plan. Brīdinājums: Tu droši vien tikai vēlas to darīt, ja jums ir pienācīga datu plānu. Using 3G data can result in a very large bill! Izmantojot 3G dati var radīt ļoti lielu rēķinu!

  1. The first thing you need to do is make sure your N95 is paired with your laptop. Pirmais, kas jums jādara, ir pārliecināties, vai jūsu N95 ir savienota pàrï ar jūsu portatīvo datoru. This is far easier than I expected. Tas ir daudz vieglāk, nekā es gaidīju. 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. Kamēr vien jums ir gnome-bluetooth paketes uzstādīta, tas ir tik vienkārši, kā uzsākt pāri no tālruņa un ieejot tajā pašā mūķīzeris gan tālruni un datoru, kad tas tiek pieprasīts. You also need to have the ppp package and the wvdial package installed. Jūs arī jābūt PPP paketi un wvdial paketi uzstādīta. 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). Ja jums nav, jūs varat vienkārši palaist, kā root ar termināļa logā, yum install ppp wvdial (vai izmantot jebkādas paketes vadītājs nāk w / Jūsu Linux distro).
  2. Now that both devices are paired, open a terminal window and run hcitool scan to discover your phones Bluetooth MAC address. Tagad, kad abas ierīces pàrï, atvērt termināla logu un palaist hcitool skenēšanu, lai atklātu savu telefonu Bluetooth MAC adresi. This section applies to both the command line and GUI parts of this tutorial. Šī iedaļa attiecas gan komandrindas un GUI daļu šo pamācību.

    [user@radon ~]$ hcitool scan [User @ radons ~] $ hcitool scan
    Scanning … Skenēšana ...
    00:22:66:9F:83:37 N95 00:22:66:9 F: 83:37 N95

  3. Next we use sdptool to find out the channel for the Dial-Up Networking service. Nākamā mēs izmantojam sdptool uzzināt kanālu Dial-Up Networking pakalpojumu.

    [user@radon ~]$ sdptool browse 00:22:66:9F:83:37 [User @ radons ~] $ sdptool pārlūkot 00:22:66:9 F: 83:37
    Browsing 00:22:66:9F:83:37 … Pārlūkošana 00:22:66:9 F: 83:37 ...
    Service Name: Dial-Up Networking Service Name: Dial-Up Networking
    Service RecHandle: 0×1004a Pakalpojumu RecHandle: 0 x 1004a
    Service Class ID List: Service Class ID saraksts
    “Dialup Networking” (0×1103) "Iezvanpieejas tīkla izveide" (0 × 1103)
    Protocol Descriptor List: Protokols deskriptors List:
    “L2CAP” (0×0100) "L2CAP" (0 × 0100)
    “RFCOMM” (0×0003) "Rfcomm" (0 × 0003)
    Channel: 2 Kanāls: 2
    Language Base Attr List: Valoda Base Attr saraksts
    code_ISO639: 0×454e code_ISO639: 0 x 454e
    encoding: 0×6a Encoding: 0 × 6a
    base_offset: 0×100 base_offset: 0 × 100
    Profile Descriptor List: Profils deskriptors List:
    “Dialup Networking” (0×1103) "Iezvanpieejas tīkla izveide" (0 × 1103)
    Version: 0×0100 Version: 0 x 0.100

  4. There will probably be a few screens of output. Iespējams, ka būs daži ekrāniem produkciju. I have only included the relevant part in the above example. Man ir tikai iekļauta attiecīgā daļa, kas iepriekšējā piemērā. Note that the Dial-Up Networking service is on channel 2 . Ņemiet vērā, ka Dial-Up Networking pakalpojums ir par 2 kanālu.
  5. 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. Izmantojot jūsu iecienītākajā teksta redaktorā, kā root, rediģēt / etc / bluetooth / rfcomm.conf un dara to izskatās šādi, aizstājot savu telefonu MAC adresi un kanāla numurs.
  6. # #
    # RFCOMM configuration file. # Rfcomm konfigurācijas failu.
    # #

    rfcomm0 { rfcomm0 (
    bind yes; saistošs jā;
    device 00:22:66:9F:83:37; ierīce 00:22:66:9 F: 83:37;
    channel 2; channel 2;
    } )

  7. Save your rfcomm.conf and exit your text editor. Saglabājiet rfcomm.conf un izejas teksta redaktoru.
  8. As root, restart the bluetooth service: Kā saknes, restartējiet bluetooth pakalpojumu:

    [root@radon ~]# service Bluetooth restart [root @ radons ~] # pakalpojumu Bluetooth restart
    Stopping Bluetooth services: [ OK ] Apstāšanās Bluetooth pakalpojumi: [OK]
    Starting Bluetooth services: [ OK ] Starting Bluetooth pakalpojumi: [OK]

  9. We have now created a Bluetooth serial port at /dev/rfcomm0 that will be persistent through reboots. Mums tagad ir izveidots Bluetooth serial port at / dev/rfcomm0, kas būs noturīga caur reboots. This is the port you will use as a “modem” during the rest of the configuration. Tas ir portu tu izmanto kā "modems" laika posmā no pārējā konfigurācija.

Now we move on to the quick and dirty command line setup. Tagad mēs pāriet uz ātru un netīro komandrindas setup. Feel free to skip to the GUI setup below if you aren't very comfortable with the command line. Jūtieties brīvi izlaist līdz GUI setup tālāk, ja Jums nav ļoti apmierināti ar komandrindu.

Command Line Method Command Line metode
GUI Method GUI metode


Command Line Method Command Line metode

  1. Edit /etc/wvdial.conf and make it look like this: Rediģēt / etc / wvdial.conf un lai tas izskatās šādi:
  2. Modem = /dev/rfcomm0 Modem = / dev/rfcomm0
    Baud = 460800 Baud = 460.800
    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 Username = lietotājs
    Password = pass Password = pass
    Phone = *99***1# Phone = * 99 *** 1 #
    Stupid Mode = 1 Stupid Mode = 1
    Init1 = ATZ Init1 = ATZ
    Inherits = Modem0 Manto = Modem0

  3. I'm using Rogers Wireless in Canada and the above is the minimum configuration that works for me. Es, izmantojot Rogers Wireless Kanādā un iepriekš minimālā konfigurācija, kas darbojas par mani. Literally Username = user and Password = pass. Burtiski Lietotājvārds = lietotājs un parole = pass. You may need to make changes to the Username, Password, and Phone lines. Jums var būt nepieciešams veikt izmaiņas lietotājvārdu, paroli un telefona līnijas. Contact your wireless provider for the correct details. Sazinieties ar savu bezvadu sniedz pareizu informāciju.
  4. I also had to create a script called /etc/ppp/ip-up.local to make the automatic DNS configuration work. Man bija arī izveidot skripta nosaukumu / etc / ppp / ip-up.local veikt automātisko DNS konfigurācija darbu. Here's my ip-up.local: Here's my ip-up.local:
  5. #!/bin/bash #! / bin / bash
    # #

    PATH=/sbin:/usr/sbin:/bin:/usr/bin PATH = / sbin: / usr / sbin: / bin: / usr / bin
    export PATH Eksporta PATH
    echo “# created by pppd” > /etc/resolv.conf echo "# izveidots ar AALD"> / etc / resolv.conf
    echo “nameserver ${DNS1}” >> /etc/resolv.conf echo "nameserver $ (DNS1)">> / etc / resolv.conf
    echo “nameserver ${DNS2}” >> /etc/resolv.conf echo "nameserver $ (DNS2)">> / etc / resolv.conf
    chmod go+r /etc/resolv.conf chmod go + R / etc / resolv.conf

    Don't forget to chmod 755 /etc/ppp/ip-up.local Neaizmirstiet chmod 755 / etc / ppp / ip-up.local

  6. Unfortunately I have not been able to connect as a normal user in this configuration so you'll have to connect as root. Diemžēl man nav izdevies savienot kā normālu lietotājam šo konfigurāciju, lai jums ir savienojums, kā root.

    [root@radon ~]# wvdial Bluetooth [root @ radons ~] # wvdial Bluetooth
    –> WvDial: Internet dialer version 1.60 -> WvDial: Internet Dialer version 1,60
    –> Cannot get information for serial port. -> Nevar iegūt informāciju par seriālo portu.
    –> Initializing modem. -> Inicializē modemu.
    –> Sending: ATZ -> Sending: ATZ
    ATZ ATZ
    OK OK

    –> Sending: ATM0 -> Sending: ATM0
    ATM0 ATM0
    OK OK
    –> Modem initialized. -> Modem inicializēts.
    –> Sending: ATDT*99***1# -> Sending: ATDT * 99 *** 1 #
    –> Waiting for carrier. -> Gaida pārvadātāju.
    ATDT*99***1# ATDT * 99 *** 1 #
    CONNECT CONNECT
    ~[7f]}#@!}!} } }2}#}$@#}!}$}%\}”}&} }*} } g}%~ ~ [7f ]}#@!}!})) 2 }#}$@#}!}$}% \ }"}&}) *)) g)% ~
    –> Carrier detected. -> Carrier konstatēta. Starting PPP immediately. Starting PPP nekavējoties.
    –> Starting pppd at Sun Oct 19 16:48:56 2008 -> Starting pppd at Sun 19 oktobris 16:48:56 2.008
    –> Pid of pppd: 8028 -> PID of AALD: 8.028
    –> Using interface ppp0 -> Izmantojot interfeisa ppp0
    –> local IP address 172.28.53.106 -> Vietējās IP adrese 172.28.53.106
    –> remote IP address 10.6.6.6 -> Attālai uz IP adresi 10.6.6.6
    –> primary DNS address 207.181.101.4 -> Primāro DNS adresi 207.181.101.4
    –> secondary DNS address 207.181.101.5 -> Sekundāro DNS adresi 207.181.101.5

  7. I removed the lines containing unprintable characters, but otherwise you should see something very similar to above. Es noņemt līnijām, kurās unprintable rakstzīmes, bet pretējā gadījumā jums vajadzētu redzēt kaut kas ļoti līdzīgs iepriekš. Note that wvdial stays in the foreground. Ņemiet vērā, ka wvdial paliek priekšplānā. This is so you can disconnect by simply pressing Ctrl-C. Tas ir tāpēc, jūs var atvienot, vienkārši nospiežot Ctrl-C.
  8. You can verify that you are online by switching to a new terminal window and running ifconfig. Jūs varat pārliecināties, ka esat tiešsaistē, pārejot uz jauno termināla logu un darbojas ifconfig.

    [root@radon ~]# ifconfig [root @ radons ~] # ifconfig
    lo Link encap:Local Loopback lo Link encap: Local LOOPBACK
    inet addr:127.0.0.1 Mask:255.0.0.0 inet addr: 127.0.0.1 Mask: 255.0.0.0
    inet6 addr: ::1/128 Scope:Host inet6 addr::: 1 / 128 Scope: Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1 UP LOOPBACK DARBĪBAS MTU: 16.436 Metric: 1
    RX packets:12767 errors:0 dropped:0 overruns:0 frame:0 RX packets: 12.767 errors: 0 dropped: 0 overruns: 0 frame: 0
    TX packets:12767 errors:0 dropped:0 overruns:0 carrier:0 TX packets: 12.767 errors: 0 dropped: 0 overruns: 0 carrier: 0
    collisions:0 txqueuelen:0 collisions: 0 txqueuelen: 0
    RX bytes:714652 (697.9 KiB) TX bytes:714652 (697.9 KiB) RX bytes: 714.652 (697,9 KiB) TX bytes: 714.652 (697,9 KiB)

    ppp0 Link encap:Point-to-Point Protocol ppp0 Link encap: Point-to-Point protokols
    inet addr:172.28.53.106 PtP:10.6.6.6 Mask:255.255.255.255 inet addr: 172.28.53.106 PTP: 10.6.6.6 Mask: 255.255.255.255
    UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1 UP POINTOPOINT DARBĪBAS NOARP multicast MTU: 1500 Metric: 1
    RX packets:4 errors:0 dropped:0 overruns:0 frame:0 RX packets: 4 errors: 0 dropped: 0 overruns: 0 frame: 0
    TX packets:5 errors:0 dropped:0 overruns:0 carrier:0 TX packets: 5 errors: 0 dropped: 0 overruns: 0 carrier: 0
    collisions:0 txqueuelen:3 collisions: 0 txqueuelen: 3
    RX bytes:64 (64.0 b) TX bytes:94 (94.0 b) RX bytes: 64 (64,0 b) TX bytes: 94 (94,0 b)

    [root@radon ~]# ping simplehelp.net [root @ radons ~] # ping simplehelp.net
    PING simplehelp.net (74.52.95.42) 56(84) bytes of data. Ping simplehelp.net (74.52.95.42) 56 (84) bytes of data.
    64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=1 ttl=46 time=110 ms 64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq = 1 ttl = 46 time = 110 ms
    64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=2 ttl=46 time=102 ms 64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq = 2 ttl = 46 time = 102 ms
    64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=3 ttl=46 time=164 ms 64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq = 3 ttl = 46 time = 164 ms
    64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=4 ttl=46 time=130 ms 64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq = 4 ttl = 46 time = 130 ms
    64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq=5 ttl=46 time=149 ms 64 bytes from 2a.5f.344a.static.theplanet.com (74.52.95.42): icmp_seq = 5 ttl = 46 time = 149 ms
    ^C ^ C
    — simplehelp.net ping statistics — - Simplehelp.net ping statistics --
    5 packets transmitted, 5 received, 0% packet loss, time 4513ms 5 packets transmitted, 5 saņemto 0% pakešu zudumu, laika 4513ms
    rtt min/avg/max/mdev = 102.061/131.349/164.376/23.190 ms RTT min / avg / max / mdev = 102.061/131.349/164.376/23.190 ms

  9. Once you are finished online, don't forget to switch back to the terminal where you ran wvdial and press Ctrl-C. Kad esat beidzis online, neaizmirstiet pārslēgties atpakaļ uz terminālu, kur darbojās wvdial un nospiediet Ctrl-C.

    ^CCaught signal 2: Attempting to exit gracefully… ^ CCaught signāls 2: Attempting lai izietu graciozi ...
    –> Terminating on signal 15 -> Beidzas 15 signāls
    –> Connect time 5.8 minutes. -> Connect laiks 5,8 minūtes.
    –> Disconnecting at Sun Oct 19 16:54:48 2008 -> Atvieno pie Sun 19 oktobris 16:54:48 2.008


GUI Method GUI metode

Now, if all that command line stuff scares you, here's how to make it work using Gnome's GUI: Tagad, ja visu šo komandrindu stuff aizsardzības apdraudējumu tu, lūk, kā, lai tā darbotos, izmantojot Gnome ir GUI:

  1. Click System -> Administration -> Network Noklikšķiniet uz System -> Administration -> Tīkla
  2. You will be asked to enter your root password. Jums tiks prasīts ievadīt savu root paroli. Enter it and click OK . Ievadiet to un nospiediet Labi.
  3. Now you can see a list of installed network devices. Tagad jūs varat apskatīt sarakstu uzstādītās tīkla ierīces. Click on the Hardware tab. Noklikšķiniet uz Hardware tab.

  4. click to enlarge Uzklikšķiniet, lai palielinātu

  5. Now click the New button, select Modem , and click OK . Tagad noklikšķiniet pogai Jauns, izvēlieties Modem, un noklikšķiniet uz Labi.
  6. Change the Modem Device to /dev/rfcomm0. Maina Modem Device uz / dev/rfcomm0. If /dev/rfcomm0 is not available in the list, just type it in. Click OK . Ja / dev/rfcomm0 nav pieejama sarakstā, vienkārši ierakstiet to in Noklikšķiniet uz Labi.
  7. Now click the Devices tab. Tagad noklikšķiniet Devices tab.

  8. click to enlarge Uzklikšķiniet, lai palielinātu


    click to enlarge Uzklikšķiniet, lai palielinātu

  9. Click the New button, select Modem connection, and click Forward . Noklikšķiniet uz New pogas, izvēlieties Modema savienojums, un noklikšķiniet uz Pārsūtīt.

  10. click to enlarge Uzklikšķiniet, lai palielinātu

  11. 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. Visi man vajadzēja darīt, lai mans Rogers bezvadu savienojums darbs ievadiet * 99 *** 1 # kā tālruņa numuru, lietotāja ieejas vārds, un nodot kā paroli. I also chose to name this connection Bluetooth. Es izvēlējos vārdu šajā sakarā Bluetooth. Click Forward . Noklikšķiniet uz Pārsūtīt.

  12. click to enlarge Uzklikšķiniet, lai palielinātu

  13. I left these options at their defaults. Es atstāju šos pie to saistību nepildīšanas iespējas. Click Forward . Noklikšķiniet uz Pārsūtīt.

  14. click to enlarge Uzklikšķiniet, lai palielinātu

  15. We've finished creating the connection. Mēs esam pabeigts izveidot savienojumu. Click Apply . Noklikšķiniet uz Lietot.

  16. click to enlarge Uzklikšķiniet, lai palielinātu

  17. Click the X in the top right corner to close this window. Noklikšķiniet X augšējā labajā stūrī, lai aizvērtu šo logu.

  18. click to enlarge Uzklikšķiniet, lai palielinātu

  19. Click Yes to save the changes. Noklikšķiniet uz Jā, lai saglabātu izmaiņas.
  20. Click OK . Noklikšķiniet uz Labi. No, we won't need to restart the computer. Nē, mums nebūs nepieciešams restartēt datoru.

  21. click to enlarge Uzklikšķiniet, lai palielinātu

  22. So, let's use our newly created connection. So, let's izmantot mūsu jaunizveidoto savienojumu. Click System -> Administration -> Network Device Control . Noklikšķiniet uz System -> Administration -> Network Device Control.
  23. Select the Bluetooth connection you just created and click Activate . Izvēlieties Bluetooth savienojums tikko izveidota un noklikšķiniet uz Aktivizēt.

  24. click to enlarge Uzklikšķiniet, lai palielinātu

  25. Notice how the Bluetooth connection has changed from Inactive to Active . Pievērsiet uzmanību Bluetooth savienojums ir mainīta no Neaktīvs aktīvajā.

  26. click to enlarge Uzklikšķiniet, lai palielinātu

  27. Open Firefox and visit http://www.simplehelp.net. Atvērts Firefox un apmeklēt http://www.simplehelp.net.

  28. click to enlarge Uzklikšķiniet, lai palielinātu

  29. When you are finished online, go back to the Network Device Control window, select the Active Bluetooth connection and click Deactivate . Kad esat pabeidzis online, atgriezieties Network Device Control logs, izvēlieties Aktīvā Bluetooth savienojumu un noklikšķiniet uz Deaktivizēt.

  30. click to enlarge Uzklikšķiniet, lai palielinātu

  31. Verify that the Bluetooth connection is indeed Inactive, then close the Network Device Control window. Pārbauda, Bluetooth savienojums ir patiešām neaktīvs, tad aizveriet Network Device Control logu.

  32. click to enlarge Uzklikšķiniet, lai palielinātu

  33. Some of you may be wondering why I chose not to use Network Manager. Daži no jums var būt jautājums, kāpēc es izvēlējos neizmantot 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. Tas ir gluži vienkārši tāpēc, ka mobilais platjoslas atbalsts Network Manager ir tas sākuma stadijā, un es atklāju, ka tā ir praktiski nelietojama. Once Network Manager's mobile broadband support becomes better, I'll rewrite this tutorial based on it. Kad Network Manager mobilo platjoslas atbalsts kļūst labāk, es ņemšu pārrakstīt šo pamācību, pamatojoties uz to.
Related Posts: Related Posts:
  • How to share the GPS in your N95 with your laptop via Bluetooth in Linux Kā dalīties savā N95 GPS ar savu portatīvo datoru, izmantojot Bluetooth Linux
  • How to tether your Nokia N95s Internet connection to your laptop via USB in Linux Kā piesiet Nokia N95s interneta savienojumu ar jūsu portatīvo datoru, izmantojot USB Linux
  • How to turn your N95 into a wireless access point Kā pārvērst jūsu N95 vērā bezvadu piekļuves punkts
  • How to install additional fonts for PuTTY on the N95 Kā instalēt papildu fontus tepe uz N95
  • How to install and use PuTTY on your Nokia N95 Kā instalēt un izmantot tepe savā Nokia N95
  • Get Simple Help tutorials just like this one in your email inbox every day - for free! Get Simple Palīdzība konsultācijas tāpat kā šo vienu savā e-pastā ik dienas - bez maksas! Just enter your email address below: Vienkārši ievadiet savu e-pasta adresi:

    You can always opt out of this email subscription at any time. Jūs vienmēr varat atteikties no šīs e-pasta abonementu jebkurā laikā.

    { 0 comments… (0 comments ... add one now pievienot vienu tagad } )

    Leave a Comment Leave Comment

    You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Jūs varat izmantot šos HTML tagus un atribūtus: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>