Linux bluetooth development
 help / color / mirror / Atom feed
* [Bluez-users] dbus connection failed
@ 2007-03-16 23:50 Vincent Yau
  2007-03-19 15:08 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Vincent Yau @ 2007-03-16 23:50 UTC (permalink / raw)
  To: bluez-users


Hi:

I am trying to use the DBUS API in my pin exchange script.  I got a DBUS 
connection error when I execute this line:

   DBusConnection *conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);

When I print out err.message, I got a bunch of non-printable character so I 
could not quite figure out what the error is.

However, I took the same DBUS line and put in a stand-alone program and it 
works fine.

In my /etc/dbus-1/system.d, there is bluetooh.conf which is identifcal to 
the config that ships with Bluez.  I even explicitly include bluetooth.conf 
in my /etc/dbus-1/system.conf file.

I tried Bluez-Utils 3.7 and 3.9 and with the same results.

Is there any special trick to connect to DBUS system bus from within Bluez?

thanks

--v



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Bluez-users] dbus connection failed
  2007-03-16 23:50 [Bluez-users] dbus connection failed Vincent Yau
@ 2007-03-19 15:08 ` Marcel Holtmann
  0 siblings, 0 replies; 2+ messages in thread
From: Marcel Holtmann @ 2007-03-19 15:08 UTC (permalink / raw)
  To: BlueZ users

Hi Vincent.

> I am trying to use the DBUS API in my pin exchange script.  I got a DBUS 
> connection error when I execute this line:
> 
>    DBusConnection *conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);
> 
> When I print out err.message, I got a bunch of non-printable character so I 
> could not quite figure out what the error is.
> 
> However, I took the same DBUS line and put in a stand-alone program and it 
> works fine.
> 
> In my /etc/dbus-1/system.d, there is bluetooh.conf which is identifcal to 
> the config that ships with Bluez.  I even explicitly include bluetooth.conf 
> in my /etc/dbus-1/system.conf file.
> 
> I tried Bluez-Utils 3.7 and 3.9 and with the same results.
> 
> Is there any special trick to connect to DBUS system bus from within Bluez?

take a look at the example code in bluez-utils. I think that
passkey-agent.c is the easiest one.

Regards

Marcel



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Bluez-users mailing list
Bluez-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-users

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-03-19 15:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-16 23:50 [Bluez-users] dbus connection failed Vincent Yau
2007-03-19 15:08 ` Marcel Holtmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox