Bosch Sensortec Community

    Showing results for 
    Search instead for 
    Did you mean: 

    Doubts about BSEC 2.0 and BME68x

    Doubts about BSEC 2.0 and BME68x


    Hello guys.

    I changed the library in my devices from BSEC 1.6 to BSEC 2.0. 

    Had to do that because I was using BME688 sensor and it wasn't working properly with BSEC 1.6.

    First thing I noted on BSEC 2.0 example was that it uses "BSEC_SAMPLE_RATE_HIGH_PERFORMANCE". This sample rate is the so called "to debug only (1Hz)"  stated in the datasheet? I mean, high performance sample rate is suitable for production?

    My device is connected to the grid, so low power is not a requirement.

    I changed the sample rate to BSEC_SAMPLE_RATE_LP as I was using with BSEC 1.6 and I got the following error: BSEC error code : -12. Which according to bsec_datatypes.h means:

    "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"

    Why is that error?

    I'm planning to use BME680 too, is there any significant change in the code I should do? Is there anyway to check which sensor is connected, if BME680 or BME688?

    I don't really need the featurtes of BME688 (AI), all I need is IAQ Index, eCO2 and bVOC. I'd love to use the AI but it seems impossible to get a development board this days... I'm using BME688 because Bosch support recommended me to use that sensor for new products. And because it's more available in the market.


    Following that same example, another difference I encountered with provious versions is the callback... I've seen that the sensor not always produces the same outputs. For example, IAQ Index is not produced every time the callback is called... Is that because of BSEC filtering and buffering sensor outputs? If so, how can I configure that?

    If I only need to take measures every 5 minutes or so...What's the recommended working mode for that? With BSEC 1.6 I was sing LP Mode, and taking measures every 3 sec, and discarding all the measures I didin't need... Is that the right way to proceed in this case?

    Thanks for all!



    PS: Please update the repository!

    3 REPLIES 3

    Community Moderator
    Community Moderator

    Hello Emiliano, 


    If you don't need AI things, BME680 + BSEC 1.x can be option for your application.

    There is some improvements in BSEC 2.x library, but something different from BSEC 1.x like we don't use forced mode anymore. 

    Therefore, GAS and IAQ value aren't generated every 3s. 

    And also, you need to change application level and library as well to use BSEC 2.x. (Need some effort)

    At this point, if you don't need to add new features, BME680 is okay to use. 

    Please let me know if you havea any further quesitons. 

    Thank you. 

    Hello Minhwan, thanks for your response.

    I'll migrate to BSEC2.0 my application.

    My main question here is about that "BSEC error -12" (when using something else besides high perf mode) and if that "HIGH PERFORMANCE MODE" is suitable for production or if that's the "debug mode" mentioned on the datasheet.

    Having that callback in BSEC 2.0 is actually a relief for me, I don't mind not having IAQ every 3 sec. Just wanted to be sure thats the expected behaviour, as I had hard times trying to find documentation about BSEC 2.0 (besides that one basic example).



    Community Moderator
    Community Moderator

    Hello EmiQS, 


    I got you points. 

    Since our BME688 and BME680 pursue low energy, our config files are for low power. 

    Therefore, LP or ULP is right setting for production. I don't think you will get -12 error even if you set performance mode.

    Please let me know if you have further quesitons. 

    Thank you.