Closed conphilpott closed 5 years ago
What kind of different types?
ISO 14443-3A NXP MIFARE Classic 1k - NfcA, MifareClassic, NdefFormattable (Some work) ISO 14443-4 NXP MIFARE DESFire / NXP MIFARE DESFire EV1 - IsoDep, NfcA, NdefFormattable (Doesn"t work)
Im using a clear adafruit fob with ISO 14443-3A NXP MIFARE Classic 1k - NfcA, MifareClassic, NdefFormattable and it doesnt work, generic fobs with the same specs do.
Just wondering if there is a way to turn off the data field as its just causing problems for me.
ISO 14443-3A NXP Mifare Ultralight (Ultralight C) - NfcA, MifareUltralight, NdefFormattable used to work on the last version i had but I upgraded to get the reader to stop entering the error state (didn't work)
Hi
I've made a PR which adds a definition to the my_user_config.h to enable use of the DATA functionality that is currently in the driver.
The reason is to segregate the UID functionality from the DATA functionality until I can get my hands on NFC cards which can reproduce the behaviour you're experiencing.
Thanks for reporting - much appreciated.
Cheers for the change 👍 Heres a link to the ultralight cards that i'm using and having issues with https://www.amazon.co.uk/dp/B07BB65HV9/ref=cm_sw_em_r_mt_dp_U_o5JpCbF5D6YB8
It also does the same thing with an Oyster card or ITSO Railway Keycard if that helps.
@Conphilpott PR https://github.com/arendst/Sonoff-Tasmota/pull/4943 has been merged so if you can now conditionally exclude the data functionality and will only have UID for now. Just pull the xsns_40_pn532.ino and just the changes in my_user_config.h
I did not think of checking the rail pass - I know I read them before but cannot remember what type they were... will check in the next few days if we are lucky then we can make that work also.
@Conphilpott
things like this are sent as JSON which make it unfriendly to decode. "DATA":"\x14\x01\x03\xe1\x03\xe1\x03\xe1\x03\xe1\x03\xe1\x03\xe1\x03\xe1\x03"
Just curious - this is obviously data that is already stored on block 1
Have you tried setting the DATA to something new using either
Sensor40 E
to erase the DATA block
or
Sensor40 S,TEST
to set the DATA block to contain "TEST"
?
I didn't try that no sorry , I've already reflashed and sealed the unit into a box though. I did erase the tag and format it with NFC Tools on Android and that made the data string longer.
Right, the driver expects characters within the normal text range so maybe the format just writes some predetermined bytes to block 1 which do not fall within the %s (string/char array) range - worth trying if you ever open it again, but don't sweat it as I am not 100% sure - just a hunch.
I was just facing an issue with Sensor15 -> there has been a name change to the correct value Sensor40. getting Data works fine on all my mifare tags or cards, setting data is not working at all - it says "Data must be alphanumeric"
By the way - thank you for adding support for the PN532 reader, i was starting to implement this in my dev environment yesterday and stumbled over it today by accident :D
Data must be alphanumeric
i.e. A to Z and 0 to 9, no special characters like - etc
Just adding for reference - PR https://github.com/arendst/Sonoff-Tasmota/pull/5162 changed support for the PN532 from I2C to HSU (Serial Rx/Tx)
There was also a bug discovered by @Jason2866 which caused false errors for "Data must be alphanumeric" to be presented so that was also fixed earlier in the I2C version and the same methodology was carried through to the HSU version which is now merged into development.
Hi, me again. I'm referring to my issue "PN532 HSU not working on ELECHOUSE card and WEMOS D1" again. I can't see the link to this issue, since in my case I had a problem with communication between PN532 board and Wemos/ESP8266 - not a wireless communication issue to the card. Anyway I changed code of xsns_40_pn532.ino to use I2C (merged from elechouse/PN532 repository) instead of HSU and now communication is working just fine. Bye the way, it looks like I2C was initialy supported and has just recently been changed to HSU? What was the reason you chenged from I2C to HSU? Thank you, Oliver
I2C support was dropped because it wasnt 100% reliable and with serial processor load is much lower
Hi Oliver, I wanted to ask if you resolved your problem and if you did can you please send me the code? Thank you Denis
Support for I2C was dropped as indicated by @Jason2866
From experience, we noticed that the ESP8266 cores (whether it emanates from the SDK or the core is not certain) have issues with chips that require clock stretching. This appears to affect certain i2c sensors/chips and unfortunately, the PN532 seems to be one of them.
The original code is kept here for posterity purposes so you're welcome to play with it but as the HSU interface provided by the PN532 solved the problem it is not likely to be re-introduced into development.
Edit: I must have been half asleep when I wrote this :)
Hi, i m trying to configure pn532 with wemos d1 mini using tasmota firmware. FIRST TRY: i upgraded with release sonoff-sensors.bin v6.5 SECOND TRY: i compiled my own binary following steps on https://github.com/arendst/Sonoff-Tasmota/wiki/PN532
in both cases i did the following:
i dont get detection message on my console
00:00:00 NFC: PN532 NFC Reader detected
am i missing something? thank you!
Make sure you don't have anything else connected to the serial interface... like the usb cable you used to flash the wemos.
Use the web console...
Make sure you don't have anything else connected to the serial interface... like the usb cable you used to flash the wemos.
thank you for your reply i m using usb alimentation connected to a phone 5V battery charger.
Also, make sure you disabled serial logging using seriallog 0
to disable any data from being sent out the serial interface but I can't remember this being an issue for me or not - I may have disabled it without giving it much thought.
Other than that it should just work according to how it is outlined in the wiki https://github.com/arendst/Sonoff-Tasmota/wiki/PN532
i put some log command into _xsns_40pn532.ino.
checking the console, the code stops at line 72
i am powering pn532 with 3.3v from wemos.if(PN532_Serial->hardwareSerial()){ClaimSerial();}
EDIT: i was wrong. it stops at line 75
uint32_t ver = PN532_getFirmwareVersion();
if (ver) {
i am powering pn532 with 3.3v from wemos.
That could be a problem - The on board regulators on the wemos mini's are known not to be able to deliver a high amount of current.
So you have two options.
2. If the PN532 board has an on board 5V to 3.3V regulator you can power it directly from the 5V rail on the wemos. Mine has one and I played with both 5V and 3.3V and both worked.
mine is not working in both cases!
after uploading i set back #define CFG_HOLDER 4617
to the original value
Im using a ELECHOUSE pn532 board, as in the case that @olix74 reported.
i tested the nfc module on a arduino mega using https://github.com/Seeed-Studio/PN532
the module has been recognized with .getFirmwareVersion()
So it seems the ELECTHOUSE board is not compatible.
Closing this issue as several cards are supprted.
Thanks everyone for working on this :+1:
i've also an ELECHOUSE (no T in the name) NFC MODULE V3, with a sample code on an arduino is working, but seems there is no way to get it recognized from my D1 and Tasmota (no detection message in console, and tags not detected)... wiring and config are as explained https://tasmota.github.io/docs/PN532/
So we should consider this board not usable?
Yes, Elechouse board is not working with Tasmota
:( ok probably need to go via ESPHome as this guy is using same board https://www.youtube.com/watch?v=YqwRppUsFIQ and looks working with esphome
Is there a recommendation for a working board? They are all looking similar to the board shown at the wiki. Some have printed ELECHOUSE some not...
Try to find one where the serial connections are easy available (as above) Most of the bought ones not saying elechouse do work
I think the picture in the tutorial may confuse users because to enable the HSU the position of the switches in the picture must be to the left as in the attached picture. I tried this tutorial and it worked with a device marked Elechouse. Tasmota v12.1.1 on esp32 s2 mini board pins 2 and 3 for tx/rx
@matteodallefeste you are welcome to update the photo and the text in the docs
When scanning some NFC tags the data field is empty, this seems to work ok, but when others are scanned things like this are sent as JSON which make it unfriendly to decode. "DATA":"\x14\x01\x03\xe1\x03\xe1\x03\xe1\x03\xe1\x03\xe1\x03\xe1\x03\xe1\x03"
Using a wemos D1 mini with PN532, compiled and flashed using Arduino IDE
To Reproduce Scan different types of cards using the PN532
Expected behavior either no data displayed or valid JSON generated