Get EOS Body ID

requesttype=0x1d

Used only with EOS cameras. Canon RemoteCapture issues it immediately before entering remote capture mode.

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 ................
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 1d 00 00 12 10 00 00 00 f4 f4 12 00 ................
        

Response: 0x58 bytes (EOS D30)

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 ................
0000 02 00 00 00 1d 00 00 22 18 00 00 00 f4 f4 12 00 ......."........
0010 00 00 00 00 ea 01 28 18                         ......(.
        

Theres one zero word, then four bytes containing the body ID.

With a D30, the upper 16 bits should be used directly as hexadecimal digits, and the lower 16 bits should be converted to decimal. For this camera, its 182800490: 0x1828 concatenated with 00490, which is the decimal equivalent of 0x01ea. The following C code fragment will do the trick:

  char serialnumber[10];
  sprintf ( serialnumber, "%04x%05d", (body_id>>16)&0xffff, body_id&0xffff );
      

For a D60, its a simple binary number: convert it to decimal to get the body ID. 1e ab d6 3c becomes 0x3cd6ab1e; the decimal equivalent is 1020701470, the number on the sticker on the base of the camera. This C code fragment will convert this to ASCII correctly:

   char serialnumber[10];
   sprintf ( serialnumber, "%d", body_id );