AmedeeBulle / pyrak811

RAK811 Python 3 library for Raspberry Pi
Apache License 2.0
49 stars 24 forks source link

device reports readiness to read but returned no data #10

Closed aal7 closed 4 years ago

aal7 commented 4 years ago

Hello, I wonder if you can help me. I have downloaded the code to two RPis with LoRa pHats. If I run the code on one of the RPis, it's fine. I can see the transmissions on my spec analyser and all is fine. The same applies if I run it on the other RPi.

However, if I run the code on one RPi, wait until it's waiting for an incoming message and then run the code on the other RPi, I immediately get this message on the first RPi:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/serial/serialposix.py", line 501, in read
    'device reports readiness to read but returned no data '
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/dist-packages/rak811/serial.py", line 106, in _read_loop
    line = self._serial.readline()
  File "/usr/local/lib/python3.7/dist-packages/serial/serialposix.py", line 509, in read
    raise SerialException('read failed: {}'.format(e))
serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

This happens whichever RPi I start first. It's a bit beyond my experience level to know what's going on here. Can anyone help me? Many thanks

aal7 commented 4 years ago

My apologies. This was my own finger trouble, I will close this issue now.