Skip to main content
choongkeanfatt29
Associate II
October 21, 2016
Solved

How to make ST95HF RF field not switch OFF after read a peer NFC device

  • October 21, 2016
  • 8 replies
  • 1671 views
Posted on October 21, 2016 at 03:55

Hi Sir / Madam,

After ST95HF has read its peer NFC device, ST95HF RF field is automatically shut down.  I have to initialise it again using the following functions:

        ISO14443A_Init( );

        ISO14443A_IsPresent();

        ISO14443A_Anticollision();

May I know how can I prohibit this to happen.  Because when this happens, where the RF field provide by ST95HF is not stable, peer NFC device is unable to smoothly read by ST95HF.  May I know how can I make ST95HF RF field is constantly switch ON when even I have finished reading and writing to peer NFC RF interface ?

Thank you for your advice.

Please reply soon.

Thank you.

Cheers,

KF

#nfc-transceiver-ics---xx95hf #nfc #nfc-transceiver-ics---xx95hf
    This topic has been closed for replies.
    Best answer by Ronald B.
    Posted on November 15, 2016 at 11:55

    Hello,

    Sorry for the late reply, we experience troubles with the forum notifications currently...

    Thanks for the additional information you provided.

    My understanding of your setup is the following:

    1. ST95HF successfully reads the NXP NTAG.

    2. You attempt an additional read from the ST95HF right after, which fails because the ST95HF RF field has been shut down.

    If you are using the ST demo function TagReading() without any modification, this function shut down the RF field before exiting:  PCD_FieldOff();

    However, if you re-attempt a read using the TagReading() function, it should work as the RF field is switched ON again by the ConfigManager_TagHunting(TRACK_ALL) procedure.

    If you are not using the TagReading() function for the second read, then you have to re-do the init process as mentionned in your very first message.

    If you are not using the TagReading() function at all, here is the code that you can use:

        ISO14443A_Init( );

        if(ISO14443A_IsPresent() == RESULTOK)

        { 

          if(ISO14443A_Anticollision() == RESULTOK)

          { 

            if (((ISO14443A_Card.SAK&0x60) == 0x00)) /* TT2 */

              TagType = TRACK_NFCTYPE2;

          }

        }

    /* This is the first read */

    PCDNFCT2_ReadNDEF()

     delay_ms(3000);

    /* This is the second read after a 3s delay */

    PCDNFCT2_ReadNDEF()

    If you're not formating your message as a NDEF, you can use the PCDNFCT2_Read() function instead.

    Please let me know if this is of any help with your issue.

    Regards.

    8 replies

    Ronald B.
    Visitor II
    November 2, 2016
    Posted on November 02, 2016 at 11:40

    Hello,

    We need more details on your setup to help you.

    1. Which Firmware are you using on the ST95HF?

    2. What is the peer device? Another ST95HF, a Smartphone?

    > If you are using a smartphone, what application do you use?

    3. Do you know if you are using the ST proprietary implementation of the peer to peer?

    Thanks & regards.

    choongkeanfatt29
    Associate II
    November 8, 2016
    Posted on November 08, 2016 at 02:24

    HI SIr / Madam,

    Please see my reply as attached.

    Thank you and please advice soon.

    Cheers,

    KF

    choongkeanfatt29
    Associate II
    November 15, 2016
    Posted on November 15, 2016 at 02:48

    Hello ST Support,

    May I know what happen to ST95HF after ST95HF read data from its Peer NFC device ?

    May I know what has shut off ST95HF RF Field after ST95HF has done the read action ?

    After ST95HF read data from its peer NFC, is ST95HF still in ready state and in reader role ?  In my code, provide by ST, I do not turn off the RF field after read function.  But I have to turn it ON before every Read statement, or I will get a timeout (0x87).   

    Please help soon.

    Thank you very much.  Your help is very much appreciated.

    Cheers,

    KF

     Please see the following for the answers.  Thank you.

     1. Which Firmware are you using on the ST95HF?

    May I know what is the firmware information you need ?, I am using ST95HF attached to ST M3 microcontroller.

    The ST95HF software is downloaded from internet. 

    For example: drv_95HF.c  ---->  author is MMY Application Team

                                               ---->  version V4.0.0

                                               ---->  date is 02/06/2014

                                               ----> brief :  This file provides set of driver functions to    manage communication between MCU and xx95HF chip (RX95HF, CR95HF or ST95HF)

    <h2><center>&copy; COPYRIGHT 2014 STMicroelectronics</center></h2>

       *

       * Licensed under MMY-ST Liberty SW License Agreement V2, (the ''License'');

       * You may not use this file except in compliance with the License.

       * You may obtain a copy of the License at:

       *

       *       

    http://www.st.com/software_license_agreement_liberty_v2

       *

       * Unless required by applicable law or agreed to in writing, software

       * distributed under the License is distributed on an ''AS IS'' BASIS,

       * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.

       * See the License for the specific language governing permissions and

       * limitations under the License.

     2. What is the peer device? Another ST95HF, a Smartphone?

    My peer device is NXP NTAG 1K which is attached to a ST M3 microcontroller.

     > If you are using a smartphone, what application do you use?

     3. Do you know if you are using the ST proprietary implementation of the peer to peer?

     No, I have not touch anything on ST proprietary because I have not use anything from the file lib_proprietaryP2P.c  .

     Thanks & regards.

    Ronald B.
    Ronald B.Best answer
    Visitor II
    November 15, 2016
    Posted on November 15, 2016 at 11:55

    Hello,

    Sorry for the late reply, we experience troubles with the forum notifications currently...

    Thanks for the additional information you provided.

    My understanding of your setup is the following:

    1. ST95HF successfully reads the NXP NTAG.

    2. You attempt an additional read from the ST95HF right after, which fails because the ST95HF RF field has been shut down.

    If you are using the ST demo function TagReading() without any modification, this function shut down the RF field before exiting:  PCD_FieldOff();

    However, if you re-attempt a read using the TagReading() function, it should work as the RF field is switched ON again by the ConfigManager_TagHunting(TRACK_ALL) procedure.

    If you are not using the TagReading() function for the second read, then you have to re-do the init process as mentionned in your very first message.

    If you are not using the TagReading() function at all, here is the code that you can use:

        ISO14443A_Init( );

        if(ISO14443A_IsPresent() == RESULTOK)

        { 

          if(ISO14443A_Anticollision() == RESULTOK)

          { 

            if (((ISO14443A_Card.SAK&0x60) == 0x00)) /* TT2 */

              TagType = TRACK_NFCTYPE2;

          }

        }

    /* This is the first read */

    PCDNFCT2_ReadNDEF()

     delay_ms(3000);

    /* This is the second read after a 3s delay */

    PCDNFCT2_ReadNDEF()

    If you're not formating your message as a NDEF, you can use the PCDNFCT2_Read() function instead.

    Please let me know if this is of any help with your issue.

    Regards.

    choongkeanfatt29
    Associate II
    December 21, 2016
    Posted on December 21, 2016 at 05:08

    Hi ST Support,

    I have another problem.  I need your help. Please help me

    (1) I am struggling on why ST95 is unable read the session register the second time without doing another round of ISO14443A_Init( ), ISO14443A_IsPresent() , and ISO14443A_Anticollision().  There is no response from NTAG.

    (2) Even though I redo  ISO14443A_Init( ), ISO14443A_IsPresent() , and ISO14443A_Anticollision().  or collectively called it RF field ON,  It will fail at ISO14443A_IsPresent().  It will fail at REQ A (0x2607) , timeout while waiting for NTAG response.  But if I do it this way :  ISO14443A_Init( ), ISO14443A_IsPresent() , ISO14443A_IsPresent() , and ISO14443A_Anticollision().  , it will success.  The reason is that :  The errchk(ISO14443A_REQA(pDataRead));  will only receive data from NTAG the second time if send out twice to NTAG.  The first time of REQA can be a wrong value, example 0x0000.  But the second time must be a correct value 0x2607.  Only by this way, it will make REQA a success. 

    (3) According to NFC resource, the REQA is actually 0x26, only.  May I know what is mean by 0x07, following 0x26.

    (4) I have raise this question because :  Every time, while doing Pass through communication between NTAG and ST95, I need to do the following:

       (a) Field ON after read session register.

       (b) Field ON before and after reading NTAG mapped SRAM.

       (c) Field ON before and after writing NTAG mapped SRAM.

    I have also apply the same method for read / write NTAG Mirror SRAM.

    Without this method, NTAG RF interface (ST95) will behave abnormaly.

    Please reply soon.

    Thank you very much.

    Cheers,

    KF