Skip to main content
Explorer
April 23, 2023
Solved

temperature sensor NDEF

  • April 23, 2023
  • 11 replies
  • 2438 views

I have programmed the temperature sensor, but it seems that it has not been successful, the NDEF reading result is shown in the figure, what should I do?

if( NfcType5_NDEFDetection( ) != NDEF_OK )

 {

  CCFileStruct.MagicNumber = NFCT5_MAGICNUMBER_E1_CCFILE;

  CCFileStruct.Version = NFCT5_VERSION_V1_0;

  CCFileStruct.MemorySize = ( ST25DVXXKC_MAX_SIZE / 8 ) & 0xFF;

  CCFileStruct.TT5Tag = 0x05;

  /* Init of the Type Tag 5 component (M24LR) */

  while( NfcType5_TT5Init( ) != NFCTAG_OK );

 }

 /* Init done */

 NFC07A1_LED_Off( GREEN_LED );

 HAL_Delay( 300 );

 NFC07A1_LED_Off( BLUE_LED );

 HAL_Delay( 300 );

 NFC07A1_LED_Off( YELLOW_LED );

 HAL_Delay( 300 );

 /* write text message to EEPROM */

 K_Temperature= MAX6675_ReadTemperature(); //读�?�热电�?�温度值

 HAL_Delay(1000);

 // 将浮点数转�?�为字符串

 char temp_str[20];

 sprintf(temp_str, "%f", K_Temperature);

 // 将字符串转�?�为无符�?�8�?整数数组

 uint8_t temp_data[strlen(temp_str)];

 memcpy(temp_data, temp_str, strlen(temp_str));

 // 写入NDEF消�?�

 NDEF_WriteNDEF(strlen(temp_str), temp_data);

  //读�?�NDEF消�?�

  NDEF_ReadNDEF(temp_data);

 /* Set the LED3 on to indicate Programing done */

 NFC07A1_LED_On( YELLOW_LED );

}


_legacyfs_online_stmicro_images_0693W00000bidNeQAI.png

    This topic has been closed for replies.
    Best answer by Brian TIDAL

    Hi,

    as already explained in a previous post:

    when the NDEF TEXT message is properly formatted, Android displays the text (i.e. decodes the NDEF and extracts the payload). If using the ST25 NFC Tap app, the NDEF tab display "Text record"; the content of the record is displayed when pressing on the "Text record" field.

    This is the way you should check.

    Rgds

    BT

    11 replies

    Technical Moderator
    April 26, 2023

    Hi,

    as already explained in a previous post:

    when the NDEF TEXT message is properly formatted, Android displays the text (i.e. decodes the NDEF and extracts the payload). If using the ST25 NFC Tap app, the NDEF tab display "Text record"; the content of the record is displayed when pressing on the "Text record" field.

    This is the way you should check.

    Rgds

    BT