#15 i2c-tools
Closed 5 years ago Opened 5 years ago by alciregi.

Since i2c interface works out of the box, what about including the i2c-tools package in the base image? I mean without the need to subsequently overlay it with rpm-ostree install.
What do you think?


I actually want less things in the base image not more. Once other dependencies I need to get done are out of the way I intend on doing an IoT tools container which will likely be a catch all for these sorts of random things people way wish to use.

I actually want less things in the base image not more. Once other dependencies I need to get done are out of the way

Yeah. This is reasonable.

I intend on doing an IoT tools container which will likely be a catch all for these sorts of random things people way wish to use.

Is it possible to access the hardware from inside a container?

I intend on doing an IoT tools container which will likely be a catch all for these sorts of random things people way wish to use.

Is it possible to access the hardware from inside a container?

Yes, although the exact details to implementation are still in flux, for the tools container we'll likely make it, at least in the short term a super container (the proper term escapes me ATM).

I intend on doing an IoT tools container which will likely be a catch all for these sorts of random things people way wish to use.

Is it possible to access the hardware from inside a container?

Yeah! It is possible.

# podman run \
         -it --name i2ctest \
         --device=/dev/i2c-0 \
         --device=/dev/i2c-1 \
         --device=/dev/i2c-2 \
         fedora /bin/bash



Then from inside the container

# dnf install i2c-tools

# i2cdetect -l -a
i2c-1   i2c         bcm2835 I2C adapter                 I2C adapter
i2c-2   i2c         bcm2835 I2C adapter                 I2C adapter
i2c-0   i2c         bcm2835 I2C adapter                 I2C adapter

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



Then following the steps in the wiki, I'm able to use the I2C OLED display from indside a container!

Metadata Update from @alciregi:
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.

Metadata