[maemo-developers] [maemo-developers] Disconnect rfcomm stays between bt_disconnected and rf_disconnected

From: koos vriezen koos.vriezen at gmail.com
Date: Mon Mar 27 14:43:20 EEST 2006
Hi,

GPSDrive, ported to Hildon, is a really nice addition to N770. However
I'm having some trouble with my bt GPS receiver and N770.
1. Often after a few minutes GPSDrive reports a timeout on the GPS receiver.
2 The bt commection doen't disconnect properly.

The first thing might be a gpsd/gpsdrive issue, but the second not.
Also because of the first problem, the second is quite annoying.

So if I do
  /usr/bin/rfcomm connect 0 $GPSID
it connects and I'm able to run gpsd/gpsdrive (for some time)
However if I kill rfcomm with -INT, it doesn't fully disconnect but
does print 'Disconnected'. I can't reconnect anymore and even a
'hcitool scan' fails.
I've setup a smal program that uses the com.nokia.btcond.request
interface for connecting and disconnecting, and here I see the same
issue but, strangely enough, not all the time.
(using com.nokia.btcond.request.disconnect then)
When such an half disconnected state occurs, I see that

dbus-send --system --dest=com.nokia.btcond --print-reply
/com/nokia/btcond/request com.nokia.btcond.request.connection_status
string:$GPSID

returns 'connected'. Calling 'com.nokia.btcond.request.disconnect',
takes a while, reports success, but still keeps the connection.
Did found that closing the n770 w/ the plastic cover fully disconnects the bt.

Questions that I have right now are:
1. Why doesn't rfcomm hang up properly
2. What is the exact difference between rfcomm and using the dbus
calls on 'com.nokia.btcond.request', eg. rfcomm never asks for a PIN,
but using 'com.nokia.btcond.request.rfcomm_connect' I get a popup for
that (actually only the first time, when reconnecting the second time,
and not having turned of the GPS device, I get a authentication
error).
3 Ideas what point 1 might be, eg the gpsd package is 2.13 and current
upstream is already 2.32.

Tia,

Koos

PS. if someone is interested in Hilden ported gpsdrive drop a note.
Although it's much more conveniant to be able to task switch, but only
the original version (from ApplicationCatalogWip) had a gpsdrive.sh
script doing both bt setup and application launcher. For the ported
version, one has to setup the bt and gpsd first and then launch
gpsdrive.
More information about the maemo-developers mailing list