我一直在尝试使用 bluez 和 ofono 在 linux 上构建免提配置文件应用程序。我已经通过 spd 注册了我的设备。我是这样连接手机的:
request = dbus_message_new_method_call("org.bluez","/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX","org.bluez.Device1", "Connect");
call = dbus_connection_send_with_reply_and_block(conn, request, -1, NULL);
当我尝试调用它时:
request = dbus_message_new_method_call("org.ofono","/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX","org.ofono.HandsfreeAudioCard", "Connect");
call = dbus_connection_send_with_reply_and_block(conn, request, -1, &dbus_error);
我收到一个错误:
{name = 0x55555556ce30 "org.freedesktop.DBus.Error.UnknownObject",
message = 0x55555556cf90 "Method \"Connect\" with signature \"\" on interface \"org.ofono.HandsfreeAudioCard\" doesn't exist\n", dummy1 = 0, dummy2 = 0, dummy3 = 0,
dummy4 = 0, dummy5 = 0, padding1 = 0x29}
我究竟做错了什么?