]> git.zerfleddert.de Git - proxmark3-svn/blob - client/cmdlft55xx.h
424e85abd7183a641b236c96a956b3e638bc371e
[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 enum {
15 DEMOD_NRZ = 0x00,
16 DEMOD_PSK1 = 0x01,
17 DEMOD_PSK2 = 0x02,
18 DEMOD_PSK3 = 0x03,
19 DEMOD_FSK1 = 0x04,
20 DEMOD_FSK1a = 0x05,
21 DEMOD_FSK2 = 0x06,
22 DEMOD_FSK2a = 0x07,
23 DEMOD_FSK = 0xF0, //generic FSK (auto detect FCs)
24 DEMOD_ASK = 0x08,
25 DEMOD_BI = 0x10,
26 DEMOD_BIa = 0x18,
27 } modulation;
28 bool inverted;
29 uint8_t offset;
30 uint32_t block0;
31 enum {
32 RF_8 = 0x00,
33 RF_16 = 0x01,
34 RF_32 = 0x02,
35 RF_40 = 0x03,
36 RF_50 = 0x04,
37 RF_64 = 0x05,
38 RF_100 = 0x06,
39 RF_128 = 0x07,
40 } bitrate;
41 bool Q5;
42 } t55xx_conf_block_t;
43 t55xx_conf_block_t Get_t55xx_Config();
44 void Set_t55xx_Config(t55xx_conf_block_t conf);
45
46
47 int CmdLFT55XX(const char *Cmd);
48 int CmdT55xxSetConfig(const char *Cmd);
49 int CmdT55xxReadBlock(const char *Cmd);
50 int CmdT55xxWriteBlock(const char *Cmd);
51 int CmdT55xxReadTrace(const char *Cmd);
52 int CmdT55xxInfo(const char *Cmd);
53 int CmdT55xxDetect(const char *Cmd);
54 int CmdResetRead(const char *Cmd);
55 int CmdT55xxWipe(const char *Cmd);
56
57 char * GetBitRateStr(uint32_t id);
58 char * GetSaferStr(uint32_t id);
59 char * GetModulationStr( uint32_t id);
60 char * GetModelStrFromCID(uint32_t cid);
61 char * GetSelectedModulationStr( uint8_t id);
62 uint32_t PackBits(uint8_t start, uint8_t len, uint8_t *bitstream);
63 void printT55xxBlock(const char *demodStr);
64 int printConfiguration( t55xx_conf_block_t b);
65
66 bool DecodeT55xxBlock();
67 bool tryDetectModulation();
68 bool test(uint8_t mode, uint8_t *offset, int *fndBitRate, uint8_t clk, bool *Q5);
69 int special(const char *Cmd);
70 int AquireData( uint8_t page, uint8_t block, bool pwdmode, uint32_t password );
71
72 #endif
Impressum, Datenschutz