Added some cmd and struct definitions for proxmark5
This commit is contained in:
1 parent
a061f080ed
commit
f145871b7e
1 file changed
+36
@@ -504,6 +504,19 @@ typedef struct {
|
||||
uint8_t data[];
|
||||
} PACKED smart_card_raw_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t factory_info_version;
|
||||
uint8_t ecdsa_secp256k1_signature[64];
|
||||
struct {
|
||||
uint64_t unix_timestamp;
|
||||
uint8_t chip_unique_id[12];
|
||||
uint32_t production_id;
|
||||
uint32_t hardware_version;
|
||||
uint8_t aes_key[16];
|
||||
uint8_t reserved[147];
|
||||
} PACKED info;
|
||||
} PACKED proxmark5_factory_info_v1_t;
|
||||
|
||||
// For the bootloader
|
||||
#define CMD_DEVICE_INFO 0x0000
|
||||
// #define CMD_SETUP_WRITE 0x0001
|
||||
@@ -512,6 +525,7 @@ typedef struct {
|
||||
#define CMD_START_FLASH 0x0005
|
||||
#define CMD_CHIP_INFO 0x0006
|
||||
#define CMD_BL_VERSION 0x0007
|
||||
#define CMD_CHIP_TYPE 0x0008
|
||||
#define CMD_NACK 0x00fe
|
||||
#define CMD_ACK 0x00ff
|
||||
|
||||
@@ -525,6 +539,7 @@ typedef struct {
|
||||
#define CMD_READ_MEM 0x0106 // legacy
|
||||
#define CMD_READ_MEM_DOWNLOAD 0x010A
|
||||
#define CMD_READ_MEM_DOWNLOADED 0x010B
|
||||
#define CMD_MAIN_CHIP_UNIQUEID 0x010C
|
||||
#define CMD_VERSION 0x0107
|
||||
#define CMD_STATUS 0x0108
|
||||
#define CMD_PING 0x0109
|
||||
@@ -546,6 +561,7 @@ typedef struct {
|
||||
#define CMD_FLASHMEM_WIPE 0x0122
|
||||
#define CMD_FLASHMEM_DOWNLOAD 0x0123
|
||||
#define CMD_FLASHMEM_DOWNLOADED 0x0124
|
||||
// DXL: I found that this command did not seem to have been used before, so it can be used to obtain the unique ID of FLASH MEM.
|
||||
#define CMD_FLASHMEM_INFO 0x0125
|
||||
#define CMD_FLASHMEM_SET_SPIBAUDRATE 0x0126
|
||||
#define CMD_FLASHMEM_PAGES64K 0x0127
|
||||
@@ -607,6 +623,15 @@ typedef struct {
|
||||
#define CMD_USART_TXRX 0x0162
|
||||
#define CMD_USART_CONFIG 0x0163
|
||||
|
||||
// PM5, Dual frequency antenna control.
|
||||
#define CMD_ANT_CONTROL_WRITE 0x0170
|
||||
#define CMD_ANT_CONTROL_READ 0x0171
|
||||
// PM5, EPPROM of factory info store
|
||||
#define CMD_EEPROM_FACTORY_INFO_READ 0x0172
|
||||
#define CMD_EEPROM_FACTORY_INFO_WRITE 0x0173
|
||||
// PM5, QC test for the hardware
|
||||
#define CMD_PM5_QC_TEST 0x0177
|
||||
|
||||
// For low-frequency tags
|
||||
#define CMD_LF_TI_READ 0x0202
|
||||
#define CMD_LF_TI_WRITE 0x0203
|
||||
@@ -798,6 +823,14 @@ typedef struct {
|
||||
// For direct FPGA control
|
||||
#define CMD_FPGA_MAJOR_MODE_OFF 0x0500
|
||||
|
||||
// For fpga config bitstream
|
||||
#define CMD_FPGA_BITSTREAM_CONFIG_START 0x0501
|
||||
#define CMD_FPGA_BITSTREAM_CONFIG_WRITE 0x0502
|
||||
#define CMD_FPGA_BITSTREAM_CONFIG_FINISH 0x0503
|
||||
|
||||
// For fpga set pwm output for driver voltage adjust
|
||||
#define CMD_FPGA_CMD_SET_PWR_PWM_LOW_COUNT 0x0504
|
||||
|
||||
// For mifare commands
|
||||
#define CMD_HF_MIFARE_EML_MEMCLR 0x0601
|
||||
#define CMD_HF_MIFARE_EML_MEMSET 0x0602
|
||||
@@ -1121,6 +1154,9 @@ typedef struct {
|
||||
/* Set if this device understands the read memory command */
|
||||
#define DEVICE_INFO_FLAG_UNDERSTANDS_READ_MEM (1 << 7)
|
||||
|
||||
/* Set if this device understands the chip type command */
|
||||
#define DEVICE_INFO_FLAG_UNDERSTANDS_CHIP_TYPE (1<<8)
|
||||
|
||||
#define BL_VERSION_MAJOR(version) ((uint32_t)(version) >> 22)
|
||||
#define BL_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
|
||||
#define BL_VERSION_PATCH(version) ((uint32_t)(version) & 0xfff)
|
||||
|
||||
Reference in new issue
Block a user