[SOLVED] RFID UPM & Groove Board Issues
Hello,
I've got a rfid board PN532 connected to the I2C bus via the groove board and directly to the GPIO ping 3 and 5. Here's what I was able to get to so far:
Connected directly to I2C:
nfc-scan-device -v
nfc-scan-device uses libnfc 1.7.1
1 NFC device(s) found:
- pn532_i2c:/dev/i2c-5:
pn532_i2c:/dev/i2c-5
chip: PN532 v1.6
initator mode modulations: ISO/IEC 14443A (106 kbps), FeliCa (424 kbps, 212 kbps), ISO/IEC 14443-4B (106 kbps), Innovision Jewel (106 kbps), D.E.P. (424 kbps, 212 kbps, 106 kbps)
target mode modulations: ISO/IEC 14443A (106 kbps), FeliCa (424 kbps, 212 kbps), D.E.P. (424 kbps, 212 kbps, 106 kbps)
nfc-list
nfc-list uses libnfc 1.7.1
NFC device: pn532_i2c:/dev/i2c-5 opened
1 ISO14443A passive target(s) found:
ISO/IEC 14443A (106 kbps) target:
ATQA (SENS_RES): 00 04
UID (NFCID1): cb c2 94 0b
SAK (SEL_RES): 08
If' I connect the pn532 via the groove shield I get nothing. If I scan the I2C bus first, I get nothing (have to reboot the machine to get the nfc commands working again.)
Using the python example with mraa/upm I get this error message:
Example from: https://github.com/intel-iot-devkit/upm/blob/master/examples/python/pn532.py
python rfid.py
Traceback (most recent call last):
File "rfid.py", line 68, in
main()
File "rfid.py", line 11, in main
myNFC = upmPn532.PN532(3, 2)
File "/usr/lib/python2.7/dist-packages/upm/pyupm_pn532.py", line 246, in init
this = _pyupm_pn532.new_PN532(*args)
ValueError: UPM Invalid Argument: Invalid GPIO pin specified
** python3 rfid.py**
Traceback (most recent call last):
File "rfid.py", line 68, in
main()
File "rfid.py", line 11, in main
myNFC = upmPn532.PN532(3, 2)
File "/usr/lib/python3.5/dist-packages/upm/pyupm_pn532.py", line 246, in init
this = _pyupm_pn532.new_PN532(*args)
ValueError: UPM Invalid Argument: Invalid GPIO pin specified
I've changed to pin 3 and 5 according to https://wiki.up-community.org/Pinout_UP2 to no avail.
Any suggestions on how to get this to work with mraa/upm and python?
Regards, O.
Comments
-
Hi @Orchestrator ,
Please, first could you confirm the MRAA installation is correct following the Wiki instructions?
https://wiki.up-community.org/MRAA/UPMAlso please, you could test your MRAA/UPM library for python example:
https://wiki.up-community.org/MRAA/UPM#Example_1:_Blink_an_LED_on_a_GPIO_output_pinI think your pin definition is not correct. Please check the UP2 pinout here:
https://wiki.up-community.org/Pinout_UP2