SPI on Beaglebone Black

beaglebone

#1

Hi,

I’ve shifted to Resin 2.12.7 for Beaglebone black and my old method of enabling spi using pin-config appears to now be deprecated. On the host os, I can execute “echo BB-SPIDEV0 > /sys/devices/platform/bone_capemgr/slots” to get SPI back, but I would like this to persist this between reboots. As the resin filesystem appears to be read only, what is the recommended way to get the Host / container to do this?

Adding the command to a privileged container’s startup script seems to result in the container producing “bash: echo: write error: No such file or directory” - probably as it can’t “see” slots.


#5

Hi,
how were you enabling them until now? and on what resinOS version?


#6

Sorry for the delay. I’ve found that on Resin OS 2.12.7, if you are using a docker compose file (i.e. multiple container images) the guest containers do not get to see /lib/firmware and as such, are unable to apply overlays to enable SPI. If you have a single container running on Resin OS 2.12.7 without docker compose, the container is able to see /lib/firmware and as such, enable the SPI bus.


#8

Hi @azazeal, you can enable access to /lib/firmware in the multicontainer setting using a service label: io.resin.features.firmware, something like:

...
  someservice:
    ...
    labels:
      io.resin.features.firmware: '1'
...

where the ... are just other, not relevant entries in docker-compose.yml. Here just wanted to highlight how to set this label for a specific service.

See more about the available service labels in our docs:

Let us know if you check it out, whether it works!