Hi,
We are testing NFC with Mifare UL card and the application we are using is provided by NXP .When testing Ultralite using NXP demo application we are not able to read any data or write data.But when we try to read Classic card we are able to read and write.I noticed that there is a parameter which is described in libnfc-nxp.conf i.e "MIFARE_READER_ENABLE" which is set as 0x01 for Mifare classic card.But what is the parameter to be set in order for us to read or write Ultralite card.Please Reply as soon as possible as am not getting support from anybody
Thank you,
Deepanraj.A
we are using PN1720 and our Environment is Linux.The software package we are using is linux-nfc provided by nxp R2.1.
Example is the demo app which is present in the library and the command nxp provided library. In imx6 platform and we are referring AN11697.pdf i.e PN71x0 Linux Software Stack Integration Guidelines
Thank you,
Deepanraj.A
Hi Deepanraj,
To send command to a MIFARE UL you can use nfcTag_transceive API of the library to send "raw" command to a card.
Please find attached an update of the demoapp delivered as part of the linux_libnfc-nci library demonstrating a "READ" command on MIFARE UL card when it is not NDEF compliant (see about line 1385).
Regards,
Jeremy Geslin.
Hi,
The changes you have done in the demo app.if it is applied is it possible to read and write data to ultralight card.
Thank you,
Deepanraj.A
Hi,
The changes done to the demo app are only showing how to read a MIFARE UL sector. For writing you can use exact same API to send command such "WRITE", in this case the buffer to be send should looks like {0xA2, block address, 4 bytes of data to write} (e.g. {0xA2, 0x04, 0x11, 0x22, 0x22, 0x44} will write block 4 with data 11223344).
Regards,
Jeremy.
Hi,
For writing you have mentioned the buffer did you mean MifareAuthCmd in the demo app or is it any other buffer you are mentioning and is there any thing need to be set in libnfc-nxp.conf i.e the value of MIFARE_READER_ENABLE for reading Ultralight.
Thank you,
Deepanraj.A
Just create you own buffer and use it for instance:
unsigned char MifareWriteCmd[] = {0xA2, 0x04, 0x11, 0x22, 0x22, 0x44};
unsigned char RespBuf[255];
nfcTag_transceive(TagInfo.handle, MifareWriteCmd, sizeof(MifareWriteCmd), RespBuf, sizeof(RespBuf), 500);
Hi,
Is it possible to format my card to NDEF format using this demo app ?
or,
Is there any other application available to format NFC cards in Linux
Thank you,
Deepanraj.A
nfcDemoApp "write" option actually format the tag if is is not yet NDEF and if NDEF formatting is supported.
But When we give "write" command still it is telling NDEF content as NO . Is there a way to write NDEF content to my classic or Ultralite card ?
nfcDemoApp "write" option should, unless your card doesn't support formatting.
To verify this, please enable more traces (in /etc/libnfc-nxp.conf file, update NXPLOG_NCIX_LOGLEVEL and NXPLOG_NCIR_LOGLEVEL to value 0x03) and provide related logs.
This is strange since I thought I was able to reproduce the exact same issue you reported for which the patch fixed the problem.
For deeper analysis, please activate more traces by setting parameter "ENABLE_API_TRACES" to "TRUE" (inside src\halimpl\pn54x\log\phNxpLog.h).
I see from the trace that your tag is not blank (block4 = 11 22 22 44).
The format function of the library only works if tag is factory initialized (block 4=FF FF FF FF).
If you have an NFC android smartphone you can format the tag to factory state (using NXP TagWriter application for instance). Otherwise I can provide you updated demoApp to handle this case.
Can you please share the updated demo app source code so that it will be easy for us to test here