ESPHome 2026.2.1
Loading...
Searching...
No Matches
esphome::nfc Namespace Reference

Data Structures

class  NciMessage
 
class  NdefMessage
 
class  NdefRecord
 
class  NdefRecordText
 
class  NdefRecordUri
 
class  Nfcc
 
class  NfcOnTagTrigger
 
class  NfcTag
 
class  NfcTagBinarySensor
 
class  NfcTagListener
 

Typedefs

using NfcTagUid = StaticVector<uint8_t, NFC_UID_MAX_LENGTH>
 

Functions

char * format_uid_to (char *buffer, std::span< const uint8_t > uid)
 Format UID to buffer with '-' separator (e.g., "04-11-22-33"). Returns buffer for inline use.
 
char * format_bytes_to (char *buffer, std::span< const uint8_t > bytes)
 Format bytes to buffer with ' ' separator (e.g., "04 11 22 33"). Returns buffer for inline use.
 
std::string format_uid (std::span< const uint8_t > uid)
 
std::string format_bytes (std::span< const uint8_t > bytes)
 
uint8_t guess_tag_type (uint8_t uid_length)
 
uint8_t get_mifare_classic_ndef_start_index (std::vector< uint8_t > &data)
 
bool decode_mifare_classic_tlv (std::vector< uint8_t > &data, uint32_t &message_length, uint8_t &message_start_index)
 
uint32_t get_mifare_ultralight_buffer_size (uint32_t message_length)
 
uint32_t get_mifare_classic_buffer_size (uint32_t message_length)
 
bool mifare_classic_is_first_block (uint8_t block_num)
 
bool mifare_classic_is_trailer_block (uint8_t block_num)
 
bool has_ha_tag_ndef (NfcTag &tag)
 
std::string get_ha_tag_ndef (NfcTag &tag)
 
std::string get_random_ha_tag_ndef ()
 

Typedef Documentation

◆ NfcTagUid

using esphome::nfc::NfcTagUid = StaticVector<uint8_t, NFC_UID_MAX_LENGTH>

Definition at line 15 of file nfc_tag.h.

Function Documentation

◆ decode_mifare_classic_tlv()

bool esphome::nfc::decode_mifare_classic_tlv ( std::vector< uint8_t > & data,
uint32_t & message_length,
uint8_t & message_start_index )

Definition at line 51 of file nfc.cpp.

◆ format_bytes()

std::string esphome::nfc::format_bytes ( std::span< const uint8_t > bytes)

Definition at line 25 of file nfc.cpp.

◆ format_bytes_to()

char * esphome::nfc::format_bytes_to ( char * buffer,
std::span< const uint8_t > bytes )

Format bytes to buffer with ' ' separator (e.g., "04 11 22 33"). Returns buffer for inline use.

Definition at line 15 of file nfc.cpp.

◆ format_uid()

std::string esphome::nfc::format_uid ( std::span< const uint8_t > uid)

Definition at line 22 of file nfc.cpp.

◆ format_uid_to()

char * esphome::nfc::format_uid_to ( char * buffer,
std::span< const uint8_t > uid )

Format UID to buffer with '-' separator (e.g., "04-11-22-33"). Returns buffer for inline use.

Definition at line 11 of file nfc.cpp.

◆ get_ha_tag_ndef()

std::string esphome::nfc::get_ha_tag_ndef ( NfcTag & tag)

Definition at line 10 of file nfc_helpers.cpp.

◆ get_mifare_classic_buffer_size()

uint32_t esphome::nfc::get_mifare_classic_buffer_size ( uint32_t message_length)

Definition at line 74 of file nfc.cpp.

◆ get_mifare_classic_ndef_start_index()

uint8_t esphome::nfc::get_mifare_classic_ndef_start_index ( std::vector< uint8_t > & data)

Definition at line 38 of file nfc.cpp.

◆ get_mifare_ultralight_buffer_size()

uint32_t esphome::nfc::get_mifare_ultralight_buffer_size ( uint32_t message_length)

Definition at line 67 of file nfc.cpp.

◆ get_random_ha_tag_ndef()

std::string esphome::nfc::get_random_ha_tag_ndef ( )

Definition at line 26 of file nfc_helpers.cpp.

◆ guess_tag_type()

uint8_t esphome::nfc::guess_tag_type ( uint8_t uid_length)

Definition at line 30 of file nfc.cpp.

◆ has_ha_tag_ndef()

bool esphome::nfc::has_ha_tag_ndef ( NfcTag & tag)

Definition at line 8 of file nfc_helpers.cpp.

◆ mifare_classic_is_first_block()

bool esphome::nfc::mifare_classic_is_first_block ( uint8_t block_num)

Definition at line 87 of file nfc.cpp.

◆ mifare_classic_is_trailer_block()

bool esphome::nfc::mifare_classic_is_trailer_block ( uint8_t block_num)

Definition at line 95 of file nfc.cpp.