Closed ThomasSchemmer closed 8 years ago
To enable SPI, you also need to add “dtparam=spi=on” to your /boot/config.txt and reboot. I've successfully used SPI within a container on the HypriotOS 0.7 release (but not tested it on 0.8 yet).
Thank you, that worked perfectly :+1: might i ask where you found the reference?
Just googled for raspberrypi spi enable
and the first hit http://raspi.tv/how-to-enable-spi-on-the-raspberry-pi had all the details. Then double-checked what raspi-config
does internally to confirm the solution.
Darn, i found the link before, just didnt completely read it. Thx again, closing the issue now.
Hello, first of , thanks for making my life easier. Now I'm afraid I'll have to make yours a tad harder. :( I'm currently trying to enable SPI on my Raspberry Pi 2 B inside a Docker container.(edit: using HypriotOS 0.8) In the end, I want to be able to communicate with a nrf24l01 wireless module via the RF24 lib.
For the image creation im following the tutorial here and adapted the run command to the following
docker run --cap-add ALL -v /lib/modules:/lib/modules -v /sys:/sys --device /dev/ttyAMA0:/dev/ttyAMA0 --device /dev/mem:/dev/mem --privileged -ti tschemmer/sensor bash
as Jerome states that it should enable modprobe within a container. I even added the--cap-add ALL
for good measure ;)The container starts up fine,
sudo modprobe spi-bcm2835
works without error andlsmod
returns the appropriate values:But when I checked the /dev directory, the
spidev0.0
isnt there. So i tried to do it in the OS directly, outside of any container, according to Issue 13. Even addedspi-bcm2835
to /etc/modules and restarted. The spi is still not in the /dev directory, so trying the loopback test does not work for me. Now my question is: what do I have to do to get that /dev/spidev0.0 up and running? I feel like im missing something :/ On raspbian i would be able to useraspi-config
, is there somehting similar here? Thanks for your help Thomas