1

I am running (on a Pi3) an MFRRC522 reader - much like this one: Image from http://raspmer.blogspot.co.uk/2015/07/how-to-use-rfid-rc522-on-raspbian.html It has been working fine, but after I changed SD card, to increase capacity - whilst also doing a new Raspian install I haven't been able to get it to work. I have done the following:

  • Add device_tree_param=spi=on and dtoverlay=spi-bcm2708 to the config.txt
  • Taken a look in /etc/modprobe.d/raspi-blacklist.conf, but it's empty in the latest versions of Raspian anyway
  • Enabled the SPI interface in raspi-config
  • Installed SPI-Py and MFRC522-python
  • Checked it's wired as here

The issue is - running dmesg | grep spi doesn't return anything. Have Raspian Updates removed the default modules? How do I enable the spi modules?

JBithell
  • 163
  • 1
  • 2
  • 10

2 Answers2

2

I always use dtparam=spi=on.

Remove the dtoverlay line, it is not needed.

By default the new spi-bcm2853 module should be loaded.

joan
  • 71,024
  • 5
  • 73
  • 106
  • Thanks for the answer - I have done the above - and lsmod contains spi_bcm2835, but dmesg | grep spi still returns nothing - should it return something like [ 5.408904] bcm2708_spi 20204000.spi: master is unqueued, this is deprecated [ 5.659213] bcm2708_spi 20204000.spi: SPI Controller at 0x20204000 (irq 80)? – JBithell Jun 30 '16 at 08:31
  • @JBithell It's simplest just to see if /dev/spi* exists. If it does the driver is loaded. As you have pointed out there seems to be a problem with the new driver and your particular device. – joan Jun 30 '16 at 10:57
2

This is a known issue:

Run sudo rpi-update

Make sure you have enabled the interface for this board with dtoverlay=spi0-hw-cs and dtparam=spi=on in the config.txt

And that should solve the problem. See https://github.com/raspberrypi/linux/issues/1547 for further details

JBithell
  • 163
  • 1
  • 2
  • 10