mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-23 11:13:09 +00:00
c186d2b0cc
* added support for ISO15693 (NfcV) emulation, added support for reading SLIX tags * SLIX: fixed crash situation when an invalid password was requested * ISO15693: show emulate menu when opening file * rename NfcV emulate scene to match other NfcV names * optimize allocation size for signals * ISO15693: further optimizations of allocation and free code * ISO15693: reduce latency on state machine reset * respond with block security status when option flag is set * increased maximum memory size to match standard added security status handling/load/save added SELECT/QUIET handling more fine grained allocation routines and checks fix memset sizes * added "Listen NfcV Reader" to sniff traffic from reader to card * added correct description to delete menu * also added DSFID/AFI handling and locking * increase sniff log size * scale NfcV frequency a bit, add echo mode, fix signal level at the end * use symbolic modulated/unmodulated GPIO levels * honor AFI field, decrease verbosity and removed debug code * refactor defines for less namespace pollution by using NFCV_ prefixes * correct an oversight that original cards return an generic error when addressing outside block range * use inverse modulation, increasing readable range significantly * rework and better document nfc chip initialization * nfcv code review fixes * Disable accidentally left on signal debug gpio output * Improve NFCV Read/Info GUIs. Authored by @xMasterX, committed by @nvx * Fix crash that occurs when you exit from NFCV emulation and start it again. Authored by @xMasterX, committed by @nvx * Remove delay from emulation loop. This improves compatibility when the reader is Android. * Lib: digital signal debug output pin info Co-authored-by: Tiernan Messmer <tiernan.messmer@gmail.com> Co-authored-by: MX <10697207+xMasterX@users.noreply.github.com> Co-authored-by: gornekich <n.gorbadey@gmail.com> Co-authored-by: あく <alleteam@gmail.com>
46 lines
1.5 KiB
C
46 lines
1.5 KiB
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include "nfc_util.h"
|
|
#include <furi_hal_nfc.h>
|
|
|
|
#define NFCV_MANUFACTURER_NXP 0x04
|
|
|
|
/* ISO15693-3 CUSTOM NXP COMMANDS */
|
|
#define NFCV_CMD_NXP_SET_EAS 0xA2
|
|
#define NFCV_CMD_NXP_RESET_EAS 0xA3
|
|
#define NFCV_CMD_NXP_LOCK_EAS 0xA4
|
|
#define NFCV_CMD_NXP_EAS_ALARM 0xA5
|
|
#define NFCV_CMD_NXP_PASSWORD_PROTECT_EAS_AFI 0xA6
|
|
#define NFCV_CMD_NXP_WRITE_EAS_ID 0xA7
|
|
#define NFCV_CMD_NXP_INVENTORY_PAGE_READ 0xB0
|
|
#define NFCV_CMD_NXP_INVENTORY_PAGE_READ_FAST 0xB1
|
|
#define NFCV_CMD_NXP_GET_RANDOM_NUMBER 0xB2
|
|
#define NFCV_CMD_NXP_SET_PASSWORD 0xB3
|
|
#define NFCV_CMD_NXP_WRITE_PASSWORD 0xB4
|
|
#define NFCV_CMD_NXP_DESTROY 0xB9
|
|
#define NFCV_CMD_NXP_ENABLE_PRIVACY 0xBA
|
|
|
|
/* available passwords */
|
|
#define SLIX_PASS_READ 0x01
|
|
#define SLIX_PASS_WRITE 0x02
|
|
#define SLIX_PASS_PRIVACY 0x04
|
|
#define SLIX_PASS_DESTROY 0x08
|
|
#define SLIX_PASS_EASAFI 0x10
|
|
|
|
#define SLIX_PASS_ALL \
|
|
(SLIX_PASS_READ | SLIX_PASS_WRITE | SLIX_PASS_PRIVACY | SLIX_PASS_DESTROY | SLIX_PASS_EASAFI)
|
|
|
|
bool slix_check_card_type(FuriHalNfcDevData* nfc_data);
|
|
bool slix2_check_card_type(FuriHalNfcDevData* nfc_data);
|
|
bool slix_s_check_card_type(FuriHalNfcDevData* nfc_data);
|
|
bool slix_l_check_card_type(FuriHalNfcDevData* nfc_data);
|
|
|
|
ReturnCode slix_get_random(NfcVData* data);
|
|
ReturnCode slix_unlock(NfcVData* data, uint32_t password_id);
|
|
|
|
void slix_prepare(NfcVData* nfcv_data);
|
|
void slix_s_prepare(NfcVData* nfcv_data);
|
|
void slix_l_prepare(NfcVData* nfcv_data);
|
|
void slix2_prepare(NfcVData* nfcv_data);
|