Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8013

Interfacing (DSI, CSI, I2C, etc.) • Two identical Raspberries, only one can access my i2c device

$
0
0
I have two identical raspberry pi 5 with a MLX90640 IR cam connected. It works correctly on the first one, but not on the second and I am trying to figure out why:

The failure happened when I try to import board in python:

Code:

[size=85]Traceback (most recent call last):  File "/home/rabaton/ds_readout/ir.py", line 2, in <module>    import board  File "/home/rabaton/ds_readout/venv/lib/python3.11/site-packages/board.py", line 45, in <module>    from adafruit_blinka.board.raspberrypi.raspi_5 import *  File "/home/rabaton/ds_readout/venv/lib/python3.11/site-packages/adafruit_blinka/board/raspberrypi/raspi_5.py", line 6, in <module>    from adafruit_blinka.microcontroller.bcm2712 import pin  File "/home/rabaton/ds_readout/venv/lib/python3.11/site-packages/adafruit_blinka/microcontroller/bcm2712/pin.py", line 7, in <module>    from adafruit_blinka.microcontroller.generic_linux.lgpio_pin import Pin  File "/home/rabaton/ds_readout/venv/lib/python3.11/site-packages/adafruit_blinka/microcontroller/generic_linux/lgpio_pin.py", line 30, in <module>    CHIP = _get_gpiochip()           ^^^^^^^^^^^^^^^  File "/home/rabaton/ds_readout/venv/lib/python3.11/site-packages/adafruit_blinka/microcontroller/generic_linux/lgpio_pin.py", line 18, in _get_gpiochip    drivers = set((dev / "of_node/compatible").read_text().split("\0"))                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/lib/python3.11/pathlib.py", line 1059, in read_text    with self.open(mode='r', encoding=encoding, errors=errors) as f:         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  File "/usr/lib/python3.11/pathlib.py", line 1045, in open    return io.open(self, mode, buffering, encoding, errors, newline)           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^FileNotFoundError: [Errno 2] No such file or directory: '/sys/bus/gpio/devices/gpiochip14/of_node/compatible'[/size]
working raspi:

Code:

uname -r6.6.74+rpt-rpi-2712
not working raspi:

Code:

uname -r6.12.22-v8-16k+
This is one difference I can pinpoint.
I also exported all installed packages and tried to find out if I might have forgotten to install something. but nothing sticks out.

Here is /boot/firmware/config.txt:

Code:

dtparam=i2c_arm=ondtparam=spi=ondtparam=pciex1dtparam=audio=oncamera_auto_detect=1display_auto_detect=1auto_initramfs=1dtoverlay=vc4-kms-v3dmax_framebuffers=2disable_fw_kms_setup=1arm_64bit=1disable_overscan=1arm_boost=1[cm4]otg_mode=1[cm5]dtoverlay=dwc2,dr_mode=host[all]dtoverlay=w1-gpio,gpiopin=26
also i2cdetect -y -1 shows (same on both):

sudo i2cdetect -y 1

Code:

     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f00:                         -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 70: 70 -- -- -- -- -- -- -- 

Statistics: Posted by xtlc — Tue Apr 08, 2025 5:16 pm



Viewing all articles
Browse latest Browse all 8013

Trending Articles