X-Git-Url: https://hackdaworld.org/gitweb/?p=rfid%2Flibrfid.git;a=blobdiff_plain;f=gemtag%2Fgemtag.h;fp=gemtag%2Fgemtag.h;h=d1bef964c00ec87b15bed51ecf4cfcec14b8d920;hp=be203d4972d880df80acca56d9dca60724929ca5;hb=d72a365a0f044de71ae7c13dd7782895f531a944;hpb=b9ec871784f1408d26e24bd29e9084017239543d diff --git a/gemtag/gemtag.h b/gemtag/gemtag.h index be203d4..d1bef96 100644 --- a/gemtag/gemtag.h +++ b/gemtag/gemtag.h @@ -25,7 +25,7 @@ struct gemtag_handle { struct usb_dev_handle *handle; unsigned char seq; unsigned char caps; - unsigned char snr[4]; + unsigned char serial[4]; }; #define GEMTAG_CAP_CRC 0x01 @@ -41,32 +41,14 @@ struct gemtag_cmd_hdr { #define BAD_CRC 0x01 #define SEQ_MISMATCH 0x02 #define SHORT_ANSWER 0x03 +#define CMD_FAILED 0x04 +#define AUTH_FAILED 0x05 +#define READ_FAILED 0x06 +#define NO_PICC 0x07 +#define PICC_SELECT_ERROR 0x08 /* gemtag commands */ -#define GEMTAG_CMD_GET_FW_VERSION 0x63 -#define GEMTAG_CMD_GET_RIC_VERSION 0x64 - -#define GEMTAG_CMD_SET_CPU_TIMEOUT 0x88 - - -#define GEMTAG_CMD_PICC_EXCHANGE_BLOCK 0x48 - - - -#define GEMTAG_CMD_PICC_ACTIVATE_IDLE 0x43 -#define GEMTAG_CMD_PICC_ACTIVATE_WAKEUP 0x44 - -#define GEMTAG_CMD_PICC_REQUEST 0x40 -#define GEMTAG_PICC_REQALL 0x52 -#define GEMTAG_PICC_REQIDL 0x26 - -#define GEMTAG_CMD_PICC_CASC_ANTICOLL 0x41 -#define GEMTAG_CMD_PICC_CASC_SELECT 0x42 -#define GEMTAG_PICC_STD_SELECT_CODE 0x93 -#define GEMTAG_PICC_CASC_LEVEL1 0x95 -#define GEMTAG_PICC_CASC_LEVEL2 0x97 - #define GEMTAG_CMD_PCD_CONFIG 0x10 #define GEMTAG_CMD_PICC_ANTICOLL 0x12 #define GEMTAG_CMD_PICC_SELECT 0x13 @@ -83,42 +65,51 @@ struct gemtag_cmd_hdr { #define GEMTAG_CMD_PICC_WRITE 0x1a #define GEMTAG_CMD_PICC_VALUE 0x1b #define GEMTAG_CMD_PICC_VALUE_DEBIT 0x1c -#define GEMTAG_PICC_INCREMENT -#define GEMTAG_PICC_DECREMENT -#define GEMTAG_PICC_RESTORE #define GEMTAG_CMD_PICC_HALT 0x1d #define GEMTAG_CMD_PICC_WRITE4 0x1e #define GEMTAG_CMD_COMMON_WRITE 0x1f -#define GEMTAG_PICC_WRITE16 -#define GEMTAG_PICC_WRITE4 - #define GEMTAG_CMD_PCD_RF_RESET 0x20 - #define GEMTAG_CMD_GET_SERIAL_NUMBER 0x22 - #define GEMTAG_CMD_PCD_READ_E2 0x23 #define GEMTAG_CMD_PCD_WRITE_E2 0x24 - -#define GEMTAG_CMD_PCD_SET_TMO 0x27 - #define GEMTAG_CMD_PICC_COMMON_READ 0x28 +#define GEMTAG_PICC_DECREMENT +#define GEMTAG_PICC_INCREMENT #define GEMTAG_PICC_READ16 +#define GEMTAG_PICC_RESTORE +#define GEMTAG_PICC_WRITE16 +#define GEMTAG_PICC_WRITE4 -#define GEMTAG_CMD_SET_ATTRIBUTES 0x46 -#define GEMTAG_CMD_SET_DFLT_ATTRIBUTES 0x45 +#define GEMTAG_CMD_PICC_REQUEST 0x40 +#define GEMTAG_PICC_REQIDL 0x26 +#define GEMTAG_CMD_PCD_SET_TMO 0x27 -#define GEMTAG_CMD_PPS_REQUEST 0xa0 -#define GEMTAG_CMD_DESELECT 0xa1 +#define GEMTAG_CMD_PICC_CASC_ANTICOLL 0x41 +#define GEMTAG_CMD_PICC_CASC_SELECT 0x42 +#define GEMTAG_PICC_STD_SELECT_CODE 0x93 +#define GEMTAG_PICC_CASC_LEVEL1 0x95 +#define GEMTAG_PICC_CASC_LEVEL2 0x97 -#define GEMTAG_CMD_SET_DEFAULT_BAUDRATE 0x81 -#define GEMTAG_CMD_SET_ONLINE_BAUDRATE 0x82 +#define GEMTAG_CMD_PICC_ACTIVATE_IDLE 0x43 +#define GEMTAG_CMD_PICC_ACTIVATE_WAKEUP 0x44 +#define GEMTAG_CMD_SET_DFLT_ATTRIBUTES 0x45 +#define GEMTAG_CMD_SET_ATTRIBUTES 0x46 +#define GEMTAG_CMD_PICC_EXCHANGE_BLOCK 0x48 +#define GEMTAG_PICC_REQALL 0x52 #define GEMTAG_CMD_SWITCH_LED 0x60 #define GEMTAG_LED_OFF 0x00 #define GEMTAG_LED_ON 0x01 +#define GEMTAG_CMD_GET_FW_VERSION 0x63 +#define GEMTAG_CMD_GET_RIC_VERSION 0x64 +#define GEMTAG_CMD_SET_DEFAULT_BAUDRATE 0x81 +#define GEMTAG_CMD_SET_ONLINE_BAUDRATE 0x82 +#define GEMTAG_CMD_SET_CPU_TIMEOUT 0x88 + #define GEMTAG_CMD_DETECT_CARD 0x92 #define GEMTAG_CMD_DETECT_ISO15693_CARD 0x93 - +#define GEMTAG_CMD_PPS_REQUEST 0xa0 +#define GEMTAG_CMD_DESELECT 0xa1 #endif