This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NFC Tag Type for rwpayload and staticpayload at same time.

Hello,

I want to define a writable payload section and a static payload section (not writable) in one tag is this possible?

I have now implemented it like this, but that only gives me the static payload.

void nfc_init(void)

{ uint32_t err_code;

  /* Set up NFC */
err_code = nfc_t4t_setup(nfc_callback, NULL);
APP_ERROR_CHECK(err_code);
		
/* Provide information about available buffer size to encoding function */
uint32_t len_static = sizeof(m_ndef_msg_buf_static);
	uint32_t len_rw = sizeof(m_ndef_msg_buf_rw);

	name_msg_encode(m_ndef_msg_buf_rw, &len_rw);
												
/* Run Read-Write mode for Type 4 Tag platform */
err_code = nfc_t4t_ndef_rwpayload_set(m_ndef_msg_buf_rw, sizeof(m_ndef_msg_buf_rw));
APP_ERROR_CHECK(err_code);

	uuid_msg_encode(m_ndef_msg_buf_static, &len_static);

   /* Run Static mode for Type 4 Tag platform */
err_code = nfc_t4t_ndef_staticpayload_set(m_ndef_msg_buf_static, sizeof(m_ndef_msg_buf_static));
APP_ERROR_CHECK(err_code);
																
/* Start sensing NFC field */
err_code = nfc_t4t_emulation_start();
APP_ERROR_CHECK(err_code);

}

Thanks!

Related