# Root cause, if the bluetooth(kernel module and hardware) didn't finished the initial. Then:
bluez-4.98/src/main.c :
439 int main(int argc, char *argv[])
... ..
511 if (connect_dbus() < 0) {
512 error("Unable to get on D-Bus"); ^^^^^^^^
// The function connect_dbus() will return a non-zero, so will output a log "Unable to get on D-Bus".
# Root cause, if the bluetooth(kernel module and hardware) didn't finished the initial. Then:98/src/main.c :
^^^^^^^^
bluez-4.
439 int main(int argc, char *argv[])
... ..
511 if (connect_dbus() < 0) {
512 error("Unable to get on D-Bus");
// The function connect_dbus() will return a non-zero, so will output a log "Unable to get on D-Bus".
385 static int connect_dbus(void)init(&err);setup_bus(DBUS_BUS_SYSTEM, BLUEZ_NAME, &err);
^^^^^^^^^^^^^^^^is_set(&err)) {
^^^^^^^^^^^^^^^free(&err);
386 {
387 DBusConnection *conn;
388 DBusError err;
389
390 dbus_error_
391
392 conn = g_dbus_
393 if (!conn) {
394 if (dbus_error_
395 g_printerr("D-Bus setup failed: %s\n", err.message);
396 dbus_error_
397 return -EIO;
398 }
399 return -EALREADY;
// The value "conn" is non-zero and dbus_error_is_set(&err)) will return none-zero too.
Just restart the bluetooth service by manual, bluetoothd will be startup correctly.
sudo service bluetooth restart