Here’s the dmesg logs for host and container.
dmesg-host.log (51.4 KB)
dmesg-container.log (40.1 KB)
Just to clarify my issue, the device driver works, it loads without error. The thing is that CAN bus interface cards are treated as network devices by Linux. And Balena, does not let me interface directly with a network device from the container.
On the Host OS I can run:
ip link set emuccan0 up qlen 1000
And this will give me the emuccan0 network interface like so:
emuccan0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
NOARP MTU:16 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
This is really quite convenient because from our application code we can interact with the CAN bus using simple sockets.
But when I try to run the same ip link command from the container I get:
ip: ioctl 0x8943 failed: No such device
I suspect this is because Linux treats it as a network device and Balena is (for good reason) rather possessive about network devices.
In short I’d like to know how I can interact with the CAN bus sockets from a container.