05-18-2021 07:48 PM
I'm using the bme680 with the bsec library and the bsec iot example code as my starting point. I notice that the sample code does not check the status for the call to bsec_sensor_control(). Under normal circumstances this always returns 0 but what if it doesn't? If I force an error with an invalid timestamp I notice it never recovers. What about bsec_do_steps()? The status code from this call is just passed to a user provided function.
Thanks,
Jonathan
05-19-2021 03:37 AM
Hello jonathan_c,
There was BSEC iot example code in another ticket, could you refer it?
https://community.bosch-sensortec.com/t5/MEMS-sensors-forum/BME680-with-BSEC-produces-on-0-0s-even-a...
05-21-2021 02:09 PM
Not really relevant at all. The link was a case of someone setting things up incorrectly. My point was that the libraries return error codes but none of the example code actually handles the error codes. Are the codes only for cases where someone has made a coding mistake? What if someone has a higher level process that starves the bme680 process for long enough that it gets a BSEC_W_SC_CALL_TIMING_VIOLATION when it finally runs? How do I recover? My goal is to have this run for years and I don't want to reset everything when their is an error.
06-09-2021 09:09 AM
Hello jonathan_c,
On my side, it worked well after I migrating BSEC to MCU. bsec_sensor_control() always returned 0.
You forced an error with an invalid timestamp, this is unreasonable in itself. The algorithm needs to be got correct input parameters, and it must ensure the parameters are correct.