sparkfun / Qwiic_9DoF_IMU_ICM20948_Py

Python module for the SparkFun 9DoF IMU Breakout - ICM-20948 (Qwiic)
MIT License
31 stars 13 forks source link

Error connecting to Device: 69, [Errno 6] No such device or address #6

Closed Srichitra-S closed 11 months ago

Srichitra-S commented 11 months ago

Hi, I am running the example in Renesas RZV2L SBC. When i run i2cdetect -y 3 , I see the device listed in the adress 68.

P.S : The Renesas RZV2L board is booted with yocto image. I am right now running the example inside a docker container of ubuntu focal. I had tested the same code in a docker container in RPi and it works. I get the error when running it in RZV2L SBC.

MicrosoftTeams-image (1)

But when i run the example code, I see the terminal log as :

SparkFun 9DoF ICM-20948 Sensor Example 1 Error connecting to Device: 69, [Errno 6] No such device or address The Qwiic ICM20948 device isn't connected to the system. Please check your connection

sfe-SparkFro commented 11 months ago

Hi there! The default address of that board is 0x69, so since you're scan shows the secondary address of 0x68, I'm guessing you've soldered closed the ADR jumper, yes? If so, you'll need to update the code to use the secondary address like so:

IMU = qwiic_icm20948.QwiicIcm20948(0x68)

I'm pretty sure this will resolve the problem, so I'm going to close this issue. But if not, please reply and we'll see if we can get you sorted!

Srichitra-S commented 11 months ago

Hi there! The default address of that board is 0x69, so since you're scan shows the secondary address of 0x68, I'm guessing you've soldered closed the ADR jumper, yes? If so, you'll need to update the code to use the secondary address like so:

IMU = qwiic_icm20948.QwiicIcm20948(0x68)

I'm pretty sure this will resolve the problem, so I'm going to close this issue. But if not, please reply and we'll see if we can get you sorted!

Hi @sfe-SparkFro No, I didnot solder the IMU, but connected it to the GPIO pin using a custom adapter given by the same company.

I tried your solution, but in vain. The address in the error ms has changed as `Error connecting to Device: 68, [Errno 6] No such device or address.

P.S : The Renesas RZV2L board is booted with yocto image. I am right now running the example inside a docker container of ubuntu focal. I had tested the same code in a docker container in RPi and it works. I get the error when running it in RZV2L SBC.

sfe-SparkFro commented 11 months ago

Thanks for the update, sorry that didn't resolve it!

Do you happen to be using any other SparkFun Qwiic drivers, or just this one? I wonder if the Qwiic_I2C_Py driver just doesn't work on your platform. Could you please run the following Python code:

import qwiic_i2c
print(qwiic_i2c.getI2CDriver().scan())

If this prints out a list of I2C devices connected to your system, then that driver is most likely working fine, and I'm not sure what the root problem is. If it does not print the list of devices, then that's most likely the root problem, and I would ask you to open a new issue there.

Thank you!

Srichitra-S commented 11 months ago

Hi, The device was actually being listed in bus#4 and the driver code was just scanning for the device in bus#1. I changed the iBus to 4 and now it works fine.

Thanks @sfe-SparkFro for your help!

sfe-SparkFro commented 11 months ago

Glad you got it working!