This page has moved...

You will be redirected automatically there in 5 seconds.

If not, then please click on the following link: http://users.bigpond.net.au/blmiller/linux/rdc2e/protocol.html

Please update any links to this page you may have had.


Ricoh RDC-2E Serial Line Protocol

Hardware requirements

The camera is able to run at speeds between 2400 and 115,200 bps, initially starting at 2400. The speed is changed using commands described below.

Both DTR & RTS on the DTE side should be raised, resulting in DRT & CTS being raised by the camera. These seem to remain up during the whole camera session and don't seem to be a hardware flow control... well, I have never seen RTS or CTS change. When all transfers are finished, the PC drops RTS & DTR, which the camera sees, returning the camera to the default communications settings. i.e. 2400 bps.

Frame Format

Ricoh RDC-2E Frame Format
STX Data ETX CRC Length Frame #
10 02       ...Data...       10 03 xx xx xx xx

Descriptions of Fields
FieldLengthDescription
STX2 bytesStart of Text sequence. All frames start with 0x1002.
Datan bytesData content of frame. Any byte with a value of 0x10 within the frame MUST be escaped by prepending a 0x10 to it.
ETX2 bytesEnd of Text sequence. Always has the value of 0x1003.
CRC2 bytesThe CRC is worked out on the DATA portion
of the frame and uses the same one as used in zmodem.
Length1 byteLength of the data in theData field of the frame. This does not include the 0x10's that are used to escape special chatacters within the data.
Frame #1 byteFrames are given a sequence number. This number starts at 0x00 and increments by 0x01 for each frame in a single transfer. i.e. you will see this incrementing in the transfer of a picture.

When ever a frame is sent in one direction, the receiving end resopnds immediately with a 0x05 which I assume is a possitive response. I haven't seen a negative response yet, so I have no idea what they look like.

Data Format

Data Format
Command Control Optional Data
1 byte 1 byte 0-n bytes

List of Commands
CommandDescription
0x31Set interface speed
0x40Request to download a picture
Response with picture name
0x44Downloading picture from camera
0x49Request/response for number of pictures currently in camera.
0x4CSwap source of pictures in camera between internal 2MB memory, and the (optional) PCMCIA card.

Bit Fields of Control
BitsDescription
0x80 This is set if there are more frames to follow.
Normally seen in a picture download,
except in last frame.

Command Description

Set Serial Speed

When communication is initially being set up between the PC and the camera, the forst thing that is done is to set the speed of the PC and camera interface.

Initially, the speed of both ends starts at 2400 bps, and is negotated to a higher speed. By default, the PC software that came with the camera (Photo Studio) goes straight to 115200 bps.

I have seen that the PC sends out a first a Set Serial Speed command, waits for about a second for a response, then sends a second. The camera generally responds to the second request with a 0x05. After the camera responds, the PC and camera step up to the new speed, ready for the next command.

Set Serial Speed
SpeedFrame Data
240031 00 00 00
480031 00 00 01
960031 00 00 02
1920031 00 00 03
3840031 00 00 04
5760031 00 00 05
11520031 00 00 07

Number of Pictures - PC Request

The PC request for the number of pictures in the camera is very simple.

Frame Data
49 00

The camera then responds with a 0x05, followed by a Number of Pictures - Camera response.

Number of Pictures - Camera Response

After the PC has sent in a request for the number of pictures held in the cameras memory, it responds with:

Frame Data
49 00 mp ll hh ll hh

The PC should reply with a 0x05, acknowledging the receipt of this frame.

Where mp is 0x00 for the internal 2MB of Memory, and 0x01 is for PCMCIA.

Where ll hh is the number of pictures present in camera memory. This is in fact an Intel ordered short integer, where ll is the low order byte, and hh is the low order byte (usually 0x00). Why there are two occurances of ll hh I don't know.

(please note that I don't have a PCMCIA memory card, so I am only going on what Hugo Visser has told me.)

Swapping between Internal 2MB memory and PCMCIA Card

Frame Data
4C 00 mp

Where mp is 0x00 for the internal 2MB of Memory, and 0x01 is for PCMCIA.

The camera will respond with a 0x05 followed by a Number of Pictures On Media - Camera response.

Number of Pictures On Media - Camera Response

Note: This is the same as a Number of Pictures - Camera Response except that the command is 0x4C instead of 0x49.

After the PC has sent in a request to change to the source of pictures to either internal 2MB memory or the PCMCIA card, it responds with:

Frame Data
4C 00 mp ll hh ll hh

The PC should reply with a 0x05, acknowledging the receipt of this frame.

Where mp is 0x00 for the internal 2MB of Memory, and 0x01 is for PCMCIA.

Where ll hh is the number of pictures present in camera memory. This is in fact an Intel ordered short integer, where ll is the low order byte, and hh is the low order byte (usually 0x00). Why there are two occurances of ll hh I don't know.

(please note that I don't have a PCMCIA memory card, so I am only going on what Hugo Visser has told me.)

Request to Download a Picture

Frame Data
40 00 nn 00

Where nn is the number of the picture to download.

The camera will respond with a 0x05.

File Name that is about to be Downloaded

When you request a photo to be downloaded, the first thing you get back is a frame that tells you the name that it is called in the camera. These are names like R0100001.J6I or R0100002.J6I, etc.

Frame Data
40 00 aa aa aa aa aa aa aa aa aa aa aa aa 00 ss ss 00

The PC should reply with a 0x05, acknowledging the receipt of this frame.

Where aa are ASCII characters that make up a full file name like that described just above. I don't see any reason why you have to use this file name; it's just given though. Also the file size is given by ss ss. This is a short integer number (Intel byte order) of 256 byte blocks that make up the size of the file.

Picture Download - Camera To PC

Straight after the File Name that is about to be Downloaded frame has been acknowledged, the camera starts sending the actual photo.

Frame Data
44 80 80 3e 44 53 43 49 4d 00 01 00 00 ..........

There are a few things to note about these frames:

The last frame of the transfer contains no data, and the more bit is not set.

Frame Data
44 00

Disclaimer

All projects and documentation must have one...

By no means is this a full breakdown of the protocol, just enough I think to get a basic downloading of pictures from the camera to work. There must be more; it's just my software doesn't do any more... like make the camera take a picture...

Some Sample Frames

The data section of the frame is in blue and the checksums are in red.
Setting the speed....
10 02 31 00 00 00 10 03 a4 36 04 00
10 02 31 00 00 01 10 03 a5 36 04 00
10 02 31 00 00 02 10 03 a6 36 04 00
10 02 31 00 00 03 10 03 a7 36 04 00
10 02 31 00 00 04 10 03 a0 36 04 00
10 02 31 00 00 05 10 03 a1 36 04 00
10 02 31 00 00 07 10 03 a3 36 04 00

How many pictures do you have?
10 02 49 00 10 03 00 49 02 00

I have 2 pictures in memory...
10 02 49 00 00 02 00 02 00 10 03 76 dd 07 00

Please download picture #1
10 02 40 00 01 00 10 03 cc 0c 04 00

Please download picture #2
10 02 40 00 02 00 10 03 cc 0f 04 00

Picture #1 is called R0100001.J6I
10 02 40 00 52 30 31 30 30 30 30 31 2e 4a 36 49 00 c0 00 00 10 03 78 44 12 00

The first frame of picture #1 to be downloaded
10 02 44 80 80 3e 44 53 43 49 4d 00 01 00 00 00 00 00 00 00 56 49 44 45 4f 31
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01 00
00 00 00 00 03 00 00 00 00 00 00 ac 00 00 b2 d3 81 08 09 00 99 01 08 14 00 29
82 20 1f 52 49 43 4f 48 00 01 00 00 20 20 20 20 20 20 20 20 20 20 20 20 20 20
20 20 20 20 20 20 00 00 82 0c 0b 52 49 43 4f 48 00 01 00 01 00 00 82 14 13 52
49 43 10 03 3a 42 82 01

The last frame of picture #1 to be downloaded
10 02 44 00 10 03 00 44 02 81