]> git.zerfleddert.de Git - proxmark3-svn/blame - client/cmdlft55xx.h
Merge branch 'master' of https://github.com/Proxmark/proxmark3
[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
b97311b1 39 DEMOD_NRZ = 0x00,\r
13d77ef9 40 DEMOD_PSK1 = 0x01,\r
41 DEMOD_PSK2 = 0x02,\r
42 DEMOD_PSK3 = 0x03,\r
b97311b1 43 DEMOD_FSK1 = 0x04,\r
44 DEMOD_FSK1a = 0x05,\r
45 DEMOD_FSK2 = 0x06,\r
13d77ef9 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
b97311b1 50 DEMOD_BIa = 0x18\r
13d77ef9 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
b97311b1 63 RF_128 = 0x07\r
13d77ef9 64 } bitrate;\r
f6650679 65 bool Q5;\r
d1869c33 66 bool ST;\r
13d77ef9 67} t55xx_conf_block_t;\r
9f669cb2 68\r
b97311b1 69t55xx_conf_block_t Get_t55xx_Config(void);\r
70void Set_t55xx_Config(t55xx_conf_block_t conf);\r
13d77ef9 71\r
b97311b1 72extern int CmdLFT55XX(const char *Cmd);\r
73extern int CmdT55xxBruteForce(const char *Cmd);\r
74extern int CmdT55xxSetConfig(const char *Cmd);\r
75extern int CmdT55xxReadBlock(const char *Cmd);\r
76extern int CmdT55xxWriteBlock(const char *Cmd);\r
77extern int CmdT55xxReadTrace(const char *Cmd);\r
78extern int CmdT55xxInfo(const char *Cmd);\r
79extern int CmdT55xxDetect(const char *Cmd);\r
80extern int CmdResetRead(const char *Cmd);\r
81extern int CmdT55xxWipe(const char *Cmd);\r
13d77ef9 82\r
b97311b1 83char * GetBitRateStr(uint32_t id, bool xmode);\r
13d77ef9 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
b97311b1 93bool DecodeT55xxBlock(void);\r
94bool tryDetectModulation(void);\r
95extern bool tryDetectP1(bool getData);\r
f6650679 96bool test(uint8_t mode, uint8_t *offset, int *fndBitRate, uint8_t clk, bool *Q5);\r
13d77ef9 97int special(const char *Cmd);\r
be2d41b7 98int AquireData( uint8_t page, uint8_t block, bool pwdmode, uint32_t password );\r
e98300f2 99\r
5490c2d6 100void printT55x7Trace( t55x7_tracedata_t data, uint8_t repeat );\r
101void printT5555Trace( t5555_tracedata_t data, uint8_t repeat );\r
102\r
e98300f2 103#endif\r
Impressum, Datenschutz