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

SerialException when waiting for frame #48

Open
GoogleCodeExporter opened this issue Apr 11, 2015 · 0 comments
Open

SerialException when waiting for frame #48

GoogleCodeExporter opened this issue Apr 11, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

I am currently using the library with multiple xbee devices configured as 
DigiMesh.  I use an asynchronous callback function for reading data and I 
asynchronously call the write function through the use of other callback 
inputs.  Each xbee device may be tasked with sending and receiving copious 
amounts of data between computers.  I occasionally receive the following error:

Exception in thread Thread-5:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner
    self.run()
  File "/usr/local/lib/python2.7/dist-packages/xbee/base.py", line 95, in run
    self._callback(self.wait_read_frame())
  File "/usr/local/lib/python2.7/dist-packages/xbee/base.py", line 399, in wait_read_frame
    frame = self._wait_for_frame()
  File "/usr/local/lib/python2.7/dist-packages/xbee/base.py", line 131, in _wait_for_frame
    byte = self.serial.read()
  File "/usr/lib/python2.7/dist-packages/serial/serialposix.py", line 456, in read
    raise SerialException('device reports readiness to read but returned no data (device disconnected?)')
SerialException: device reports readiness to read but returned no data (device 
disconnected?)

Sometimes the error happens immediately, while sometimes it takes time before 
it occurs.  I can also say that it is not due to a bad connection as I have 
confirmed the connection as well as on various different vehicles.  I am 
curious as if it is due to multiple writes and reads possibly colliding as I 
did not see any protection against this.

I appreciate any help someone could give.

Original issue reported on code.google.com by [email protected] on 20 Mar 2014 at 12:12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant