]> git.zerfleddert.de Git - proxmark3-svn/blame - client/cmdlft55xx.h
adjust timeouts on lf read/lf search to no timeout if threshold was set.
[proxmark3-svn] / client / cmdlft55xx.h
CommitLineData
e98300f2 1//-----------------------------------------------------------------------------\r
2//\r
3// This code is licensed to you under the terms of the GNU GPL, version 2 or,\r
4// at your option, any later version. See the LICENSE.txt file for the text of\r
5// the license.\r
6//-----------------------------------------------------------------------------\r
7// Low frequency T55xx commands\r
8//-----------------------------------------------------------------------------\r
9\r
10#ifndef CMDLFT55XX_H__\r
11#define CMDLFT55XX_H__\r
12\r
5490c2d6 13typedef struct {\r
14 uint32_t bl1;\r
15 uint32_t bl2; \r
16 uint32_t acl; \r
17 uint32_t mfc; \r
18 uint32_t cid; \r
19 uint32_t year; \r
20 uint32_t quarter; \r
21 uint32_t icr;\r
22 uint32_t lotid; \r
23 uint32_t wafer; \r
24 uint32_t dw;\r
25} t55x7_tracedata_t;\r
26\r
27typedef struct {\r
28 uint32_t bl1;\r
29 uint32_t bl2;\r
30 uint32_t icr;\r
31 char lotidc;\r
32 uint32_t lotid;\r
33 uint32_t wafer;\r
34 uint32_t dw;\r
35} t5555_tracedata_t;\r
36\r
13d77ef9 37typedef struct {\r
38 enum {\r
39 DEMOD_NRZ = 0x00, \r
40 DEMOD_PSK1 = 0x01,\r
41 DEMOD_PSK2 = 0x02,\r
42 DEMOD_PSK3 = 0x03,\r
43 DEMOD_FSK1 = 0x04, \r
44 DEMOD_FSK1a = 0x05, \r
45 DEMOD_FSK2 = 0x06, \r
46 DEMOD_FSK2a = 0x07, \r
47 DEMOD_FSK = 0xF0, //generic FSK (auto detect FCs) \r
48 DEMOD_ASK = 0x08,\r
49 DEMOD_BI = 0x10,\r
50 DEMOD_BIa = 0x18, \r
51 } modulation;\r
52 bool inverted;\r
53 uint8_t offset;\r
54 uint32_t block0;\r
55 enum {\r
56 RF_8 = 0x00,\r
57 RF_16 = 0x01,\r
58 RF_32 = 0x02,\r
59 RF_40 = 0x03,\r
60 RF_50 = 0x04,\r
61 RF_64 = 0x05,\r
62 RF_100 = 0x06,\r
63 RF_128 = 0x07,\r
64 } bitrate;\r
f6650679 65 bool Q5;\r
d1869c33 66 bool ST;\r
13d77ef9 67} t55xx_conf_block_t;\r
9f669cb2 68t55xx_conf_block_t Get_t55xx_Config();\r
69void Set_t55xx_Config(t55xx_conf_block_t conf);\r
70\r
13d77ef9 71\r
e98300f2 72int CmdLFT55XX(const char *Cmd);\r
506672c4 73int CmdT55xxBruteForce(const char *Cmd);\r
13d77ef9 74int CmdT55xxSetConfig(const char *Cmd);\r
75int CmdT55xxReadBlock(const char *Cmd);\r
76int CmdT55xxWriteBlock(const char *Cmd);\r
77int CmdT55xxReadTrace(const char *Cmd);\r
78int CmdT55xxInfo(const char *Cmd);\r
79int CmdT55xxDetect(const char *Cmd);\r
66837a03 80int CmdResetRead(const char *Cmd);\r
f6650679 81int CmdT55xxWipe(const char *Cmd);\r
13d77ef9 82\r
83char * GetBitRateStr(uint32_t id);\r
84char * GetSaferStr(uint32_t id);\r
85char * GetModulationStr( uint32_t id);\r
86char * GetModelStrFromCID(uint32_t cid);\r
87char * GetSelectedModulationStr( uint8_t id);\r
9632ecbe 88uint32_t PackBits(uint8_t start, uint8_t len, uint8_t *bitstream);\r
5490c2d6 89void printT5xxHeader(uint8_t page);\r
13d77ef9 90void printT55xxBlock(const char *demodStr);\r
be2d41b7 91int printConfiguration( t55xx_conf_block_t b);\r
e98300f2 92\r
13d77ef9 93bool DecodeT55xxBlock();\r
94bool tryDetectModulation();\r
f6650679 95bool test(uint8_t mode, uint8_t *offset, int *fndBitRate, uint8_t clk, bool *Q5);\r
13d77ef9 96int special(const char *Cmd);\r
be2d41b7 97int AquireData( uint8_t page, uint8_t block, bool pwdmode, uint32_t password );\r
e98300f2 98\r
5490c2d6 99void printT55x7Trace( t55x7_tracedata_t data, uint8_t repeat );\r
100void printT5555Trace( t5555_tracedata_t data, uint8_t repeat );\r
101\r
e98300f2 102#endif\r
Impressum, Datenschutz