pn7150 read/write to 2 tags at the same time

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

pn7150 read/write to 2 tags at the same time

9,729 Views
ziv1
Contributor I

hello nxp 

 

i am working with pn7150

my host mcu connect with the pn7150 via i2c

the pn7150 will try to be reading and writing to 2 nearby ntag213 type 2 tags

 

  1. i wonder in a SW / API manner how to prevent collisions when reading or writing to one tag or the other

 

i found this functions in the nfc.h file 

bool NxpNci_ReaderActivateNext(NxpNci_RfIntf_t *pRfIntf);

bool NxpNci_ReaderReActivate(NxpNci_RfIntf_t *pRfIntf);

but it is not clear how i know to which card i am talking to, which one is activated and which one is deactivated?

Is there a tag instance for each one of them ???

 

does the variable ' NxpNci_RfIntf_t RfIntf '  contain the tag's id or specification so if I give it as an argument to a function it works on a certain tag and not the other one? If so, where is it defined and do I need to hold 2 instances of that variable?

 

also in the

            bool NxpNci_StartDiscovery(unsigned char *pTechTab, unsigned char TechTabSize);

what is the functionality of the pointer pTechTab .. is it some sort of ids to the tags ? if so, how can I use this ids to determine to which tag I am writing/reading ?

 

2. Do I need to use the

bool NxpNci_StartDiscovery(unsigned char *pTechTab, unsigned char TechTabSize);

            every time befor using

            bool NxpNci_ReaderTagCmd (unsigned char *pCommand, unsigned char CommandSize, unsigned char *pAnswer, unsigned char *pAnswerSize);

or is it ok if I use it once in the beginning of the program  ?

3. What is the difference between using :

void NxpNci_ProcessReaderMode(NxpNci_RfIntf_t RfIntf, NxpNci_RW_Operation_t Operation);

            or using :

bool NxpNci_ReaderTagCmd (unsigned char *pCommand, unsigned char CommandSize, unsigned char *pAnswer, unsigned char *pAnswerSize);

            I understand the first one calls for a callback function but actually they both wait for tags response so ??

 

 

basically if there are some code examples somewhere for sending and receiving data for more than one tag, because it is very difficult to start with the basic from nxp_nci_mcuexpresso

which just read if a tag is present or not if i get it right

 

i need to be sending a reading request for specific data and i need to write to specific data to specific location, so i guess there is always a read cmd and then wait for reply.. ?

again i need SW help

 

best regards

Ziv

0 Kudos
17 Replies

9,298 Views
jeremygeslin
NXP Employee
NXP Employee

Hi Ziv,

1. Indeed in the updated example the NFC settings were disabled by mistake. The only impact is that PN7150 will run with existing settings value in internal EEPROM. You can simply re-enable it by using original example related Nfc_settings.h file.

2. Those differences relates to additional interface definition of latest PN7150 references. It has no impact until you use C11004 or C11006 reference. Those new reference adds a anti-tearing mechanism, and the code here is for handling this new mechanism.

3. When the tags are discovered first time, 2 handles are somehow created. You can then read or write the tag you want after it has been selected (using dedicated function as shown in example). The handle will remain valid until a restart of the discovery, but in case the tag is removed the selection will fail.

Regards,

Jeremy.

0 Kudos

9,298 Views
ziv1
Contributor I

Hi Jeremy

Referring to answer 1:

1. I understand that if I don't set new configuration the device will keep the last flashed configuration, but If it is possible I would like to know what is the meaning of this configurations and what are the packets sent to the PN7150 each time and what is the meaning of a valid reply packet from the PN7150.

Refereeing to answer 2:

1. Again, is it possible to get the bytes info in the packet sent to the PN7150 (don't need the payload bytes info as it is related to the NTAG213 itself and I found this data in its datasheet).

But from what I see in the example code you start a message with 2 bytes set to zero, though in the data sheet a control packet starts not with a zero, so if you send a read or a write command do you consider it as DATA TYPE Message Type packet? And still the CONN ID, RFU / OID , GID cannot be set to zero for reading and writing no ? .. this is the data I am missing in the PN7150 data sheet.. what is the packets byte info and what the PN7150 return packet bytes info (so I can understand what is a valid return message and if there is a problem maybe I can understand better what it is

Refereeing to answer 3:

1. Just to make sure, So the Activation and deactivation does not change the set but if one tag is removed and I have to rediscover then I will again have to check by tags info which is which right?

2.

Best regards

Ziv Hershkovitch, Software Eng.

NEAT Applied Tech. LTD

Tel: +972 4 6541518 (Ext. #106) I Fax: +972 4 654 1520 I Mob: +972 54 6765686

ziv@neat-tech.com<mailto:ziv@neat-tech.com> I www.neat-tech.com<http://www.neat-tech.com/>;

Please consider your environmental responsibility before printing this e-mail

0 Kudos

9,297 Views
jeremygeslin
NXP Employee
NXP Employee

Hi Ziv,

PN7150 implements NFC Forum NCI interface. This interface is detailled in related NFC Forum NCI specification, only specificity to PN7150 is described in PN7150's User Manual.

Basically NCI interface is defined as:

- first 2 bytes define the frame type (command, response or event) and purpose

- third byte defines the payload length (rest of the frame)

For instance, in Nfc_settings.h file:

uint8_t NxpNci_CORE_CONF[]={ 0x20, 0x02, 0x05, 0x01,         /* CORE_SET_CONFIG_CMD */
                                                         0x00, 0x02, 0x00, 0x01        /* TOTAL_DURATION */

0x20, 0x02 -> Command CORE_SET_CONFIG

0x05 -> length of payload

0x01 -> Nb of configuration to set

0x00 -> ID of the configuration (TOTAL_DURATION)

0x02 -> Size of the configuration

0x00, 0x01 -> configuration value (LSB first)

And for data exchange communication with cards:

0x00, 0x00 -> Command  DATA_MESSAGE

0xXX -> payload length

0x .... RF frame

Regards,

Jeremy.

0 Kudos

9,297 Views
ziv1
Contributor I

Hi Jeremy

I know this .. I added the command and data type message structure from the user manual to my previous question,

However, to make it simple ..

1. I want to know the bytes I need to send to the NFC controller for it to pass a command to the Tag

2. I want to know the bytes I need to send to the NFC controller to read the message from the Tag

3. And just to be sure.. does the interrupt pin will be rise only when a message from the Tag is ready or after every command sent to the Tag or only to the NFC controller, like configs and such ?

Best regards

Ziv Hershkovitch, Software Eng.

NEAT Applied Tech. LTD

Tel: +972 4 6541518 (Ext. #106) I Fax: +972 4 654 1520 I Mob: +972 54 6765686

ziv@neat-tech.com<mailto:ziv@neat-tech.com> I www.neat-tech.com<http://www.neat-tech.com/>;

Please consider your environmental responsibility before printing this e-mail

0 Kudos

9,298 Views
jeremygeslin
NXP Employee
NXP Employee

Hi Ziv,

1./2. To exchange data with NTAG213 tag, after it have been activated, you must use NCI_DATA_PACKET frame to send NTAG213 commands (see https://www.nxp.com/docs/en/data-sheet/NTAG213_215_216.pdf  chapter 10) :

   - first 2 bytes are "0x00 0x00"

   - third byte defines the payload length (rest of the frame)

   - remaining bytes (payload) is the NTAG213 command to send

Then PN7150 will confirm command sent to the tag by NCI frame "0x60 0x06 0x03 0x01 0x00 0x01".

And finally, PN7150 will forward NTAG213 answer with NCI_DATA_PACKET:

   - first 2 bytes are "0x00 0x00"

   - third byte defines the payload length (rest of the frame)

   - next bytes are NTAG213 answer (if no answer it will be null bytes)

   - last byte is answer status (0x00 if success)

For instance to perform NTAG213 READ command of block 4:

   Send command: 0x00 0x00 0x02 0x30 0x04

   Receive Ack: 0x60 0x06 0x03 0x01 0x00 0x01

   Receive response: 0x00 0x00 0x05 0x11 0x22 0x33 0x44 0x00 (11223344 is block 4 value) if valid

                                   or 0x00 0x00 0x01 0x02 (in case of timeout)

3. As stated in www.nxp.com/docs/en/user-guide/UM10936.pdf chapter 3.4, the IRQ pin is raised each time PN7150 need to signal data to be read on I2C. It means in the above READ scenario IRQ line will raise for the and NTAG213 response (the IRQ line is kept high until all I2C data are read).

Regards,

Jeremy.

0 Kudos

9,298 Views
ziv1
Contributor I

 Hi Jeremy

 

I have finally returned to this project..

 

I see strange results right at the start maybe you can help:

1. in the example i am looking at there is a function ' NxpNci_StartDiscovery '

which creates a message  { 0x21, 0x03, 0x09, 0x04, 0x00, 0x01, 0x02, 0x01, 0x01, 0x01, 0x06, 0x01, 00000 }

what does that message mean, it does not start with 0x00, 0x00 like you wrote 

i can guess according to data sheet the 0x2 is the 001 MT of Control Packet - Command Message as a payload

and the 1 in the first 4 bits of the first byte is the GID, but what is GID = 1, what other values the GID has ? i could not find it in the data sheet 

same question about the second byte, i guess it is the OID , what are the possible values of the OID and what do they refer to ?

 

2.  what is the meaning or return message 0x60, 0x08, 0x02, 0x01, 0x00 

and if i want to read or write to a tag to i have to run start discovery before  (in my case tags will be inserted to microswitches so i have some validation that a tag is present ) ?

3.  what is the meaning of 0x61, 0x05, 0x17 (instead of 0x03 in the 3 byte)

4.  i have noticed that if i try to read to a buffer of 6 bytes and the pn7150 has more data for the DH then the IRQ pin is kept high, is there a way to know how much i need to read because it seems wasteful to keep a 255 byte buffer for every message even if i just except to read the 6 bytes of receive ACK  ?

5.  when i send to receive after read command then i get the 6 bytes of ACK and right after that i get 0xff, 0x00, 0x00, 0x11 (which is not what you wrote in your previous response) what does it mean and why does it return much more then the 4 bytes i requested to read ?

6. one more things, after the i call for 'NxpNci_StartDiscovery(..)' i make a 'do-while' loop like in your example for multiple tags read/write, i sometimes get stuck in this loop because i only get responses starting with 0x60 instead of 0x61. if i am in debug mode and i make a breakpoint on the while then after sometimes one sometimes 10 times it gets the 0x61, why is that, also i watch the IRQ pin state, i don't understand how come it stays on also after i read the info from the card and how come when i get stuck if i don't put a breakpoint it stays low ???

I can not have such infinite loop in my program, how can i better do that with out looping waiting for the desired answer ??

7. can i get an API with all public functions and some info about them, also a list of commands and return packets meaning  pls ?

8. i try to work by the ' NxpNci_WaitForDiscoveryNotification()' but i can't be using all this while loops in my program, in this function there is this line:

while(Answer[AnswerSize-1] == 0x02) NxpNci_WaitForReception(Answer, sizeof(Answer), &AnswerSize, TIMEOUT_100MS);

what does it means ? do you not know a head how many messages the pn7150 has? i only have 2 tags, of the same ntag213 type, to read. 

does it work like waiting for some data from each tag in the area ? 

9. beside all the above questions that needs to be answer please, when running the code from the example,

      after the NxpNci_WaitForDiscoveryNotification() return SUCCESS, 

      in the NxpNci_ReaderActivateNext(&RfInterface[1]) , i get the following response 

      00 00 00 00 00 00 04 00 41 04 01 00 ff 61 05 17 01 01 02 00 ff 01 0c 44 00 07 04 83 b8 aa 28 63 81 01 00 00 00 00 00 ff ff ff ...

      while, this is expected:

         /* First disconnect current tag */
         NxpNci_HostTransceive(NCIStopDiscovery, sizeof(NCIStopDiscovery), Answer, sizeof(Answer), &AnswerSize);
         if((Answer[0] != 0x41) && (Answer[1] != 0x06) && (Answer[3] != 0x00)) return NXPNCI_ERROR;
         NxpNci_WaitForReception(Answer, sizeof(Answer), &AnswerSize, TIMEOUT_100MS);
         if((Answer[0] != 0x61) && (Answer[1] != 0x06)) return NXPNCI_ERROR;

         in the last line i get NXPNCI_ERROR, and its the same message for both parts

i edit this question all the time cause i try to put all my findings and questions in one time since your reply speed is so very slow :smileysad:  

best regards 

Ziv

0 Kudos

9,298 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hi Ziv,

For question 1, it is a Control Packet - Command Message as you guess, it is a RF_DISCOVER_CMD according to the NCI spec: https://nfc-forum.org/product/nfc-controller-interface-nci-technical-specification-2-1/#:~:text=The%... 

Please kindly refer to the following for details.

[NCI][COMMAND][0x21 0x03 0x09 0x04 0x00 0x01 0x02 0x01 0x01 0x01 0x06 0x01]
RF_DISCOVER_CMD
* Number of Configurations = 4 [0x04]
--> Configuration N° 1
- RF Technology and Mode = {Std} NFC_A_PASSIVE_POLL_MODE [0x00]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]

--> Configuration N° 2
- RF Technology and Mode = {Std} NFC_F_PASSIVE_POLL_MODE [0x02]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]

--> Configuration N° 3
- RF Technology and Mode = {Std} NFC_B_PASSIVE_POLL_MODE [0x01]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]

--> Configuration N° 4
- RF Technology and Mode = {Std} NFC_15693_PASSIVE_POLL_MODE (RFU) [0x06]
- Discovery Frequency = RF Technology and Mode will be executed in every discovery period [0x01]

For question 2, it is a Control Packet – Notification Message, please kindly refer to the following for details.

[NCI][NOTIFICATION][0x60 0x08 0x02 0x01 0x00]
CORE_INTERFACE_ERROR_NTF
* Status = {Std} STATUS_REJECTED [0x01]
* Conn ID = Static RF Connection between the DH and a Remote NFC Endpoint [0x00]

For question 3, it is also a Control Packet – Notification Message, it is a RF_INTF_ACTIVATED_NTF, but should be just the beginning of it, this message should contain 26 bytes .

Hope that helps,

Have a great day,
Kan


-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

9,298 Views
ziv1
Contributor I

thanks Kan 

though it didn't help me so much

first, the link you added directed me to a 600$ book for the NCI protocol, i have no intention of buying it or reading the whole protocol

second, you haven't really given me any new information. i know i am receiving a control packet notifications, what i don't know is how to interoperate them, is there an explanation somewhere for what each byte in the control packet notification means and what the values in each of this bytes mean ?

also would appreciate if there can be attention for the rest of the questions :smileyhappy:

best regards

Ziv

0 Kudos

9,298 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello Ziv,

Please kindly refer to the following for details.

4.  i have noticed that if i try to read to a buffer of 6 bytes and the pn7150 has more data for the DH then the IRQ pin is kept high, is there a way to know how much i need to read because it seems wasteful to keep a 255 byte buffer for every message even if i just except to read the 6 bytes of receive ACK  ?

- It is not possible to know exactly how many bytes you have to read after some commands, as the response is different case by case, which API are you using? For example, NxpNci_ReaderTagCmd() can know how many bytes are received after returned.

 

5.  when i send to receive after read command then i get the 6 bytes of ACK and right after that i get 0xff, 0x00, 0x00, 0x11 (which is not what you wrote in your previous response) what does it mean and why does it return much more then the 4 bytes i requested to read ?

-Do you have the NCI log for a review? Maybe you just received part of the response.

 

6. one more things, after the i call for 'NxpNci_StartDiscovery(..)' i make a 'do-while' loop like in your example for multiple tags read/write, i sometimes get stuck in this loop because i only get responses starting with 0x60 instead of 0x61. if i am in debug mode and i make a breakpoint on the while then after sometimes one sometimes 10 times it gets the 0x61, why is that, also i watch the IRQ pin state, i don't understand how come it stays on also after i read the info from the card and how come when i get stuck if i don't put a breakpoint it stays low ???

I can not have such infinite loop in my program, how can i better do that with out looping waiting for the desired answer ??

- Do you have the NCI log for this case? Is it possible to show your  'do-while' loop here?  It looks like some timing issue.

 

7. can i get an API with all public functions and some info about them, also a list of commands and return packets meaning  pls ?

 - Do you mean API user manual ? 

8. i try to work by the ' NxpNci_WaitForDiscoveryNotification()' but i can't be using all this while loops in my program, in this function there is this line:

while(Answer[AnswerSize-1] == 0x02) NxpNci_WaitForReception(Answer, sizeof(Answer), &AnswerSize, TIMEOUT_100MS);

what does it means ? do you not know a head how many messages the pn7150 has? i only have 2 tags, of the same ntag213 type, to read. 

does it work like waiting for some data from each tag in the area ? 

 - This part is to receiving NTF message if there is remaining from PN7150 side.

9. beside all the above questions that needs to be answer please, when running the code from the example,

      after the NxpNci_WaitForDiscoveryNotification() return SUCCESS, 

      in the NxpNci_ReaderActivateNext(&RfInterface[1]) , i get the following response 

      00 00 00 00 00 00 04 00 41 04 01 00 ff 61 05 17 01 01 02 00 ff 01 0c 44 00 07 04 83 b8 aa 28 63 81 01 00 00 00 00 00 ff ff ff ...

      while, this is expected:

         /* First disconnect current tag */
         NxpNci_HostTransceive(NCIStopDiscovery, sizeof(NCIStopDiscovery), Answer, sizeof(Answer), &AnswerSize);
         if((Answer[0] != 0x41) && (Answer[1] != 0x06) && (Answer[3] != 0x00)) return NXPNCI_ERROR;
         NxpNci_WaitForReception(Answer, sizeof(Answer), &AnswerSize, TIMEOUT_100MS);
         if((Answer[0] != 0x61) && (Answer[1] != 0x06)) return NXPNCI_ERROR;

         in the last line i get NXPNCI_ERROR, and its the same message for both parts

- Better to have the NCI log for a review, what was received in this case?

Best Regards,

Kan

0 Kudos

9,298 Views
ziv1
Contributor I

i don't have an NCI log, it kind of answer to all most of your answers 

so the answers provided above does not help me to better work with the pn7150

would appreciate if i can get more clear info on the above matters ( API =  Application Programming Interface )

best regards

ziv

0 Kudos

9,298 Views
Kan_Li
NXP TechSupport
NXP TechSupport

Hello Ziv,

If you want to know how to interoperate them as well as the meaning for each byte in the message, you still have to dig into the NCI protocol, the UM10936 (https://www.nxp.com/docs/en/user-guide/UM10936.pdf  ) shows the interoperate such as RF state machine but doesn't contain the details regarding the NCI spec.

I am investigating the rest of the questions and will give you a response later. Thanks for your patience!

Best Regards,

Kan

0 Kudos

9,298 Views
ziv1
Contributor I

hi Kani_Li

sorry to say but i have read this UM10936 manual more the once all ready, no such info as to what the values of the returned messages mean

there is no explanation of what this message mean 0x60 0x08 0x02 0x01 0x00, or this 0x60 0x06 0x03 0x01 0x00 0x01, what is the meaning of a message starting with 0x41, or 0x61, or 0x00 ?

and this are just some examples of how there is no info available to understand what the nfc returns.

also regarding the IRQ pin, sometimes it stays low when i am waiting for reception and sometimes it stays high even after i read the data, its not clear when it goes down and up 

best regards

ziv

0 Kudos

9,298 Views
jeremygeslin
NXP Employee
NXP Employee

Hi Ziv,

Please find attached updated (and simplified) example demonstration detection and successive selection of 2 tags.

I hope it clarifies your questions.

Regards,

Jeremy.

0 Kudos

8,695 Views
ziv1
Contributor I

hi Jeremy

we are trying now to work with the same system with NXP PN7150 with the ICODE SLIX 2 chip tags instead of the NTAG213 

i can read and write one tag but when i try to read 2 tags with the same mechanism for finding the tags as in the NTAG213, it seems i can not find the tags (also looks like it takes longer time with the ICODE tags)

maybe you also have a code example for reading/writing multiple tags for the ICODE SLIX 2 ? 

it would be a great help and time saving 

if not, may be you can light for me the difference in the configurations for each ' NxpNci_RfIntf_t ' instance and if there are more things i need to set differently ?

 

hope to read from you soon

best regards

Ziv

0 Kudos

9,298 Views
ziv1
Contributor I

Hi Jeremy I posted this reply at nxp forum

hi Jeremy

thanks for the example you sent.. few questions:

1.in the example you sent the Nfc_settings.h file looks like that:

/* Following definitions specifies which settings will apply when NxpNci_ConfigureSettings()

  • API is called from the application

*/

#define NXP_CORE_CONF 0

#define NXP_CORE_STANDBY 0

#define NXP_CORE_CONF_EXTN 0

#define NXP_CLK_CONF 0 // 1=Xtal, 2=PLL

#define NXP_TVDD_CONF 0 // 1=CFG1, 2=CFG2

#define NXP_RF_CONF 0

and in the exampe code i have from nxp site the same file looks lie this:

/* Following definitions specifies which settings will apply when NxpNci_ConfigureSettings()

  • API is called from the application

*/

#define NXP_CORE_CONF 1

#define NXP_CORE_CONF_EXTN 1

#define NXP_CORE_STANDBY 1

#define NXP_CLK_CONF 1 // 1=Xtal, 2=PLL

#define NXP_TVDD_CONF 2 // 1=CFG1, 2=CFG2

#define NXP_RF_CONF 1

why is there a difference and what is the meaning of this configs and command cause i could not find referance to that on the UM10936 PN7150 User Manual.

2. in the NxpNci_CheckDevPres() function

the RX answer is tested for

if ((Answer[0] != 0x40) || (Answer[1] != 0x00)) return NXPNCI_ERROR;

in my example , and in the example you sent its validity is tested for:

if ((Answer[0] == 0x60) && (Answer[1] == 0x07))

why is there a difference ? again what is the meaning of this values i could not find it in the user manual

/* Is PN7150B0HN/C11004 Anti-tearing recovery procedure triggered ? */

if ((Answer[3] == 0xE6)) gRfSettingsRestored_flag = true;

this is also chacked in you example and not in mine and not sure what its for

3. regarding the identifing of 2 tags .. if i understand correctly , in order to know which tag is the RfInterface[0] and which one is the RfInterface[1], i have to check by the data in the Tag after the first read and after that each instance will always read the same tag, even if one is removed and then installed back the one that remained will remain with the instance that was asign to it at initialization .. correct ?

best regards

Ziv

Best regards

Ziv Hershkovitch, Software Eng.

NEAT Applied Tech. LTD

Tel: +972 4 6541518 (Ext. #106) I Fax: +972 4 654 1520 I Mob: +972 54 6765686

ziv@neat-tech.com<mailto:ziv@neat-tech.com> I www.neat-tech.com<http://www.neat-tech.com/>;

Please consider your environmental responsibility before printing this e-mail

0 Kudos

9,298 Views
ziv1
Contributor I

hi Jeremy

thanks for the example you sent.. few questions:

1.in the example you sent the Nfc_settings.h file looks like that:

/* Following definitions specifies which settings will apply when NxpNci_ConfigureSettings()
 * API is called from the application
 */
#define NXP_CORE_CONF        0
#define NXP_CORE_STANDBY     0
#define NXP_CORE_CONF_EXTN   0
#define NXP_CLK_CONF         0 // 1=Xtal, 2=PLL
#define NXP_TVDD_CONF        0 // 1=CFG1, 2=CFG2
#define NXP_RF_CONF          0

      

and in the exampe code i have from nxp site the same file looks lie this:

/* Following definitions specifies which settings will apply when NxpNci_ConfigureSettings()
 * API is called from the application
 */
#define NXP_CORE_CONF        1
#define NXP_CORE_CONF_EXTN   1
#define NXP_CORE_STANDBY     1
#define NXP_CLK_CONF         1 // 1=Xtal, 2=PLL
#define NXP_TVDD_CONF        2 // 1=CFG1, 2=CFG2
#define NXP_RF_CONF          1

why is there a difference and what is the meaning of this configs and command cause i could not find referance to that on the  UM10936  PN7150 User Manual. 

2. in the NxpNci_CheckDevPres()  function

      the RX answer is tested for 

if ((Answer[0] != 0x40) || (Answer[1] != 0x00)) return NXPNCI_ERROR;

      in my example , and in the example you sent its validity is tested for:

if ((Answer[0] == 0x60) && (Answer[1] == 0x07))

why is there a difference ? again what is the meaning of this values i could not find it in the user manual

/* Is PN7150B0HN/C11004 Anti-tearing recovery procedure triggered ? */
            if ((Answer[3] == 0xE6)) gRfSettingsRestored_flag = true;

this is also chacked in you example and not in mine and not sure what its for

3. regarding the identifing of 2 tags .. if i understand correctly , in order to know which tag is the RfInterface[0] and which one is the RfInterface[1], i have to check by the data in the Tag after the first read and after that each instance will always read the same tag, even if one is removed and then installed back the one that remained will remain with the instance that was asign to it at initialization .. correct ?

best regards

Ziv

0 Kudos

9,298 Views
rodolfoveltrigo
NXP Employee
NXP Employee

jeremygeslin‌: Hi Jeremy, can you have a look at this  Israeli customer (supported by our Disti Telsys) who is willing to detect multiple tags using PN7150 and needs some hints to enable full-anticollision mechanism. He wants to detect two friendly cards at the same time and be able to write both cards while they are in the field.

Let me know if you can take this, otherwise let's get in touch via email.

Cheers

Rodolfo

rodolfo.gomes@nxp.com

0 Kudos