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

Zephyr nrf-connect nfc t4t not working (How do I report bugs for sdk-nrf?)

Hello,

I would like to report a bug found in the sdk-nrf. The github is not allowing bug reports so I will put it here.

The `nfc_ndef_msg_encode` function in `nrf/ndef/message.h` is missing some needed logic specific for type 4 nfc tags.

If `NFC_NDEF_MSG_TAG_TYPE` is set to `TYPE_4_TAG`, the function should reserve `NLEN_FIELD_SIZE` for bytes at the start of the buffer for the length, then populate that reserved space with the length of the encoded message.

My current workaround is

uint32_t len = sizeof(ndef_msg_buf)
uint8_t	* temp_msg_buff_pointer = ndef_msg_buf;

#if NFC_NDEF_MSG_TAG_TYPE == TYPE_4_TAG
	temp_msg_buff_pointer += NLEN_FIELD_SIZE;
#endif
	
err = nfc_ndef_msg_encode(&nfc_payload,
	temp_msg_buff_pointer,
	&len);
__ASSERT(err == 0, "Failed to encode record.");
	
#if NFC_NDEF_MSG_TAG_TYPE == TYPE_4_TAG
	sys_put_be16(len, ndef_msg_buf); //Write length to start of ndef message
	len += NLEN_FIELD_SIZE; // Increase total size to include length
#endif

err = nfc_t4t_ndef_staticpayload_set(ndef_msg_buf, len);
__ASSERT(err == 0, "Failed to set nfc payload!");

Is there an official place for reporting bugs?

Thanks,

Sam

Related