Bosch Sensortec Community

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

    BSEC2.2.0.0 Estimates with 2022_05_17_01_09_bsec_h2s_nonh2s_2_2_0_0.config on BME688

    BSEC2.2.0.0 Estimates with 2022_05_17_01_09_bsec_h2s_nonh2s_2_2_0_0.config on BME688

    Prop4et
    Established Member

    I'm trying to use the 2022_05_17_01_09_bsec_h2s_nonh2s_2_2_0_0.config file from the BSEC2.2.0.0 library to get the estimates for the H2S/non H2S that should be given by the BSEC_OUTPUT_GAS_ESTIMATE_1 and BSEC_OUTPUT_GAS_ESTIMATE_2 in the virtual sensors . I also requested TPHG and all the sample rates are set to SCAN.

    The first thing that differs from what should be the standard way to do it is that i don't actually load the .config file (bsec_set_configuration returns a mismatch version error) but i use the bsec_serialized_configurations_selectivity.h and bsec_serialized_configurations_selectivity.c files to load the configuration since it works and gives me the OK code as a return.

    Next i initialize the bme library and call the bsec update subscription.

    Inside the main loop i then call the sensor control from which the returned mode is the parallel (2) and from which i take all the parameters for the oversampling and the heater duration and temperature profiles and then i set all the configurations and the op mode.

    Next i check if i the trigger measuramente is 1 and if so i call the get data.

    Then i check i process_data is not 0 and if so a for loop is called to initialize the input[] array with the data[i] values that are then passed to bsec do steps.

    When checking the output parameter from bsec_do_steps() though i don't have the values for the estimates but only for TPHG.

    How do i get the values for the gas estimates? Do i have to call the bsec_do_step() with different parameters with respect to the forced mode? Do i have to wait more time?

    4 REPLIES 4

    Prop4et
    Established Member

    I also noticed that if i request TPHG the bietfield of process_data in bsec_bme_settings_t is 15 that is ..001111 in binary so requesting the signals for TPHG as the input. When i add the GAS_ESTIMATE_1 in the virtual sensors the bitfield becomes the equivalent of 8388623 in deciamal (something like 1000..001111 at 24 bits). Why is that 1 at the beginning? What does it mean? Does it influence the output somehow?

    BSTRobin
    Community Moderator
    Community Moderator

    Hi Prop4et,

    Did you strictly refer the example code "bsec_2-2-0-0_generic_release_30052022\examples\Bosch_BSEC2_Library\examples\generic_examples\basic_config_state" and document "bsec_2-2-0-0_generic_release_30052022\integration_guide\BST-BME688-Integration-Guide-AN011-20.pdf"?

    Prop4et
    Established Member

    Hi Robin,

    I strictly referred to the integration guide, while i needed to adapt the example code to my case because i am using a raspberry pi pico.
    The main problem is that i don't get any values for requesting the gas estimates. I don't even get zeros. One more difference is that when loading the configuration i cannot use the .config file because i get a version mismatch error, while i can load the .h and .c file, and i don't know if this changes something (referring to the BSEC_2.2.0.0_Generic_Release_30052022\config\bsec_sel_iaq_33v_3s_4d files). 

    The workflow in my code is the one defined in the sequence diagram in the integration guide.

    EDIT: i checked the version of the bsec loaded by the pico through bsec_get_version and it is 2.2.0.0

    Prop4et
    Established Member

    I understood that the 24th bit is set because BSEC_INPUT_PROFILE_PART is requested as a input. I am providing this value to the sensor but it still doesn't output anything.

    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