我认为,当我启动Bluetooth守护程序时,将创建D-Bus接口 org.bluez.Network1 和 Connect < / em> 方法。我已经从GitHub克隆,构建和安装了最新最出色的BlueZ(v5.45),它附带了一套Python测试脚本。当我运行 测试网络 时:
# ~/b/test> ./test-network B8:27:EB:F7:E4:50 panu
Traceback (most recent call last):
File "./test-network", line 42, in <module>
iface = network.Connect(service)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 70, in __call__
return self._proxy_method(*args, **keywords)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
**keywords)
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "s" on interface "org.bluez.Network1" doesn't exist
当我尝试使用 bt-pan 在客户端上构建网络接口时,我得到:
~# /usr/bin/bt-pan client --wait B8:27:EB:00:D4:35
Traceback (most recent call last):
File "/usr/bin/bt-pan", line 237, in <module>
if __name__ == '__main__': sys.exit(main())
File "/usr/bin/bt-pan", line 209, in main
try: iface = net.Connect(opts.uuid)
File "/usr/lib/python2.7/dist-packages/dbus/proxies.py", line 145, in __call__
**keywords)
File "/usr/lib/python2.7/dist-packages/dbus/connection.py", line 651, in call_blocking
message, timeout)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: Method "Connect" with signature "s" on interface "org.bluez.Network1" doesn't exist
如何创建D-Bus接口 org.bluez.Network1 以及 Connect ? / p>
顺便说一句, org.bluez.Network1 不应与BlueZ一起使用吗?
>