rfcomm_pppd fails (T40p and Nokia 7650)

Maksim Yevmenkin m_evmenkin at yahoo.com
Sat Jul 19 14:47:10 PDT 2003


Peter,

> I've been trying to get connected using GPRS and Bluetooth on my IBM
> ThinkPad T40p. It has a bluetooth card that sits on the USB bus, so
> I'm using the ubt driver.

thank you for trying this :) 

> I am following the descriptions at:
> 	
>    http://www.oook.cz/bsd/bluetooth.html
> 	
> and everything works perfectly up until the point where I want to connect
> using rfcomm_pppd. I run the following command:
> 	
>    rfcomm_pppd -a 00:02:ee:73:89:0b -c -C 1 -d -l rfcomm-dialup

good. i assume that "00:02:ee:73:89:0b" is your phone BD_ADDR, right?

> Where channel 1 is Dial-Up Networking (I also tried 2 - Bluetooth Serial
> Port, just in case). When I do things one of two things happen:
> 	
>    * Either it just exists after a little while, no messages.

this probably means that you have established Bluetooth RFCOMM connection
and PPP has started, but then something went wrong with PPP. could you
please add "set debug all" in your /etc/ppp/ppp.conf file and look in
/var/log/ppp.log to see what the problem might be?

>    * Or it exits with:
>         rfcomm_pppd[39117]: Could not connect socket. Connection refused
> (61)

this means that PC was not able to establish Bluetooth RFCOMM connection.
perhaps phone rejected it, or could be other reason. i would like to see
HCI dump. could you please compile hcidump(1) from the snapshot's ports/
directory and then run it 

# hcidump -x 

after that try to run rfcomm_pppd(8) again and send me the output of hcidump.
Note: hcidump(1) is included in snapshot: 

http://www.geocities.com/m_evmenkin/ngbt-fbsd-20030604.tar.gz

> On the phone side the bluetooth indicator indicates traffic is happening
> for a while. However the GPRS indicator doesn't flinch (normally it's a
> three-step indicator indicating either that nothing is happening, or a G if
> GPRS is in the process of connecting, or an encircled G when GPRS is up and
> running).

hmmm... strange... i need to see HCI dump to help you.
 	
> The laptop is paired with the phone and set as "authorized" on the phone
> side. I have tried with hcsecd both on and off; and with
> read/write_authentication_enable both 1 and 0, and so far no luck.

hcsecd(8) must be running all the time. my ericsson t68i stores link
key once i pair PC and the phone. next time when PC tries to connect to
the phone, the phone will ask for the link key. if hcsecd(8) is not
running then link key request from the phone will timeout and Bluetooth
connection will fail. perhaps nokia phones use the same scheme.

another little problem is that hcsecd(8) does not store link keys, so
you will need to enter PIN every time to get it working. this problem
was fixed, but i did not release this yet (there is hcsecd(8) patch for
recent snapshot however).
 	
> Besides this not working, the one "weird" thing I noticed was that once a
> BT connection (as reported by read_connection_list) is established, it
> doesn't stay up for long. After a timeot of just a few seconds it
> disappears
> from the list. I don't know if this would affect DUN, but the guide doesn't
> mention it and I know that a friend of mine is not experiencing such quick
> disapperance of bluetooth connections in BlueZ on Linux with the same
> phone.
> Is it normal?

it is probably "auto disconnect" feature. L2CAP node has auto disconnect
timeout (default 5 seconds). if baseband connection was inactive for the
duration of the auto disconnect timeout we will close it. you can use 
l2control(8) utility to change (or disable) auto disconnect timeout.
	
> (The connection comes back automatically when doing an l2ping or similar
> though.)

right, and it will go down once you stop l2ping and wait for auto disconnect
timeout.

> In ppp.conf the only line in the default section that is not commented out
> is:
> 	
>     set dial "ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 \
>               \"\" AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT"
> 	              
> And my rfcomm-dialup section looks like this:
> 	
> rfcomm-dialup:
>   enable force-scripts
>   set authname "test"
>   set authkey "test"
>   set phone "*99***1#"
>   set login
>   set timeout 30
>   enable dns
>   resolv rewrite
>   set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0
>   add default HISADDR

this looks normal to me. i would add "set debug all" to debug PPP problem.

> I've tried *99# as the phone number aswell, which is what is normally used.
> The authname/authkey is currently set to test, but I have tried with it
> empty aswell. (The local operator, Telia, is not using any login/password
> combo, but my previous experience on other laptops with Windows tells me
> that it often doesn't work when empty, as I have often had to use
> test/test.)

empty authname/authkey should work just fine. it only matters if remote
side requests them (and it seems your provider does not). also you should
make sure you have the right service plan on you phone. APN (Access Point
Name) should point to access point that talks PPP not WAP.
	
> One last thing. I haven't gotten this to work in Windows either, but with
> different symptomes. There the GPRS indicator shortly changes to a G
> (meaning its connecting), and then goes down again. But using a terminal
> problem an ATZ followed by an ATDT*99# is quite enough to get PPP started
> on
> the phone. I don't know if the problems ar related.

so, you are saying that you can connect to the "serial port" service on
the phone, then start windows termial program and after you type

ATZ
ATDT*99#

you can see PPP frames? if that is true than you can do the same thing in
FreeBSD. use rfcomm_sppd(8) utility to connect to the "serial port" service
on your phone. then start ppp(8) and use tty in "set device" command and try
to open PPP session. then look into /var/log/ppp.log to see what is going on.

thanks,
max


__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com


More information about the freebsd-mobile mailing list