I have an Intel Edison with the latest Board software is latest available, and I am developing a bluetooth driver using the Eclipse based IDE. My Bluez version number in this edison release is 5.37. I am writing it for a system that scans for bluetooth devices nearby, detects sensor devices based on name and MAC address, pairs and connects sensor devices automatically.
But pairing and connecting has been a problem since I can detect sensor devices but I am unable to pair them through the bluez5 interface. I have tried using the D-BUS interface and its no good as I keep getting the following error message:
Method "FindAdapter" with signature "s" on interface "org.bluez.Manager" doesn't exist
Here's the code:
DBusMessage *msg, *reply;
DBusError err;
const char *reply_path;
char *path;
msg = dbus_message_new_method_call("org.bluez", "/","org.bluez.Manager", "FindAdapter");
dbus_message_append_args(msg, DBUS_TYPE_STRING, &adapter,DBUS_TYPE_INVALID);
dbus_error_init(&err);
reply = dbus_connection_send_with_reply_and_block(conn, msg, -1, &err);
dbus_message_unref(msg);
P.S. -
DBusConnection *conn -> DBUS_BUS_SYSTEM
const char *adapter -> "hci0".