07-22-2021 04:16 PM
I am attempting to get the BME680 up and running on the nrf52840dk board and I am using the iot example provided code.
My problem is that after a certain amount of time (its the same timestamp), output_ready is no longer called and only bme680_get_sensor_mode is called every ~33 seconds despite being on LP mode.
I'm hoping for some guidance in how to start troubleshooting this because I am a little lost as to what I can do without modifying the bsec library. The numbers at the end of the status values are tags I added for identification (so I knew which one was called).
I have attached the .c file for the iot_example I am using and the main function is below (its just the stock code included):
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(env_test_process, ev, data)
{
PROCESS_BEGIN();
return_values_init ret;
i2c_init();
ret = bsec_iot_init(BSEC_SAMPLE_RATE_LP, 0.0f, bus_write, bus_read, sleep, state_load, config_load);
if (ret.bme680_status)
{
LOG_INFO_("Could not initialise BME680\n");
}
else if (ret.bsec_status)
{
LOG_INFO_("Could Not Initialise BSEC Library\n");
}
bsec_iot_loop(sleep, get_timestamp_us, output_ready,state_save, 10000);
PROCESS_END();
}
/*---------------------------------------------------------------------------*/
LOG OUTPUT:
__________________________
------------MEASUREMENTS----------x100--------
bsec_status: 0
timestamp: 24101562000
IAQ index: 2500, Accuracy: 0
Temperature: 2900
Humidity: 4600
Pressure: 10020800
Gas: 2773500
CO2 Equivalent: 0
VOC Equivalent: 0
bme680_status = 0 4
bme680_status = 0 3
bme680_status = 0 1
bme680_status = 0 6
bsec_status = 0 5
------------MEASUREMENTS----------x100--------
bsec_status: 0
timestamp: 27101562000
IAQ index: 2500, Accuracy: 0
Temperature: 2900
Humidity: 4600
Pressure: 10020400
Gas: 2983900
CO2 Equivalent: 0
VOC Equivalent: 0
bme680_status = 0 4
bme680_status = 0 3
bme680_status = 0 1
bme680_status = 0 6
bsec_status = 0 5
------------MEASUREMENTS----------x100--------
bsec_status: 0
timestamp: 30101562000
IAQ index: 2500, Accuracy: 0
Temperature: 2900
Humidity: 4600
Pressure: 10020800
Gas: 3168200
CO2 Equivalent: 0
VOC Equivalent: 0
bme680_status = 0 4
bme680_status = 0 3
bme680_status = 0 1
bme680_status = 0 6
bsec_status = 0 5
------------MEASUREMENTS----------x100--------
bsec_status: 0
timestamp: 33109375000
IAQ index: 2500, Accuracy: 0
Temperature: 2900
Humidity: 4600
Pressure: 10020800
Gas: 3320700
CO2 Equivalent: 0
VOC Equivalent: 0
bme680_status = 0 1
bme680_status = 0 1
bme680_status = 0 1
bme680_status = 0 1
bme680_status = 0 1
bme680_status = 0 1
bme680_status = 0 1
bme680_status = 0 1
bme680_status = 0 1
Solved! Go to Solution.
07-22-2021 04:33 PM
Hello acanthe, I'm experiencing similar issues. In my case the regular cycle takes 10.6seconds, but some times BSEC takes as long as 120seconds to give me a IAQ value.
I see in your logs IAQ is always 25. Are you having problems with IAQ not moving from 25 (acc = 0) too?
I'll follow your topic!
Regards.
07-22-2021 04:45 PM
At the moment I am just trying to get it to continually get measurements (I assumed its not having time to calibrate/settle) but I can imagine once this is solved I may have that problem.
Nice to know I am not the only one with this issue!
NOTE: the device isn't hanging, from what I have gathered so far it looks like sensor_settings->trigger_measurement and sensor_settings->process_data are both 0 after a minute or so and do not change.
07-24-2021 02:09 AM
Hello Acanthe,
Are you using BSEC 1 or 2?
If you are using BME680, you have to use BSEC 1. If you pursue to use BSEC 2, please use BME688.
And if you are using BME680 and BSEC 1 and facing this issue, please let me know which example you are using.
Thank you.
07-26-2021 09:47 AM