2016-01-13 04:59 AM
Dear all,
How to create a NDEF Text message using M24SR with STM32F411? I manage to create a 7 bits text message using M24SR_UpdateBinary (and mbed lib) How to create a >7 bits NDEF text message using only ST libraries? Thanks, Regards YMA #ndef-text-m24sr-stm32f411Solved! Go to Solution.
2016-01-15 05:36 AM
Hello,
With the 7 characters limitation you are mentioning, the function call: M24SR_UpdateBinary (wtot, 16, NDEF_Buffer+wtot); should instead be: M24SR_UpdateBinary (wtot, 7, NDEF_Buffer+wtot); Other than that the code seems to correctly take into account this limitation. M24SR is not limited to a 7 characters update. The limitation is somewhere else. Maybe it is worth checking where this limitation comes from. Best regards, Have a nice day.2016-01-14 07:10 AM
Due to 7 char limitation i managed as follow (but it is not THE solution),
uint16_t wtot = 0; if(message.size()>7){ do{ M24SR_UpdateBinary (wtot, 16, NDEF_Buffer+wtot); wtot+=7; } while(wtot<=message.size()); } else{ M24SR_UpdateBinary (0, 16, NDEF_Buffer); } where message is string character text message to write and NDEF_Buffer, NDEF content, for example: NDEF_Buffer={0x00,0x12,0xd1,0x1,0xe,0x54,0x2,0x65,0x6e,0x48,0x65,0x6c,0x6c,0x6f,0x20,0x57,0x6f,0x72,0x6c,0x64} for message=''Hello World'' Hoppe this will help people as nowhere on the net i found a real answer2016-01-15 05:36 AM
Hello,
With the 7 characters limitation you are mentioning, the function call: M24SR_UpdateBinary (wtot, 16, NDEF_Buffer+wtot); should instead be: M24SR_UpdateBinary (wtot, 7, NDEF_Buffer+wtot); Other than that the code seems to correctly take into account this limitation. M24SR is not limited to a 7 characters update. The limitation is somewhere else. Maybe it is worth checking where this limitation comes from. Best regards, Have a nice day.