platitude
Posts: 4
Joined: Fri Jul 31, 2015 8:55 pm

MFRC522 + Raspberry Pi B+

Fri Sep 11, 2015 8:05 pm

Hello. I'm trying to connect a RFID module to my Raspberry Pi. I'm trying to use rpi-rc522 (https://code.google.com/p/rpi-rc522/) but i can only see ("Debug mode" message when running "sudo ./rc522_reader -d"). Connection looks like:
sda - 24
sck - 23
mosi - 19
miso - 21
gnd - 20
rst - 22
3.3v - 17

File /boot/config.txt:

Code: Select all

# For more options and information see 
# http://www.raspberrypi.org/documentation/configuration/config-txt.md
# Some settings may impact device functionality. See link above for details

# uncomment if you get no picture on HDMI for a default "safe" mode
#hdmi_safe=1

# uncomment this if your display has a black border of unused pixels visible
# and your display can output without overscan
#disable_overscan=1

# uncomment the following to adjust overscan. Use positive numbers if console
# goes off screen, and negative if there is too much border
#overscan_left=-16
#overscan_right=-16
#overscan_top=-16
#overscan_bottom=-16

# uncomment to force a console size. By default it will be display's size minus
# overscan.
#framebuffer_width=1280
#framebuffer_height=720

# uncomment if hdmi display is not detected and composite is being output
#hdmi_force_hotplug=1

# uncomment to force a specific HDMI mode (this will force VGA)
#hdmi_group=1
#hdmi_mode=1

# uncomment to force a HDMI mode rather than DVI. This can make audio work in
# DMT (computer monitor) modes
#hdmi_drive=2

# uncomment to increase signal to HDMI, if you have interference, blanking, or
# no display
#config_hdmi_boost=4

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
arm_freq=800

# Uncomment some or all of these to enable the optional hardware interfaces
dtparam=i2c_arm=on
# dtparam=i2c=on
#dtparam=i2s=on
dtparam=spi=on
#dtoverlay=spi-bcm2835

# Uncomment this to enable the lirc-rpi module
#dtoverlay=lirc-rpi

# Additional overlays and parameters are documented /boot/overlays/README


# NOOBS Auto-generated Settings:
hdmi_force_hotplug=1
config_hdmi_boost=4
overscan_left=1
overscan_right=2
overscan_top=1
overscan_bottom=2
disable_overscan=1
start_x=0
gpu_mem=128
core_freq=250
sdram_freq=400
over_voltage=0
lsmod:

Code: Select all

Module                  Size  Used by
rtc_ds1307             10383  0 
cfg80211              501663  0 
rfkill                 22491  1 cfg80211
i2c_dev                 6737  0 
snd_bcm2835            22339  3 
snd_pcm                92573  1 snd_bcm2835
snd_seq                62040  0 
snd_seq_device          5130  1 snd_seq
snd_timer              23456  2 snd_pcm,snd_seq
snd                    68161  11 snd_bcm2835,snd_timer,snd_pcm,snd_seq,snd_seq_device
8192cu                569532  0 
i2c_bcm2708             6252  0 
spi_bcm2835             7796  0 
uio_pdrv_genirq         3690  0 
uio                    10009  1 uio_pdrv_genirq

platitude
Posts: 4
Joined: Fri Jul 31, 2015 8:55 pm

Re: MFRC522 + Raspberry Pi B+

Sun Sep 13, 2015 1:00 pm

UP. Anyone?

User avatar
with ice cream
Posts: 161
Joined: Mon Jul 30, 2012 7:25 am

Re: MFRC522 + Raspberry Pi B+

Sat Sep 19, 2015 11:45 pm

Not helpful, but I am in the same situation. I rewired everything twice, tried the python code that is floating around - no dice.

User avatar
with ice cream
Posts: 161
Joined: Mon Jul 30, 2012 7:25 am

Re: MFRC522 + Raspberry Pi B+

Sun Sep 20, 2015 12:06 am

A few minutes later: solved for me. The key was this comment. The library works (best/only) with a Pi 2 with version 1.40.

Here's what I did (I keep my sources in ~/src):

Code: Select all

cd ~/src/bcm2835-1.36
sudo make uninstall
cd  ~/src
wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.40.tar.gz
tar -zxf bcm2835-1.40.tar.gz
cd bcm2835-1.40/
./configure
sudo make install
cd ../rpi-rc522-read-only/
gcc config.c rfid.c rc522.c main.c -o rc522_reader -lbcm2835
cd rc522/
gcc config.c rfid.c rc522.c main.c -o rc522_reader -lbcm2835
sudo cp RC522.conf /etc/
sudo ./rc522_reader -d
Good luck!

danjperron
Posts: 3382
Joined: Thu Dec 27, 2012 4:05 am
Location: Québec, Canada

Re: MFRC522 + Raspberry Pi B+

Sun Sep 20, 2015 12:39 pm

but I can only see ("Debug mode" message when running "sudo ./rc522_reader -d")
Did you put your serial number and the command into /etc/RC522.conf ?

I just reply to a post showing exactly what you are missing

viewtopic.php?p=818250&sid=95628c938039 ... ff#p818250

The library works (best/only) with a Pi 2 with version 1.40.
Works fine with the B+ also.

Return to “Troubleshooting”