NFC Compatibility Container

New poster here

I have been playing around with PN532 chips recently, and have been using a MEGA board.

I see that the NDEF Specification states that a NDEF message can be 2^32-1 however it doesn't seem that I can set the Compatibility Container value to be more than 64k. Can someone explain where the value in the container size is the size of the whole message or the size limit of the entire message that can be exchanged?

Ideally I would like to set this larger for my purposes if possible but not sure how to.

As a note, I am not bound by the SRAM limits on the board with our work, I am however trying to understand the limits of how to express available memory in the CC container to represent the device as having more than 64k.


 uint8_t compatibility_container[] = {
        0, 0x0F,
        0, 0x54,
        0, 0xFF,
        0x04,                                                        // T
        0x06,                                                        // L
        0xE1, 0x04,                                                  // File identifier
       // ((NDEF_MAX_LENGTH & 0xFF00) >> 8), (NDEF_MAX_LENGTH & 0xFF), // maximum NDEF file size
        0x00,                                                        // read access 0x0 = granted
        0x00                                                         // write access 0x0 = granted | 0xFF = deny

I have not worked with the NDEF stuff, but I would select an Arduino (just pretend you have one, you do not actually need a board) with a modern processor e.g. ARM Cortex-M and compile the code for that. If it works, you know the limitation in your case are likely in the comilation tools and/or the architecture. Your MEGA is a 8bit processor, so 64k is already quite an achievement of the engineers to extend the architecture.

There are good reasons why we are moving to 32/64 bit processors. :slight_smile: