Skip to content Gå til innhold


How to tether your Nokia N95s Internet connection to your laptop via Bluetooth in Linux Slik tjore Nokia N95s Internett-tilkobling til den bærbare datamaskinen via Bluetooth i Linux

LinuxSymbian

Sometimes you end up somewhere with your laptop where you just can't find any open WiFi. Noen ganger kan du ende opp et sted med den bærbare datamaskinen der du rett og slett ikke finner noen åpne WiFi. Luckily you have a Nokia N95 and a Bluetooth adapter. Heldigvis har du en Nokia N95 og en Bluetooth-adapter. 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. Jeg skal vise deg hvordan du tjore din N95 til den bærbare datamaskinen via Bluetooth de raske og skitne kommandolinje måte, samt penere GUI måte. In these examples I am running Fedora 9 and Gnome. I disse eksemplene Jeg kjører Fedora 9 og Gnome.

Warning: You probably only want to do this if you have a decent data plan. Advarsel: Du har sannsynligvis bare vil gjøre dette hvis du har en anstendig dataabonnement. Using 3G data can result in a very large bill! Ved hjelp av 3G-data kan resultere i en veldig stor regning!

  1. The first thing you need to do is make sure your N95 is paired with your laptop. Det første du må gjøre er å sørge for at N95 er sammenkoblet med den bærbare datamaskinen. This is far easier than I expected. Dette er langt enklere enn jeg forventet. 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. Så lenge du har gnome-bluetooth pakken installert, er det så enkelt som å igangsette sammenkoblingen fra telefonen og inn på samme passnøkkel på både telefonen og datamaskinen når du blir bedt. You also need to have the ppp package and the wvdial package installed. Du må også ha PPP pakken og wvdial pakken installert. 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). Hvis du ikke gjør det, kan du bare løpe, som root i et terminalvindu, yum installere PPP wvdial (eller bruke alt pakkebehandler kommer w / Linux-distro).
  2. Now that both devices are paired, open a terminal window and run hcitool scan to discover your phones Bluetooth MAC address. Nå som begge enhetene er sammenkoblet, åpner du et terminalvindu og kjør hcitool scan for å finne din telefoner Bluetooth MAC-adressen. This section applies to both the command line and GUI parts of this tutorial. Denne delen gjelder både kommandolinjen og GUI deler av denne opplæringen.

    [user@radon ~]$ hcitool scan [user @ radon ~] $ hcitool scan
    Scanning … Scanning ...
    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. Neste vi bruker sdptool å finne ut kanal for Ekstern pålogging service.

    [user@radon ~]$ sdptool browse 00:22:66:9F:83:37 [user @ radon ~] $ sdptool bla 00:22:66:9 F: 83:37
    Browsing 00:22:66:9F:83:37 … Browsing 00:22:66:9 F: 83:37 ...
    Service Name: Dial-Up Networking Tjenesten Navn: Dial-Up Networking
    Service RecHandle: 0×1004a Tjenesten RecHandle: 0 × 1004a
    Service Class ID List: Tjenesten Klasse ID List:
    “Dialup Networking” (0×1103) "Ekstern pålogging" (0 × 1103)
    Protocol Descriptor List: Protocol Descriptor List:
    “L2CAP” (0×0100) "L2CAP" (0 × 0100)
    “RFCOMM” (0×0003) "RFCOMM" (0 × 0003)
    Channel: 2 Channel: 2
    Language Base Attr List: Språk Base attr List:
    code_ISO639: 0×454e code_ISO639: 0 × 454e
    encoding: 0×6a koding: 0 × 6a
    base_offset: 0×100 base_offset: 0 x 100
    Profile Descriptor List: Profile Descriptor List:
    “Dialup Networking” (0×1103) "Ekstern pålogging" (0 × 1103)
    Version: 0×0100 Versjon: 0 × 0100

  4. There will probably be a few screens of output. Det vil trolig bli noen skjermbilder av produksjonen. I have only included the relevant part in the above example. Jeg har bare tatt den aktuelle delen i eksempelet ovenfor. Note that the Dial-Up Networking service is on channel 2 . Merk at Dial-Up Networking tjenesten er på kanal 2.
  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. Bruke din favoritt teksteditor, som root, redigere / etc / bluetooth / rfcomm.conf og at den ser slik ut, erstatte din telefoner MAC-adresse og kanalnummer.
  6. # #
    # RFCOMM configuration file. # RFCOMM konfigurasjonsfil.
    # #

    rfcomm0 { rfcomm0 (
    bind yes; bind ja;
    device 00:22:66:9F:83:37; Enheten 00:22:66:9 F: 83:37;
    channel 2; channel 2;
    } )

  7. Save your rfcomm.conf and exit your text editor. Lagre rfcomm.conf og avslutte din tekst editor.
  8. As root, restart the bluetooth service: Som root, starte bluetooth tjenesten:

    [root@radon ~]# service Bluetooth restart [root @ radon ~] # service Bluetooth hvile
    Stopping Bluetooth services: [ OK ] Stoppe Bluetooth-tjenester: [OK]
    Starting Bluetooth services: [ OK ] Starter Bluetooth-tjenester: [OK]

  9. We have now created a Bluetooth serial port at /dev/rfcomm0 that will be persistent through reboots. Vi har nå opprettet en Bluetooth-serieport på / dev/rfcomm0 som vil være vedvarende gjennom oppstarter. This is the port you will use as a “modem” during the rest of the configuration. Dette er den porten du vil bruke som "modem" under resten av konfigurasjonen.

Now we move on to the quick and dirty command line setup. Nå skal vi gå videre til rask og skitten kommandolinje oppsett. Feel free to skip to the GUI setup below if you aren't very comfortable with the command line. Føl deg fri til å hoppe til det grafiske oppsettet nedenfor hvis du ikke er veldig komfortabel med kommandolinjen.

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: Rediger / etc / wvdial.conf og at den ser slik ut:
  2. 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 Brukernavn = user
    Password = pass Password = pass
    Phone = *99***1# Phone = * 99 *** 1 #
    Stupid Mode = 1 Stupid Mode = 1
    Init1 = ATZ Init1 = ATZ
    Inherits = Modem0 Arver = Modem0

  3. I'm using Rogers Wireless in Canada and the above is the minimum configuration that works for me. Jeg bruker Rogers Wireless i Canada og over er den minste konfigurasjon som fungerer for meg. Literally Username = user and Password = pass. Bokstavelig Brukernavn = brukernavn og passord = pass. You may need to make changes to the Username, Password, and Phone lines. Du må kanskje gjøre endringer i brukernavn, passord og telefonlinjer. Contact your wireless provider for the correct details. Kontakt mobiloperatøren for korrekt informasjon.
  4. I also had to create a script called /etc/ppp/ip-up.local to make the automatic DNS configuration work. Jeg måtte også lage et skript som heter / etc / ppp / ip-up.local å gjøre den automatiske DNS-konfigurasjon arbeid. Here's my ip-up.local: Her er min ip-up.local:
  5. #!/bin/bash #! / bin / bash
    # #

    PATH=/sbin:/usr/sbin:/bin:/usr/bin PATH = / sbin: / usr / sbin: / bin: / usr / bin
    export PATH export PATH
    echo “# created by pppd” > /etc/resolv.conf echo "# opprettet av pppd"> / 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 Ikke glem å 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. Dessverre jeg har ikke vært i stand til å koble seg som en vanlig bruker i denne konfigurasjonen så du må koble som root.

    [root@radon ~]# wvdial Bluetooth [root @ radon ~] # wvdial Bluetooth
    –> WvDial: Internet dialer version 1.60 -> WvDial: Internet Dialer versjon 1.60
    –> Cannot get information for serial port. -> Kan ikke hente informasjon for seriell port.
    –> Initializing modem. -> Initializing modem.
    –> Sending: ATZ -> Sending: ATZ
    ATZ ATZ
    OK OK

    –> Sending: ATM0 -> Sender: ATM0
    ATM0 ATM0
    OK OK
    –> Modem initialized. -> Modem initialisert.
    –> Sending: ATDT*99***1# -> Sender: ATDT * 99 *** 1 #
    –> Waiting for carrier. -> Waiting for carrier.
    ATDT*99***1# ATDT * 99 *** 1 #
    CONNECT CONNECT
    ~[7f]}#@!}!} } }2}#}$@#}!}$}%\}”}&} }*} } g}%~ ~ [7f ]}#@!}!})) 2. }#}$@#}!}$}% \ }"}&}) *)) g)% ~
    –> Carrier detected. -> Carrier detected. Starting PPP immediately. Starting PPP umiddelbart.
    –> Starting pppd at Sun Oct 19 16:48:56 2008 -> Starting pppd at Søn Okt 19 16:48:56 2008
    –> Pid of pppd: 8028 -> PID of pppd: 8028
    –> Using interface ppp0 -> Bruke grensesnittet ppp0
    –> local IP address 172.28.53.106 -> Lokale IP-adressen 172.28.53.106
    –> remote IP address 10.6.6.6 -> Eksterne IP-adresse 10.6.6.6
    –> primary DNS address 207.181.101.4 -> Primære DNS-adressen 207.181.101.4
    –> secondary DNS address 207.181.101.5 -> Sekundær DNS-adresse 207.181.101.5

  7. I removed the lines containing unprintable characters, but otherwise you should see something very similar to above. Jeg fjernet de linjer som inneholder unprintable tegn, men ellers burde du se noe som ligner på ovenfor. Note that wvdial stays in the foreground. Merk at wvdial forblir i forgrunnen. This is so you can disconnect by simply pressing Ctrl-C. Dette er slik at du kan koble ved å trykke Ctrl-C.
  8. You can verify that you are online by switching to a new terminal window and running ifconfig. Du kan bekrefte at du er pålogget ved å bytte til en ny terminal vindu og kjører ifconfig.

    [root@radon ~]# ifconfig [root @ radon ~] # 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 RUNNING MTU: 16436 Metric: 1
    RX packets:12767 errors:0 dropped:0 overruns:0 frame:0 RX packets: 12767 errors: 0 dropped: 0 overruns: 0 frame: 0
    TX packets:12767 errors:0 dropped:0 overruns:0 carrier:0 TX packets: 12767 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: 714652 (697,9 KiB) TX bytes: 714652 (697,9 KiB)

    ppp0 Link encap:Point-to-Point Protocol ppp0 Link encap: Point-to-Point Protocol
    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 RUNNING 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 @ radon ~] # ping simplehelp.net
    PING simplehelp.net (74.52.95.42) 56(84) bytes of data. PING simplehelp.net (74.52.95.42) 56 (84) byte med 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 fikk, 0% packet loss, time 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. Når du er ferdig på nettet, ikke glem å bytte tilbake til terminalen hvor du kjørte wvdial og trykk Ctrl-C.

    ^CCaught signal 2: Attempting to exit gracefully… ^ CCaught signal 2: Forsøk på å avsluttes normalt ...
    –> Terminating on signal 15 -> Avslutning på signal 15
    –> Connect time 5.8 minutes. -> Tilkobling tid 5,8 minutter.
    –> Disconnecting at Sun Oct 19 16:54:48 2008 -> Koble på Søn Okt 19 16:54:48 2008


GUI Method GUI Metode

Now, if all that command line stuff scares you, here's how to make it work using Gnome's GUI: Nå, hvis alt kommandolinje ting skremmer deg, her er hvordan du gjør det arbeid med Gnome's GUI:

  1. Click System -> Administration -> Network Klikk System -> Administrasjon -> Nettverk
  2. You will be asked to enter your root password. Du vil bli bedt om å skrive inn root-passordet. Enter it and click OK . Skriv det og klikk OK.
  3. Now you can see a list of installed network devices. Nå kan du se en liste over installerte nettverksenheter. Click on the Hardware tab. Klikk på kategorien Maskinvare.

  4. click to enlarge Klikk for å forstørre

  5. Now click the New button, select Modem , and click OK . Nå klikker du på Ny-knappen, velg Modem, og klikk OK.
  6. Change the Modem Device to /dev/rfcomm0. Endre Modem Device til / dev/rfcomm0. If /dev/rfcomm0 is not available in the list, just type it in. Click OK . Hvis / dev/rfcomm0 ikke er tilgjengelig i listen, skriver det i. Klikk OK.
  7. Now click the Devices tab. Nå klikker kategorien Enheter.

  8. click to enlarge Klikk for å forstørre


    click to enlarge Klikk for å forstørre

  9. Click the New button, select Modem connection, and click Forward . Klikk på Ny-knappen, velg Modem-tilkobling, og klikk på Videresend.

  10. click to enlarge Klikk for å forstørre

  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. Alt jeg trengte å gjøre for å gjøre mitt Rogers Trådløs tilkobling arbeidet ble inn * 99 *** 1 # som telefonnummer, brukeren som Login Name, og pass som passord. I also chose to name this connection Bluetooth. Jeg valgte å navngi denne tilkoblingen Bluetooth. Click Forward . Klikk Videresend.

  12. click to enlarge Klikk for å forstørre

  13. I left these options at their defaults. Jeg forlot disse alternativene på deres standardverdier. Click Forward . Klikk Videresend.

  14. click to enlarge Klikk for å forstørre

  15. We've finished creating the connection. Vi har ferdig med å opprette forbindelsen. Click Apply . Klikk Bruk.

  16. click to enlarge Klikk for å forstørre

  17. Click the X in the top right corner to close this window. Klikk på X øverst i høyre hjørne for å lukke dette vinduet.

  18. click to enlarge Klikk for å forstørre

  19. Click Yes to save the changes. Klikk Ja for å lagre endringene.
  20. Click OK . Klikk OK. No, we won't need to restart the computer. Nei, vil vi ikke trenger å starte datamaskinen på nytt.

  21. click to enlarge Klikk for å forstørre

  22. So, let's use our newly created connection. Så, la oss bruke vår nyopprettede tilkobling. Click System -> Administration -> Network Device Control . Klikk System -> Administration -> Network Device Control.
  23. Select the Bluetooth connection you just created and click Activate . Velg Bluetooth-tilkoblingen du nettopp laget, og klikk Aktiver.

  24. click to enlarge Klikk for å forstørre

  25. Notice how the Bluetooth connection has changed from Inactive to Active . Legg merke til hvordan Bluetooth-tilkoblingen er endret fra inaktiv til aktiv.

  26. click to enlarge Klikk for å forstørre

  27. Open Firefox and visit http://www.simplehelp.net. Åpne Firefox og besøk http://www.simplehelp.net.

  28. click to enlarge Klikk for å forstørre

  29. When you are finished online, go back to the Network Device Control window, select the Active Bluetooth connection and click Deactivate . Når du er ferdig tilkoblet, gå tilbake til Network Device Control vinduet velger du Aktiv Bluetooth-tilkoblingen, og klikk Deaktiver.

  30. click to enlarge Klikk for å forstørre

  31. Verify that the Bluetooth connection is indeed Inactive, then close the Network Device Control window. Kontroller at Bluetooth-tilkoblingen er virkelig Inaktive, lukk deretter Network Device Control vinduet.

  32. click to enlarge Klikk for å forstørre

  33. Some of you may be wondering why I chose not to use Network Manager. Noen av dere kanskje lurer på hvorfor jeg valgte å ikke bruke 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. Det er ganske enkelt skyldes at mobilt bredbånd-støtte i Network Manager er i den spede begynnelse, og jeg fant det å være praktisk talt ubrukelig. Once Network Manager's mobile broadband support becomes better, I'll rewrite this tutorial based on it. Når Network Manager mobile bredbånd-støtte blir bedre, skal jeg skrive denne opplæringen basert på det.

Posted in Posted in Guest Blogger Guest Blogger , , Linux Linux , , Symbian Symbian . .

Get Simple Help tutorials just like this one in your email inbox every day - for free! Få Enkelt Hjelp opplæring akkurat som dette i innboksen hver dag - helt gratis! Just enter your email address below: Bare skriv inn din e-postadresse nedenfor:

You can always opt out of this email subscription at any time. Du kan alltid velge bort denne e-abonnementet når som helst.

0 Responses 0 Responses

Stay in touch with the conversation, subscribe to the Hold kontakten med samtalen, abonnere på RSS feed for comments on this post RSS feed for kommentarer til dette innlegget . .



Some HTML is OK Some HTML is OK

or, reply to this post via eller svare på dette innlegget via trackback styrekule . .