getsenic / nuimo-linux-python

Nuimo Python SDK for Linux to connect and communicate with Nuimo controllers made by Senic
https://senic.com
MIT License
52 stars 20 forks source link

dbus.connection: Unable to set arguments #29

Closed chbardel closed 7 years ago

chbardel commented 7 years ago

sudo nuimoctl --discover ERROR:dbus.connection:Unable to set arguments ({'Transport': 'le', 'UUIDs': ['f29b1525-cb19-40f3-be5c-7241ecb82fd2', 'f29b1523-cb19-40f3-be5c-7241ecb82fd1', '00001801-0000-1000-8000-00805f9b34fb', '0000180a-0000-1000-8000-00805f9b34fb', '0000180f-0000-1000-8000-00805f9b34fb']},) according to signature None: <class 'TypeError'>: Expected a string or unicode object Traceback (most recent call last): File "/usr/local/bin/nuimoctl", line 9, in <module> load_entry_point('nuimo==0.3.2', 'console_scripts', 'nuimoctl')() File "/usr/local/lib/python3.4/dist-packages/nuimoctl.py", line 112, in main controller_manager.start_discovery() File "/usr/local/lib/python3.4/dist-packages/nuimo/nuimo.py", line 35, in start_discovery super().start_discovery(service_uuids=Controller.SERVICE_UUIDS) File "/usr/local/lib/python3.4/dist-packages/gatt/gatt_linux.py", line 128, in start_discovery self._adapter.SetDiscoveryFilter(discovery_filter) File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 70, in __call__ return self._proxy_method(*args, **keywords) File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__ **keywords) File "/usr/lib/python3/dist-packages/dbus/connection.py", line 641, in call_blocking message.append(signature=signature, *args) TypeError: Expected a string or unicode object

I am using a raspberry pi. Discovery and connecting with blueZ works like a charm. My Pi runs the stated BlueZ 5.44.

larsblumberg commented 7 years ago

That part of the error message is suspicious: according to signature None: <class 'TypeError'>: Expected a string or unicode object. Looks like some type couldn't be resolved.

Which adapter name does your Bluetooth adapter have? Is it hci0?

chbardel commented 7 years ago

The name is hci0 thats right! I really dont know where this is coming from. I followed the instructions one by one and on bluetooth side it is no problem to find and connect to the nuimo via CLI.

chbardel commented 7 years ago

After a reboot everything works fine now. Always the same stupid thing, while the sophisticated developers mind produces the complexest of possible errors.

larsblumberg commented 7 years ago

Glad it's working now. Thanks for your feedback!