1

Cannot get working SPI. Have checked on wheezy and it works perfectly. On jessie /dev see only spi0.1, have tried both pins, but no result. Where is the problem?

grep spi /boot/config.txt:

#dtparam=spi=on
#dtparam=spi=on
dtparam=spi=on
dtoverlay=spi-bcm2835-overlay

pi@raspberrypi:~ $ lsmod|grep spi  
    spi_bcm2835             7868  0 


pi@raspberrypi:~ $ ls -l /dev/spi*  
crw-rw---- 1 root spi 153, 0 Mar  5 20:32 /dev/spidev0.1


pi@raspberrypi:~ $ uname -a  
Linux raspberrypi 4.1.18+ #848 Mon Feb 29 13:55:31 GMT 2016 armv6l GNU/Linux
Patrick Cook
  • 6,365
  • 8
  • 38
  • 63
Kvach
  • 111
  • 3

2 Answers2

1

check your config.txt, you also need to disable Device-Tree if you run a recent kernel, adding this line:

device_tree=

(yes, empty parameter) or use raspi-config to do it for you

CedDev
  • 11
  • 2
0

Did you ever find the answer to your problem? I recently switched an old project on Wheezy to Jessie Lite. When I tried to run the python script, it gave me "ImportError: No module named 'spidev'"

After I spent most of a day trying to figure this out, I ran across an old blog with a list of python libraries. Unfortunately, the blog was written in Japanese and I don't read Japanese but lo and behold, the list contained an entry "python-spidev"

So just for grins, I tried "sudo apt-get install python3-spidev" AND IT WORKED!

Just to see what is actually needed, I back-tracked to a much earlier (pre- SPI) version of my SD card that I was working on and simply enabled SPI via raspi-config and then installed python3-spidev. That's all it took!