From 930db72f85198796cefe95d93ba7a84b1131eef2 Mon Sep 17 00:00:00 2001 From: "Stephen H. Westin" Date: Tue, 4 Jan 2005 17:17:11 +0000 Subject: [PATCH] Fixed various typographical errors. Added info observed from EOS 300D. Regularized structure of USB command descriptions. Added real example of interrupt packet received at camera init. Added formatted example of directory read. git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@7475 67ed7778-7388-44ab-90cf-0a291f65f57c --- camlibs/canon/doc/Protocol.xml | 1924 ++++++++++++++++++++++++-------- 1 file changed, 1457 insertions(+), 467 deletions(-) diff --git a/camlibs/canon/doc/Protocol.xml b/camlibs/canon/doc/Protocol.xml index 876497dc6..766a933ac 100644 --- a/camlibs/canon/doc/Protocol.xml +++ b/camlibs/canon/doc/Protocol.xml @@ -9,15 +9,14 @@ - - - - + + + <phrase role="strong">Canon PowerShot Series Transfer - Protocol Specifications</phrase> Monday, December 20, 2004 + Protocol Specifications Tuesday, January 4, 2005 Introduction @@ -160,6 +159,14 @@ 09 May 2000: first version with both USB and serial protocols described in the same document. 05 Dec 2002: import to AbiWord for XML output. 28 Jan 2003: Convert DocBook XML, expand USB information + $Log$ + Revision 1.5 2005/01/04 17:17:11 swestin + Fixed various typographical errors. + Added info observed from EOS 300D. + Regularized structure of USB command descriptions. + Added real example of interrupt packet received at camera init. + Added formatted example of directory read. + @@ -696,9 +703,6 @@ xx <directory_name> 00 00 00 - - - USB Interface @@ -778,7 +782,7 @@ xx <directory_name> 00 00 00 The bytes before this seem to vary from camera to camera: the S20 here has 01 00 02 00. The PowerShot G2 has 01 00 05 03, just the same as - the EOS D30 and D60. The EOS 20D has + the EOS D30, D60, and 300D. The EOS 20D has 01 06 15 83. These bytes might identify which version of the protocol is used. @@ -786,16 +790,16 @@ xx <directory_name> 00 00 00 think they are 4-byte integers, and suspect that they specify maximum transfer sizes in some way: - File attributes +
Unknown contents of response packet - OffsetS20G2D30D6020D + OffsetS20G2D30D60300D20D - 0x480x800 (2048)0x800 (2048)0x800 (2048)0x800 (2048)0x800 (2048) - 0x4C-1-1-1-10x10000 (65536) - 0x500xfd00 (64768)0xfd00 (64768)0xfd00 (64768)0xfd00 (64768)0xfd00 (64768) - 0x540xfd00 (64768)0xfd00 (64768)0xfd00 (64768)0xfd00 (64768)0x10000 (65536) + 0x480x800 (2048)0x800 (2048)0x800 (2048)0x800 (2048)0x800 (2048)0x800 (2048) + 0x4C-1-1-1-1-10x10000 (65536) + 0x500xfd00 (64768)0xfd00 (64768)0xfd00 (64768)0xfd00 (64768)0xfd00 (64768)0xfd00 (64768) + 0x540xfd00 (64768)0xfd00 (64768)0xfd00 (64768)0xfd00 (64768)0xfd00 (64768)0x10000 (65536)
@@ -864,13 +868,17 @@ xx <directory_name> 00 00 00 - Read 16 (0x0c) bytes from the interrupt endpoint. Some + Read 16 (0x10) bytes from the interrupt endpoint. Some newer cameras (e.g. the PowerShot S50) return the bytes 8 - at a time, so two reads may be needed. + at a time, so two reads may be needed. The code in bytes + 0x44-0x47 is 0x20. Example (EOS 300D): + +0000 02 00 00 00 20 00 00 00-10 00 00 00 00 00 00 00 .... ........... - Note: The EOS 20D seems to return the 16 bytes (8 at - a time) after the “Remote Camera control” - command, rather than here. + Note: The EOS 20D seems to return the 16 bytes (8 at a + time) after the + “Power supply status” command, rather + than here. @@ -1112,31 +1120,31 @@ do { 0x010x202 - 0x00000000 0x00001400 "DCIM\100CANON\IMG_0100.JPG" 0x00 + 0x00000000 0x00001400 "DCIM\100CANON\IMG_0100.JPG" <NUL> LGet picture 0x050x201 - "D:\DCIM" 0x000x5 + "D:\DCIM" <NUL>0x5 Make directory 0x060x201 - "D:\DCIM" 0x000x54 + "D:\DCIM" <NUL>0x54 Delete directory 0x090x201 - "D:\" 0x000x5c + "D:\" <NUL>0x5c Disk info request 0x0A0x202 noneL Flash device identification 0x0B0x202 - 0x01 "D:\DCIM"0x00 0x00 0x00L - Get directory (0x1 = max depth of recursion) + 0x01 "D:\DCIM"<NUL> <NUL> <NUL>L + Get directory 0x0D0x201 - "D:\DCIM\100CANON" 0x00 "IMG_0002.JPG" 0x000x54 + "D:\DCIM\100CANON" <NUL> "IMG_0002.JPG" <NUL>0x54 Delete file 0x0E0x201 - 0x00000021 "D:\DCIM\100CANON" 0x00 "IMG_0002.JPG" 0x000x54 + 0x00000021 "D:\DCIM\100CANON" <NUL> "IMG_0002.JPG" <NUL>0x54 Set file attribute 0x0F0x201 - 0x00000021 "D:\DCIM\158CANON\AUT_0001.JPG" 0x00 0x000x54 + 0x00000021 "D:\DCIM\158CANON\AUT_0001.JPG" <NUL> <NUL>0x54 Set file time @@ -1155,9 +1163,9 @@ do { Get time 0x040x201 0x390873f0 0x000000000x54 - Set time (UNIX-type) + Set time 0x050x201 - "Donald Duck" 0x000x54 + "Donald Duck" <NUL>0x54 Change owner 0x0A0x201 none0x58 @@ -1166,19 +1174,17 @@ do { variesvaries Remote camera control 0x170x202 - 0x00000000 0x00001400 0x00000001 0x2d011516L - Download captured image - 0x180x202 - LDownload captured preview + 0, 0x1400, 1, 0x2d011516L + Download Captured Image 0x1A0x201 - 0x3c bytes0x80 - Unknown: seen with D30 + 44 bytes0x80 + Unknown: EOS D30 only 0x1B0x201 0x000000060x54 - EOS (D30/D60) lock keys + EOS (D30/D60) Lock Keys 0x1C0x201 none0x54 - EOS (D30/D60) unlock keys + EOS (D30/D60) Unlock Keys 0x1D0x201 none0x58 Get EOS serial number @@ -1188,27 +1194,6 @@ do { 0x200x201 none0x54 Lock keys, turn off LCD - 0x210x201 - 0x0000000f0x54 - Unknown command, seen on EOS 20D - 0x220x201 - 0x0000000f0x54 - Release shutter? - 0x230x201 - none0x58 - Get Body ID, seen on EOS 20D - 0x240x201 - none0x458 - Get Photo Abilities, seen on EOS 20D - 0x250x201 - 9 bytes: 00 00 00 00 00 00 00 00 000x5c - Unknown command, seen on EOS 20D - 0x260x202 - 0x10 bytes: 00 00 00 00 00 00 01 00 02 00 00 00 07 00 00 00varies - Get captured image, seen on EOS 20D - 0x350x201 - none0x5c - Unknown command, seen on EOS 20D @@ -1217,6 +1202,7 @@ do { checks for a word at position 0x06 for the length, and then reads the rest in 0x1400 buffers as described above. +
@@ -1225,15 +1211,7 @@ do { Downloads a full image or thumbnail from camera storage. - Parameters: - - Flag for download of thumbnail: 0x00000001 to download - thumbnail, 0x00000000 to download full image file. - Size of bulk transfers to use (Canon ZoomBrowser EX - uses 0x1400) - Pathname of file to download, terminated by a NUL - byte - + requesttype=0x01 Example command: 0x76 bytes. Command length will vary with length of pathname string. @@ -1248,7 +1226,17 @@ do { 0070 33 2e 4a 50 47 00 - 3.JPG. - This requests download of the full image in file + Parameters: + + Flag for download of thumbnail: 0x00000001 to download + thumbnail, 0x00000000 to download full image file. + Size of bulk transfers to use (Canon ZoomBrowser EX + uses 0x1400) + Pathname of file to download, terminated by a NUL + byte + + + This example requests download of the full image in file “D:\DCIM\155CANON\IMG_5593.JPG”, using transfers of 0x3000 bytes. @@ -1262,7 +1250,7 @@ do { This indicates a total file size of 1647748 bytes - (0x00192484 from offset 0c06). After this, a series of + (0x00192484 from offset 0x06). After this, a series of messages with length 0x3000 was read. Finally, a read of 0x484 finished download of the image. @@ -1297,9 +1285,41 @@ do { of 6299 bytes, downloading EXIF thumbnail info.
+
+ Make directory + + requesttype=0x05 + + Command: variable length (here 0x58) + +0000 18 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +0010 47 71 cf e1 5a cb 63 28 ab bd 3e f3 9c 9b c5 1a Gq..Z.c(..>..... +0020 6d c6 a1 05 c4 92 dc c5 2d a1 dc 86 18 c3 6f cf m.......-.....o. +0030 50 72 c3 1d 3f 5a ec 74 6f 88 51 cf 73 6d 71 72 Pr..?Z.to.Q.smqr +0040 02 00 00 00 05 00 00 11 18 00 00 00 a4 e7 12 00 ................ +0050 44 3a 5c 44 43 49 4d 00 D:\DCIM. + + + Response: 0x54 bytes + + +0000 14 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ +0010 81 7d 80 80 80 84 80 7c 7e 7f 7f 7e 78 77 79 7e .}.....|~..~xwy~ +0020 82 82 7f 7e 7f 84 80 7b 7f 7f 80 87 85 81 80 7f ...~...{........ +0030 83 84 80 7e 7f 80 83 82 82 83 84 8a 89 83 81 7c ...~...........| +0000 02 00 00 00 05 00 00 21 14 00 00 00 a4 e7 12 00 .......!........ +0010 00 00 00 00 .... + + +
+
Delete directory - Data received via bulk in after a command block: (Delete directory) + + requesttype=0x06 + + Command: 0x54 bytes + 00000000 00 00 00 00 01 03 00 00-00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ @@ -1309,9 +1329,14 @@ do { 00000050 00 00 00 00 ....
+
Disk Info Request - Example command: variable length + + requesttype=0x09 + + Command: variable length (here 0x54) + 0000 14 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -1347,7 +1372,9 @@ do {
Flash Device Identification - Example command: 0x40 bytes + requesttype=0x0a + + Command: 0x40 bytes 0000 10 00 00 00 02 02 00 00 00 00 00 00 00 00 00 00 ................ @@ -1357,10 +1384,7 @@ do { 0040 02 00 00 00 0a 00 00 11 10 00 00 00 20 f6 12 00 ............ ... - Response: (PowerShot G2) 0x44 bytes - - Data received via a long_bulk_in_read: (Flash device - identification) + Response: variable length (here 0x44 bytes) (PowerShot G2) 0000 00 00 00 00 02 03 04 00 00 00 00 00 00 00 00 00 ................ @@ -1371,21 +1395,13 @@ do {
+
Get Directory - Error codes: + requesttype=0x0a - - 0x00000000 No errors - 0x02000022 File not found - 0x02000029 File was protected - 0x02000086 Path not found - - - Example command: 0x5b bytes. The length of the command - will vary depending on the length of the pathname - string. + Command: variable length (here 0x5b bytes) 0000 1b 00 00 00 02 02 00 00-00 00 00 00 00 00 00 00 ................ @@ -1400,7 +1416,7 @@ do { allowed, here zero (no recursion). This is followed by the directory pathname, here “D:\DCIM”. - Response: (PowerShot G2) + Response: 0x40 bytes (PowerShot G2) 0000 00 00 00 00 02 03 56 00-00 00 00 00 00 00 00 00 ......V......... 0010 40 04 fe 15 d3 78 6a fb-54 bf d1 3c ed 63 4a 5d @....xj.T..<.cJ] @@ -1421,7 +1437,17 @@ do { 0050 00 00 00 00 00 00 - ...... - This shows four entries. Each entry contains + Error codes: + + + 0x00000000 No errors + 0x02000022 File not found + 0x02000029 File was protected + 0x02000086 Path not found + + + The example shows four entries. Each entry contains + 1 byte attribute bits (described in ) @@ -1468,7 +1494,7 @@ do { 00000030 00 10 00 00 00 00 00 CC-B5 10 39 43 41 4E 4F 4E ..........9CANON 00000040 4D 53 43 00 80 00 00 00-00 00 00 00 00 00 2E 2E MSC............. 00000050 00 00 00 00 00 00 00 00-00 00 00 00 ............ - + Directory contents: "D:" (recurse = 0x2) @@ -1481,25 +1507,50 @@ do { 00000060 00 80 00 00 00 00 00 00-00 00 00 2E 2E 00 80 00 ................ 00000070 00 00 00 00 30 C4 10 39-2E 5C 43 41 4E 4F 4E 4D ....0..9.\CANONM 00000080 53 43 00 20 00 4A 0A 00-00 30 C4 10 39 31 30 30 SC. .J...0..9100 -00000090 2E 43 54 47 00 20 00 7F-01 00 00 30 C4 10 39 44 .CTG. ....0..9D +00000090 2E 43 54 47 00 20 00 7F-01 00 00 30 C4 10 39 44 .CTG. .....0..9D 000000A0 2E 43 54 47 00 80 00 00-00 00 00 00 00 00 00 2E .CTG............ 000000B0 2E 00 80 00 00 00 00 00-00 00 00 00 2E 2E 00 00 ................ 000000C0 00 00 00 00 00 00 00 00-00 00 .......... - + + + Here is a formatted listing of the entries: + + + D : +0000: 0080 00000000 00000000 44 3A 00 + . \ D C I M +000D: 0080 00000000 3910C036 2E 5C 44 43 49 4D 00 + . \ 1 0 0 C A N O N +001E: 0080 00000000 3910C03C 2E 5C 31 30 30 43 41 4E 4F 4E 00 + I M G _ 0 0 0 1 . J P G +0033: 0020 000BE0C3 3910C03C 49 4D 47 5F 30 30 30 31 2E 4A 50-47 00 + I M G _ 0 0 0 2 . J P G +004A: 0020 0000AD79 3910C430 49 4D 47 5F 30 30 30 32 2E 4A 50 47 00 + . . +0061: 0080 00000000 00000000 2E 2E 00 + . \ C A N O N M S C +006E: 0080 00000000 3910C430 2E 5C 43 41 4E 4F 4E 4D 53 43 00 + 1 0 0 . C T G +0083: 0020 00000A4A 3910C430 31 30 30 2E 43 54 47 00 + D . C T G +0095: 0020 0000017F 3910C430 44 2E 43 54 47 00 + . . +00A6: 0080 00000000 00000000 2E 2E 00 + . . +00B2: 0080 00000000 00000000 2E 2E 00 + +00BF: 0000 00000000 00000000 00 +
Delete file - Status codes: - - 0x00000000 No errors - 0x02000022 File not found - 0x02000029 File was protected - 0x02000086 Path not found (success on at least G2 and EOS D30/D60) - - Example command: + requesttype=0x0d + + Command: variable length (here 0x7e) + 0000 3c 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 <............... 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -1524,6 +1575,14 @@ do { 0010 00 00 00 00 .... + Status codes: + + 0x00000000 No errors + 0x02000022 File not found + 0x02000029 File was protected + 0x02000086 Path not found (success on at least G2 and EOS D30/D60) + + Example command (delete JPEG image): 0000 2f 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 /............... @@ -1580,15 +1639,15 @@ do {
+
Set File Attribute - Error codes: - - 0x00000000 No errors - 0x02000022 File not found - - Sample command (0x73 bytes, but variable length, PowerShot G2): + requesttype=0x0e + + Command: variable length (here 0x73, from a PowerShot + G2) + 0000 33 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 3............... 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -1601,7 +1660,10 @@ do { I don't know where the data are put, unless it's the word - at 0x50. The response to this command was 0x54 bytes: + at 0x50. + + Response: 0x54 bytes + 0000 14 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 0010 31 2e 4a 50 47 00 5e 26 77 98 c7 07 87 6d 3d 5e 1.JPG.^&w....m=^ @@ -1611,6 +1673,12 @@ do { 0050 00 00 00 00 .... + Error codes: + + 0x00000000 No errors + 0x02000022 File not found + + Data received via bulk_in after a command block: (Set file attribute) (file did not exist). 00000000 00 00 00 00 01 03 00 00-00 00 00 00 00 00 00 00 ................ @@ -1628,12 +1696,11 @@ do {
Set File Time - Parameters: 32-bit Unix time, full pathname of - file. Terminated by two NUL characters, not just one. + requesttype=0x0f - Error codes: unknown + Command: variable length (here 0x73, from a PowerShot + G2) - Example command (0x73 bytes, variable length): 0000 33 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 3............... 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -1645,9 +1712,12 @@ do { 0070 47 00 00 G.. + Parameters: 32-bit Unix time, full pathname of + file. Terminated by two NUL characters, not just one. + This command ended the upload of a file to - “D:\DCIM\158CANON\AUT_0001.JPG” on a PowerShot G2 - camera. + “D:\DCIM\158CANON\AUT_0001.JPG” on a PowerShot G2 + camera. Response (0x54 bytes): @@ -1659,11 +1729,17 @@ do { 0050 00 00 00 00 .... + Error codes: unknown +
Identify Camera - Command block is 0x50 bytes: + + requesttype=0x01 + + Command: 0x50 bytes + 0000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 0010 43 3a 5c 44 6f 63 75 6d 65 6e 74 73 20 61 6e 64 C:\Documents and @@ -1672,7 +1748,7 @@ do { 0040 02 00 00 00 01 00 00 12 10 00 00 00 00 f5 d6 00 ................ - Response is 0x9c bytes (from an EOS D60): + Response: 0x9c bytes (from an EOS D60): 0000 00 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -1714,8 +1790,10 @@ do {
Get time - No parameters. - Example command block (0x50 bytes): + requesttype=0x03 + + Command: 0x50 bytes + 0000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -1724,7 +1802,8 @@ do { 0040 02 00 00 00 03 00 00 12 10 00 00 00 f0 35 12 00 .............5.. - Response (0x60 bytes): + Response: 0x60 bytes + 0000 00 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -1734,14 +1813,19 @@ do { 0050 00 00 00 00 44 cf 27 3e 00 00 00 00 00 00 00 00 ....D.'>........ - 0x54 contains a UNIX time + 0x54 contains a 4-byte UNIX time Other bytes are zero
+
Set Time - Command block is 0x5c bytes. + + requesttype=0x04 + + Command: 0x5c bytes + 0x50 contains a UNIX time Other bytes are zero @@ -1752,22 +1836,15 @@ do { 0x02000086 Invalid parameters (e.g. command block wrong length)
-
- Make directory - Data received via bulk in after a command block: (Make directory) - -00000000 00 00 00 00 01 03 00 00-00 00 00 00 00 00 00 00 ................ -00000010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ -00000020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ -00000030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ -00000040 02 00 00 00 05 00 00 21-14 00 00 00 78 56 34 12 .......!....xV4. -00000050 00 00 00 00 .... - -
+
Change Owner - Data received via bulk_in after a command block: - (Change owner) (no error codes) + + requesttype=0x05 + + Command: 0x50 bytes + + Response: 0x54 bytes (no error codes) 00000000 00 00 00 00 01 03 00 00-00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ @@ -1781,7 +1858,11 @@ do {
Power supply status - Command is 0x50 bytes: + + requesttype=0x0a + + Command: 0x50 bytes + 0000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 0010 43 3a 5c 44 6f 63 75 6d 65 6e 74 73 20 61 6e 64 C:\Documents and @@ -1790,7 +1871,9 @@ do { 0040 02 00 00 00 0a 00 00 12 ........ - Response is 0x58 bytes (from an EOS D60 on battery power): + Response: 0x58 bytes (from an EOS D60 on battery + power): + 0000 00 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -1811,7 +1894,7 @@ do { - First 0x40 bytes are throwable. + First 0x50 bytes are throwable. 0x54 contains a byte with power status: 0x6=good, 0x4=bad 0x57 contains a byte with power type in bit 4: @@ -1828,6 +1911,9 @@ do {
Remote Camera Control + + requesttype=0x13 + This command actually has 19 subcommands: Remote Camera Control Codes @@ -1840,7 +1926,7 @@ do { Camera control initialization01none5C Exit release control - 02none5C (58 from EOS 20D) + 02none5C Start viewfinder 03none5C Stop viewfinder @@ -1874,8 +1960,6 @@ do { Select camera output15?????? Do auto exposure, focus, and white balance - noneUnknown?? - Unknown
@@ -1894,15 +1978,15 @@ do { information. The minimum length is 0x5c. - The EOS 20D uses this command with no parameters at all, - i.e. with a total length of 0x50. We don't (yet) know what - it does., but it still returns 0x58 bytes. -
Camera control initialization: 00 - Takes no parameters. With some models, this command extends the lens to make the camera ready to capture images. With others, there is no visible effect, but Canon software seems to issue it anyway. - Example block: 0x58 bytes + Takes no parameters. With some models, this command + extends the lens to make the camera ready to capture + images. With others, there is no visible effect, but Canon + software seems to issue it anyway. + + Command: 0x58 bytes 0000 18 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 05 7f 00 00 02 00 01 43 61 6e 6f ............Cano @@ -1911,16 +1995,10 @@ do { 0040 02 00 00 00 13 00 00 12 18 00 00 00 00 c5 12 00 ................ 0050 00 00 00 00 00 00 00 00 ........ - Example block from EOS 20D: 0x50 bytes - -00000000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000040 02 00 00 00 13 00 10 12 10 00 00 00 28 ed e4 00 ............(... - - Response: 0x5c bytes (after ~5 seconds on PowerShot G2) + Response: 0x5c bytes (after ~5 seconds on PowerShot + G2) + 0000 00 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -1930,7 +2008,13 @@ do { 0010 00 00 00 00 00 00 00 00 00 00 00 00 ............ - If the lens cap is left on a PowerShot G2, the lens can’t extend. The response takes about 10 seconds (as apparently the camera tries more than once to extend the lens), and the response block looks like this. Note that bytes 0x50 and 0x53 are non-zero, which is not the case when the lens extends properly. + If the lens cap is left on a PowerShot G2, the lens + can’t extend. The response takes about 10 seconds (as + apparently the camera tries more than once to extend the + lens), and the response block looks like this. Note that bytes + 0x50 and 0x53 are non-zero, which is not the case when the + lens extends properly. + 0000: 1c 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 0010: 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 80 ................ @@ -1941,38 +2025,27 @@ do { If there is no CF card in an EOS D30, the response will - be only 0x40 bytes long, and will look like this: + be only 0x40 bytes long, and will look like this: + 0000 00 00 00 00 01 03 00 00-00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 0020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ 0030 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................ + The PowerShot G2 returns normally, even if no CF card is present. The error will be signaled later, at “set transfer mode” and “release shutter” - The EOS 20D returns 0x58 bytes: - -00000000 18 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000000 02 00 00 00 13 00 10 22 18 00 00 00 28 ed e4 00 ......."....(... -0000010 00 00 00 00 06 00 00 20 ....... - - After this, the 20D returns an interrupt message of 0x10 - bytes: - -00000000 02 00 00 00 20 00 00 00 10 00 00 00 00 00 00 00 .... ........... -
+
Exit release control: 01 Takes no parameters - Example block: 0x58 bytes + Command: 0x58 bytes 0000 18 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -1994,31 +2067,29 @@ do {
+
Start viewfinder: 02 - Takes no parameters; returns minimum message of 0x5c bytes. + Takes no parameters; returns minimum message of 0x5c + bytes. - The EOS 20D (which has no electronic viewfinded feature> - returns only 0x58 bytes: - -00000000 18 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000000 02 00 00 00 13 00 10 22 18 00 00 00 c4 eb 12 00 ......."........ -00000010 00 00 00 00 06 00 00 20 ....... -
Stop viewfinder: 03 - Takes no parameters; returns minimum message of 0x5c bytes. + Takes no parameters; returns minimum message of 0x5c + bytes.
+
Release shutter: 04 - Takes no parameters; returns minimum message of 0x5c bytes. The sequence goes: + + Takes no parameters; returns minimum message of 0x5c + bytes. The camera does, however, signal through the + interrupt pipe. The sequence goes: + Issue “release shutter” command, read @@ -2102,11 +2173,6 @@ do { 0000: 02 00 00 00 0c 00 00 00 17 00 00 00 01 00 00 00 0010: 01 5a cb 09 00 00 b0 - - For an EOS 20D, the bytes were - 0000 02 00 00 00 0c 00 00 00 17 00 00 00 01 00 00 00 - 0010 01 6c 4d 04 00 83 ad - A 4-byte integer at 0x0c has the image index for the For EOS cameras, read the final message: 0000: 02 00 00 00 0f 00 00 00 10 00 00 00 00 00 00 00 + NOTE: This message seems never to arrive from an EOS 300D. - So interrupt reads always have a code in byte 0x04 + Interrupt reads always have a code in byte 0x04 (actually, it’s probably a 4-byte integer with a small value). This code is @@ -2246,6 +2313,12 @@ do { EOS capture complete: 0x10 bytes. + 0x20 + + Response to camera initialization; not seen + during capture dialog. + +
@@ -2262,7 +2335,7 @@ do { #define FLASH_AUTO 0x02 - Response is 0x5c bytes (failure): + Response: 0x5c bytes (failure): 0000: 00 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ @@ -2302,7 +2375,7 @@ do { These may be combined in any way. - Example block: 0x5c bytes + Command: 0x5c bytes 0000 1c 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -2360,6 +2433,7 @@ do {
+
Get zoom position: 0B @@ -2414,6 +2488,7 @@ do {
+
Get available shot: 0D @@ -2443,11 +2518,13 @@ do { estimated size of an image file in the current mode.
+
0E Set custom function No documentation; not yet seen in USB stream.
+
Get custom function: 0F @@ -2516,7 +2593,7 @@ do { The custom functions (as seen in Canon RemoteCapture and on the camera menu) are as follows: - EOS Custom Functions +
EOS Custom Functions CodeFunctionValues @@ -2555,6 +2632,7 @@ do {
+
Get size of extended release parameters: 10 @@ -2584,11 +2662,13 @@ do { “extended release parameters”.
+
11 Get version of extended release parameters No documentation; not yet seen in USB stream.
+
Get extended release parameters: 12 Command: 0x5c bytes @@ -2613,12 +2693,14 @@ do {
+
13 Set extended parameters No documentation; not yet seen in USB stream.
+
Select camera output: 14 @@ -2627,6 +2709,7 @@ do { (0x3).
+
15 Do auto exposure, focus, and white balance @@ -2634,35 +2717,14 @@ do {
-
-
- Unknown; seen with EOS 20D - - Sends a block with no parameters (i.e. length 0x50). - Example from an EOS 20D: - -00000000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000040 02 00 00 00 13 00 10 12 10 00 00 00 28 ed d5 00 ............(... - - - Reply: 0x58 bytes - -00000000 18 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ -00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -00000000 02 00 00 00 13 00 10 22 18 00 00 00 28 ed d5 00 ......."....(... -00000010 00 00 00 00 06 00 00 10 ........ - -
Download Captured Image - Command block is 0x60 bytes: + + requesttype=0x17 + + Command: 0x60 bytes: 0000 20 00 00 00 02 02 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -2708,19 +2770,25 @@ do {
Download Captured Preview + + requesttype=0x18? + No documentation; not yet seen in USB stream.
Unknown + requesttype=0x1a + Not seen with EOS D60 and Canon RemoteCapture. Seen only - with D30. + with D30. If byte 0x50 is some sort of opcode, it may come in sequence: 01, 02, 03 in consecutive commands. - Command is 0x7C bytes: + Command: 0x7C bytes + 0000 3c 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 <............... 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -2732,7 +2800,7 @@ do { 0070 b8 6d 4f 00 02 00 00 00 01 e6 12 00 .mO......... - Reply is 0x80 bytes: + Reply: 0x80 bytes 0000 00 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -2766,6 +2834,8 @@ do {
EOS (D30/D60) Lock Keys + requesttype=0x1b + This command will normally be issued immediately before a "release shutter" command, unlike the non-EOS “lock keys” command, @@ -2775,13 +2845,7 @@ do { have this capability, so they can (should) be locked as soon as the USB connection is made. - Status codes: - - 0x00000000 No errors - 0x02000086 Unknown - - - Command is 0x54 bytes: + Command: 0x54 bytes 0000 14 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 0a 00 00 00 30 00 00 00 00 03 01 00 ........0....... @@ -2789,9 +2853,9 @@ do { 0030 00 00 00 7f 10 00 48 00 ff ff ff ff 18 c8 18 ff ......H......... 0040 02 00 00 00 1b 00 00 12 14 00 00 00 a4 f6 12 00 ................ 0050 06 00 00 00 .... - + - Response is 0x54 bytes: + Response: 0x54 bytes 0000 00 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -2799,17 +2863,26 @@ do { 0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 0000 02 00 00 00 1b 00 00 22 14 00 00 00 a4 f6 12 00 ......."........ 0010 00 00 00 00 .... - + + + Status codes: + + 0x00000000 No errors + 0x02000086 Unknown + +
EOS (D30/D60) Unlock Keys + requesttype=0x1c + This command is normally issued during the interrupt sequence after a "release shutter" command, so as to make the camera available as soon as possible. - Command is 0x50 bytes: + Command: 0x50 bytes 0000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -2818,7 +2891,7 @@ do { 0040 02 00 00 00 1c 00 00 12 10 00 00 00 58 f7 12 00 ............X... - Response is 0x54 bytes: + Response: 0x54 bytes 0000 00 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -2832,7 +2905,10 @@ do {
Get EOS Serial Number - Used only with EOS D30 and D60. Takes no arguments, returns 8 bytes. Canon RemoteCapture issues it immediately before entering remote capture mode. + requesttype=0x1d + + Used only with EOS cameras. Canon RemoteCapture issues it + immediately before entering remote capture mode. Command: 0x50 bytes @@ -2880,12 +2956,9 @@ do {
Get Camera Photo Abilities - Note: This command doesn't seem to be implemented on the - EOS D30/D60 or the PowerShot S45 or G3. I suspect that it's - being phased out, and new cameras from now on (February 2003) - won't implement it. + requesttype=0x1f - Command is 0x5f bytes: + Command: 0x50 bytes 0000: 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -3008,11 +3081,21 @@ struct { I suspect that the remaining bytes after 0x21c are garbage. + + Note: This command doesn't seem to be implemented on the + EOS D30/D60 or the PowerShot S45 or G3. I suspect that it's + being phased out, and new cameras from now on (February 2003) + won't implement it. The new protocol uses a different code for what + seems to be the same function. +
Lock Keys + requesttype=0x20 + Not used for EOS D30/D60 cameras: use “EOS Lock Keys” instead. This command is normally issued during camera @@ -3043,20 +3126,867 @@ struct {
-
- Unknown Command - seen with EOS 20D; issued after Remote Camera control with no - operands. - requesttype=0x21 - value=0x?? - length=0x54 +
+ USB Upload (a little bit special) + Control_transfer_write + requesttype=0x40 + value=0x10 + length=0x40 + data=0x00000000 0x0203 0x40+len1[explained later] [0x00 repeated 0x38] + + Example: + +0000 00 00 00 00 03 02 7a 14 00 00 00 00 00 00 00 00 ......z......... +0010 8e 58 63 3e 44 2e 43 54 47 00 00 00 00 00 00 00 .Xc>D.CTG....... +0020 00 00 00 00 00 83 85 82 87 84 7f 81 7f 7d 7b 77 .............}{w +0030 7e 81 7e 7d 7c 7d 81 80 82 80 7c 80 81 7f 84 83 ~.~}|}....|..... + + + This is identical to the response to “Download + Captured Image”, except for the cmd3 + halfword at 0x04. The cmd3 halfword is + 0x0203 here, 0x0302 there. + + bulk_in_read [0x40 bytes] + Example: + +0000 00 00 00 00 03 03 00 00 00 00 00 00 00 00 00 00 ................ +0010 8e 58 63 3e 44 2e 43 54 47 00 00 00 00 00 00 00 .Xc>D.CTG....... +0020 00 00 00 00 00 83 85 82 87 84 7f 81 7f 7d 7b 77 .............}{w +0030 7e 81 7e 7d 7c 7d 81 80 82 80 7c 80 81 7f 84 83 ~.~}|}....|..... + + + The following block obeys the normal command block + structure. The exact layout is: + + +0000000: xx xx xx xx 03 04 00 00 - 00 00 00 00 00 00 00 00 +0000010: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 +0000020: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 +0000030: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 +0000040: 02 00 00 00 03 00 00 11 - xx xx xx xx SS SS SS SS +0000050: 00 00 00 00 UU UU UU UU - VV VV VV VV pathname data ... + + + xx xx xx xx : len1, the length of the + payload (total block length - 0x40) + + cmd3 = 0x00000403 + cmd1 = 0x03 + cmd2 = 0x11 + xx xx xx xx : len1 (again) + + SS SS SS SS : sequence number + + UU UU UU UU : Offset within file; + starts at zero, increments by len2 (below) for next block + + VV VV VV VV : len2, length of data in + this block. Normally 0x1400 or less. + + pathname : full path name of file on + camera, terminated by one NUL. File cannot be created in + nonexistent directory. data + : image data (len2 bytes) + + Example of beginning of a block: + +0000 3a 14 00 00 03 04 00 00 00 00 00 00 00 00 00 00 :............... +0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0040 02 00 00 00 03 00 00 11 3a 14 00 00 a2 4c 10 02 ........:....L.. +0050 00 00 00 00 00 00 00 00 00 14 00 00 44 3a 5c 44 ............D:\D +0060 43 49 4d 5c 31 35 38 43 41 4e 4f 4e 5c 41 55 54 CIM\158CANON\AUT +0070 5f 30 30 30 31 2e 4a 50 47 00 ff d8 ff e1 18 ba _0001.JPG....... +0080 45 78 69 66 00 00 49 49 2a 00 08 00 00 00 09 00 Exif..II*....... +0090 0f 01 02 00 06 00 00 00 7a 00 00 00 10 01 02 00 ........z....... +00A0 .... + + + The filename here is + “D:\DCIM\158CANON\AUT_0001.JPG”; the offset is + zero (i.e. this is the first block of this file) and length is + 0x1400. Len1 is 0x143a, which is 0x1400 + + 0x10 + 0xc (three full words) + 0x1e (length of + pathname+1). + + Response to this block (0x5c bytes): + +0000 00 00 00 00 03 03 00 00 00 00 00 00 00 00 00 00 ................ +0010 00 00 00 00 00 00 00 00 78 00 00 00 76 00 00 00 ........x...v... +0020 36 00 00 00 02 02 00 00 00 00 00 00 00 00 00 00 6............... +0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0040 02 00 00 00 03 00 00 21 1c 00 00 00 a2 4c 10 02 .......!.....L.. +0050 00 00 00 00 00 14 00 00 00 14 00 00 ............ + + + The interesting words are: + + + 0x50 Status + + 0x54 Count of bytes already transferred in this + upload? + + 0x58 Number of bytes of real data transferred in the + latest bulk write. + + + Unfortunately, the number at 0x54 seems to jump too fast; + after the second write of 0x1400 bytes, it reads 0x3c00, not + 0x2800. And after the next, it's 0x6400, not 0x3c00. In fact, + it counts up by multiples of the 0x1400 data length: 1, 3, 5, + 7, 9, ... + + This transaction is repeated until the whole file is + transmitted. + + At the end of the transfer, there will usually be one + “short” transfer. Here it is 0x117e bytes: + +0000 b8 11 00 00 03 04 00 00 00 00 00 00 00 00 00 00 ................ +0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +0040 02 00 00 00 03 00 00 11 b8 11 00 00 a2 4c 10 02 .............L.. +0050 00 00 00 00 00 4c 04 00 7e 11 00 00 44 3a 5c 44 .....L..~...D:\D +0060 43 49 4d 5c 31 35 38 43 41 4e 4f 4e 5c 41 55 54 CIM\158CANON\AUT +0070 5f 30 30 30 31 2e 4a 50 47 00 02 8a 00 28 a0 02 _0001.JPG....(.. +0080 8a 00 28 a0 02 8a 00 28 a0 02 8a 00 28 a0 02 8a ..(....(....(... +0090 00 28 a0 02 8a 00 28 a0 02 8a 00 28 a0 02 8a 00 .(....(....(.... + + + Here the offset is 0x44c00. + + The response is 0x5c bytes + +0000 00 00 00 00 03 03 00 00 00 00 00 00 00 00 00 00 ................ +0010 7a 8c f2 3e 94 98 6a 3b 19 01 14 ee 3d f2 79 14 z..>..j;....=.y. +0020 a0 07 f9 17 0c ab d4 e7 9a 43 bb ec 3c 6d 7e 4e .........C..<m~N +0030 0a 2f 71 9c d2 ae 1f 32 37 cd 8e 87 1c d1 61 58 ./q....27.....aX +0040 02 00 00 00 03 00 00 21 1c 00 00 00 a2 4c 10 02 .......!.....L.. +0050 00 00 00 00 7e a9 08 00 7e 11 00 00 ....~...~... + + + The “total byte count” (or whatever it is) is + now 0x8a97e. After this the caller must set the file time; otherwise + it is left at -1. + +
+ + + + + New USB Interface + + The EOS 20D introduced a new version of the Canon native + protocol. While it still seems to use the same basic format of + command and response blocks, some command codes have been + abandoned, new ones added, and, worst of all, some + codes have changed their meanings. This section + describes what we know so far about this revised protocol. I + assume that there will be other cameras using this new protocol; + the first candidates would be the EOS 1D Mk. II and 1D Mk. II, + which share the CR2 raw image format with the 20D. + +
+ Summary of available (known) commands in new protocol + New Storage Control Commands (cmd2=0x11) + + + cmd1cmd3Argument(e.g.)Response LengthOperation + + 0x010x202 + 0x00000001 "A:/DCIM/100CANON\IMG_0098.CR2" <NUL> + LGet picture + 0x0A0x202 + noneL + Delete file? + 0x0B0x202 + 0x01 "D:\DCIM"<NUL> <NUL> <NUL>L + Get directory + 0x0D0x201 + "A:" <NUL>0x5c + Disk info request + 0x0E0x202 + noneL + Flash Device Identification + + +
+ + New Camera Control Commands (cmd2=0x12) + + + cmd1cmd3Argument(e.g.)Response LengthOperation + + + 0x010x201 + none0x9c + Identify camera + 0x030x201 + none0x60 + Get time + 0x040x201 + 0x390873f0 0x000000000x54 + Set time + 0x050x201 + none0x74 + Get owner + 0x060x201 + "Cornell University" <NUL>0x54 + Set owner + 0x130x201 + none0x58 + Power supply status + 0x1D0x201 + 0x000000000x94 + Get custom function settings + 0x210x201 + 0x000000000x54 + Unknown command, seen on EOS 20D + 0x220x201 + 0x0000000f0x54 + Release shutter? + 0x230x201 + none0x58 + Get Body ID, seen on EOS 20D + 0x240x201 + none0x458 + Get Photo Abilities, seen on EOS 20D + 0x250x201 + 9 bytes: 00 00 00 00 00 00 00 00 000x5c + Unknown command, seen on EOS 20D + 0x260x202 + 0x10 bytes: 00 00 00 00 00 00 01 00 02 00 00 00 07 00 00 00varies + Get captured image, seen on EOS 20D + 0x350x201 + none0x5c + Unknown command, seen on EOS 20D + 0x360x201 + 00 00 00 00 00 00 00 000x54 + Unknown command, seen on EOS 20D + + +
+ +
+ +
+ Get Picture + + requesttype=0x01 + + Downloads a full image or thumbnail from camera + storage. Similar with command in old protocol, but parameters differ. + + Command: variable length (here 0x76 bytes) + + +00000000 33 00 00 00 02 02 00 00 00 00 00 00 00 00 00 00 3............... +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 01 00 20 11 33 00 00 00 18 cd 12 00 ...... .3....... +00000050 01 00 00 00 41 3a 2f 44 43 49 4d 2f 31 30 30 43 ....A:/DCIM/100C +00000060 41 4e 4f 4e 2f 49 4d 47 5f 30 30 39 38 2e 43 52 ANON/IMG_0098.CR +00000070 32 00 00 2.. + + + Parameters: + + + 0x50: Flag for download of thumbnail: 0x00000001 to + download full image file, don't know the code to download + thumbnail. + + 0x54: Pathname of file to download, terminated + by a single NUL byte + + + + The example requests download of the full image in file + “A:/DCIM/100CANON/IMG_0098.C2R”. Notice the + forward slashes in this pathname. + + Response: 0x40 bytes (EOS 20D) + + +00000000 00 00 00 00 02 03 d6 3a 0e 00 00 00 00 00 00 00 .......:........ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + + + This indicates a total file size of 1647748 bytes + (0x000e3ad6 from offset 0x06). After this, a series of 14 + messages with length 0x10000 was read, then one read of length + 0x3ac0. Finally, a read of 0x16 finished download of the + image. This example seems to be downloading a CR2 raw image + file; notice the TIFF magic + II* at the + sbeginning. + + +00000000 49 49 2a 00 10 00 00 00 43 52 02 00 20 ee 07 00 II*.....CR.. ... +00000010 0e 00 00 01 03 00 01 00 00 00 00 06 4c cc 01 01 ............L... +00000020 03 00 01 00 00 00 00 04 33 33 02 01 03 00 03 00 ........33...... +00000030 00 00 be 00 00 00 03 01 03 00 01 00 00 00 06 00 ................ +00000040 cc cc 0f 01 02 00 06 00 00 00 c4 00 00 00 10 01 ................ +00000050 02 00 0e 00 00 00 ca 00 00 00 11 01 04 00 01 00 ................ +00000060 00 00 00 26 00 00 12 01 03 00 01 00 00 00 01 00 ...&............ +00000070 22 33 17 01 04 00 01 00 00 00 28 2a 03 00 1a 01 "3........(*.... +00000080 05 00 01 00 00 00 ea 00 00 00 1b 01 05 00 01 00 ................ +00000090 00 00 f2 00 00 00 28 01 03 00 01 00 00 00 02 00 ......(......... +000000a0 27 33 32 01 02 00 14 00 00 00 fa 00 00 00 69 87 '32...........i. +000000b0 04 00 01 00 00 00 0e 01 00 00 28 50 03 00 08 00 ..........(P.... +000000c0 08 00 08 00 43 61 6e 6f 6e 00 43 61 6e 6f 6e 20 ....Canon.Canon +000000d0 45 4f 53 20 32 30 44 00 dc cc cc cc 8c cc cc de EOS 20D......... +000000e0 33 33 77 b3 13 b6 cf f9 32 33 48 00 00 00 01 00 33w.....23H..... +000000f0 00 00 48 00 00 00 01 00 00 00 32 30 30 34 3a 31 ..H.......2004:1 +00000100 31 3a 31 30 20 30 36 3a 34 33 3a 30 36 00 1c 00 1:10 06:43:06... +00000110 9a 82 05 00 01 00 00 00 64 02 00 00 9d 82 05 00 ........d....... +00000120 01 00 00 00 6c 02 00 00 22 88 03 00 01 00 00 00 ....l..."....... +... +00000000 ec ca cc cc ec cc ed ee cc d6 cc cc ef cc cc 48 ...............H +00000010 cc ae 33 33 b3 b7 ..33.. + + +
+ +
+ Delete file + + requesttype=0x0a + + Command: variable length (here 0x91 bytes) + +00000000 51 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 Q............... +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 0a 00 10 11 51 00 00 00 2c d8 12 00 ........Q...,... +00000050 41 3a 2f 44 43 49 4d 2f 31 30 31 43 41 4e 4f 4e A:/DCIM/101CANON +00000060 2f 49 4d 47 5f 30 31 30 35 2e 4a 50 47 00 00 00 /IMG_0105.JPG... +00000070 07 00 05 00 00 01 08 00 68 76 8f 00 78 80 8f 00 ........hv..x... +00000080 41 3a 2f 44 43 49 4d 2f 31 30 31 43 41 4e 4f 4e A:/DCIM/101CANON +00000090 2f / + + + Here we delete a JPEG file. After the file name string, we + have + + + + 3 zero bytes. The first would terminate the string; + I’m guessing that i’ts padded out to a word + boundary, or perhaps the three bytes signal the end of the + file list. + + + 2-byte integer 7 + + + 2-byte integer 5 + + + 2-byte integer 0x100 (256) + + + 2-byte integer 8 + + + The name of the directory that contained the file, + without a terminating NUL. Length is 26 (0x1a). + + + + Response: 0x54 bytes + +00000000 14 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 02 00 00 00 0a 00 10 21 14 00 00 00 2c d8 12 00 .......!....,... +00000010 00 00 00 00 .... + + + Status codes: + + 0x00000000 No errors + 0x02000022 File not found + 0x02000029 File was protected + 0x02000086 Path not found (success on at least G2 and EOS D30/D60) + + +
+ +
+ Get Directory + + requesttype=0x0b + + Error codes: + + + 0x00000000 No errors + 0x02000022 File not found + 0x02000029 File was protected + 0x02000086 Path not found + + + Command: variable length (here 0x64 bytes) + + +00000000 24 00 00 00 02 02 00 00 00 00 00 00 00 00 00 00 $............... +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 0b 00 20 11 24 00 00 00 78 80 8f 00 ...... .$...x... +00000050 00 41 3a 5c 44 43 49 4d 5c 31 30 30 43 41 4e 4f .A:\DCIM\100CANO +00000060 4e 00 00 00 N... + + + The byte at offset 0x50 gives the level of recursion + allowed, here zero (no recursion). This is followed by the + directory pathname, here + “A:\DCIM\100CANON”. + + Response: 0x40 bytes + +00000000 00 00 00 00 02 03 78 00 00 00 00 00 00 00 00 00 ......x......... +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ + + + As with all “long” dialogues, the message + contains only the length of data to follow, as a word starting + at offset 0x06. In this case, the subsequent data will be 0x78 + bytes long. The next message from the camera is: + + +00000000 a0 00 00 00 00 00 cc 54 8b 41 41 3a 5c 44 43 49 .......T.AA:\DCI +00000010 4d 5c 31 30 30 43 41 4e 4f 4e 00 20 00 d3 9a 9f M\100CANON. .... +00000020 00 98 0f 90 41 49 4d 47 5f 30 30 39 38 2e 43 52 ....AIMG_0098.CR +00000030 32 00 20 00 52 b0 68 00 7a b8 91 41 49 4d 47 5f 2. .R.h.z..AIMG_ +00000000 30 30 39 39 2e 43 52 32 00 20 00 f3 2e 69 00 8a 0099.CR2. ...i.. +00000010 b8 91 41 49 4d 47 5f 30 31 30 30 2e 43 52 32 00 ..AIMG_0100.CR2. +00000020 80 00 00 00 00 00 00 00 00 00 2e 2e 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 ........ + + + This shows four entries. Each entry contains + + 1 byte attribute bits (described in + ) + 1 zero byte + 4 bytes file size in bytes (zero if directory) + 4 bytes UNIX time + File name (null-terminated string of arbitrary length) + “..” in + name means “leave directory”. + + + An entry with attribute, date, and length all zero + indicates the end of the directory listing. It seems that with + this camera, Canon has changed to putting the string ".." in + this empty entry; formerly, the name contained only a single + NUL. + + The contents of this listing: + + “A:\DCIM\100CANON”, attribute byte 0xa0. This is the name of the directory listed. + “IMG_0098.CR2”, attribute byte 0x20, size 0x009f9ad3 (10,459,869) time 0x41900f98. + “IMG_0099.CR2”, attribute byte 0x20, size 0x0068b052 (6,860,882) time 0x4191b87a. + “IMG_0100.CR2”, attribute byte 0x20, size 0x00692ef3 (6,893,299) time 0x4191b88a. + +
+ +
+ + Disk Info Request + + requesttype=0x0d + + Command: variable length (here 0x53 bytes) + +00000000 13 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 0d 00 10 11 13 00 00 00 a8 d9 12 00 ................ +00000050 41 3a 00 A:. + + + Argument: null-terminated string containing the name of + the disk. + + Response: 0x5c bytes + +00000000 1c 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 02 00 00 00 0d 00 10 21 1c 00 00 00 a8 d9 12 00 .......!........ +00000010 00 00 00 00 c0 44 0f 00 80 ac 0e 00 .....D...... + + + + 0x54 contains a word with total bytes on flash. + 0x58 contains a word with bytes free. + + + So this camera seems to have a card with 1,000,640 bytes, + and 961,664 bytes free. I would guess that we need to multiply + by, say, 1024, since I think the card was 1GB. + +
+ +
+ Flash Device Identification + + requesttype=0x0e + + Command: 0x50 bytes + + +00000000 10 00 00 00 02 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 0e 00 20 11 10 00 00 00 84 d9 12 00 ...... ......... + + + Response: 0x44 bytes + + +00000000 00 00 00 00 02 03 04 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 41 3a 00 00 A:.. + + +
+ +
+ Identify Camera + + requesttype=0x01 + + This command is unchanged from the original protocol. + + Command: 0x50 bytes + +00000000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 01 00 10 12 10 00 00 00 08 e4 d5 00 ................ + + + Response: 0x9c bytes (EOS 20D): + +00000000 5c 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 \............... +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 01 00 10 22 5c 00 00 00 08 e4 d5 00 ......."\....... +00000050 00 00 00 00 00 08 77 81 00 05 00 01 43 61 6e 6f ......w.....Cano +00000060 6e 20 45 4f 53 20 32 30 44 00 00 00 00 00 00 00 n EOS 20D....... +00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000010 01 00 00 00 00 00 00 00 00 00 00 00 ............ + + + + First 0x40 bytes is throwable (as usual) + Data at 0x54-0x57 (here 00 08 77 81) have unknown + purpose. + 0x58-0x5b is firmware version (04 03 02 01 is + version 1.2.3.4; 00 05 00 01 here is version 1.0.5.0) + At 0x5c is a string with camera type. + At 0x7c is a string with owner name. + + +
+ +
+ Get time + + requesttype=0x03 + + No parameters. Identical with previous protocol. + + Command: 0x50 bytes + +00000000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 03 00 10 12 10 00 00 00 30 dc 12 00 ............0... + + + Response (0x60 bytes): + +00000000 20 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ............... +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 02 00 00 00 03 00 10 22 20 00 00 00 30 dc 12 00 ......." ...0... +00000010 00 00 00 00 de de a1 41 00 00 00 00 00 00 00 00 .......A........ + + + 0x54 contains a 4-byte UNIX time + Other bytes are zero + + +
+ +
+ Set Time + + requesttype=0x04 + + Command: 0x5c bytes. + + +00000000 1c 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 04 00 10 12 1c 00 00 00 04 df 12 00 ................ +00000050 f5 de a1 41 00 00 00 00 00 00 00 00 ...A........ + + + + 0x50 contains a 4-byte UNIX time + Other bytes are zero + + + + Response: 0x54 bytes. + + +00000000 14 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 02 00 00 00 04 00 10 22 14 00 00 00 04 df 12 00 ......."........ +00000010 00 00 00 00 .... + + + Status codes: + + 0x02000086 Invalid parameters (e.g. command block wrong length) + +
+ +
+ Get Owner + + requesttype=0x05 + + Command: 0x50 bytes. + + +00000000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 05 00 10 12 10 00 00 00 58 dc 12 00 ............X... + + + Response: 0x74 bytes. + + +00000000 34 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 4............... +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 02 00 00 00 05 00 10 22 34 00 00 00 58 dc 12 00 ......."4...X... +00000010 00 00 00 00 43 6f 72 6e 65 6c 6c 20 55 6e 69 76 ....Cornell Univ +00000020 65 72 73 69 74 79 20 32 35 35 2d 38 33 36 37 00 ersity 255-8367. +00000030 00 00 00 00 .... + + + Status code is 4 bytes at 0x50, followed by + null-terminated string. in a 32-byte field (i.e. maximum text + length is 31 bytes, I think. + +
+ +
+ Set Owner + + requesttype=0x06 + + Command is variable in length, here 0x63 bytes. + + +00000000 23 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 #............... +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 06 00 10 12 23 00 00 00 58 df 12 00 ........#...X... +00000050 43 6f 72 6e 65 6c 6c 20 55 6e 69 76 65 72 73 69 Cornell Universi +00000060 74 79 00 ty. + + + Response: 0x54 bytes. + + +00000000 14 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 02 00 00 00 06 00 10 22 14 00 00 00 58 df 12 00 ......."....X... +00000010 00 00 00 00 .... + + + Status code is 4 bytes at 0x50. + +
+ +
+ Power supply status + + requesttype=0x13 + + Command: 0x50 bytes + +00000000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 13 00 10 12 10 00 00 00 28 ed f9 00 ............(... + + + Response: 0x58 bytes (from an EOS 20D on battery + power): + + +00000000 18 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 02 00 00 00 13 00 10 22 18 00 00 00 28 ed f9 00 ......."....(... +00000010 00 00 00 00 06 00 00 20 ....... + + + + First 0x50 bytes are throwable. + + 0x54 contains a byte with power status: 0x6=good, 0x4=bad + 0x57 contains a byte with power type in bit 4: + + ((value &0x20) == 0) running from ac-adapter + ((value &0x20) != 0) running from battery + + + + + The last two values also form the end of the response to + an “Identify camera” request. + +
+ +
+ Get Custom Functions + + requesttype=0x1d + Command: 0x54 bytes 00000000 14 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 1d 00 10 12 14 00 00 00 a4 e7 12 00 ................ +00000050 00 00 00 00 .... + + + Response: 0x94 bytes + +00000000 54 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 T............... +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 1d 00 10 22 54 00 00 00 a4 e7 12 00 ......."T....... +00000050 00 00 00 00 28 00 00 00 00 01 00 02 00 03 00 04 ....(........... +00000060 00 05 01 06 00 07 01 08 00 09 00 0a 00 0b 00 0c ................ +00000070 00 0d 00 0e 00 0f 00 10 00 11 00 12 7c ae 10 00 ............|... +00000000 40 49 b1 ff 70 af 10 00 28 82 b1 ff 00 00 00 00 @I..p...(....... +00000010 00 00 00 00 .... + + + At 0x50 is a 4-byte status code followed by a 4-byte count + of bytes (including the 4 bytes of the count), then + apparently the custom function settings for the camera. Then + at 0x7c is the same sequence as starting at offset 0x84 of + the reply to Identify + Camera. I suspect that this is garbage in the + buffer. + + Here are the meanings of all custom functions. Note that + this table is not the same as that for the earlier EOS + cameras. + + + Custom function values for EOS 20D + + + + + + FunctionIndexValues + + + SET button func, when shooting10: Default (no function) 1: Change quality 2: Change parameters 3: Menu display 4: Image replay + Long exposure noise reduction21: on + Shutter speed in Av mode30: auto 1: 1/250 + Shutter button/AE lock button function40: AF/AE lock 1: AE lock/AF 2: AF/AF lock, no AE lock 3: AE/AF, no AE lock + Disable AF-assist light5 + TV,AV and exposure increments60: 1/2 stop 1: 1/3 stop + Flash firing70: Fires 1: Does not fire + ISO expansion80: Off 1: On + AEB sequence/auto cancellation90:0..-..+/enable 1:0..-..+/disable 2:-..0..+/enable 3:-..0..+/disable + Superimposed display100: On 1: Off + Menu button return position110: Previous (top if power off) 1: previous 2: Top + Mirror lockup121: on + Af point selection method130: Normal 1: Multi-controler direct 2: Quick Control Dial direct + E-TTL II140: Evaluative 1: Average + Shutter curtain sync150: first 1: second + Safety shift in Av or TV160: Disable 1: Enable + Lens AF stop button Fn, switch170: AF stop 1: AF start 2: AE lock while metering 3: AF point: M→Auto/Auto→ctr. 4: ONE SHOT ↔ AI SERVO 5: IS start + Add original decision data180: Off 1: On + + +
+ +
+ +
+ Unknown Command + + requesttype=0x21 + + seen with EOS 20D; issued after Power supply status with + no operands. + + Command: 0x54 bytes + + +00000000 14 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000040 02 00 00 00 21 00 10 12 14 00 00 00 a8 e7 12 00 ....!........... 00000050 0f 00 00 00 .... @@ -3071,14 +4001,16 @@ struct {
-
+
Unknown Command + + requesttype=0x22 + seen with EOS 20D; perhaps “release shutter” - requesttype=0x22 - value=0x?? - length=0x54 + Command: 0x54 bytes + 00000000 14 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -3145,7 +4077,9 @@ struct { - But there seem to be other versions of the command: + But there seem to be other versions of the command, + e.g.: + 00000000 14 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -3154,7 +4088,8 @@ struct { 00000040 02 00 00 00 21 00 10 12 14 00 00 00 a8 e7 12 00 ....!........... 00000050 0f 00 00 00 .... - with the following 0x54 bytes: + + with the following response: 00000000 14 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -3165,15 +4100,16 @@ struct {
-
+
Get EOS Body ID - seen with EOS 20D; issued after “Identify - Camera” + requesttype=0x23 - value=0x?? - length=0x50 - Example: + + seen with EOS 20D; issued after “Identify + Camera” + + Command: 0x50 bytes. 00000000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -3181,7 +4117,7 @@ struct { 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000040 02 00 00 00 23 00 10 12 10 00 00 00 f0 df e4 00 ....#........... - Response: 0x58 bytes: + Response: 0x58 bytes 00000000 18 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -3201,18 +4137,19 @@ struct {
-
+
Get Photo Abilities - So far, this has only been seen with EOS 20D, and I think - it replaces the “Get Camera Photo - Abilities” command. The response block for this command is - longer, but contains a similar list of image type names, - resolutions, and compression types. + requesttype=0x24 - value=0x?? - length=0x50 + + I think this replaces the “Get Camera Photo + Abilities” command. The response block for this + command is longer, but contains a similar list of image type + names, resolutions, and compression types. + Command: 0x50 bytes + 00000000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -3339,13 +4276,16 @@ struct { I suspect that the remaining bytes after 0x15d are garbage.
-
+
Unknown Command - seen with EOS 20D + requesttype=0x25 - value=0x?? - length=0x59 + + Seen with EOS 20D. Seems to be repeated in long sequences; + perhaps some sort of a polling operation? + Command: 0x59 bytes + 00000000 19 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -3354,7 +4294,9 @@ struct { 00000040 02 00 00 00 25 00 10 12 19 00 00 00 68 e7 12 00 ....%.......h... 00000050 00 00 00 00 00 00 00 00 00 ......... + Camera response: 0x5c bytes + 00000000 1c 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -3363,14 +4305,162 @@ struct { 00000000 02 00 00 00 25 00 10 22 1c 00 00 00 68 e7 12 00 ....%.."....h... 00000010 00 00 00 00 00 00 00 00 00 00 00 00 ............ + + When issued after the “Disk info + request” command, the length is 0x5d + bytes: + + +00000000 1d 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 25 00 10 12 1d 00 00 00 58 e7 12 00 ....%.......X... +00000050 09 00 00 00 04 00 00 00 02 00 00 00 00 ............. + + + but the response is still 0x5c bytes: + + +00000000 1c 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 02 00 00 00 25 00 10 22 1c 00 00 00 58 e7 12 00 ....%.."....X... +00000010 00 00 00 00 09 00 00 00 00 00 00 00 ............ + + + + Then the command is issued again in its 0x59-byte form: + + +00000000 19 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 25 00 10 12 19 00 00 00 4c e7 12 00 ....%.......L... +00000050 0a 00 00 00 00 00 00 00 00 ......... + + + eliciting a much longer response of 0x8c bytes: + + +00000000 4c 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 L............... +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 25 00 10 22 4c 00 00 00 4c e7 12 00 ....%.."L...L... +00000050 00 00 00 00 0a 00 00 00 30 00 00 00 20 02 01 02 ........0... ... +00000060 00 00 ff 00 03 01 00 ff 03 ff 02 90 08 ff 00 ff ................ +00000070 7f 7f 7f 7f ff ff 58 00 1c 00 70 00 00 00 ff ff ......X...p..... +00000000 18 00 50 00 ff ff ff ff ff ff 01 00 ..P......... + + + Then the long form again: + + +00000000 1d 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 25 00 10 12 1d 00 00 00 4c e7 12 00 ....%.......L... +00000050 1b 00 00 00 04 00 00 00 0b 00 00 00 00 ............. + + + The response is even longer, at 0x98 bytes: + + +00000000 58 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 X............... +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 25 00 10 22 58 00 00 00 4c e7 12 00 ....%.."X...L... +00000050 00 00 00 00 12 00 00 00 3c 00 00 00 3c 00 00 00 ........<...<... +00000060 00 00 05 00 00 00 00 00 ff ff ff ff 00 00 00 00 ................ +00000070 ff ff ff ff ff ff ff ff 00 00 ff ff ff ff ff ff ................ +00000000 ff ff 00 00 50 14 ff ff 01 00 ff ff ff ff 00 00 ....P........... +00000010 ff ff 00 00 00 00 00 00 ........ + + + Then comes the 0x35 command, "get body ID", and another + long one of ours: + + +00000000 1d 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 25 00 10 12 1d 00 00 00 4c e7 12 00 ....%.......L... +00000050 1b 00 00 00 04 00 00 00 0b 00 00 00 00 ............. + + + +00000000 1e 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 02 00 00 00 25 00 10 22 1e 00 00 00 4c e7 12 00 ....%.."....L... +00000010 00 00 00 00 1b 00 00 00 02 00 00 00 0b 00 .............. + + + and a short one: + + +00000000 19 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 25 00 10 12 19 00 00 00 4c e7 12 00 ....%.......L... +00000050 1c 00 00 00 00 00 00 00 00 ......... + + + 0x77 bytes + + +00000000 27 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 '............... +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 02 00 00 00 25 00 10 22 27 00 00 00 4c e7 12 00 ....%.."'...L... +00000010 00 00 00 00 1c 00 00 00 0b 00 00 00 03 00 00 00 ................ +00000020 02 00 00 00 03 04 05 ....... + + + Then a long one: + + +00000000 1d 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 25 00 10 12 1d 00 00 00 4c e7 12 00 ....%.......L... +00000050 1b 00 00 00 04 00 00 00 0e 00 00 00 00 ............. + + + 0x5e bytes + + +00000000 1e 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 02 00 00 00 25 00 10 22 1e 00 00 00 4c e7 12 00 ....%.."....L... +00000010 00 00 00 00 1b 00 00 00 02 00 00 00 11 00 .............. + + + Things seem to alternate short and long commands from + there. +
-
- New EOS Fetch Image? - seen with EOS 20D; possibly “Get captured image” +
+ Get captured image + requesttype=0x26 - value=0x?? - length=0x60 + + seen with EOS 20D. + Command: 0x60 bytes 00000000 20 00 00 00 02 02 00 00 00 00 00 00 00 00 00 00 ............... @@ -3380,53 +4470,69 @@ struct { 00000040 02 00 00 00 26 00 20 12 20 00 00 00 d0 53 7e 00 ....&. . ....S~. 00000050 00 00 00 00 00 00 01 00 02 00 00 00 07 00 00 00 ................ + + This is very similar to the old “Download Captured + Image” command block. Offset 0x50 presumably has + the 4-byte status code, 0x54 has the transfer length (here + 0x10000, 65536 bytes), 0x58 has the image type (here 2 for + full image), and 0x5c has the image handle of 7. + Camera response: variable length + -00000000 00 00 00 00 02 03 2d a4 81 00 00 00 00 00 00 00 ......-......... +00000000 00 00 00 00 02 03 f8 0e 03 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ - then many blocks. First is length 0x10000, then 0x2500, then - alternating 0x40,0xfec0 (total FFF0), 128 times, then 0xfec0, - then 0x2d bytes. Total was 0x81f6ed (8,517,357) - bytes but shouldn’t it be 0x81a42d? That’s - indicated in the block we just got. I think this is a - CR2 raw image being uploaded; note the TIFF magic "II*" - at the start. - -00000000 49 49 2a 00 10 00 00 00 43 52 02 00 29 ef 09 00 II*.....CR..)... -00000010 0e 00 00 01 03 00 01 00 00 00 00 06 6c cc 01 01 ............l... -00000020 03 00 01 00 00 00 00 04 33 33 02 01 03 00 03 00 ........33...... -00000030 00 00 be 00 00 00 03 01 03 00 01 00 00 00 06 00 ................ -00000040 ec cc 0f 01 02 00 06 00 00 00 c4 00 00 00 10 01 ................ -00000050 02 00 0e 00 00 00 ca 00 00 00 11 01 04 00 01 00 ................ -00000060 00 00 00 26 00 00 12 01 03 00 01 00 00 00 01 00 ...&............ -00000070 22 33 17 01 04 00 01 00 00 00 37 27 05 00 1a 01 "3........7'.... -00000080 05 00 01 00 00 00 ea 00 00 00 1b 01 05 00 01 00 ................ -00000090 00 00 f2 00 00 00 28 01 03 00 01 00 00 00 02 00 ......(......... -000000a0 37 33 32 01 02 00 14 00 00 00 fa 00 00 00 69 87 732...........i. -000000b0 04 00 01 00 00 00 0e 01 00 00 37 4d 05 00 08 00 ..........7M.... -000000c0 08 00 08 00 43 61 6e 6f 6e 00 43 61 6e 6f 6e 20 ....Canon.Canon -000000d0 45 4f 53 20 32 30 44 00 de cc cc cc 8c cc cc df EOS 20D......... -000000e0 33 33 77 b3 13 b6 cf f9 3a 33 48 00 00 00 01 00 33w.....:3H..... -000000f0 00 00 48 00 00 00 01 00 00 00 32 30 30 34 3a 31 ..H.......2004:1 -00000100 31 3a 31 32 20 30 32 3a 30 30 3a 30 33 00 1c 00 1:12 02:00:03... -00000110 9a 82 05 00 01 00 00 00 64 02 00 00 9d 82 05 00 ........d....... -00000120 01 00 00 0... -00000000 88 c7 cd 26 b0 e6 79 0e bb 72 d4 fc fe 69 a6 f0 ...&..y..r...i.. -00000010 e2 4e bd cb 74 3c 6b d7 bf 36 9b e9 9c 9a ca a1 .N..t<k..6...... -00000020 e8 ee 45 66 16 52 d4 33 b6 b1 47 ff d9 ..Ef.R.3..G.. + As before, bytes 6-10 of the reply packet contain the + 32-bit total length of the image data transfers, here + 0x00030ef8. We must then issue a series of bulk + reads. + + then many blocks. First is length 0x10000, then 0x10c0, + then (0x40, 0xfec0) twice, then 0x38 bytes. Total is + 0x00030ef8 (200,440) bytes. I think this is a JPEG image + being downloaded; note the JFIF EXIF tag at the start. + + +00000000 ff d8 ff e1 2d 9a 45 78 69 66 00 00 49 49 2a 00 ....-.Exif..II*. +00000010 08 00 00 00 09 00 0f 01 02 00 06 00 00 00 7a 00 ..............z. +00000020 00 00 10 01 02 00 0e 00 00 00 80 00 00 00 12 01 ................ +00000030 03 00 01 00 00 00 01 00 00 00 1a 01 05 00 01 00 ................ +00000040 00 00 a0 00 00 00 1b 01 05 00 01 00 00 00 a8 00 ................ +00000050 00 00 28 01 03 00 01 00 00 00 02 00 00 00 32 01 ..(...........2. +00000060 02 00 14 00 00 00 b0 00 00 00 13 02 03 00 01 00 ................ +00000070 00 00 02 00 00 00 69 87 04 00 01 00 00 00 c4 00 ......i......... +00000080 00 00 50 24 00 00 43 61 6e 6f 6e 00 43 61 6e 6f ..P$..Canon.Cano +00000090 6e 20 45 4f 53 20 32 30 44 00 00 00 00 00 00 00 n EOS 20D....... +000000a0 00 00 00 00 00 00 00 00 00 00 00 00 48 00 00 00 ............H... +000000b0 01 00 00 00 48 00 00 00 01 00 00 00 32 30 30 34 ....H.......2004 +000000c0 3a 31 31 3a 32 32 20 31 32 3a 35 35 3a 31 36 00 :11:22 12:55:16. +000000d0 1c 00 9a 82 05 00 01 00 00 00 1a 02 00 00 9d 82 ................ +000000e0 05 00 01 00 00 00 22 02 00 00 22 88 03 00 01 00 ......"..."..... +000000f0 00 00 01 00 00 10 27 88 03 00 01 00 00 00 64 00 ......'.......d. +00000100 00 00 00 90 07 00 04 00 00 00 30 32 32 31 03 90 ..........0221.. +00000110 02 00 14 00 00 00 2a 02 00 00 04 90 02 00 14 00 ......*......... +00000120 00 00 3e 02 00 00 01 91 07 00 04 00 00 00 01 02 ..>............. +... +00000000 b8 cd 23 64 b6 07 03 d4 50 f5 0d 80 a6 18 12 4f ..#d....P......O +00000010 1e b4 31 2c 71 b7 34 b7 04 ae 01 f0 40 23 93 da ..1,q.4.....@#.. +00000020 80 7e 6c 37 5f 6a 00 45 4c 64 0f cc d2 ee da c0 .~l7_j.ELd...... +00000030 63 83 de 9d c5 73 ff d9 c....s..
-
+
Unknown Command - seen with EOS 20D + requesttype=0x35 - value=0x?? - length=0x50 + + seen with EOS 20D, issued after a 0x25/0x12 command and + before either a 0x1d or a 0x36. + Command: 0x50 bytes 00000000 10 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ @@ -3435,7 +4541,9 @@ struct { 00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ 00000040 02 00 00 00 35 00 10 12 10 00 00 00 a8 eb 12 00 ....5........... + Camera response: 0x5c bytes + 00000000 1c 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ @@ -3444,157 +4552,39 @@ struct { 00000000 02 00 00 00 35 00 10 22 1c 00 00 00 a8 eb 12 00 ....5.."........ 00000010 00 00 00 00 00 00 00 00 00 00 00 00 ............ -
- -
- USB Upload (a little bit special) - Control_transfer_write - requesttype=0x40 - value=0x10 - length=0x40 - data=0x00000000 0x0203 0x40+len1[explained later] [0x00 repeated 0x38] - - Example: - -0000 00 00 00 00 03 02 7a 14 00 00 00 00 00 00 00 00 ......z......... -0010 8e 58 63 3e 44 2e 43 54 47 00 00 00 00 00 00 00 .Xc>D.CTG....... -0020 00 00 00 00 00 83 85 82 87 84 7f 81 7f 7d 7b 77 .............}{w -0030 7e 81 7e 7d 7c 7d 81 80 82 80 7c 80 81 7f 84 83 ~.~}|}....|..... - - This is identical to the response to “Download - Captured Image”, except for the first word and the - cmd3 halfword at 0x04. Here the first word - is zero, there it’s 0x00000020. The cmd3 - halfword is 0x0203 here, 0x0302 there. - - bulk_in_read [0x40 bytes] - Example: - -0000 00 00 00 00 03 03 00 00 00 00 00 00 00 00 00 00 ................ -0010 8e 58 63 3e 44 2e 43 54 47 00 00 00 00 00 00 00 .Xc>D.CTG....... -0020 00 00 00 00 00 83 85 82 87 84 7f 81 7f 7d 7b 77 .............}{w -0030 7e 81 7e 7d 7c 7d 81 80 82 80 7c 80 81 7f 84 83 ~.~}|}....|..... - - - The following block obeys the normal command block - structure. The exact layout is: - - -0000000: xx xx xx xx 03 04 00 00 - 00 00 00 00 00 00 00 00 -0000010: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 -0000020: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 -0000030: 00 00 00 00 00 00 00 00 - 00 00 00 00 00 00 00 00 -0000040: 02 00 00 00 03 00 00 11 - xx xx xx xx SS SS SS SS -0000050: 00 00 00 00 UU UU UU UU - VV VV VV VV pathname data ... - - - xx xx xx xx : len1, the length of the - payload (total block length - 0x40) - - cmd3 = 0x00000403 - cmd1 = 0x03 - cmd2 = 0x11 - xx xx xx xx : len1 (again) - - SS SS SS SS : sequence number - - UU UU UU UU : Offset within file; - starts at zero, increments by len2 (below) for next block - - VV VV VV VV : len2, length of data in - this block. Normally 0x1400 or less. - - pathname : full path name of file on - camera, terminated by one NUL. File cannot be created in - nonexistent directory. data - : image data (len2 bytes) - - Example of beginning of a block: - -0000 3a 14 00 00 03 04 00 00 00 00 00 00 00 00 00 00 :............... -0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -0040 02 00 00 00 03 00 00 11 3a 14 00 00 a2 4c 10 02 ........:....L.. -0050 00 00 00 00 00 00 00 00 00 14 00 00 44 3a 5c 44 ............D:\D -0060 43 49 4d 5c 31 35 38 43 41 4e 4f 4e 5c 41 55 54 CIM\158CANON\AUT -0070 5f 30 30 30 31 2e 4a 50 47 00 ff d8 ff e1 18 ba _0001.JPG....... -0080 45 78 69 66 00 00 49 49 2a 00 08 00 00 00 09 00 Exif..II*....... -0090 0f 01 02 00 06 00 00 00 7a 00 00 00 10 01 02 00 ........z....... -00A0 .... - - - The filename here is - “D:\DCIM\158CANON\AUT_0001.JPG”; the offset is - zero (i.e. this is the first block of this file) and length is - 0x1400. Len1 is 0x143a, which is 0x1400 + - 0x10 + 0xc (three full words) + 0x1e (length of - pathname+1). - - Response to this block (0x5c bytes): - -0000 00 00 00 00 03 03 00 00 00 00 00 00 00 00 00 00 ................ -0010 00 00 00 00 00 00 00 00 78 00 00 00 76 00 00 00 ........x...v... -0020 36 00 00 00 02 02 00 00 00 00 00 00 00 00 00 00 6............... -0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -0040 02 00 00 00 03 00 00 21 1c 00 00 00 a2 4c 10 02 .......!.....L.. -0050 00 00 00 00 00 14 00 00 00 14 00 00 ............ - - - The interesting words are: - - - 0x50 Status - - 0x54 Count of bytes already transferred in this - upload? - - 0x58 Number of bytes of real data transferred in the - latest bulk write. - - - Unfortunately, the number at 0x54 seems to jump too fast; - after the second write of 0x1400 bytes, it reads 0x3c00, not - 0x2800. And after the next, it's 0x6400, not 0x3c00. In fact, - it counts up by multiples of the 0x1400 data length: 1, 3, 5, - 7, 9, ... - - This transaction is repeated until the whole file is - transmitted. - - At the end of the transfer, there will usually be one - “short” transfer. Here it is 0x117e bytes: - -0000 b8 11 00 00 03 04 00 00 00 00 00 00 00 00 00 00 ................ -0010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ -0040 02 00 00 00 03 00 00 11 b8 11 00 00 a2 4c 10 02 .............L.. -0050 00 00 00 00 00 4c 04 00 7e 11 00 00 44 3a 5c 44 .....L..~...D:\D -0060 43 49 4d 5c 31 35 38 43 41 4e 4f 4e 5c 41 55 54 CIM\158CANON\AUT -0070 5f 30 30 30 31 2e 4a 50 47 00 02 8a 00 28 a0 02 _0001.JPG....(.. -0080 8a 00 28 a0 02 8a 00 28 a0 02 8a 00 28 a0 02 8a ..(....(....(... -0090 00 28 a0 02 8a 00 28 a0 02 8a 00 28 a0 02 8a 00 .(....(....(.... - - - Here the offset is 0x44c00. - - The response is 0x5c bytes: - -0000 00 00 00 00 03 03 00 00 00 00 00 00 00 00 00 00 ................ -0010 7a 8c f2 3e 94 98 6a 3b 19 01 14 ee 3d f2 79 14 z..>..j;....=.y. -0020 a0 07 f9 17 0c ab d4 e7 9a 43 bb ec 3c 6d 7e 4e .........C..<m~N -0030 0a 2f 71 9c d2 ae 1f 32 37 cd 8e 87 1c d1 61 58 ./q....27.....aX -0040 02 00 00 00 03 00 00 21 1c 00 00 00 a2 4c 10 02 .......!.....L.. -0050 00 00 00 00 7e a9 08 00 7e 11 00 00 ....~...~... - - - The “total byte count” (or whatever it is) is - now 0x8a97e. After this the caller must set the file time; otherwise - it is left at -1.
+ +
+ Unknown Command + + requesttype=0x36 + + seen with EOS 20D, issued after 0x35/0x12. Seems to be + followed by two 0x25/0x12 commands with lengths 0x89 and + 0x95. + + Command: 0x58 bytes + +00000000 18 00 00 00 01 02 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000040 02 00 00 00 36 00 10 12 18 00 00 00 98 ed 17 01 ....6........... +00000050 00 00 00 00 00 00 00 00 ........ + + + Response: 0x54 bytes + +00000000 14 00 00 00 01 03 00 00 00 00 00 00 00 00 00 00 ................ +00000010 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................ +00000000 02 00 00 00 36 00 10 22 14 00 00 00 98 ed 17 01 ....6.."........ +00000010 00 00 00 00 .... + + +
+