Hello Mickaël,
The card Emulation demo emulates a T4T tag with a CC file and an NDEF file. In STM32CubeExpansion_NFC6_V1.1.0, the NDEF file has an hardcoded NDEF URI in ndef_uri bytes array in demo_ce.c file. it can be easily modified to have a TEXT record instead of a URI record, for example:
static const uint8_t ndef_uri[] = {
0x00, 0x1E, /* NDEF length */
0xD1, /* NDEF Header */
0x01, /* NDEF type length */
0x1A, /* NDEF payload length */
0x54, /* NDEF Type */
0x02, /* TEXT Lang Len */
0x65, 0x6E, /* TEXT Lang value */
0x57, 0x65, 0x6C, 0x63, /* TEXT */
0x6F, 0x6D, 0x65, 0x20, /* TEXT */
0x74, 0x6F, 0x20, 0x53, /* TEXT */
0x54, 0x20, 0x4E, 0x44, /* TEXT */
0x45, 0x46, 0x20, 0x64, /* TEXT */
0x65, 0x6D, 0x6F /* TEXT */
};
You can also encode NDEF messages thanks to NDEF library and then copy this message into the NDEF file buffer. The STSW-ST25R-LIB has a Card Emulation demo called bluetooth_pairing that encodes a NDEF message and copy it into the NDEF buffer. You can also modify this demo to encode an NDEF with a TEXT record.
Rgds
BT