- all packets end with a 3-byte sequence, where XX YY ZZ is defined as follows:
- XX is UNKNOWN at this time
- YY is a checksum of all bytes up to but not including XX
- ZZ is always
0xFF
- the checksum (byte YY from above) is calculated as follows:
!0 + !byte0 + !byte1 + ... + !byteN
for example, in the packet AF 00 00 03 4D FF , the checksum is calculated
using !0 + !AF + !00 + !00 == 4D
- in quite a few places, though not all, the UNKNOWN
byte before the checksum seems to be the number of characters in
the packet; however, there doesn't seem to be any consistency on
when this rule is being followed
- the largest packet size seems to be 0x8a bytes (138 bytes) in length
- except for the first few messages, packets from the software generally start with
0x01
- except for the first few messages, packets from the camera generally start with
0x10
- except for the first few messages, the 2nd byte of each packet seems to be some kind of counter; the packets from the software as well as those from the camera seem to be on two indendant counters
- for the first few packets, at least 16 bytes of header information (and at times even more?) seems to be included at the start of each packet; this can be observed very well at line #54, where the data for this packet begins at offset
0x10
- at line #26, the software is asking the camera for all filesystem entries in the subdirectory called
\DCIM
- offsets 0x1e, 0x1f, 0x20 and 0x21 at line #25 may make a 4-byte integer value that determines the number of characters sent at offset 0x24 of line #26
- camera sends back 20-byte records when listing all files/directories found on the CF card; these can be seen in the packets starting at line #28, #41 and #53
- structure of 20-byte filesystem records (line #20, 43) are:
- bytes 0x00 to 0x0a are the filenames, without the "." between filename and extension
- bytes 0x0b is an attribute byte composed of bit flags; 0x01 is a diretory, all other flags are currently UNKNOWN, though 0x02 may simply mean "archive bit"
- bytes 0x0c to 0x0f are always
0x00 0x00 0x21 0x28
- bytes 0x10 to 0x13 make a 4-byte integer value with the filesize
- the filesystem record for DCP_0003.JPG starts on line #70, but isn't completed until offset 0x10 at line #54; what are the 16 bytes of header information?
- the filesystem records for DCP_0002.JPG (line #47) and DCP_0003.JPG have an extra
NULL inserted at offset 0x7c, thereby making one of these filesystem record be 21 bytes in length instead of 20; how is this handled?
|
- connect to the camera
- camera returns 4 images available on the CF card
- download all 4 thumbnails
- quit from the Kodak software, thereby closing the connection
|
2001_02_27.txt (300K)
|