Can't get I2C to work on raspberry pi zero 2

Hello,
I’m trying to make I2C work in a node image on the Raspberry PI zero 2 but I get the following error:

root@430725c5441d:~# modprobe i2c-dev
modprobe: FATAL: Module i2c-dev not found in directory /lib/modules/5.10.78-v8

Any tips on how to make it work ?
thanks !

I got it to work by adding a label in my docker-compose:

labels:
  io.balena.features.kernel-modules: '1'

Perhaps this should be more clear in the documentation ?

1 Like

Hello @natcl thank you for your message and posting the solution!

I will check the docs and try to improve it in order to reduce friction to the developers!

Let me know if we can help you more!

Thanks !
On this page, it would help a lot:

3 Likes

Agreed. I lost a day troubleshooting this one.