Bluetooth GPRS mini-HowTo rm 11-2004, 11-2005 Goal: use the Bluetooth T610 cellular phone as a wireless modem for Internet anywhere access via GPRS This is my personal rudimentary HOWTO. You have to adapt it to your needs. - replace 00:0E:07:23:FA:B9 with the proper bluetooth address of your phone. (you get that address by step 3 of the installation procedure below.) - create the GPRS-account in your phone. (SonyEricsson: Connectivity/Data comm./Data accounts) Insert all the relevant provider data (at least the APN-address, maybe username and password, maybe more). Remember or look up the CID number of that account - replace the "4" in ATD*98*4# below with the appropriate GPRS-account number (CIF) inside your phone. (SonyEricsson: Connectivity/Data comm./Data accounts) - if the rfcomm command below (step A.2.) constantly reports errors like "cannot connect to socket - access denied" try to delete your computer's name from the list of paired devices inside your Bluetooth phone. -> FIRST TIME SET-UP see below under INSTALLATION USAGE ================================================================ for Gericom X5force with Belkin Bluetooth USB-Stick and SuSE 9.1 or Gentoo 2004.3 new: adapted for SUSE 10.0 for T610 with One and GPRS should work for other Bluetooth devices and other phones (# is the root shell prompt, > is the user shell prompt) A. start up ================================ 0. prepare 2 root shells and one normal shell connect/insert the bluetooth USB stick check bluetooth services using: (not for SUSE 10.0) # /etc/init.d/bluetooth status should be running - if not: # /etc/init.d/bluetooth start (hcid should be running now: # ps ax | grep hcid ) 1. check for the com device in root shell (not for SUSE 10.0): # ls -l /dev/rfcomm0 if there is none, make it: # mknod --mode 666 /dev/rfcomm0 c 216 0 2. in root shell 1 do: (have the phone at hand to type in the PIN if necessary) # rfcomm connect /dev/rfcomm0 00:0E:07:23:FA:B9 there must be no errors there must be a message like "terminate with Ctr-C" leave this shell open SUSE 10.0: in another root shell do now: # chmod 0666 /dev/rfcomm0 if there are errors after the rfcomm connect: - "Can't connect RFCOMM socket: Permission denied" switch bluetooth visibility on in the phone menu try again, else unplug the bluetooth USB stick and try from the beginning... - "Can't connect RFCOMM socket: Connection refused" delete the list of paired devices in the phone menu try again, else unplug the bluetooth USB stick and try from the beginning... - "Can't connect RFCOMM socket: Device or resource busy" here anything went wrong patiently unplug and reset anything including the paired devices list inside the phone then begin from first step... 3. in root shell 2 do: # ( ifdown wlan0 ) then switch off WLAN device or eth0 or whatever you have running (shutting down if devices helps getting the default routing correct for pppd) # pppd call gprs (SuSE only:) there must be a long protocol with local and remote IP-addresses leave this shell open (Gentoo only:) you see the long protocol with local and remote IP-addresses in the file /var/log/everything/current I find it convenient to have a third root shell open running the command: # tail -n 20 -f /var/log/everything/current 4. in user shell do: > ping artm-friends.at terminate with Ctr-C this should show the usual ping packets 5. use Internet... B. shut down ================================= 1. type Ctr-C in pppd root shell 2. type Ctr-C in rfcomm root shell (only SuSE) 3. # /etc/init.d/bluetooth stop 4. pull off the bluetooth USB stick 5. to restart the connection follow the A block again... INSTALLATION ========================================================= SuSE 9.1 and Gentoo 2004.3 new: SUSE 10.0 for Gericom X5force with Belkin Bluetooth USB-Stick for T610 with One and GPRS should work for other Bluetooth devices and other phones (# is the root shell prompt, > is the user shell prompt) 0. preparations: => insert correct PIN code into /etc/bluetooth/pin (SuSE only) => make this file: /etc/ppp/peers/gprs: debug noauth usepeerdns /dev/rfcomm0 115200 115200 local nocrtscts defaultroute noipdefault connect '/usr/sbin/chat -f /etc/ppp/chat-gprs -r /dev/console' => make this file: /etc/ppp/chat-gprs: TIMEOUT 5 ECHO ON ABORT '\nBUSY\r' ABORT '\nERROR\r' ABORT '\nNO ANSWER\r' ABORT '\nNO CARRIER\r' ABORT '\nNO DIALTONE\r' ABORT '\nRINGING\r\n\r\nRINGING\r' '' \rAT TIMEOUT 12 OK ATD*98*4# CONNECT "" => edit /etc/modprobe.conf.local: (only SuSE 9) add to file /etc/modprobe.conf.local these 3 lines: alias char-major-10-250 hci_vhci alias tty-ldisc-15 hci_uart alias bt-proto-5 cmtp 1s. more preparations: (only SuSE 9) => start hcid: (only if necessary, should be automatic in SuSE) # hcid => make the device node: # mknod --mode 666 /dev/rfcomm0 c 216 0 # only once to make the device 2. bluetooth device: => insert the bluetooth dongle. (only Gentoo: # /etc/init.d/bluetooth start (only Gentoo) ) => hotplug should initialize the bluetooth device. Check with: # hciconfig -a 3. bluetooth scanning: => search for bluetooth devices: # hcitool scan you will get the bluetooth address of your phone as result 4. test the bluetooth connection: => ping the T610 phone: # l2ping 00:0E:07:23:FA:B9 5. connect to the T610 phone: ( maybe you should do bluetooth device pairing here: # rfcomm bind /dev/rfcomm0 0 00:0E:07:23:FA:B9 1 SUSE 10.0: pairing seems to work only if initiated from the phone, do it now) => then connect # rfcomm connect /dev/rfcomm0 00:0E:07:23:FA:B9 SUSE 10.0: in another root shell do # chmod 0666 /dev/rfcomm* 6. help getting routing right: => stop WLAN (or what else interface you have up): # ifdown wlan0 (only SuSE) and/or shut off WLAN device (better; SuSE and Gentoo) 7. pppd => start ppp and test without and with DNS: # pppd call gprs > ping 213.229.60.16 (artm-friends.at) or what you like > ping artm-friends.at or what you like 8. after the session: => stop processes in correct order: => type Ctr-C in pppd shell => type Ctr-C in rfcomm shell (only SuSE) # /etc/init.d/bluetooth stop => pull off bluetooth device Sources: ==================================== I used these documents - thanks to the authors for providing the information! http://www.jochen-lillich.de/files/artikel/bluetooth/bluetooth.pdf http://www.holtmann.org/linux/bluetooth/ http://www.teaparty.net/technotes/blue-gprs.html