i2c port changes randomly

Hi,
I'm using up squared.
I connect a device via the i2c port in the HAT40 connector.
when using i2cdetect, I detect the same device (identified by the address) on different ports.
Changes occur between reboots.
to my understanding, I may be able to resolve this by setting a rule in 'etc/udev/rules.d', but I'm not sure how to do this. specifically, I'm not sure how to filter the sensor to create the rule.
The 'kernel' I see is 'i2c-2', but I wonder if this will change on the next reboot.
Thank you.
Comments
-
Hi @dgridish ,
Can you please provide the UP Squared product info. (RAM/eMMC/Part Number), along with the current BIOS version on it?
Our tech team is trying to replicate your issue. I will keep you posted on the results/resolution.
Regards,
Pratik -
Hi @dgridish ,
I saw a good tutorial that can guide you through creating the udev rule here
You can follow the steps below to filter the i2c device:
- With i2c device connected and you find the current port using i2cdetect and you find for example port 12c-2
- Run the following command to find the sensor attributes you will need for the udev rule
udevadm info -a --p $(udevadm info -q path /sys/bus/pci/devices/*/i2c_designware.2/)
With the details you can create udev rule.
**Note ** I added 2 at the end of the device path because I am assuming i2c device current port is detected on i2c-2
Kindly let us know the outcome and feel free to share with the community when the udev rule works.
Best regards,
Tagged
Categories
- All Categories
- 105 Announcements & News
- 55 Product News - New Product/Product Change Notice/ End-of-life
- 184 Welcome Developers!
- 55 Unboxing & Project Sharing
- 31 Tech Updates
- 659 UP Products
- 1 UP 7000
- UP Squared i12
- 8 UP Xtreme i12
- 9 UP Squared Pro 7000
- 1 UP Element i12 Edge
- 17 UP Squared V2
- 54 UP 4000
- 24 UP Xtreme i11
- 35 UP Squared 6000
- 58 UP Squared Pro
- 142 UP Xtreme
- 834 UP Squared
- 1.4K UP Board
- 89 UP Core Plus
- 222 UP Core
- 3 UP Xtreme Lite
- 44 UP AI Edge
- 215 Starter Kits & Peripheral