[maemo-developers] [maemo-developers] btcond / d-bus problems

From: Andrew Ramsay ramsaya at dcs.gla.ac.uk
Date: Tue Dec 27 15:39:21 EET 2005
I've been trying to connect a Nokia LD-1W Bluetooth GPS unit to an N770 
programmatically. The manual method on the wiki (hcitool scan + rfcomm 
bind <dev> <bda>) works fine, but I haven't been able to get anywhere with 
the btcond D-BUS interface linked from the wiki page. I've got no real 
experience of using D-BUS, which may well be part of the problem, but I've 
tried lots of different things now and none of them are working.

I started off with the basic example program which just connects to the 
session bus, lists the services available, then exits. That works fine 
with both session and system buses. I then tried to modify it slightly to 
obtain a proxy for the "com.nokia.btcond" service, which didn't work until 
I discovered you had to connect to the system rather than the session bus. 
Once I'd got the proxy, I tried to call the rfcomm_bind method as 
suggested in the wiki. However, all I get back is an error saying that 
this method doesn't exist on the com.nokia.btcond.request interface. 
Calling any of the other methods results in the error 
"com.nokia.btcond.invalid_dev", which is supposed to indicate an invalid 
BDA from what I can tell, although the address I'm using is definitely 
correct.

Can anyone help me out here? As I said, I have no previous experience with 
D-BUS programming, so I may well be doing something very wrong and just 
haven't noticed yet. I'm using the Glib bindings for D-BUS since that was 
what the example code used. If anyone has actually done this already I'd 
be very interested to hear how you did it.

Andrew

More information about the maemo-developers mailing list