Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't get it working with spi #2

Open
simondid opened this issue Dec 5, 2015 · 4 comments
Open

can't get it working with spi #2

simondid opened this issue Dec 5, 2015 · 4 comments

Comments

@simondid
Copy link

simondid commented Dec 5, 2015

hey so im traying youre code out and i can't get it working with this board
http://www.ebay.com/itm/311005959514?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT

and the following wirring im running a raspberry pi 2 mobel b

MOSI pin 19 to MOSI
MISO pin 21 to MISO
SCLK pin 23 to SCLK
pin 24 to ss
GPIO 0 pin 11 to RSTO
3.3v pin 1 to vcc
gnd pin 6 to gnd

the output from the program is when set in debug mode

Starting up...
Beginning SPI.
Wiringpisetup is 0
Wiringpispisetup is 16
Waking SPI.
getFirmwareVersion
Medium.writeCommand([0] )
Medium.waitForAck()
Medium.readSpiStatus()
Medium.checkSpiAck()
Medium.readResponse(..., 6, 1000)
pn532i2c.readResponse bad length checksum
Didn't find PN53x board

@hsilomedus
Copy link
Owner

I cannot guarantee if the code will work with other PN532 based boards. It should though, but again, I'm not sure.You can double check this by following this guide: http://blog.iteadstudio.com/to-drive-itead-pn532-nfc-module-with-raspberry-pi/If you can't make it work with these instructions, then either the connections are bad, or it's not compatible. You can also check it first agains an arduino, and use the library here: https://github.com/elechouse/PN532.
From: simondid [email protected]
To: hsilomedus/raspi-pn532 [email protected]
Sent: Saturday, December 5, 2015 2:27 PM
Subject: [raspi-pn532] can't get it working with spi (#2)

hey so im traying youre code out and i can't get it working with this board
http://www.ebay.com/itm/311005959514?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AITand the following wirring im running a raspberry pi 2 mobel bMOSI pin 19 to MOSI
MISO pin 21 to MISO
SCLK pin 23 to SCLK
pin 24 to ss
GPIO 0 pin 11 to RSTO
3.3v pin 1 to vcc
gnd pin 6 to gndthe output from the program is when set in debug modeStarting up...
Beginning SPI.
Wiringpisetup is 0
Wiringpispisetup is 16
Waking SPI.
getFirmwareVersion
Medium.writeCommand([0] )
Medium.waitForAck()
Medium.readSpiStatus()
Medium.checkSpiAck()
Medium.readResponse(..., 6, 1000)
pn532i2c.readResponse bad length checksum
Didn't find PN53x board—
Reply to this email directly or view it on GitHub.

@hsilomedus
Copy link
Owner

or you can use the I2C interface. I have a working code here: hsilomedus/door-nfx
From: simondid [email protected]
To: hsilomedus/raspi-pn532 [email protected]
Sent: Saturday, December 5, 2015 2:27 PM
Subject: [raspi-pn532] can't get it working with spi (#2)

hey so im traying youre code out and i can't get it working with this board
http://www.ebay.com/itm/311005959514?_trksid=p2060353.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AITand the following wirring im running a raspberry pi 2 mobel bMOSI pin 19 to MOSI
MISO pin 21 to MISO
SCLK pin 23 to SCLK
pin 24 to ss
GPIO 0 pin 11 to RSTO
3.3v pin 1 to vcc
gnd pin 6 to gndthe output from the program is when set in debug modeStarting up...
Beginning SPI.
Wiringpisetup is 0
Wiringpispisetup is 16
Waking SPI.
getFirmwareVersion
Medium.writeCommand([0] )
Medium.waitForAck()
Medium.readSpiStatus()
Medium.checkSpiAck()
Medium.readResponse(..., 6, 1000)
pn532i2c.readResponse bad length checksum
Didn't find PN53x board—
Reply to this email directly or view it on GitHub.

@simondid
Copy link
Author

simondid commented Dec 6, 2015

hey ya i ended giving up on the spi part and trayed i2c with i goth working but i'm having truble reading the uid as a propper value

and any idear how i can write to the card ?

@PeterPumpkin
Copy link

Although this is a quite old thread it might be interesting for users, having problems with SPI on boards mentioned above. My board looks similar, also from ebay. It might be an elechouse board or a clone of that. I found that on the board the 5 resistors within the SPI lines had a value of 100kOhm, and not 100 Ohm as mentioned in the manual and the schematics. Of course, with those values SPI could not work. In addition, the mode switch was what soldered correctly (no connection to Vcc in case of I2C). This might be an single problem with my board, but in case of problems it might be helpful to check this.
Regards,
Peter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants