digidotcom / xbee-python

Python library to interact with Digi International's XBee radio frequency modules.
Mozilla Public License 2.0
185 stars 93 forks source link

`Serial exception while reading: device reports readiness to read but no returned data #275

Closed Hassan-de-dot closed 2 years ago

Hassan-de-dot commented 2 years ago

Hello, I have this really bizarre error. I am running a python application on a Jetson nano that makes use of an Xbee (S2C) to transmit data to another remote module, the script I am using is similar to the first example in the docs, I only increased the "sync timeout to 10 seconds", anyways when I run the application manually everything works fine, however when the app runs automatically on boot it runs fine for a couple of seconds and data is transmitted, then suddenly freezes giving the following error: Serial exception while reading: device reports readiness to read but no returned data (device disconnected or multiple access on port?) The app starts at boot using a custom service. Any ideas? I have been stuck at this error for a few days now, any help would be appreciated. Thanks in advance

Hassan-de-dot commented 2 years ago

For whoever may need this in the future. The error was that nvgetty service was blocking ttyTHS1 on boot. I only needed to stop that service: systemctl stop nvgetty systemctl disable nvgetty

See here