Community
cancel
Showing results for 
Search instead for 
Did you mean: 
MGL1
Beginner
1,326 Views

why PN532 mraa_i2c_write() failed on Linux Yocto

Jump to solution

Hi, I'm trying to use a PN532 RFID reader from deek-robot http://www.aliexpress.com/store/product/MINI-PN532-NFC-RFID-Controller-Shield-for-Arduino/1178065_32... http://www.aliexpress.com/store/product/MINI-PN532-NFC-RFID-Controller-Shield-for-Arduino/1178065_32... in i2c mode on a Galileo Gen 2 on yocto linux image in either python or NodeJS with these exemples, but got the same error at both (I tried both to have a chance to get at least one working) :

NodeJS exemple : https://github.com/intel-iot-devkit/upm/blob/master/examples/python/pn532.py https://github.com/intel-iot-devkit/upm/blob/master/examples/python/pn532.py and i also tried with de constructor : var myNFCObj = new pn532.PN532(3, 2,0,24); instead of "(3,2)"

Python exemple : I don't have the link, but i can post de code if you want

Both script give me the same kind of error : mraa_i2c_write() failed

With the python scrpt I alway get the error :

And with the Nodejs/Javascript I get that error :

When i use te command i2cdetect -y -r 0 the RFID reader is reconized at the address 24 (whitch disapear when i unplug the reader) on the i2c-0 bus , So the bus seems to work or at least recognize the reader, but I'm unable to use it in the mentionned scripts

I use the pinout :

A4 -> SDA

A5 -> SCL

pin 2 ->RESET

pin 3 -> IRQ

I'm currently using the Intel XDK, and I also tried to install manualy the jsupm_pn532 module with the NPM command via SSH for the javascript script but it doesn't help.

MRAA and UPM are at their lastest versions :

3.8.7-yocto-standard

MRAA v1.2.1

UPM v0.7.2

Node 4.4.3

I tested the RFID reader on an arduino UNO with an adafruit_PN532 library exemple and it works fine with the same pinout.

FYI, that arduino sketch DOESN'T works when I upload it to the arduino part the Galileo.

Does anyone already successfully make à pn532 RFID reader work on the linux part of the galileo ?

It doesn't matter if I end up using it in SPI or UART mode(I also already testes those but mode, but with no success) but fot this project I can't use another RFID chip

Thanks for your help

Matt

0 Kudos
1 Solution
idata
Community Manager
71 Views

Hello Matt_G_Live,

 

 

The example found in https://github.com/intel-iot-devkit/upm/blob/master/examples/python/pn532.py should be able to work as the examples uploaded in that github have officially been tested. I have tried to run it and I have received the same issue as you. It seems there is an issue with the library the example uses.

 

So, my suggestion is that you submit an issue about this example in https://github.com/intel-iot-devkit/upm/issues. If you do so, you would be contacting the developers of UPM directly and they should be able to help you quicker and more accurately.

 

 

-Peter.

View solution in original post

2 Replies
idata
Community Manager
72 Views

Hello Matt_G_Live,

 

 

The example found in https://github.com/intel-iot-devkit/upm/blob/master/examples/python/pn532.py should be able to work as the examples uploaded in that github have officially been tested. I have tried to run it and I have received the same issue as you. It seems there is an issue with the library the example uses.

 

So, my suggestion is that you submit an issue about this example in https://github.com/intel-iot-devkit/upm/issues. If you do so, you would be contacting the developers of UPM directly and they should be able to help you quicker and more accurately.

 

 

-Peter.

View solution in original post

MGL1
Beginner
71 Views

Hi,

Thanks a lot, I will contact them about that issue.

Matt

Reply