BNO085 - can't get started

I have used the Adafruit BNO085 IMU as well as Robotshop CMPS14 (also based on BNO085). Today I’m trying to use the Sparkfun BNO085 with an ESP32.

I’m using version 1.0.5 of the library. I have tried connecting using Qwiic connector as well as wiring directly to the module. I’ve tried with and without RST and INT, and I have tried using alternate GPIOs. I have tried with VS Code/PIO as well as Arduino IDE.

I added an I2C scan to the example and it finds a device at 0x4B. This is the only device on I2C. However, myIMU.begin() returns an error. Looking into the library, in BNO08x::_init(int32_t sensor_id) it looks like the sh2_open() call succeeds but the sh2_getProdIds() call fails with error -2 (SH2_ERR_BAD_PARAM). I am wondering if something changed in the SH2 library? Any suggestions?

Check if the I2C address in your code matches the address found by your I2C scanner (0x4B). Try to increase the I2C speed. Sometimes the default speed is too slow, which can cause communication issues.

Hello, I’m having the exact same problem. I’m using a [Sparkfun Thing Plus RP2040 and the [Sparkfun BNO086 VR IMU Breakout. They are connected over a Qwiic connection. The Sparkfun BNO086 Library does not work to get the BNO086 running.

I’ve spent several hours looking at this with a logic analyzer. The IMU output appears to be correct, and the RP2040 is reading the correct 0x4B address on the bus, but the library isn’t interpreting the post-POR advertising message sent by the IMU correctly. When this happens, the library eventually times out and further attempts at communication fail. This manifests as a sh2_open() call failing after sh2)getProdIds() fails with -2 (SH2_ERR_BAD_PARAM), just like wjquigs’ post.

I’ve attached a screenshot of Sigrok showing the IMU properly advertising on the Qwiic bus, but the library doesn’t interpret it correctly.](https://www.sparkfun.com/products/22857)](https://www.sparkfun.com/products/17745)

Create an issue here https://github.com/sparkfun/SparkFun_BN … ary/issues and it’ll alert the folks who manage that library

TSRussell, I was able to get it to work today. The issue wasn’t with the library (surprise), so I’m not going to bother the good folks with an issue on github.

wjquigs - are you still having problems with yours? Happy to help if you have more details.

Excellent! Glad to hear…what was going on?

I was porting the Sparkfun Library to standard C, and I made a silly mistake with the call to i2c_read that was trashing the data before it was consumed by the library. facepalm