View Single Post
Posts: 16 | Thanked: 5 times | Joined on Nov 2009
#10
I too had a problem with bluetooth-dun not starting after a clean boot.

I'm also going to document, for posterity, the steps I had to go through to get DUN running between a Gentoo Linux laptop and T-Mobile, using the N900 as the relay.

The N900 setup was more or less what you specified (specifically putting http://intr.overt.org/misc/bluetooth-dun into /etc/event.d and running `start bluetooth-dun`) except that I kept getting "spawning too fast" messages when testing.

For my laptop, I first had problems pairing--I'm sure this is some bug with the bluez version I was using, but I eventually gave up and put the line "34:7E:39:24:88:FC 9339" in /var/lib/bluetooth/*/pincodes where the "34:..." is the bluetooth address (from `hciconfig -a` on n900) and 9339 is the pin I wanted. A `rfcomm connect 0 34:7E:39:24:88:FC` then forced a pairing attempt and I was able to enter the pin 9339 on the n900. Also, the n900 was unable to see the laptop during discovery until I ran `hciconfig hci0 piscan` I don't think this was important to my efforts because the rfcomm explictly requested the pairing.

I have, more or less, the following contents of my /etc/bluetooth/hcid.conf:
------------------------------------
options {
autoinit yes;
security user;
pairing multi;
}
device {
name "BlueZ@%h (%d)";
class 0x3e0100;
iscan enable; pscan enable;
lm accept;
lp rswitch,hold,sniff,park;
}
------------------------------------

/etc/bluetooth/rfcomm.conf
------------------------------------
rfcomm0 {
bind yes;
device 34:7E:39:24:88:FC;
channel 1;
comment "N900 connection";
}
------------------------------------

/etc/conf.d/net
------------------------------------
config_ppp0=( "ppp" )
link_ppp0="/dev/rfcomm0"
username_ppp0='guest'
password_ppp0='guest'
pppd_ppp0=(
"debug"
"ipcp-accept-remote"
"ipcp-accept-local"
"holdoff 3"
"defaultroute"
"usepeerdns"
"noauth"
"noipdefault noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp local"
"921600"
"modem crtscts"
)
phone_number_ppp0=( "*99#" )
chat_ppp0=(
'ABORT' 'BUSY'
'ABORT' 'ERROR'
'ABORT' 'NO ANSWER'
'ABORT' 'NO CARRIER'
'ABORT' 'NO DIALTONE'
'ABORT' 'Invalid Login'
'ABORT' 'Login incorrect'
'TIMEOUT' '5'
'' 'ATZ'
'OK' 'ATM0'
'OK' 'ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0'
'OK' 'AT+CGDCONT=1,"IP","internet2.voicestream.com"'
'OK' 'ATDT\T'
'TIMEOUT' '60'
'CONNECT' ''
'TIMEOUT' '5'
'~--' ''
)

preup() {
case "${IFACE}" in
ppp*) modprobe ppp_generic; modprobe ppp_async;;
esac
return 0
}
postdown() {
case "${IFACE}" in
ppp*) rmmod ppp_async; rmmod ppp_generic;;
esac
return 0
}

------------------------------------

Note my use of internet2.voicestream.com and the username/password of guest/guest. One of those two changes (from internet3.voicestream.com and no username/password) was what I had to do to get DUN working over and above what has been documented here to date.
 

The Following 2 Users Say Thank You to in-maemo For This Useful Post: