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

I'm getting a ReadTimeoutError on my sensor #2

Closed
xNinjaKittyx opened this issue Jul 1, 2019 · 6 comments
Closed

I'm getting a ReadTimeoutError on my sensor #2

xNinjaKittyx opened this issue Jul 1, 2019 · 6 comments
Labels
documentation Improvements or additions to documentation

Comments

@xNinjaKittyx
Copy link

I'm using this with the enviro+, but I keep getting read error.

  File "/usr/local/lib/python3.6/dist-packages/pms5003/__init__.py", line 121, in read
    raise ReadTimeoutError("PMS5003 Read Timeout")
pms5003.ReadTimeoutError: PMS5003 Read Timeout

/dev/ttyAMA0 exists, but I'm not sure if it's setup properly, since the install script in the enviro+ library had several errors, and did not install everything properly.

I'm using Ubuntu-Mate 18.04.2 (for a Raspberry Pi ARMv8 64-bit system) on a Raspberry Pi 3 B

@Gadgetoid Gadgetoid added the documentation Improvements or additions to documentation label Jul 1, 2019
@Gadgetoid
Copy link
Member

It looks like some of the wisdom for the Enviro+ repository hasn't distilled down to here- chiefly that the PMS5003 wont work unless the Pi's UART is switched over to a full hardware UART instead of the "miniUART" since the miniUART is- even at 9600 baud- apparently unstable.

Try adding: dtoverlay=pi3-miniuart-bt to your /boot/config.txt manually. I'm guessing perhaps your /boot partition isn't mounted by default in Ubuntu Mate?

If you're missing the raspi-config utility, you should also ensure that:

  • The serial port is enabled (seems to be the case for you)
  • The Pi isn't configured to output a TTY over serial

I think this needs to be better documented here.

Gadgetoid added a commit that referenced this issue Jul 1, 2019
@xNinjaKittyx
Copy link
Author

I'm going off of memory, which I'll double check when I get home tonight.

  • As for dtoverlay, I think something is already set by enviro+'s install script.

printf "dtoverlay=pi3-miniuart-bt\n" >> $CONFIG

I do remember chcking /boot/config.txt manually to see if this was there.

  • For raspi-config, I installed it manually, however, the documentation I've seen in multiple places for enabling the serial port under "interface options" has not been the same experience I've been seeing on my raspi-config I think I went to Interface Options -> Serial -> Then it gave me a single yes/no prompt whether I wanted to enable something, which I pressed Yes on.

@xNinjaKittyx
Copy link
Author

Checking back.

The dtoverlay is already set to the correct value in the boot file.

raspi-config when I select Interface Options -> Serial, it asks me if I want "ARM I2C Interface to be Enabled" and I've tried both Yes/No and neither worked for me.

@Gadgetoid
Copy link
Member

You want the ARM I2C Interface to be Enabled, and the Serial Terminal to be disabled.

Other people encountering this issue have also suggested reseating the connector for the PMS5003, since it could be a good old-fashioned wiring problem.

@Fieel
Copy link

Fieel commented Nov 11, 2019

I stumbled upon this and it took me 30 minutes to realize I actually need the external hardware sensor and it's not embedded in the hat board. Silly me!

@Gadgetoid
Copy link
Member

Easy mistake to make! And useful to know- since I wouldn't otherwise have thought of asking "do you have a PMS5003 sensor connected at all?" Thank you!

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

No branches or pull requests

3 participants