Debian-Tethering

= Setting up Debian for Tethering =

Installing required Debian packages
apt-get install bluez-utils

Setting Up Bluetooth Connectivity
blackbox:~# hcitool scan Scanning ... 11:22:33:44:55:66      Nokia N900 blackbox:~# sdptool browse 11:22:33:44:55:66

Search for the Dial-Up Networking service

blackbox:~# sdptool browse 11:22:33:44:55:66 Browsing 11:22:33:44:55:66 ... [...] Service Name: Dial-Up Networking Service RecHandle: 0x10005 Service Class ID List: "Dialup Networking" (0x1103) "Generic Networking" (0x1201) Protocol Descriptor List: "L2CAP" (0x0100) "RFCOMM" (0x0003) Channel: 1 Profile Descriptor List: "Dialup Networking" (0x1103) Version: 0x0100 [...] blackbox:~#

Add an rfcomm device (e.g. rfcomm0) to /etc/bluetooth/rfcomm.conf:

/etc/bluetooth/rfcomm.conf rfcomm0 { bind yes; #        device 11:22:33:44:55:66; #        channel 1; #        comment "N900"; }
 * 1)       # Automatically bind the device at startup
 * 1)       # Bluetooth address of the device
 * 1)       # RFCOMM channel for the connection (whatever you get from the sdptool output)
 * 1)       # Description of the connection

Restart the bluetooth stack:

blackbox:~# /etc/init.d/bluetooth

For bluetooth pairing you can run

blackbox:~# cat < /dev/rfcomm0

and first the n900 then the Debian system should ask you for a 4 digit PIN which you define on the n900 and confirm on the Debian system. You might have to configure the helper application which is using the PIN in /etc/bluetooth/hcid.conf

Run pppconfig and use /dev/rfcomm0 as modem interface:

In my settings for klarmobil (Germany) I manually added two lines (at+cdgcont=... and AT+CREG...):

blackbox:~# cat /etc/chatscripts/klarmobil # ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED '' ATZ OK at+cgdcont=1,"IP","internet.t-mobile","",0,0 OK AT+CREG=2 OK-AT-OK "ATDT*99#" CONNECT \d\c
 * 1) This chatfile was generated by pppconfig 2.3.18.
 * 2) Please do not delete any of the comments.  Pppconfig needs them.
 * 1) ispauth PAP
 * 2) abortstring
 * 1) modeminit
 * 1) ispnumber
 * 1) ispconnect
 * 1) prelogin


 * 1) ispname
 * 2) isppassword
 * 3) postlogin

blackbox:~#
 * 1) end of pppconfig stuff

In my peers file I changed the baud rate to the device

blackbox:~# cat /etc/ppp/peers/klarmobil # # hide-password noauth connect "/usr/sbin/chat -v -f /etc/chatscripts/klarmobil" debug /dev/rfcomm0 921600 defaultroute noipdefault user "tm" remotename klarmobil ipparam klarmobil usepeerdnsblackbox:~#
 * 1) This optionfile was generated by pppconfig 2.3.18.
 * 1) 460800