Bosch Sensortec Community

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

    BME688 API - Invalid Data followed by No New Data

    BME688 API - Invalid Data followed by No New Data

    zrummler
    Established Member

    I am using the bme68x.h API to try and get data from the BME688 via I2C. I'm experiencing two problems:

    1. Bad Data: In forced mode, I'm getting data but the data is inaccurate: it's always temperature=34.0693359, pressure=64926.1641, humidity=37.853157, and gas_resistance=6400000.0
    2. No New Data: In parallel mode, I'm still getting the bad data like above--and when I try and fetch new data, I'm hit with the error code BME68X_W_NO_NEW_DATA

    In short, I can currently only get one data reading from the BME688 sensor, and that data reading is not correct.

    Note that I've written my own "read" and "write" functions which interface with the TI I2C.h library. Also, I'm running the example code that came with the bme68x.h API. I've tried parallel_mode.c and forced_mode.c, but no luck with either.

    There are two possible causes in my opinion:

    1. Not using the I2C interface correctly ... perhaps my reads and writes are wrong. I haven't found a good way to test these functions, maybe I will consult the datasheet to determine which registers are available for a unit test.
    2. More likely: Not using the bme68.x interface correclty ... perhaps my initializations and configurations are wrong, but it's strange because I am using the example code.
    3 REPLIES 3

    BSTRobin
    Community Moderator
    Community Moderator

    Hi zrummler,

    I uploaed example code on STM32 for your reference, the example code BME68x sensor API https://github.com/boschsensortec/BME68x-Sensor-API

    zrummler
    Established Member

    I'm currently using the github example code, but I found a solution. The issue was with my I2C communication. Wasn't performing writes correctly. Now it's working!

    BSTRobin
    Community Moderator
    Community Moderator

    Good news, zrummler.

    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