NHS3152 - dynaimcally update message dysplayed on phone screen

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

NHS3152 - dynaimcally update message dysplayed on phone screen

Jump to solution
891 Views
leo94
Contributor IV

Hello, 

I am using NHS3152 demo board. I want to have messages continuously updating on the phone while the chip is within the NFC field:

  1. Check if Nfc field is present 
  2. Create message
  3. update phone screen with new message
  4. repeat step 2 with new message
  5. update phone screen with new message  


Modyfing code from mainndeft2t.c I believe i am managing to have the message update multiple times whilst in the NFC field, however my phone screen wont update unless i remove the chip and put it back in the NFC field of the phone. 

 

How do i dynamically update the message on the phone while the chip is in the NFC field? 

 

This is the main of my code (rest is the same as mainndeft2t.c) 

 

 

int main(void)
{
    Board_Init();
    NDEFT2T_Init();
    NVIC_EnableIRQ(PIO0_IRQn); /* PIO0_IRQHandler is called when this interrupt fires. */
    Chip_GPIO_EnableInt(NSS_GPIO, 0, 1);
    for (;;) {
    	if (sFieldPresent){
    		GenerateNdef_Url();
    		GenerateNdef_TextMime();
    		sText[0] = (uint8_t)((sText[0] == '9') ? '0' : (sText[0] + 2));
    		sBytes[0]++; //change the sByte for next message
    		
    		Chip_Clock_System_BusyWait_ms(250); \\ wait before new update
    	}

     
    }


    return 0;
}

 

thanks, 

Leo 

 

0 Kudos
Reply
1 Solution
883 Views
driesmoors
NXP Employee
NXP Employee

Hello Leo,

Android and iOS phones do not perform repeated background reads when the tag remains in the NFC field.

  • Either you remove the tag and bring eth tag back in the field, so that a new NFC session is started - as you already found. I agree this is annoying and not very practical.
  • Or you create an APP that continually issues NC read commands.

The tag cannot change this behavior, unfortunately.

 

Best regards,
Dries.

View solution in original post

2 Replies
881 Views
leo94
Contributor IV

That's a shame, 

Thanks Driers,

leo

0 Kudos
Reply
884 Views
driesmoors
NXP Employee
NXP Employee

Hello Leo,

Android and iOS phones do not perform repeated background reads when the tag remains in the NFC field.

  • Either you remove the tag and bring eth tag back in the field, so that a new NFC session is started - as you already found. I agree this is annoying and not very practical.
  • Or you create an APP that continually issues NC read commands.

The tag cannot change this behavior, unfortunately.

 

Best regards,
Dries.