Bluetooth GPRS Howto

From ArchWiki
Revision as of 00:04, 11 August 2007 by Usv (talk | contribs) (removed some pics)
Jump to: navigation, search

This Howto will describe, how to set up a GPRS Internet connection using bluetooth device and compatible mobile phone.


  1. Linux compatible bluetooth device
  2. Bluetooth enabled mobile phone - I'm using Nokia N70


  1. Install bluez-utils, bluez-libs and dbus (install also ppp if you havent):
    pacman -S bluez-utils bluez-libs dbus
  2. Start dbus and bluetooth service:
    /etc/rc.d/dbus start
    /etc/rc.d/bluetooth start
  3. Scan for nearby bluetooth devices:
    hcitool scan
    Scanning ...
             00:19:79:89:13:8E      Penpen N70
    Now, mark that above address, it's the bluetooth hardware address of your mobile phone (provided that the name in the right matches what you have written in the phone).
  4. Scan, which channel is used for Dial-Up Networking:
    sdptool search DUN
    Inquiring ...
    Searching for DUN on 00:19:79:89:13:8E ...
    Service Name: Dial-Up Networking
    Service RecHandle: 0x10007
    Service Class ID List:
      "Dialup Networking" (0x1103)
    Protocol Descriptor List:
      "L2CAP" (0x0100)
      "RFCOMM" (0x0003)
        Channel: 3
    Language Base Attr List:
      code_ISO639: 0x454e
      encoding:    0x6a
      base_offset: 0x100
    Profile Descriptor List:
      "Dialup Networking" (0x1103)
        Version: 0x0100
    Now check the line beginning with "Channel:" - it contains the channel which is used for Dial-Up Network and it is not necessarily 1 and so is the case with my Nokia N70; my phone uses channel 3.
  5. Next, edit /etc/bluetooth/hcid.conf . Set the following in options section:
    autoinit yes;
    security auto;
    Editing the same file, comment out passkey, as it is not used actually. Also, in the device section change the line beginning with name to:
    name "BlueZ (%h)";
  6. Now edit /etc/rfcomm.conf , first uncomment the rfcomm0 device section. Then add/change the lines as this (if necessary):
    bind yes;
    device 00:19:79:89:13:8E;
    channel 3;
    comment "GPRS dialup";
    Of course, you should use your device address and the appropriate channel.
  7. Edit the bluetooth script in /etc/rc.d/bluetooth to make the rfcomm start when bluetooth system is started:
  8. Restart the bluetooth service:
    /etc/rc.d/bluetooth restart
  9. Look, whether the bluetooth device is bound to the phone. ll should look like this:
    ll /dev/rfcomm0
    crw-rw---- 1 root tty 216, 0 2007-08-10 21:32 /dev/rfcomm0
  10. Now comes the interesting part. You see, there must be an agreed password for connecting to the phone's modem. And this password is set up in an awkward way. First decide a password. Then open another root console, type there (subsitute your phone's hardware address and password accordingly)
    passkey-agent 8922 00:19:79:89:13:8E
    , but don't press enter yet. On another root window, issue
    cat /dev/rfcomm0
    and immidiately after that execute the typed passkey-agent command in other window. Situation is like this The phone should now show something like this: . Quickly, enter the passcode and press "Ok". If the passkey-agent prints something like
    Passkey	request	for device 00:19:79:89:13:8E
    Passkey	service	has been released
    you have no need to hurry anymore as you are almost set. Next, go to Menu->Connectivity->Bluetooth, select right for paired devices, select Options->Set as authorized, confirm and you are done!
  11. Edit the bottom of /etc/ppp/ip-up as following:
    echo -e "#generated by ip-up\nsearch local\nnameserver $DNS1\nnameserver $DNS2" > /etc/resolv.conf
    chmod a+r /etc/resolv.conf
    This change is used to set correct DNS settings after connection.