Electronic – arduino – MFRC522 on Beaglebone Black

arduinobeaglebone blacknfc

I am trying to get my RC522 to work on the BBB. It works great on my Arduino which is well documented e.g. here or here. My only requirement is to read the serial # of cards which are Mifare S50.

I have tried tried using the Arduino code with elinux.org/Userspace_Arduino libraries but just get gpio issues: (I've tried export/unexport etc.)

Cape loaded BB-SPI0-01
BB-BONE-BACONE: File exists
Pin 48: /gpio/export: Device or resource busy
Pin 31: /pwm/export: No such device
Pin 60: /gpio/export: Device or resource busy
Pin 51: /pwm/export: No such device
Pin 7: /pwm/export: No such device
Pin 22: /gpio/export: Device or resource busy
Pin 5: /gpio/export: Device or resource busy
Pin 4: /gpio/export: Device or resource busy
Pin 2: /gpio/export: Device or resource busy
serial:setting baud rate to 9600

I have the BBB wired up using the SPI0 pins on P9 i.e. 17,18,21,22. These should represent gpio0 5,4,3,2 respectively.

I notice there has been use of the RC522 with Python on Raspberry Pi. github.com/mxgxw/MFRC522-python . Could this be done similarly on Beaglebone (maybe with Adafruit BBIO)? Though I would prefer using C++ as I'll be using it for other related things.

Thank you for any help or to point me in the right direction!

Best Answer

Visit How to Access Chips Over the SPI on BeagleBone Black
Has detailed instructions on how to go about using it.

Correct me if I am wrong, but you are using Userspace Arduino here. Haven't checked it up in a while, but last known status was SPI is broken on it.