cancel
Showing results for 
Search instead for 
Did you mean: 

Continuously interact with M24SR

joaquim
Associate III
Posted on December 09, 2015 at 16:43

Hi,

I was wondering how can I interact with the M24SR in a continuous manner.

I mean, now I can write and read the NDEF in my M24SR with my mobile phone, that is nice. On the other side, I also have a MCU attached to the M24SR tag. 

However, for my phone to read what something I have just written, I have to separate the phone and the M24SR tag, and place them near again.

I was wondering how can I interact as fast as possible with the M24SR.

For example, I would like to write some number using my phone to my M24SR tag (ex: '4'). Once written, the GPO pin flags this to the attached MCU I have. The MCU reads the fresh new NDEF content, adds '1' to the content, and it writes back '5' to the M24SR tag. Then, the mobile phone, without the need for separating them, reads back the result of the operation.

Can this be done with M24SR? I guess there is something I can toggle to simulate a separation between M24SR and mobile phone. Maybe some command send by the MCU through the I2C interface? Or maybe I could toggle something on the Android phone side?

Please let me know your suggestions, and have a nice day.

#m24sr
1 ACCEPTED SOLUTION

Accepted Solutions
JP Miller
Senior
Posted on December 16, 2015 at 15:28

Hello,

A NDEF message with an unknown type record could be created for recording the number you are referring to which is alternatively written by the Phone or the MCU.

For communicating from the phone to the host, the host can be informed a NDEF message has been written by the phone through the GPO signal with the GPO having been set with the ‘MIP NDEF Message writing in Progress' configuration. Once the proper GPO signal state change is detected, the MCU can read the NDEF message. MCU could then read the NDEF record to see that the number has been updated and take further action.

The phone needs to do polling on the NDEF message, and specifically the NDEF record containing the number till it has been incremented by the MCU.

Some example code that could help you, can be found in our web site:

http://www.st.com/web/catalog/tools/FM147/SC1871/PF262828

Hope this helps.

Have a nice day

View solution in original post

1 REPLY 1
JP Miller
Senior
Posted on December 16, 2015 at 15:28

Hello,

A NDEF message with an unknown type record could be created for recording the number you are referring to which is alternatively written by the Phone or the MCU.

For communicating from the phone to the host, the host can be informed a NDEF message has been written by the phone through the GPO signal with the GPO having been set with the ‘MIP NDEF Message writing in Progress' configuration. Once the proper GPO signal state change is detected, the MCU can read the NDEF message. MCU could then read the NDEF record to see that the number has been updated and take further action.

The phone needs to do polling on the NDEF message, and specifically the NDEF record containing the number till it has been incremented by the MCU.

Some example code that could help you, can be found in our web site:

http://www.st.com/web/catalog/tools/FM147/SC1871/PF262828

Hope this helps.

Have a nice day