Closed circuitmike closed 2 years ago
It looks like some commands including Scd40Cal
and Scd40Test
(but not only) requires measurment to be stopped in order to be proceed
You should use Scd40Stop
before attempting any of these function and then use eihter Scd40Strt
or Scd40StLP
to restart measuments
As there doesn't seem to be any specific documentation page about this driver, a contributor who has the device and learned how to use it the hard-way would be welcomed to participate to the docs.
scd40stop
returns the same error message as the other commands, unfortunately. That's interesting, though - I didn't even notice that that command existed. I think I'll dig into the source code a bit more and see if I can figure out what's going on here. And if I do eventually get this figured out I'd be happy to contribute to the documentation!
Ah, that's unfortunate Without the device in hand, I would be difficult to go further If you are able to do some coding, this driver lacks debug messages that would be helpful to understand hte cause of the failure. I see from your StatusSNS that the SCD40 is there, so the driver is enabled and the device is detected (driver not included, not enabled or device not detected is a common source of not working commands - not the case here apparently)
May be you could try with only the SCD40 connected (and disabling the SCD30 driver) just to narrow donw the things
Most commands can only be issued when no periodic (low power or regular) measurement is being done.
(And that the intention about creating documentation too, but....)
This issue has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions.
I don't want the bot to close this so I'm replying. I still haven't had a chance to dig into the code, but I have the hardware sitting on my desk and I'll take a look soon.
I recompiled 12.0.2 with support for the SCD40/41 but without support for the SCD30. Interestingly, the commands that returned "unknown command" errors in the past now seem to work fine, even with both sensors connected. I'm not sure yet why this is, but I'm thinking there's a duplicate symbol somewhere or something like that, maybe as the result of a copy-and-paste operation since the SCD40/41 and SCD30 sensor code are so similar, the latter being based on the former. I'll continue to dig and see what I come up with.
Pls verify using latest dev release and report back.
OK, after some false starts (and a couple of deleted comments as a result) I can confirm that the problem no longer exists in the latest dev version. Everything seems fine now. Thanks for everyone's help!
PROBLEM DESCRIPTION
The console commands for the SCD40/SCD41 sensor are not recognized (scd40cal, scd40test, etc.) I compiled my own binary with support for both the SCD30 and SCD40/SCD41 sensors. The console commands for the SCD30 sensor work as expected but those for the SCD40/SCD41 do not. Both sensors are connected simultaneously, if that might matter. I did check the source code and the commands are listed there, as is the code meant to handle them.
REQUESTED INFORMATION
Backlog Template; Module; GPIO 255
:Backlog Rule1; Rule2; Rule3
:Status 0
:weblog
to 4 and then, when you experience your issue, provide the output of the Console log:TO REPRODUCE
Attempt to use any of the scd40 console commands (scd40test, scd40cal, etc.)
EXPECTED BEHAVIOUR
The commands would execute as expected, as they do with the SCD30 sensor
SCREENSHOTS
N/A
ADDITIONAL CONTEXT
N/A
(Please, remember to close the issue when the problem has been addressed)