lewapek / sds-dust-sensors-arduino-library

Library for Nova Fitness SDS dust sensors family (SDS011, SDS021)
MIT License
64 stars 19 forks source link

Invalid firmware version #10

Open lewapek opened 5 years ago

lewapek commented 5 years ago

Sensor board sometimes returns incorrect firmware version with status OK. Some of tested sds011 sensors returned 1.0.0 version [year.month.day].

Solution: version should be checked against possible ranges (at least month and day) and result in different status (not ok - it may require new status)

cyberman54 commented 2 years ago

My board returns with

ESP_LOGI(TAG, "SDS011 firmware version %s", (sds.queryFirmwareVersion().toString()).c_str());

this

SDS011 firmware version Firmware version [year.month.day]: -1.-1.-1

lewapek commented 2 years ago

I remember I had the same problem - that's why I created the issue :) Sometimes it happens - the solution is to retry - you should get the correct version (maybe the sensor needs some time to warm-up)

cyberman54 commented 2 years ago

It seems a sds.wakeup() right after opened the serial bus, before sending first command, avoids this issue.

lewapek commented 2 years ago

it was non-deterministic in my case sometimes works - sometimes I needed to retry once