summaryrefslogtreecommitdiff
path: root/pegoda/pegoda.h
blob: b957899aa58bcccffd60aa379cc96f1276077f04 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
#ifndef _PEGODA_H
#define _PEGODA_H
/*
 *  (C) 2005 by Harald Welte <laforge@gnumonks.org>
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License version 2 
 *  as published by the Free Software Foundation
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#define USB_VENDOR_PHILIPS	0x0742
#define USB_DEVICE_PEGODA	0xff01

/* header of a pegoda usb command packet */
struct pegoda_cmd_hdr {
	u_int8_t seq;
	u_int8_t cmd;
	u_int16_t len;
};

enum {
	PEGODA_CMD_WRITE_RC			= 0x01,
	PEGODA_CMD_READ_RC			= 0x02,
	PEGODA_CMD_EXCHANGE_BYTESTREAM		= 0x03,
	PEGODA_CMD_WRITE_MULTIPLE		= 0x04,
	PEGODA_CMD_READ_MULTIPLE		= 0x05,
	PEGODA_CMD_READ_WORD			= 0x06,

	
	PEGODA_CMD_PCD_CONFIG			= 0x10,
	PEGODA_CMD_PICC_REQUEST			= 0x11,
	PEGODA_CMD_PICC_ANTICOLL		= 0x12,
	PEGODA_CMD_PICC_SELECT			= 0x13,
	PEGODA_CMD_PICC_AUTH			= 0x14,
	PEGODA_CMD_PICC_AUTH_E2			= 0x15,
	PEGODA_CMD_LOAD_KEY_E2			= 0x17,
	PEGODA_CMD_PICC_AUTH_KEY		= 0x18,
	PEGODA_CMD_PICC_READ			= 0x19,
	PEGODA_CMD_PICC_WRITE			= 0x1a,
	PEGODA_CMD_PICC_VALUE			= 0x1b,
	PEGODA_CMD_PICC_VALUE_DEBIT		= 0x1c,
	PEGODA_CMD_PICC_HALT			= 0x1d,
	PEGODA_CMD_PICC_WRITE4			= 0x1e,
	PEGODA_CMD_PICC_COMMON_WRITE		= 0x1f,

	PEGODA_CMD_PCD_RF_RESET			= 0x20,
	PEGODA_CMD_PCD_RESET			= 0x21,
	PEGODA_CMD_PCD_GET_SNR			= 0x22,
	PEGODA_CMD_PCD_READ_E2			= 0x23,
	PEGODA_CMD_PCD_SET_TMO			= 0x27,
	PEGODA_CMD_PICC_COMMON_READ		= 0x28,
	PEGODA_CMD_PCD_INITIALIZE_E2		= 0x29,
	PEGODA_CMD_ACTIVE_ANTENNA_MASTER	= 0x2a,
	PEGODA_CMD_ACTIVE_ANTENNA_SLAVE		= 0x2b,

	PEGODA_CMD_HOST_TRANS_TMR_START		= 0x30,
	PEGODA_CMD_HOST_TRANS_TMR_STOP		= 0x31,
	PEGODA_CMD_HOST_GET_EXEC_TIME		= 0x32,

	PEGODA_CMD_PICC_COMMON_REQUEST		= 0x40,
	PEGODA_CMD_PICC_CASC_ANTICOLL		= 0x41,
	PEGODA_CMD_PICC_CASC_SELECT		= 0x42,
	PEGODA_CMD_PICC_ACTIVATE_IDLE		= 0x43,
	PEGODA_CMD_PICC_ACTIVATE_WAKEUP		= 0x44,
	PEGODA_CMD_PCD_SET_DEFAULT_ATTRIB	= 0x45,
	PEGODA_CMD_PCD_SET_ATTRIB		= 0x46,
	PEGODA_CMD_PCD_GET_ATTRIB		= 0x47,
	PEGODA_CMD_PICC_EXCHANGE_BLOCK		= 0x48,
	PEGODA_CMD_PICC_ACTIVATE_IDLE_LOOP	= 0x49,
	PEGODA_CMD_PICC_ACTTIVATION		= 0x4a,
	PEGODA_CMD_PCD_ENABLE_HIGH_BAUD_RATES	= 0x4b,


	PEGODA_CMD_SWITCH_LED			= 0x60,
	PEGODA_CMD_TEST_FLASH_NR		= 0x61,
	PEGODA_CMD_START_DOWNLOAD		= 0x62,
	PEGODA_CMD_GET_FW_VERSION		= 0x63,
	PEGODA_CMD_GET_RIC_VERSION		= 0x64,
	PEGODA_CMD_ENABLE_DEBUG_PINS		= 0x65,
	PEGODA_CMD_MIRROR_DATA			= 0x66,
	PEGODA_CMD_TEST_CMDS			= 0x67,

	PEGODA_CMD_TEST_PCD			= 0x70,
	PEGODA_CMD_TEST_PICC			= 0x71,
	PEGODA_CMD_GET_ONLINE_STATUS		= 0x72,

	PEGODA_CMD_I1_PCD_CONFIG		= 0x80,
	PEGODA_CMD_I1_INIT_STD_MODE		= 0x81,
	PEGODA_CMD_I1_CALC_TSE_HASH		= 0x82,
	PEGODA_CMD_I1_INIT_FAST_MODE		= 0x83,
	PEGODA_CMD_I1_OUTPUT_READ		= 0x85,
	PEGODA_CMD_I1_OUTPUT_ANTICOL_SELECT	= 0x86,
	PEGODA_CMD_I1_OUTPUT_WRITE		= 0x87,
	PEGODA_CMD_I1_OUTPUT_HALT		= 0x88,
	PEGODA_CMD_I1_OUTPUT_EAS		= 0x89,
	PEGODA_CMD_I1_RESET_QUIET		= 0x8a,
	PEGODA_CMD_I1_PCD_RF_RESET		= 0x8b,
	PEGODA_CMD_I1_SET_BIT_PHASE		= 0x8c,

	PEGODA_CMD_I2_INIT_STD_MODE		= 0x90,
	PEGODA_CMD_I2_INIT_FAST_MODE		= 0x91,
	PEGODA_CMD_15693_READ_SM		= 0x92,
	PEGODA_CMD_15693_INVENTORY		= 0x93,
	PEGODA_CMD_15693_WRITE_SM		= 0x94,
	PEGODA_CMD_15693_STAY_QUIET		= 0x95,
	PEGODA_CMD_15693_LOCK_BLOCK		= 0x96,
	PEGODA_CMD_15693_SELECT			= 0x97,
	PEGODA_CMD_15693_RESET_TO_READY		= 0x98,
	PEGODA_CMD_15693_WRITE_AFI		= 0x99,
	PEGODA_CMD_15693_LOCK_AFI		= 0x9a,
	PEGODA_CMD_15693_WRITE_DSFID		= 0x9b,
	PEGODA_CMD_15693_LOCK_DSFID		= 0x9c,
	PEGODA_CMD_15693_GET_SYSTEM_INFO	= 0x9d,
	PEGODA_CMD_15693_GET_MULTI_BLOCK_SEC	= 0x9e,
	PEGODA_CMD_15693_INVENTORY_READ		= 0x9f,
	PEGODA_CMD_15693_FAST_INVENTORY_READ	= 0xa0,
	PEGODA_CMD_15693_SET_EAS		= 0xa1,
	PEGODA_CMD_15693_RESET_EAS		= 0xa2,
	PEGODA_CMD_15693_LOCK_EAS		= 0xa3,
	PEGODA_CMD_15693_EAS_ALARM		= 0xa4,

	PEGODA_CMD_PC_PCD_CONFIG		= 0xb0,
	PEGODA_CMD_PC_BEGIN_ROUND		= 0xb1,
	PEGODA_CMD_PC_WRITE			= 0xb3,

	PEGODA_CMD_UID_PCD_CONFIG		= 0xb8,
	PEGODA_CMD_UID_BEGIN_ROUND		= 0xb9,
	PEGODA_CMD_UID_WRITE			= 0xba,
	PEGODA_CMD_UID_DESTROY			= 0xbb,
};

#endif
personal git repositories of Harald Welte. Your mileage may vary