Announcement

Collapse
No announcement yet.

Here's how to use your mobile phone as a modem via bluetooth

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Here's how to use your mobile phone as a modem via bluetooth

    This documentation clarifies how to make your mobile phone to act as a modem via bluetooth. I wrote these instructions because I found out that Maverick Meerkat (10.10) does not provide properly functioning configuration files for KPPP. I believe that these instructions are pretty much platform-free, but in case they aren't, please let me know. (In case this documentation proves to be pointless due to future upgrades, mods can delete the whole thread).

    Tested hardware:
    Nokia 5800 XpressMusic

    Example MAC address used for the mobile phone used in this documentation is 00:15:A0:7A:1D:5A and channel 3

    Dependencies:
    KPPP
    bluedevil


    First, activate BlueTooth.


    1. Pairing the mobile phone with the computer.

    When BlueTooth is switched on, you should get the appropriate icon showing in your tray bar. Use it to make the pairing between your mobile phone and computer. When prompted for a code, you can make it up (for example 1234), but you have to enter that code to the computer AND the phone.


    2. When the pairing is done, your mobile phone should appear in the devices list. Click the new device, and then click "Trust". This way every single connection attempt doesn't need to be asked from the user.


    3. We need to find out the mobile phone bluetooth MAC address and channel specific to your phone.

    To figure out the MAC address of the phone, type:
    $ hcitool scan
    To figure out the bluetooth channel of the phone, type:
    $ sdptool search --bdaddr 00:15:A0:7A:1D:5A DUN
    The printout gives service names, service rechandles, service class id list, etc. Search for the section "Channel" and write the number down.


    4. Setting up the new BlueTooth configuration.

    Edit the file /etc/bluetooth/rfcomm.conf to match the following:

    rfcomm 0 {
    bind yes;
    #
    # # Mobile Phone MAC address
    device 00:15:A0:7A:1D:5A
    #
    # # RFCOMM Channel
    channel 3;
    #
    # # Connection description
    comment "BlueTooth";
    }

    After this, restart the BlueTooth service:
    $ sudo /etc/init.d/bluetooth restart
    4.1 KPPP Configuration

    Select "Configure" and then the tab "Accounts". Click "New" to create a new connection. The name of the connection can be as simple as "BlueTooth". Use "Script-based" authentication. Click "OK" to accept the new configuration.


    Open tab "Modems" and add the modem. Select "/dev/rfcomm0" as the modem device. Flow Control is "Hardware [CRTSCTS], Line Termination "CR" and Connection speed "921600".


    Move to tab "Modem" and then "Modem commands".


    Edit the "Initialization string 2:". This should be the command string provided by your mobile internet provider. In this case, we use "internet" as the internet connection name, so the line is: "AT+CGDCONT=1,"IP","internet","0.0.0.0",0,0. (in case you get an error with this string, edit the string to match this: "AT+CGDCONT=1,"IP","internet".


    Accept the settings by clicking OK.

    5.1 Replace your /etc/ppp/options with the attached file. IMPORTANT!
    There were parameters that had to be changed in order to establish a working connection.

    Enjoy the internet


    Ps. In case you get an error when trying to connect "No such device" you have to add the following line to /etc/rc.local:
    $ rfcomm bind 0 00:15:A0:7A:1D:5A 3
    Pps. In case I forgot some dependencies, please let me know.
    Attached Files
Working...
X