Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    Not able to get Gas Estimate Channel X from BSEC

    Not able to get Gas Estimate Channel X from BSEC

    New Poster

    Hello All
    Goof Day!!
    We are integrating BSEC library with BME688 sensor on NRF SDK ,
    We succesfully able to get compensated Temprature , Humidity,Pressure value from BSEC
    But we are facing issue to get Gas Estimate X out from BSEC,it always show zero value even after 45 minute of test run.
    And also IAQ value always show 25 and "Run in status"  flag always show 0 from BSEC output.

    Please suggest possible solustion of issue.

    Please find detail log in Attachedment

    Let me know if more information require.

    12 REPLIES 12

    Community Moderator
    Community Moderator

    Hello jadeja14890,

    I think you could download BSEC1.x that had C language example. Then you don't need migrate BSEC2.X arduino project to C project, and avoid some problems.

    After you download it, you could refer "examples\bsec_iot_example.c" file.

    I have a similar problem using a BME688 ,BSEC and the BME68X C API from GitHub

    Whenever I try to subscribe the BSEC_OUTPUT_GAS_ESTIMATE_1, bsec_update_subscription returns an error.

    I tried all the BSEC_SAMPLE_RATE macros as well as 1 divided by the duration of the heater profile.

    As I understand it, the sample rate is the amount of samples per second.

    Therefore for a heater profile with a total duration of 100 ms the sample rate should be 1000 ms / 100 ms = 10.

    But if i subscribe the gas estimate with this sample rate I recieve the error -12 by the bsec_update_subscription function.

    I have also recieved error -10.

    The sample_rate of the requested output (virtual) sensor passed to bsec_update_subscription() does not match with the sampling rate allowed for that sensor

    For testing I exported an alogrithm from AI Studio and I use the .config file to call bsec_set_configuration but the gas estimates are always at 0.0 with 0 acccuracy.

    So here are my questions

    1. Which is the correct sample rate to subscribe the BSEC_OUTPUT_GAS_ESTIMATE_1 etc. ?
    2. Do I need to call bsec_update_subscription if I am using a config that was generated as an algorithm by the AI Studio?
    3. Is there a way to extract the subscribed Outputs from the bsec config or the bsec state?

    Community Moderator
    Community Moderator

    Hello MightyNate,

    1.There was integration guide document under "integration_guide" folder as you have downloaded BSEC2.0.6.1 package. You could see sampling rate selection in document.

    BSEC supported virtual sensor output signals.png

    2, 3. In "BME AI-Studio document", it supported to export the algorithm as BSEC configuration file. Refer BME688 integration guide document for how to use it in your project.

    Export the algorithm.png