Command "InListPassiveTarget" of the PN532 device returns only one ACK and nothing else

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Command "InListPassiveTarget" of the PN532 device returns only one ACK and nothing else

Jump to solution
3,541 Views
dominusdrr
Contributor IV

Hi.

I have managed to communicate with the PN532 device through a microcontroller. I get it out of the low power mode, I get the firmware version and the general status.

Now I want to read a MiFare type tag (ISO / IEC14443) and the frame I send is the following:

transmissionBuffer[0] = 0x00;
transmissionBuffer[1] = 0x00; 

transmissionBuffer[2] = 0xFF; 
transmissionBuffer[3] = 0x04; 
transmissionBuffer[4] = 0xFC; 
transmissionBuffer[5] = 0xD4; 
transmissionBuffer[6] = 0x4A ;
transmissionBuffer[7] = 0x01; 
transmissionBuffer[8] = 0x00;
transmissionBuffer[9] = 0xE1; 
transmissionBuffer[10] = 0x00;

And the frame that the PN532 answers is:

receptionBuffer[0] = 0x00;
receptionBuffer[1] = 0x00;
receptionBuffer[2] = 0xFF;
receptionBuffer[3] = 0x00;
receptionBuffer[4] = 0xFF;
receptionBuffer[5] = 0x00;

I want to indicate that I perform a procedure in the reception of data from the MCU which consists of a timer that is reset every time a byte arrives from the PN532 and when no more bytes arrive, the timer overflows and it is assumed that the frame has arrived complete.

That way in a single package I get the ACK more the answer.

To rule out that the response to the "InListPassiveTarget" command takes more time than the timer, I have tried up to 20 seconds and only the ACK arrives for that command.

For the others that I mentioned at the beginning, there is no problem.

Beforehand I appreciate any suggestions or comments.

Thanks

1 Solution
2,382 Views
dominusdrr
Contributor IV

I already understood what happens.

When the Tag is not present or there is a problem with the antenna design (which is similar to the fact that the tag is not present), the PN532 only sends the ACK, when it manages to detect the tag, it sends the second frame.

I assumed that the PN532, after the established time, returned a frame in which it indicated that the tag is not present.

Kan

View solution in original post

0 Kudos
10 Replies
2,381 Views
dominusdrr
Contributor IV

Hi.


I have made a video with the development kit to indicate what happens, in link to the video is the following:

https://www.youtube.com/watch?v=H8e86ztJgM4&feature=youtu.be

1. I send the frame to wake up the PN532.


2. Then, I send the frame to calibrate the parameters (00 00 FF 03 FD D4 12 00 1A 00)

3. Finally I sent the initiator, (00 00 FF 04 FC D4 4A 01 00 E1 00) but only responds with an ACK.

0 Kudos
2,381 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Fabian Romo,

Thanks for the information! I checked the video, the commands are correct, so I am guessing if it would be a hardware issue related with antenna tuning, all your tests shows the communication is ok between MCU and PN532, so the problem might be in the communication between PN532 and tag. Is it a custom board?


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
2,383 Views
dominusdrr
Contributor IV

I already understood what happens.

When the Tag is not present or there is a problem with the antenna design (which is similar to the fact that the tag is not present), the PN532 only sends the ACK, when it manages to detect the tag, it sends the second frame.

I assumed that the PN532, after the established time, returned a frame in which it indicated that the tag is not present.

Kan

0 Kudos
2,382 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Fabian Romo,

Yes, your understanding is almost right. but per my understanding, ACK is to the InListPassiveTarget command, meaning PN532 recognize this command, and if there is any issue in the following communication between PN532 and tag, no further frame will be back. You may refer to Fig 72. InDataExchange – Example of a ISO/IEC14443-4 exchange in the UM for more details. There might be issue in the part of red circle for your case.

pastedImage_1.png

Hope that makes sense,


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

2,381 Views
dominusdrr
Contributor IV

Thanks for answering.

To rule out that the problem is my PCB I have made the same actions on the following development kit, of which I have 3 and with all exactly the same happen:

http://www.elechouse.com/elechouse/images/product/PN532_module_V3/

shematic_drowing.pdf

In the video, I send the commands from my PC to the development kit through the Serial port RS232.

0 Kudos
2,382 Views
dominusdrr
Contributor IV

I tried to resend the command, but I only received the response from an ACK and nothing else..

I have a development kit and I have verified that the behavior is similar, I have sent the same frames from my computer through a USB to RS232 converter.

Please, someone can tell me what may be happening.

I have also tried to send the SetParameter command previously as indicated in the document "PN532 C106 application note"

But the problem continues.

0 Kudos
2,381 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Fabian Romo,

What was the data transaction before you sent the InListPassiveTarget command? and what is the type of the MiFare tag/card? Have you tried with other Mifare tag? Please kindly clarify.

Thanks for your patience!


Have a great day,
Kan

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
2,381 Views
dominusdrr
Contributor IV

Any suggestions? I'm stranded with the project.

0 Kudos
2,382 Views
dominusdrr
Contributor IV

I have also tried only to send the communication frame to wake up the device and then send the InListPassiveTarget command (that is, not ask for the firmware version or the general state) but the result is the same.

0 Kudos
2,382 Views
dominusdrr
Contributor IV

Kan Thank you very much for answering.

The first thing I do is wake up the device by sending the following frame:

0x55 0x55 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0xff 0x03 0xfd 0xd4 0x14 0x01 0x17 0x00

The PN532 responds with an ACK and an additional frame.

Then I request the firmware version (GetFirmwareVersion = 0x02) and the device correctly answers the AKC plus the frame with the firmware information.

Next I request the status of PN532 (GetGeneralStatus = 0x04) and it responds with the ACK and the frame that contains information.

Finally I send the command InListPassiveTarget (0x4A) but I only get its ACK, but the logical thing would be to add an additional response frame, if there was an error it would respond with NACK, an error frame or it just would not respond.

I have also tried the following:

According to the document "PN532 C106 application note", section 3.3.1 indicates the procedure to read a Mifare tag.

I understand that before the InListPassiveTarget command, the SetParameters command (0x12) must be sent. I sent with the byte called Flags with values 0x24 (Disable automatic sending of RATS) as indicated in the manual and I get the ACK plus the data frame (0xD5 0x13) and then I sent the command InListPassiveTarget , but it's the same, only one ACK responds and nothing else.

I have also tried to send the SetParameters command with Flags value equal to 0x34 (Enable automatic sending of RATS) as indicated by the document and it is the same problem with the InListPassiveTarget command.

Regarding what type of tag Mifare, I'm not sure, but that would be a next step.

I have also tried the following:
After sending the InListPassiveTarget command and only receiving the ACK, I proceeded to read the tag using the InDataExchange command but as a response to this command I get an ACK plus the data frame that indicates an error of type 0x27, that surely is due to the context was not initialized correctly)

I feel that I'm missing something else before I try to send the InListPassiveTarget  command.

Again thanks.

 

0 Kudos