Hello,
I need to implement bidirectional read/write communication over NFC interface, in order to provide an interface for exchanging two RAW byte arrays with a size of 900bytes.
As a first step, I'm trying to configure the content of the message to be in RAW format, by adjusting the existing demo from the SDK which uses a "Text" as the record type (part of the code listed below).
// ... NFC_NDEF_TEXT_RECORD_DESC_DEF(nfc_en_text_rec, 0, en_code, sizeof(en_code), en_payload, strlen(en_payload)); NFC_NDEF_MSG_DEF(nfc_text_msg, 1); nfc_ndef_msg_record_add(&NFC_NDEF_MSG(nfc_text_msg), &NFC_NDEF_TEXT_RECORD_DESC(nfc_en_text_rec)); nfc_ndef_msg_encode(&NFC_NDEF_MSG(nfc_text_msg), m_ndef_msg_buf, &len); err_code = nfc_t2t_payload_set(m_ndef_msg_buf, len); // ...
I'm guessing that, instead of calling NFC_NDEF_TEXT_RECORD_DESC_DEF, it should be called NFC_NDEF_GENERIC_RECORD_DESC_DEF with a TNF argument 'U' (referring to the unknown or RAW type), and without language code arguments, but so far I haven't done the configuration successfully.
Is there some existing example describing how to configure the message of NFC T2T as a RAW bytes array?
Thanks.