Kan and Dries,
Ok, I’m finally getting an answer with a number in it for the non-short NDEF2 record. As Kan pointed out, the size of the message cannot exceed the buffer allocated by the caller. The caller in this case is NDEFT2T_CreateMessage(), for which the buffer is a byte array of NFC_SHARED_MEM_BYTE_SIZE, which is defined as the size of an NSS_NFC_T. This NFC type contains a memory buffer of 128 4-byte words (512 bytes). So after accounting for whatever Mime and NDEF2 message overhead (my assumption) it’s down to 462 bytes. This is an abysmally small number for what I thought should be many times the size of a short record. I don’t suppose that there is a way to safely increase that size without breaking something in the chip_nss library?
As Dries understood, this smart business card does not use the temperature sensor, but simply stores a gob of user information to regurgitate upon the reader when tapped. I tried splitting the information into two NDEF2 records of roughly equal size, but either the first record was over-written, or the reader lost it when the second came was received.
As for my #2 and your confusion about programming – I want to program ONE firmware for all business cards, and program DATA for every card. I don’t care which memory either resides in, but the card (tag) needs to work as a passive element without any batteries, and without needing complex command/response scenarios from the reader. TagWriter should be able to dump new DATA into the card, even if it means leaving the card tapped for 10 minutes. Failing this, our fall back is to program unique firmware for every single card.
More questions for Dries…
1. “The ARM in the NHS3100 has access to 128 pages of the NFC memory” What is a page in this context? A four-byte word again? I am still only asking for 1024 bytes!
2. “You write simple firmware that stores multiple NDEF messages, and cycles through them on each tap.” Right. How? I can create the multiple NDEF messages without problems. I don’t see where even the first message gets sent out for the tap. Can you send or point to an example for multiple messages?
Steve