View Single Post
Posts: 1,224 | Thanked: 1,763 times | Joined on Jul 2007
#2
The answer is yes, but it is not easy to setup. Nokia introduced a bug to the kernel that causes the kernel to OOPS when ppp over rfcomm is started. Maybe this is why they did not include this very basic feature?
  • To connect to a phone you need the ppp modules which are not included in the kernel. They can be downloaded here:
    http://my.arava.co.il/~matan/770/n90...mantle1.tar.gz
    Open this file under /lib/modules/current and run (as root) depmod -a . After that the modules will be loaded automatically when needed. Only ppp_async is different from the modules by fanoush: http://talk.maemo.org/showpost.php?p=414731&postcount=5
  • Install pppd package from the above link.
  • After pairing the phone from the GUI, you need to setup rfcomm. Create a file /etc/bluetooth/rfcomm with contents similar to
    Code:
    rfcomm2 {
            bind no;
            device 00:1E:A4:4F:0E:34;
            channel 2;
    }
    replace the address with the BT address of your phone.
  • Setup PPP for GPRS: You need the following files:
    /etc/ppp/peers/gprs:
    Code:
    /dev/rfcomm2
    connect "/usr/sbin/chat -s -v -f /etc/ppp/chat/gprs"
    nocrtscts
    defaultroute
    usepeerdns
    /etc/ppp/chat/gprs:
    Code:
    ABORT   'BUSY'
    ABORT   'NO CARRIER'
    ABORT   'ERROR'
    ''      AT
    OK      AT+CGDCONT=1,"IP","uinternet"
    OK      ATDT*99***1#
    CONNECT
    replace uinternet with the correct APN for your connection.
    /etc/ppp/ip-up.d:
    Code:
    echo nameserver $DNS1 > /tmp/resolv.conf.ppp0
    echo nameserver $DNS2 >> /tmp/resolv.conf.ppp0
    Make this file executable by running chmod a+x /etc/ppp/ip-up.d
  • For maemo applications to know of the connection, you need dummy connections. Install the package (see here: http://talk.maemo.org/showpost.php?p=433821&postcount=2 ). and run the commands:
    Code:
    gconftool-2 -s -t string /system/osso/connectivity/IAP/orange/type DUMMY
    gconftool-2 -s -t string /system/osso/connectivity/IAP/orange/name 'orange'
    You can replace the name orange with any name.
  • To connect run the commands:
    Code:
    rfcomm bind 2
    dbus-send --type=method_call --system --dest=com.nokia.icd /com/nokia/icd com.nokia.icd.connect string:orange uint32:0
    pppd call gprs
    (The first command is only needed once per boot.)
  • To disconnect, run the commands
    Code:
    dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true
    killall pppd
 

The Following 12 Users Say Thank You to Matan For This Useful Post: