Debian-Tethering: Difference between revisions

From Maemo Wiki
Jump to navigationJump to search
imported>rdorsch
imported>amigadave
wikify slightly
 
(10 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= Setting up Debian for Tethering =
This article documents how to setup Debian for tethering to an [[Nokia N900|N900.]] How to setup the N900 is described in the [[Bluetooth DUN]] article.


How to setup the N900 is described here [[Bluetooth_DUN]]
== Setup Bluetooth connectivity ==
 
== Setup bluetooth connectivity ==


=== Installing required Debian packages ===
=== Installing required Debian packages ===
Line 39: Line 37:
  blackbox:~#
  blackbox:~#


Add an rfcomm device (e.g. rfcomm0) to /etc/bluetooth/rfcomm.conf (make sure to replace the bluetooth device address 11:22:33:44:55:66 with the bluetooth device address of your N900):
Add an rfcomm device (e.g. <code>rfcomm0</code>) to <code>/etc/bluetooth/rfcomm.conf</code> (make sure to replace the Bluetooth device address 11:22:33:44:55:66 with the Bluetooth device address of your N900):


  /etc/bluetooth/rfcomm.conf
  /etc/bluetooth/rfcomm.conf
Line 58: Line 56:
Restart the bluetooth stack:
Restart the bluetooth stack:


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


For bluetooth pairing you can run
For bluetooth pairing you can run
Line 64: Line 62:
  blackbox:~# cat < /dev/rfcomm0
  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
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 <code>/etc/bluetooth/hcid.conf</code>


=== Dial-Up Settings ===
=== Dial-Up Settings ===


Run pppconfig and use /dev/rfcomm0 as modem interface:
Run <code>pppconfig</code> and use <code>/dev/rfcomm0</code> as the modem interface:


In my settings for klarmobil (Germany) I manually added two lines (at+cdgcont=... and AT+CREG...):
In my settings for klarmobil (Germany) I manually added two lines (at+cdgcont=... and AT+CREG...):
Line 88: Line 86:
  CONNECT \d\c
  CONNECT \d\c
  # prelogin  
  # prelogin  
 
 
  # ispname
  # ispname
  # isppassword
  # isppassword
  # postlogin
  # postlogin
 
 
  # end of pppconfig stuff
  # end of pppconfig stuff
  blackbox:~#
  blackbox:~#
Line 118: Line 116:
  blackbox:~#
  blackbox:~#


For ifupdown integration add to /etc/network/interfaces
For <code>ifupdown</code> integration add to <code>/etc/network/interfaces</code>


  iface ppp0 inet ppp
  iface ppp0 inet ppp
   provider klarmobil
   provider klarmobil


Details are in the [http://www.debian.org/doc/manuals/reference/ch05.en.html#_the_ppp_connection Debian Manual].
Details are in the [http://www.debian.org/doc/manuals/reference/ch05.en.html#_the_ppp_connection Debian Reference].
 
[[Category:Connectivity]]
[[Category:N900]]

Latest revision as of 13:14, 8 December 2010

This article documents how to setup Debian for tethering to an N900. How to setup the N900 is described in the Bluetooth DUN article.

Setup Bluetooth connectivity

Installing required Debian packages

apt-get install bluez-utils pppconfig

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 (make sure to replace the Bluetooth device address 11:22:33:44:55:66 with the Bluetooth device address of your N900):

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

Restart the bluetooth stack:

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

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

Dial-Up Settings

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

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

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

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

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

usepeerdns
blackbox:~#

For ifupdown integration add to /etc/network/interfaces

iface ppp0 inet ppp
 provider klarmobil

Details are in the Debian Reference.