Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 
    SOLVED

    BME688 Configuration parameters and internal state of library

    BME688 Configuration parameters and internal state of library

    lgacnik97
    Member

    I'm trying to understand what exactly functions bsec_set_configuration() and bsec_set_state() do. The latter demands some form of (virtual) sensor coefficients, which can be stored in bme68x_calib_data struct. Shall these coefficients calibrate individual virtual sensor by means of user-defined settings? And these coefficients could be set in case of calibrating BME688 in custom environment?

    The other function restores internal state of library. What is meant by "internal state"? The following quote is taken from function description:

    To ensure optimal performance, especially of the gas sensor functionality, it is recommended to retrieve the state using bsec_get_state() before
    unloading the library, storing it in some form of non-volatile memory, and setting it using bsec_set_state() before resuming further operation of the library.

    When should bsec_get_state() be called, exactly? Yes, it says "before unloading the library" but I'm unsure what is this referring to. Are functions bsec_set_configuration() and bsec_set_state() somewhat correlated?

    5 REPLIES 5

    lgacnik97
    Member

    From what I have read on other topics, is calibration data, e.g. bme688_sel_33v_3s_4d, used with bsec_set_configuration() ? What does it do to BME688 default sensor settings? How do the BME688 sensors perform without calibration data?

    Additionally, is bsec_get_state() intended to be called prior to BME688 device shut-down and be stored in local non-volatile memory and the state of library recalled by calling bsec_set_state() at next BME688 power-up? How does BME688 performance get affected by this additional step? Or rather, how does it behave without it?

    BSTRobin
    Community Moderator
    Community Moderator

    Hi lgacnik97,

    Because BSEC is provided in the form of a library, users can only access BSEC through API interfaces, but the details of interface implementation are not publicly disclosed.

    As you can see, BSEC runs in the background and calibrates sensors. A typical example is to obtain the current calibration status through the bsec_get_state() interface before shutting down and save it to Flash or EEPROM. After turning on, read from Flash or EEPROM and set the previous calibration status to the BSEC algorithm through bsec_set_state() interface.

    If the previous calibration status is not set on the next boot, the sensor may take more time to calibrate.

    Thank you for information Robin. Yes, I'm well aware that source code of BSEC is not publicly available for review. However, I'm merely inquiring about basic's of BSEC operation.

    That said, I think I understand now what "library internal state" means. Can you tell me more about the sensor callibration as well? What kind of effect does configuration data, such as bme688_sel_33v_3s_4d, have on sensors? And what is meant by 4-day and 28-day calibration setup - at which interval should the sensor be re-calibrated?

    What happens if sensors aren't configurated using one of the available configuration files at all?

    BSTRobin
    Community Moderator
    Community Moderator

    Hi lgacnik97,

    If you download latest library(BSEC2.4.0.0) from https://www.bosch-sensortec.com/software-tools/software/bme688-software, you can find integration guide under the software package. Refer section "1.2.2 BSEC Configuration Settings"

    You can only choose to set to BSEC from the currently supported configurations, such as bme688_sel_33v_3s_4d, as described in the integration guide. Host platform need to run BSEC every 3 seconds and calibration is completed within 4 days. Calibration is implemented internally in BSEC software and no details are disclosed.

    2023-06-29_22h53_00.png2023-06-29_22h43_36.png

    Normally, configurations are selected based on application requirements, such as power consumption and calibration time required by the application. If you have not chosen to configure and configure to BSEC, it will use the default configuration.

    Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist