Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RuntimeError: Device is not responding! #6

Closed
npl12 opened this issue Mar 9, 2018 · 2 comments
Closed

RuntimeError: Device is not responding! #6

npl12 opened this issue Mar 9, 2018 · 2 comments

Comments

@npl12
Copy link

npl12 commented Mar 9, 2018

Hello,
I really like this library. I cloned it and executed it on a raspberry pi.
I start the DebugServer with DebugServer(BLEConnection().connect()).start()

Most of the time everything works fine, and I can execute commands on the movehub.
But every once in a while I get the following error:

ERROR:comms:Failed to handle cmd: Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pylgbst/comms.py", line 197, in _handle_conn
self._handle_cmd(json.loads(line))
File "/usr/local/lib/python2.7/dist-packages/pylgbst/comms.py", line 205, in _handle_cmd
self.ble.write(cmd['handle'], unhexlify(cmd['data']))
File "/usr/local/lib/python2.7/dist-packages/pylgbst/comms.py", line 115, in write
return self.requester.write_by_handle(handle, data)
RuntimeError: Device is not responding!

In the issue before, you wrote that the battery could be an issue.
I checked the battery and even used brand new ones, but I still get the error.

Do you have any idea how to get rid of this error?

@undera
Copy link
Owner

undera commented Mar 9, 2018

It's not because of battery itself, it is because of loss of signal. I also get this problem sometimes, but just reconnecting helps. I have no idea what makes it to lose BLE signal. It is obviously happening out of control for pylgbst library, just inside BLE communication layer.

@undera
Copy link
Owner

undera commented Mar 9, 2018

It's duplicate of issue #2

@undera undera closed this as completed Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants