Configuring Bluetooth connections to phones
As it happens, my personal phone and my work phone are both Nokias. I believe these instructions should work for most mobile phones, though (confirmed to work on Nokia 6233 and 6120 over USB and Bluetooth).
In /etc/bluetooth/rfcomm.conf
you can map phones to rfcomm
device nodes
by MAC address:
rfcomm1 {
bind yes;
# the phone's Bluetooth address
device 00:12:34:56:78:9A;
channel 1;
comment "personal phone";
}
rfcomm2 {
bind yes;
device 01:23:45:67:89:AB;
channel 1;
comment "work phone";
}
Vodafone
My work phone is on Vodafone, which is a relatively standard network for packet data.
In /etc/ppp/peers/vodafone:
/dev/rfcomm2
56700
noipdefault
usepeerdns
defaultroute
persist
noauth
connect '/usr/sbin/chat -v -f /etc/ppp/chat-vodafone'
and in /etc/ppp/chat-vodafone:
TIMEOUT 5
ECHO ON
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
ABORT '\nNO DIALTONE\r'
ABORT '\nRINGING\r\n\r\nRINGING\r'
'' \rAT
TIMEOUT 30
OK ATE1
OK ATD*99***1#
TIMEOUT 30
CONNECT ""
The phone number *99***1#
causes the phone to dial its current default
GPRS/3G access point, which is what's needed here.
To dial Vodafone I plug in my USB Bluetooth adaptor and run pon vodafone
;
to disconnect I run poff vodafone
.
To use a USB link, replace /dev/rfcomm2
with /dev/ttyACM0
.
Three
My personal phone is on Three, and I mainly use it via USB.
The same chat-script works, but /etc/ppp/peers/three
contains:
/dev/ttyACM0
noipdefault
usepeerdns
defaultroute
user "guest"
noproxyarp
holdoff 0
persist
noauth
connect '/usr/sbin/chat -v -f /etc/ppp/chat-vodafone'
O2
My personal phone used to be on O2, which needed some extra runes.
(I've had a report that these might no longer work - apparently they don't with an O2 XDA Mini-S, anyway. Use at your own risk.)
/etc/ppp/peers/o2 is the same as for Vodafone, but using /dev/rfcomm1 and the chat script /etc/ppp/chat-o2, which contains:
TIMEOUT 5
ECHO ON
ABORT '\nBUSY\r'
ABORT '\nERROR\r'
ABORT '\nNO ANSWER\r'
ABORT '\nNO DIALTONE\r'
ABORT '\nRINGING\r\n\r\nRINGING\r'
'' \rAT
TIMEOUT 30
# this next line is extra for O2
OK AT+CGDCONT=1,"IP","mobile.o2.co.uk"
OK ATE1
OK ATD*99***1#
TIMEOUT 30
CONNECT ""
To dial O2 I used to plug in my USB Bluetooth adaptor and run pon o2
;
to disconnect I ran poff o2
.