pylgbst
pylgbst copied to clipboard
RuntimeError: Failed to obtain MoveHub handle
I got this error, it was working fine, i don't know what i changed in the system but now it raise this exception
Traceback (most recent call last):
File "index.py", line 29, in <module>
excavator.connect(mac_address_hub1, mac_address_hub2, hci1, hci2)
File "/home/pi/codes/DI/bluetoothIO/excavator.py", line 22, in connect
self.connectionHub1.connect(mac_address_hub1)
File "/home/pi/codes/DI/bluetoothIO/lglib/pylgbst/comms/cgatt.py", line 110, in connect
self._device.connect()
File "/home/pi/codes/DI/bluetoothIO/lglib/pylgbst/comms/cgatt.py", line 31, in connect
raise exc
RuntimeError: Failed to obtain MoveHub handle
This error happens when library failed to find MoveHub device: https://github.com/undera/pylgbst/blob/94db2840f42919e464f075ae772daedf877c93ca/pylgbst/comms/cgatt.py#L58
To troubleshoot, I suggest enabling DEBUG level logging, and sharing the full log here, to see if any device were found at all.
Another approach would be to use different connection backend, for example pygatt or bleak.