<span style="font-family: monospace;"><br></span>Hi:<span style="font-family: monospace;"> </span>I am trying to use the Bluez-DBUS API in my Bluetooth device pin exchange script. I got a DBUS connection error when I execute this line:
<span style="font-family: monospace;"><br></span><br> DBusConnection *conn = dbus_bus_get(DBUS_BUS_SYSTEM, &err);<span style="font-family: monospace;"><br><br></span>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.
<span style="font-family: monospace;"><br></span>However, I took the same DBUS line and put in a stand-alone program and it works fine.<span style="font-family: monospace;"><br><br></span>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.<span style="font-family: monospace;"> </span>I tried Bluez-Utils 3.7 and
3.9 and with the same results.<span style="font-family: monospace;"><br><br></span>Is there any special trick/configuration to connect to DBUS system bus from within Bluez Bluetooth stack?<span style="font-family: monospace;">
<br><br></span>thanks <br><br>--v<br><pre><br></pre><br>