PalmCam Communications Protocol

 

Specification Version 0.5

August 24, 1998

This document describes the protocol used to control the Panasonic PV-DC1000 and NV-DC1000 PalmCam. This information was reverse engineered by monitoring the commands and responses transmitted via the RS232 interface between the camera and PC.

To the best of my knowledge, this specification is correct. If you discover errors or have additions, please email me. This early version of the specification assumes a bit of knowledge about how the camera communicates. I will add more details soon. But don't wait for me. If you have questions email me. I will be happy to explain.

Much of the information in this document was obtained from Fredrik Roubert. Check his web site for BeOS and Linux programs to control the camera.

 

 

<Command> 

<Command-Prefix>

<Size-32>

<Command-Code>

<Command-Data>

This is the format for all PalmCam commands. The commands consist of a 12-byte prefix, followed by 4 bytes of size information and a one-byte command code. The command code may be followed by command specific data. If there is command specific data, the number of bytes of data is indicted in the <Size-32> field otherwise this field is zero.

<Command-Prefix>

M

K

E

D

S

C

P

C

0x4d

0x4b

0x45

0x20

0x44

0x53

0x43

0x20

0x50

0x43

0x20

0x20

See also <Generic-Command-Prefix>

<Size-32>

(Size >> 24) & 0xff

(Size >> 16) & 0xff

(Size >> 8) & 0xff

Size & 0xff

<Size-32> is simply a 32-bit field indicating the number of bytes of <Command-Data> or <Response-Data> that follows. The bytes are stored most-significant byte first.

<Response>

<Response-Prefix>

<Size-32>

<Response-Code>

<Response-Data>

This is the format for all responses from the PalmCam. Responses consist of a 12-byte prefix, followed by 4 bytes of size information and a one-byte response code. In my observations there are always 1 to 1024 bytes of <Response-Data>. Applications should not depend on this observation.

<Response-Prefix>

M

K

E

 

P

C

 

 

D

S

C

 

0x4d

0x4b

0x45

0x20

0x50

0x43

0x20

0x20

0x44

0x53

0x43

0x20

 

<Response-Code>

<Response-Data>

 

0x00

Data

Amount of data is reported in <Size-32> field

0x01

0x00

OK

 

0x02

Image does not exist

 

0x04

Not enough memory to store image

0x03

 

Model ID

For PV-DC1000 <Size-32> is 4 and <Response-Data> is DSC1 (0x44, 0x53, 0x43, 0x31)

0x08

List

<Size-32> is the number of bytes in the image list. Each entry is 2 bytes. The first is the image number and the second is its resolution.

0x1d

<Size-32>

Image size in bytes

 

<Command-Code>

<Set-Baud-Rate>

<Size-32>

<Command-Code>

<Command-Data>

 

0x01

0x04

0x00

115200 Baud

 

 

0x01

38400 Baud

 

 

0x02

9600 Baud

 

 

0x03

57600 Baud

 

 

0x0d

19200 Baud

<Response-Code>

0x01

 

<Set-Image-Resolution>

<Size-32>

<Command-Code>

<Command-Data>

 

0x01

0x15

0x00

Normal Resolution

 

 

0x01

Fine Resolution

 

 

0x02

Super-Fine Resolution

<Response-Code>

0x01

 This command is used in conjunction with <Send-Image-Data> to upload images to the camera.

<Send-Image-Data>

<Size-32>

<Command-Code>

<Command-Data>

 

Number of bytes of image data in the <Command-Data> field.

0x00

JPEG data for image

 

<Response-Code>

0x01

This command must immediately follow the <Set-Image-Resolution> command.

<Select-Image-for-Download>

<Size-32>

<Command-Code>

<Command-Data>

 

0x01

0x1a

Image Number

 

<Response-Code>

0x1d

 

<Download-Image-Data>

<Size-32>

<Command-Code>

<Command-Data>

 

0x02

0x1e

Block Number

Block numbers start at zero

<Response-Code>

0x00

 The <Download-Image-Data> command must immediately follow the <Select-Image-for-Download> command. The number of bytes received is reported in the <Size-32> field of the <Response>. In my observations, the camera sends blocks of 1024 bytes until the last block, when it sends whatever remains of the last block.

<Get-Camera-Model>

<Size-32>

<Command-Code>

<Command-Data>

 

0x00

0x02

 

 

<Response-Code>

0x03

  

<Connect>

<Size-32>

<Command-Code>

<Command-Data>

 

0x01

0x10

0x00

It's interesting that this command has a non-zero <Size-32>. <Command-Data> values other than 0 may be useful.

<Response-Code>

0x01

Connect is probably a misnomer for this command. I haven't been able to determine what this command does.

<Reset>

<Size-32>

<Command-Code>

<Command-Data>

 

0x00

0x1f

 

 

<Response-Code>

0x01

This command resets the camera's baud rate to 9600.

<Preview-Image>

<Size-32>

<Command-Code>

<Command-Data>

 

0x01

0x14

Image Number

Does not return an error if the image number is invalid.

<Response-Code>

0x01

 

<Delete-Image>

<Size-32>

<Command-Code>

<Command-Data>

 

0x01

0x11

Image Number

<Size-32> must be set to 1. Camera will hang is an attempt is made to delete multiple images.

<Response-Code>

0x01

 

<Get-Image-List>

<Size-32>

<Command-Code>

<Command-Data>

 

0x00

0x07

 

 

<Response-Code>

0x08

 

<Generic-Command-Prefix>

A

B

C

D

1

2

3

4

w

x

y

z

Panasonic uses one of two command prefixes. For most commands it uses "MKE DSC PC ". For the <Get-Camera-Model> command it uses "MKE KSP PC ". It is unclear what difference, of any, exists between the two prefixes.

Any 12-character command prefix will work. The response is always 12 characters in the form:

<Generic-Response-Prefix>

M

K

E

w

x

y

z

D

S

C

The response always has the first 4 characters set to "MKE " and the last 4 set to "DSC " (note the space character, 0x20). The last 4 characters of the <Generic-Command-Prefix> are copied to the middle 4 characters of the response.

Index -- by <Command-Code>

0x00

<Send-Image-Data>

0x02

<Get-Camera-Model>

0x04

<Set-Baud-Rate>

0x07

<Get-Image-List>

0x10

<Connect>

0x11

<Delete-Image>

0x14

<Preview-Image>

0x15

<Set-Image-Resolution>

0x1a

<Select-Image-for-Download>

0x1e

<Download-Image-Data>

0x1f

<Reset>