Hur man tjudrar din Nokia N95s internetanslutning till din bärbar dator via Bluetooth i Linux

vid Ken Murray Oktober 27, 2008

Linux Symbian

Ibland avslutar du upp någonstans med din bärbar dator var du precis inte kan finna any öppna WiFi. Luckily har du en Nokia N95 och en Bluetooth adapter. Förmiddag som I går att visa dig hur man tjudrar din N95 till din bärbar dator via Bluetooth ömt ställe och smutsar ner, befaller fodrar långt, as well as den mer nätt GUIEN långt. I dessa förmiddag rinnande Fedora 9 för exempel I och Gnome.

Varning: Du önskar antagligen endast att göra denna, om du har anständiga data att planera. Att använda data 3G kan resultera i en mycket stor räkning!

  1. Det första tinget som du behöver att göra, är att se till din N95 paras med din bärbar dator. Detta är långt lättare, än jag förväntade. Som börja para från ditt ringa och att skriva in den samma passkeyen på både ringa och datoren, när du meddelas, så länge som du har gnomen-bluetooth att paketera installerat, är den så enkel. Du behöver också att ha pppen att paketera, och de wvdial paketerar installerat. Om du inte, kan du enkelt köra, som rotar i ett slutligt fönster, yumen installerar wvdial ppp (eller använd allt vad paketerar, chefen kommer med din Linux distro).
  2. , att öppna ett slutlig fönster och körning, nu båda apparater paras hcitoolbildläsning för att upptäcka ditt ringer det Bluetooth MACet address. Detta delar upp applicerar till den båda befalla fodrar och GUI-delar av denna tutorial.

    [user@radon~] $ hcitoolbildläsning
    Scanning…,
    00:22: 66: 9F: 83: 37 N95

  3. Därefter använder vi sdptool för att finna ut kanalisera för den tjänste- Dial-Up nätverkandet.

    [user@radon~] $ sdptoolbläddrande 00:22: 66: 9F: 83: 37
    Bläddra 00:22: 66: 9F: 83: 37…,
    Serva känt: Dial-Up nätverkande
    Tjänste- RecHandle: 0×1004a
    Tjänste- klassificera LEGITIMATIONEN listar:
    ”Dialupnätverkande” (0×1103)
    Protokolldeskriptorn listar:
    ”L2CAP” (0×0100)
    ”RFCOMM” (0×0003)
    Kanalisera: 2
    Språket baserar Attr listar:
    code_ISO639: 0×454e
    encoding: 0×6a
    base_offset: 0×100
    Profilera deskriptorn listar:
    ”Dialupnätverkande” (0×1103)
    Version: 0×0100

  4. Det ska antagligen finns några avskärmer av tillverkat. Jag har endast inklusive den relevant delen i det ovannämnda exemplet. Notera att den tjänste- Dial-Up nätverkandet är på kanalisera 2.
  5. Redigera /etc/bluetooth/rfcomm.conf och gör det looknågot liknande efter, ringer kanaliserar att ersätta som är ditt, MAC address och numrerar, genom att använda din favorit- textredaktör, som rotar.
  6. #
    Nr. sparar RFCOMM-konfigurationen.
    #

    rfcomm0 {
    röra ja;
    apparat 00:22: 66: 9F: 83: 37;
    kanalisera 2;
    }

  7. Räddningen din rfcomm.conf och går ut din textredaktör.
  8. Starta den tjänste- bluetoothen om igen: som rotar,

    [root@radon ~]# service Bluetooth restart
    Stopping Bluetooth services: [ OK ]
    Starting Bluetooth services: [ OK ]

  9. We have now created a Bluetooth serial port at /dev/rfcomm0 that will be persistent through reboots. This is the port you will use as a “modem” during the rest of the configuration.

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.

Command Line Method
GUI Method


Command Line Method

  1. Edit /etc/wvdial.conf and make it look like this:
  2. Modem = /dev/rfcomm0
    Baud = 460800
    SetVolume = 0
    Dial Command = ATDT
    Init1 = ATZ
    Init3 = ATM0
    FlowControl = CRTSCTS

    [Dialer Bluetooth]
    Username = user
    Password = pass
    Phone = *99***1#
    Stupid Mode = 1
    Init1 = ATZ
    Inherits = Modem0

  3. I’m using Rogers Wireless in Canada and the above is the minimum configuration that works for me. 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.
  4. I also had to create a script called /etc/ppp/ip-up.local to make the automatic DNS configuration work. Here’s my ip-up.local:
  5. #!/bin/bash
    #

    PATH=/sbin:/usr/sbin:/bin:/usr/bin
    export PATH
    echo “# created by pppd” > /etc/resolv.conf
    echo “nameserver ${DNS1}” >> /etc/resolv.conf
    echo “nameserver ${DNS2}” >> /etc/resolv.conf
    chmod go+r /etc/resolv.conf

    Don’t forget to 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.

    [root@radon ~]# wvdial Bluetooth
    –> WvDial: Internet dialer version 1.60
    –> Cannot get information for serial port.
    –> Initializing modem.
    –> Sending: ATZ
    ATZ
    OK

    –> Sending: ATM0
    ATM0
    OK
    –> Modem initialized.
    –> Sending: ATDT*99***1#
    –> Waiting for carrier.
    ATDT*99***1#
    CONNECT
    ~[7f]}#@!}!} } }2}#}$@#}!}$}%\}”}&} }*} } g}%~
    –> Carrier detected. Starting PPP immediately.
    –> Starting pppd at Sun Oct 19 16:48:56 2008
    –> Pid of pppd: 8028
    –> Using interface ppp0
    –> local IP address 172.28.53.106
    –> remote IP address 10.6.6.6
    –> primary DNS address 207.181.101.4
    –> secondary DNS address 207.181.101.5

  7. I removed the lines containing unprintable characters, but otherwise you should see something very similar to above. Note that wvdial stays in the foreground. This is so you can disconnect by simply pressing Ctrl-C.
  8. You can verify that you are online by switching to a new terminal window and running ifconfig.

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

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

    [root@radon ~]# ping simplehelp.net
    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=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=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
    ^C
    — simplehelp.net ping statistics —
    5 packets transmitted, 5 received, 0% packet loss, time 4513ms
    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.

    ^CCaught signal 2: Attempting to exit gracefully…
    –> Terminating on signal 15
    –> Connect time 5.8 minutes.
    –> Disconnecting at Sun Oct 19 16:54:48 2008


GUI Method

Now, if all that command line stuff scares you, here’s how to make it work using Gnome’s GUI:

  1. Click System -> Administration -> Network
  2. You will be asked to enter your root password. Enter it and click OK.
  3. Now you can see a list of installed network devices. Click on the Hardware tab.

  4. click to enlarge

  5. Now click the New button, select Modem, and click OK.
  6. Change the Modem Device to /dev/rfcomm0. If /dev/rfcomm0 is not available in the list, just type it in. Click OK.
  7. Now click the Devices tab.

  8. click to enlarge


    click to enlarge

  9. Click the New button, select Modem connection, and click Forward.

  10. click to enlarge

  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. I also chose to name this connection Bluetooth. Click Forward.

  12. click to enlarge

  13. I left these options at their defaults. Click Forward.

  14. click to enlarge

  15. We’ve finished creating the connection. Click Apply.

  16. click to enlarge

  17. Click the X in the top right corner to close this window.

  18. click to enlarge

  19. Click Yes to save the changes.
  20. Click OK. No, we won’t need to restart the computer.

  21. click to enlarge

  22. So, let’s use our newly created connection. Click System -> Administration -> Network Device Control.
  23. Select the Bluetooth connection you just created and click Activate.

  24. click to enlarge

  25. Notice how the Bluetooth connection has changed from Inactive to Active.

  26. click to enlarge

  27. Open Firefox and visit http://www.simplehelp.net.

  28. click to enlarge

  29. When you are finished online, go back to the Network Device Control window, select the Active Bluetooth connection and click Deactivate.

  30. click to enlarge

  31. Verify that the Bluetooth connection is indeed Inactive, then close the Network Device Control window.

  32. click to enlarge

  33. Some of you may be wondering why I chose not to use 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. Once Network Manager’s mobile broadband support becomes better, I’ll rewrite this tutorial based on it.
If this post helped you, I would be extremely grateful if you could take 3 minutes (I timed it) to complete this survey. If you enter your email address at the end of the survey, you'll be entered into a contest to win a $25 USD Amazon Gift Certificate. You do not need to enter your name or email address (though you won't be entered into the contest) to complete the survey. No personally identifiable information is gathered. If you do opt to enter the contest, your email address will not be sold or used for any kind of communication, other than to notify you if you won the contest. After the contest ends all email addresses will be deleted. Thanks very much in advance!!
Related Posts:
  • How to share the GPS in your N95 with your laptop via Bluetooth in Linux
  • How to tether your Nokia N95s Internet connection to your laptop via USB in Linux
  • How to turn your N95 into a wireless access point
  • Technology and Lifestyle
  • Use Adeona to help recover a lost or stolen laptop
  • Get Simple Help tutorials just like this one in your email inbox every day - for free! Just enter your email address below:

    You can always opt out of this email subscription at any time.

    { 0 comments… add one now }

    Leave a 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>