mxgxw / MFRC522-python

A small class to interface with the NFC reader Module MFRC522
GNU Lesser General Public License v3.0
521 stars 419 forks source link

Issues with the latest version of Raspbian jessie #29

Open danbuntu opened 8 years ago

danbuntu commented 8 years ago

The newer version of Raspbian have switched to using dttree when enabling SPI. When you do this upgrade this library stops working. Running the Read.py example just sits there.

EECSdude commented 8 years ago

Activity here: https://github.com/raspberrypi/linux/issues/1547

but no solution yet.

Jbithell commented 8 years ago

+1 - Having huge issues with the latest release and SPI

mab5vot9us9a commented 8 years ago

If you take a look at Issue #1547, there is a workaround now!

When cloning the SPI-Py library, changing '.cs_change = 1' to '.cs_change = 0' (line 189 in spi.c) before running sudo python setup.py install fixes the issues I had. Alternatively you can also clone my fork of this library https://github.com/mab5vot9us9a/SPI-Py, so you don't have to make the changes yourself.

Also make sure you have the latest kernel (>= 4.4.14), because it fixes a bug in earlier versions (see Issue #1547). You can check your version using:

uname -a | sed -E "s/.*([0-9]+\.[0-9]+\.[0-9]+)-v.*/\1/"

If you need to update your kernel, use sudo rpi-update. If it's not yet installed, do so using sudo apt-get install rpi-update.

thijstriemstra commented 7 years ago

@mab5vot9us9a's change was also fixed in SPI-Py master so that fork isn't necessary anymore.