Debian Codegraph @

camlibs/hp215/PROTOCOL

raw
1 Every blob looks like:
2 02 AA BB .... CC CC CC CC 03
3
4 02 - STX
5 AA - cmd byte
6 BB - 0x80 | argumentlength
7 ... - argumentlength bytes
8 CC CC CC CC 16 bit CRC split into 4 bit pieces, | 0x80
9 03 - ETX
10
11 Sent by driver: Sent by camera:
12 -----------------------------------------------
13 cmd blob
14 0x06 (ACK)
15 reply blob
16 0x06 (ACK)
17
18 Command codes:
19
20 SET_TIME = 0x86,
21 Argument: 1 uint32
22
23 SET_TIME_AS_STR = 0x87,
24 Argument: 15 byte string
25
26 SET_TIME_MODE = 0x88,
27 Argument: 1 uint8
28
29 SET_TIME_PERIOD = 0x89,
30 Argument: 1 uint8
31
32 SET_XFER_PROTOCOL = 0x8a,
33 Argument: 1 uint8
34
35 SET_AUTO_SHUTDOWN_TIME = 0x8b,
36 Argument: 1 uint16
37
38 SET_PHOTO_NO_DISPLAY_MODE = 0x8c,
39 Argument: 1 uint8
40
41 DO_CALIBRATION = 0x8d,
42
43 GET_CALIBRATION_PARAM = 0x8e,
44 SET_SHOOT_AUTO = 0x90,
45 Arguments: 1 uint8
46
47 SET_FLASH = 0x91,
48 Arguments: 1 uint8
49
50 SET_EXPOSURE = 0x92,
51 Arguments: 1 uint16
52
53 SET_FOCUS = 0x93,
54 Arguments: 1 uint8
55
56 SET_SHUTTER = 0x94,
57 Arguments: 1 uint8
58
59 SET_RESOLUTION = 0x95,
60 Arguments: 1 uint8
61
62 SET_COMPRESSION = 0x96,
63 Arguments: 1 uint8
64
65 SET_TIMER = 0x97,
66 Arguments: 1 uint8
67
68 SET_EXT_FLASH = 0x98,
69 Arguments: 1 uint8
70
71 SET_PIC_FORMAT = 0x99,
72 Arguments: 1 uint8
73
74 RECORD_FUNC = 0xa2,
75 SET_SHOOTING_DEBUG_MODE = 0xa3,
76
77 GET_INTERNAL_SHOOT_AUTO_FUNC = 0xa4,
78 No Arguments.
79 Reads data?
80
81
82 SET_INTERNAL_SHOOT_PARAM = 0xa6,
83 66 byte arguments (InternalShootparam table)
84
85 Data in argument: Offset in passed struct:
86 (uint8 (or 2 uint4) - offset 0,1
87 uint16, uint16, uint16, uint16, uint32, uint32, uint32, uint32, uint32, uint32)
88
89 reads data
90
91 SET_SHOOT_PARAM = 0xa7,
92 SET_REVIEW_MODE = 0xa8,
93 SET_DISPLAY_PICTURE_NO = 0xa9,
94 SET_SHOOT_MODE_BY_INDEX = 0xaa,
95 GET_SHOOT_MODE_TABLE = 0xab,
96 SET_ACTIVE_SHOOTING_MODE = 0xac,
97
98 TAKE_PHOTO = 0xb0,
99 Either no arguments (stores photo on camera)?
100
101
102 DELETE_PHOTO = 0xb1,
103
104 PROTECT_PHOTO = 0xb2,
105 n* 16bit arguments - pictures to protect.
106
107
108 DOWNLOAD_THUMBNAIL = 0xb3,
109 16 bit arg (picnr)
110
111 reads data
112
113 DOWNLOAD_PHOTO = 0xb4,
114 16 bit arg (picnr)
115
116 reads data
117
118
119 TAKE_PREVIEW = 0xb5,
120 Either no arguments, or a single 16 bit 1.
121
122 No arguments -> returns data.
123
124 Returns image date (jpeg) in the large reply blob.
125 Occasionally causes next command to result in NAK.
126
127
128 SELF_TEST = 0xb6,
129 DISPLAY_PATTERN = 0xb7,
130
131 UPLOAD_PHOTO = 0xb8,
132 argument: string/filename (with \0 ?)
133 writes data to the camera
134
135
136 UPLOAD_FIRMWARE = 0xba,
137 UPDATE_FIRMWARE = 0xbb,
138
139 DOWNLOAD_FILE_BY_NAME = 0xbd,
140 argument: string/filename (with \0?)
141 reads data
142
143 __UPDATE_FIRMWARE = 0xbc,
144 DOWNLOAD_PHOTO_FROM_ALBUM = 0xbe,
145 GET_CAMERA_CAPS = 0xc0,
146
147 GET_CAMERA_CURINFO = 0xc1,
148 No arguments.
149
150 Returns lots of data.
151
152 00: 15 byte of date string -> 0
153 0f: u7 -> 0f
154 10: u7 -> 10
155 /* 11 is unused I think */
156 12: u16 -> 14
157 16: u7 -> 11
158 17: u16 -> 18
159 1b: u16 -> 1c
160 1f: u7 -> 13 (percentage full?)
161 20: u32 -> 24
162 28: u32 -> 28
163 30: u32 -> 2c
164 38: u7 -> 12
165 39: u32 UNIX time.
166 41: u32 Number of free images on CF.
167 49: u32 Number of images on CF.
168 51: u32
169 59: u32 Free memory in Byte on CF.
170
171
172
173 GET_PHOTO_INFO = 0xc5,
174
175 GET_ALBUM_INFO = 0xc6,
176 Sends 1 argument (16bit), fixed 0x384
177
178 Returns album info blob.
179 0x20 byte string albumname
180 32bit int number of pictures.
181
182 GET_CAMERA_READY = 0xce,
183 Argument: 1 uint32
184
185 GET_INTERNAL_SHOOT_PARAM = 0xcf,
186 No arguments.
187
188 Reads reply blob.
189
190 CREATE_ALBUM = 0xd0,
191 RENAME_ALBUM = 0xd2,
192 SET_ACTIVE_ALBUM = 0xd4,