Skip to content

M24SR64 Y

Frederic Pillon edited this page Mar 23, 2020 · 1 revision

M24SR64-Y

Arduino library to support the dynamic NFC/RFID Tag IC dual interface M24SR64-Y.

API

  • M24SR(const uint8_t, TwoWire *, gpoEventCallback, const int, const int): class constructor
    Params I2C address of the component
    Params pointer to the I2C instance
    Params pointer to a gpoEventCallback called when the gpo pin status changes
    Params gpo pin number
    Params RF disable pin number

  • begin(void *): initializes the device
    Params not used
    Returns M24SR_SUCCESS if no errors

  • writeTxt(const char *): write text TAG
    Params pointer to the text to write
    Returns true if no errors

  • readTxt(char *): read text TAG
    Params pointer to the text to read

  • writeUri(const char *): write URI TAG
    Params pointer to the URI to write
    Returns true if no errors

  • readUri(char *): read URI TAG
    Params pointer to the URI to read

  • writeAAR(const *): write AAR TAG
    Params pointer to the AAR to write
    Returns true if no errors

  • readAAR(char *): read AAR TAG
    Params pointer to the AAR to read

  • writeURIMail(const char *, const char *, const char *): write URI Mail TAG
    Params pointer to recipient
    Params pointer to the mail subject
    Params pointer to the mail body
    Returns true if no errors

  • readURIMail(char *, char *, char *): read URI Mail TAG
    Params pointer to recipient
    Params pointer to the mail subject
    Params pointer to the mail body
    Params pointer to the URIMail to read

  • writeSMS(const char *, const char *): write SMS TAG
    Params pointer to recipient
    Params pointer to the SMS body
    Returns true if no errors

  • readSMS(char *, char *): read SMS TAG
    Params pointer to recipient
    Params pointer to the SMS body
    Params pointer to the SMS to read

  • writeMime(const char *, const char *, const uint8_t): write mime TAG
    Params pointer to mime type
    Params pointer to data
    Params data length
    Returns true if no errors

  • readMime(char *, uint8_t *, uint8_t *): read mime TAG
    Params pointer to mime type
    Params pointer to data
    Params pointer to data length

For the other functions the documentation is available on www.st.com.

Known limitation

The size of a TAG is limited to 246 bytes. This limitation is due to the Iblock command on the M24SR device (protocol + payload = 255 bytes).

Examples

  • WriteAAR: writes a AAR (Android Application Record) tag on the device. It opens an application on your smartphone.
  • WriteMime: writes a mime tag on the device. It records a define type of data.
  • WriteSMS: writes a SMS tag on the device. It records a SMS body and a recipient phone number
  • WriteText: writes a text tag on the device. It records a simple text message.
  • WriteURI: writes a URI tag on the device. It records an URI.
  • WriteURIMail: writes a Mail tag on the device. It records a mail with the recipient, the subject and the body of the message.

Source

You can find the source files at
https://github.com/stm32duino/M24SR64-Y

Documentation

The M24SR64-Y datasheet is available at
http://www.st.com/en/nfc/m24sr64-y.html

Clone this wiki locally