Skip to content

Commit

Permalink
[FL-3657] Fix NFC unit tests (#3192)
Browse files Browse the repository at this point in the history
Co-authored-by: あく <[email protected]>
  • Loading branch information
gornekich and skotopes authored Nov 9, 2023
1 parent 085c90a commit 16ffa2b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/nfc/helpers/nfc_data_generator.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ static const uint8_t default_config_ntag_i2c[] = {0x01, 0x00, 0xF8, 0x48, 0x08,
static void nfc_generate_mf_ul_uid(uint8_t* uid) {
uid[0] = NXP_MANUFACTURER_ID;
furi_hal_random_fill_buf(&uid[1], 6);
uid[3] |= 0x01; // To avoid forbidden 0x88 value
// I'm not sure how this is generated, but the upper nybble always seems to be 8
uid[6] &= 0x0F;
uid[6] |= 0x80;
Expand Down Expand Up @@ -322,6 +323,7 @@ static void nfc_generate_ntag_i2c_plus_2k(NfcDevice* nfc_device) {
static void nfc_generate_mf_classic_uid(uint8_t* uid, uint8_t length) {
uid[0] = NXP_MANUFACTURER_ID;
furi_hal_random_fill_buf(&uid[1], length - 1);
uid[3] |= 0x01; // To avoid forbidden 0x88 value
}

static void
Expand Down

0 comments on commit 16ffa2b

Please sign in to comment.