Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BHI160B can't get measurements data

    BHI160B can't get measurements data

    VictorT
    Member

    Hello,

    I'm using a BHI160B on a custom board in order to get acceleration and rotation vector data.

    I'm using firmware patch : bosch_pcb_7183_di03_bmi160-7183_di03-2-1-11824.fw.

    Init works fine (checking ROM version etc).

    Then the acccelerometer sensor is enabled.

    After a 10 seconds delay I try to read the FIFO.

    I only get timestamps and the "Initialized" meta event, and no other data is read (which are already in the FIFO before enabling the sensor).

     

    I tried several compatible firmwares, several available sensors, VS_WAKEUP/VS_NON_WAKEUP.

    I attached the application code, based on rotation_vector_example.c.

    What am I missing ?

    Thank you for your help.

     

    Regards,

    Victor T.

    5 REPLIES 5

    BSTRobin
    Community Moderator
    Community Moderator

    Hello VictorT,

    You could refer BHI160B reference code attached and run it again.

    Hello BSTRobin,

    Thank you for your help.

    I ported and tried the code you provided. What are the takeaways ?

     

    Here is the log I get :

    start demo_sensor
    successful to init bhy
    Physical Sensor Present:
    bitmap[0] = 0x2
    bitmap[1] = 0x0
    bitmap[2] = 0x1
    bitmap[3] = 0x0
    bitmap[4] = 0x0
    bitmap[5] = 0x0
    bitmap[6] = 0x0
    bitmap[7] = 0x0
    Physical Sensor Status:
    Acc : sample rate 0, range 0, int 0 pwr 1

    Acc : sample rate 0, range 0, int 0 pwr 1

    Gyro: sample rate 0, range 0, int 0 pwr 1

    Mag : sample rate 0, range 0, int 0 pwr 0

    cus evt size = 1 1 1 1 1

    Supported Virtual Sensor Information:
    id= 1
    id= 4
    id= 9
    id=10
    id=15
    id=16
    id=17
    id=18
    id=19
    id=22
    id=23
    id=24
    id=25
    id=31
    id=33
    id=36
    id=41
    id=42
    id=47
    id=48
    id=49
    id=50
    id=51
    id=54
    id=55
    id=56
    id=57
    id=63
    initialize success!

    BSTRobin
    Community Moderator
    Community Moderator

    Hello VictorT,

    Based you current code, you could add virtual sensor example and get acceleration and rotation vector data.
    For virtual sensor example, you could refer it from here: https://github.com/BoschSensortec/BHy1_driver_and_MCU_solution/tree/master/examples

    Hello BSTRobin,

    Thank you, I got it working in the meantime.

    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