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