Bosch Sensortec Community

    cancel
    Showing results for 
    Search instead for 
    Did you mean: 

    BME280 C/C++ library compatibility issues on Jetson Nano?

    BME280 C/C++ library compatibility issues on Jetson Nano?

    Totemi1324
    New Poster

    Hello!

    I want to use the BME280 temparature sensor with my Jeton Nano. I found this C library on GitHub which seemed to help me out, because I need a solution for either C or C++. The devs state that it was only tested with Raspberry Pi (which uses wiringPi). I compiled it on my Jetson Nano and was faced with an error message, so it doesn't seem to work on Jetson platforms. It failed to read the chip's ID and returned error code -2:

    Failed to initialize the device (code -2).

    Is there a chance that this can be fixed so it can be used on Jetson platforms, too? And are there any other possibilities to use the BME280 with C++ on Jetson Nano?

    Thanks!

    3 REPLIES 3

    Vincent
    Community Moderator
    Community Moderator

    Currently, we don't have plan to have our C++ platform for sensor API.

    All C base sensor API is also working under C++ environment.

    For the issue you met,  it is bus communication problem.   You can also put logic analyzer on the bus for further debug to see if the correct device address are issued on bus and if sensor send ACK to it.   (-2 means device nout found which means host didn't see the ACK).  so the logic on bus is very helpful to solve this issue.

    Hello,

    Thanks for pointing out. As for me, I'm don't know much about I2C or Bus communication in detail which makes it difficult for me to solve this problem the way you described. I don't know hot to use a logic analyzer and also don't have one. Also, I didn't found any information on the internet on what an ACK is. Can you please point ot more precisely where the problem could lie?

    I looked at the code where the error is returned and don't know what I would have to change. Also, for Jetson Nano, I had to compile it without linking the WiringPi library (since it doesn't work on Jetson).

    Vincent
    Community Moderator
    Community Moderator

    Do you able to find the lower level device driver on that platform? 

    You need to mapping or link the system I2C driver to our API first.  

    You need to ask NXP for the hardware layer API and structure then to adding our sensor API into the structure.

    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