2 Replies Latest reply on Aug 8, 2016 10:34 AM by Matt_G_Live

    why PN532 mraa_i2c_write() failed on Linux Yocto

    Matt_G_Live

      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_32213388605.html  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 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 :

      Screen Shot 2016-08-04 at 12.10.47 PM.png

      And with the Nodejs/Javascript I get that error :

      Screen Shot 2016-08-04 at 12.11.53 PM.png

      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