ATrappmann / PN5180-Library

PN5180 library for Arduino
GNU Lesser General Public License v2.1
105 stars 92 forks source link

Unable to write. #7

Closed FlorinescuCtin closed 5 years ago

FlorinescuCtin commented 5 years ago

Hello Andreas

First let me tell you that I highly apreciate your effort to make a Arduino library for the PN5180-NFC Module. I have some electronics knowledge, I can understand and adapt/modify an Arduino sketch, but that's all, I'm nowhere near to make a library or something!

So, I just received a module, I have installed your work and... EVRIKA, I can read a few tags!

The problem came when I tried to write to this tag, can you please help with my issue?

Is there some other command to write a block?

Thanks in advance!

Here are the logs from Arduino:

================================== Uploaded: Jan 23 2019 20:07:13 PN5180 ISO15693 Demo Sketch

PN5180 Hard-Reset...

Reading product version... Product version=3.5

Reading firmware version... Firmware version=3.5

Reading EEPROM version... EEPROM version=145.0

Enable RF field...

Loop #0 Inventory successful, UID=E0:4:106AC6BB4F

System Info retrieved: blockSize=4, numBlocks=28

Read block #0: 00 00 00 00 .... Read block #1: 00 00 00 00 .... Read block #2: 00 00 00 00 .... Read block #3: 00 00 00 00 .... Read block #4: 00 00 00 00 .... Read block #5: 00 00 00 00 .... Read block #6: 00 00 00 00 .... Read block #7: 00 00 00 00 .... Read block #8: 00 00 00 00 .... Read block #9: 00 00 00 00 .... Read block #10: 00 00 00 00 .... Read block #11: 00 00 00 00 .... Read block #12: 00 00 00 00 .... Read block #13: 00 00 00 00 .... Read block #14: 00 00 00 00 .... Read block #15: 00 00 00 00 .... Read block #16: 00 00 00 00 .... Read block #17: 00 00 00 00 .... Read block #18: 00 00 00 00 .... Read block #19: 00 00 00 00 .... Read block #20: 00 00 00 00 .... Read block #21: 00 00 00 00 .... Read block #22: 00 00 00 00 .... Read block #23: 00 00 00 00 .... Read block #24: 00 00 00 00 .... Read block #25: 00 00 00 00 .... Read block #26: 00 00 00 00 .... Read block #27: 57 5F 4F 4B W_OK

Error in writeSingleBlock #0: Unknown error! IRQ-Status 0x4007: [ RQ TX IDLE RX_SOF_DET ]

Loop #1

If I read this tag with my phone, I get this log:

TagInfo scan (version 4.24.4) 2019-01-23 20:15:46 Report Type: External

-- IC INFO ------------------------------

IC manufacturer:

NXP Semiconductors

IC type:

ICODE SLI (SL2ICS20)

-- NDEF ------------------------------

No NDEF data storage present:

Maximum NDEF storage size after format: 106 bytes

-- EXTRA ------------------------------

Memory size:

112 bytes

IC detailed information:

Supported read commands:

-- FULL SCAN ------------------------------

Technologies supported:

ISO/IEC 15693-3 compatible ISO/IEC 15693-2 compatible

Android technology information:

Tag description:

Detailed protocol information:

ID: E0:04:01:00:6A:C6:BB:4F AFI: 0x00 DSFID: 0x00

Memory content:

[00] . 00 00 00 00 |␀␀␀␀| [01] . 00 00 00 00 |␀␀␀␀| [02] . 00 00 00 00 |␀␀␀␀| [03] . 00 00 00 00 |␀␀␀␀| [04] . 00 00 00 00 |␀␀␀␀| [05] . 00 00 00 00 |␀␀␀␀| [06] . 00 00 00 00 |␀␀␀␀| [07] . 00 00 00 00 |␀␀␀␀| [08] . 00 00 00 00 |␀␀␀␀| [09] . 00 00 00 00 |␀␀␀␀| [0A] . 00 00 00 00 |␀␀␀␀| [0B] . 00 00 00 00 |␀␀␀␀| [0C] . 00 00 00 00 |␀␀␀␀| [0D] . 00 00 00 00 |␀␀␀␀| [0E] . 00 00 00 00 |␀␀␀␀| [0F] . 00 00 00 00 |␀␀␀␀| [10] . 00 00 00 00 |␀␀␀␀| [11] . 00 00 00 00 |␀␀␀␀| [12] . 00 00 00 00 |␀␀␀␀| [13] . 00 00 00 00 |␀␀␀␀| [14] . 00 00 00 00 |␀␀␀␀| [15] . 00 00 00 00 |␀␀␀␀| [16] . 00 00 00 00 |␀␀␀␀| [17] . 00 00 00 00 |␀␀␀␀| [18] . 00 00 00 00 |␀␀␀␀| [19] . 00 00 00 00 |␀␀␀␀| [1A] . 00 00 00 00 |␀␀␀␀| [1B] . 57 5F 4F 4B |W_OK|

x:locked, .:unlocked


Here is my setup: dsc_1548

ATrappmann commented 5 years ago

Thank you for your feedback. The problem is solved in Version 1.2 of the library by clearing the Options bit in the read & write method.