I update as requested (previously I commented /* Load previous library state, if available */ bsec_state_len = state_load(bsec_state, sizeof(bsec_state));)
Now error is at :
/* Call bsec_update_subscription() to enable/disable the requested virtual sensors */
status = bsec_update_subscription(requested_virtual_sensors, n_requested_virtual_sensors, required_sensor_settings,
=> status -16
=> BSEC_E_SU_SAMPLINTVLINTEGERMULT = -16, /*!< The sample_rate of the requested output (virtual) sensor passed to bsec_update_subscription() is not correct */
Please let me see the sample_rate in your configurate.
Example, the sample rate is BSEC_SAMPLE_RATE_LP in example code
You could find the value in this function.
/* Call to the function which initializes the BSEC library
* Switch on low-power mode and provide no temperature offset */
ret_bsec = bsec_iot_init(BSEC_SAMPLE_RATE_LP, 0.0f, bus_write, bus_read, sleep, state_load, config_load);
I did as you suggested:
ret = bsec_iot_init(BSEC_SAMPLE_RATE_LP, 0.0f, bus_write, bus_read, sleep, state_load, config_load);
The I2C link is OK because the first test is to read the Chip id and the value read is 0x61