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-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> |
|||
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> |
|
|
|
Data |
Amount of data is reported in <Size-32> field |
|
|
0x00 |
OK |
|
|
|
0x02 |
Image does not exist |
|
|
0x04 |
Not enough memory to store image |
|
|
Model ID |
For PV-DC1000 <Size-32> is 4 and <Response-Data> is DSC1 (0x44, 0x53, 0x43, 0x31) |
|
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. |
|
|
Image size in bytes |
|
<Set-Baud-Rate> |
||||
|
<Command-Code> |
<Command-Data> |
|
||
|
0x01 |
0x04 |
0x00 |
115200 Baud |
|
|
|
|
0x01 |
38400 Baud |
|
|
|
|
0x02 |
9600 Baud |
|
|
|
|
0x03 |
57600 Baud |
|
|
|
|
0x0d |
19200 Baud |
|
|
<Set-Image-Resolution> |
||||
|
<Command-Code> |
<Command-Data> |
|
||
|
0x01 |
0x15 |
0x00 |
Normal Resolution |
|
|
|
|
0x01 |
Fine Resolution |
|
|
|
|
0x02 |
Super-Fine Resolution |
|
This command is used in conjunction with
<Send-Image-Data> to upload images to the camera.|
<Send-Image-Data> |
||||
|
<Command-Code> |
<Command-Data> |
|
||
|
Number of bytes of image data in the <Command-Data> field. |
0x00 |
JPEG data for image |
|
|
This command must immediately follow the
<Set-Image-Resolution> command.|
<Select-Image-for-Download> |
||||
|
<Command-Code> |
<Command-Data> |
|
||
|
0x01 |
0x1a |
Image Number |
|
|
|
<Download-Image-Data> |
||||
|
<Command-Code> |
<Command-Data> |
|
||
|
0x02 |
0x1e |
Block Number |
Block numbers start at zero |
|
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> |
||||
|
<Command-Code> |
<Command-Data> |
|
||
|
0x00 |
0x02 |
|
|
|
|
<Connect> |
||||
|
<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. |
|
Connect is probably a misnomer for this command. I haven't been able to determine what this command does.
|
<Reset> |
||||
|
<Command-Code> |
<Command-Data> |
|
||
|
0x00 |
0x1f |
|
|
|
This command resets the camera's baud rate to 9600.
|
<Preview-Image> |
||||
|
<Command-Code> |
<Command-Data> |
|
||
|
0x01 |
0x14 |
Image Number |
Does not return an error if the image number is invalid. |
|
|
<Delete-Image> |
||||
|
<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. |
|
|
<Get-Image-List> |
||||
|
<Command-Code> |
<Command-Data> |
|
||
|
0x00 |
0x07 |
|
|
|
|
<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.
|
0x00 |
|
|
0x02 |
|
|
0x04 |
|
|
0x07 |
|
|
0x10 |
|
|
0x11 |
|
|
0x14 |
|
|
0x15 |
|
|
0x1a |
|
|
0x1e |
|
|
0x1f |