02 - Download Picture

Command Parameter Meaning Response Data
00 02 02 00 xx xx (int) Frame no <\td> Download Picture 00 03 nn nn xx-xx Packet of picture data -variable length 1-512

Description

Asks the camera to send the image referred to by Frame-no. The full image as stored on the card is transferred. The format of the image is referred to as EXIF. I don't really know what EXIF is exactly, but for practical purposes it seems identical to JPEG, and can in fact be loaded by any ordinary JPEG viewer.

Parameters

The only parameter needed is the frame number. This is an integer between 1 and the number of frames stored in the camera. Note that numbering starts from 1 and not from 0. Thus there is no frame 0.

Response

The camera will respond by sending a number of packets according to the low level protocol. The low level protocol must take care to check that the correct BCCs and ACKS are received, and must also acknowledge each packet received.

Normally each packet will be of 512 bytes except the last one which may have any length less than or equal to 512.

Hints

When storing the received data, remember that the received packets start with the four byte reponse header (00 03 nn nn). Make sure that you do not include these in the file you write to disk, as the image would then become garbled. Also make sure that the low level protocol is doing its job of removing control codes and so on.

If you want to know how big a file to expect before starting the download (for example to know how much memory or disk space to allocate), use command 17 which gives you the file size of an image.

If you want to know the name of an image befor downloading and image, use command 0a which gives you the name of a particular frame. This may be particularly necessary since the MX-700/500 do not show the frame number on the display - only the filename is shown. Thus you would not know for sure which picture you will download without something to correlate the filename with the frame number.


07 - Change baud rate of serial port

Command Parameter Meaning Response Data
01 07 01 00 xx (byte) Speed <\td> Change serial port speed 00 08 01 00 xx (byte)Result, 0=ok

Description

Sets the serial port of the camera to a different speed. Each time the camere is switched on, or changed from any mode into PC mode, the speed of the serial port is set to automatically to 9600. If you want to use a faster speed, then this command allows you to change the speed, apparently upto 115200 baud.

Parameters

A single byte represents the baud rate. The value of this byte is encoded as follows: I am not sure if all of them supported - I have used 0, 2, 4 and 7 succesfully

Response

A single byte in the respons indicates wether the result was ok. A value of zero means OK, while any non zero means that the command has failed - and thus the speed has not been changed at all.

Hints

It is important that the correct procedure is followed in using this command. It actually took me quite some time to get it to work reliably. The sequence is as follows: Note that the speed of the port is not changed just after the command is sent, but rather after the EOT is sent. This of course means that the ACK and the response are received at the original speed. Also, the computer must send its ACK and also the EOT at the 'old' speed. The first character to be sent at the new speed is the final ENQ sent.

I have found that speeds higher than 19200 make no improvemenet in the time taken to transfer an image. It appears that this is not a shortcoming of my software since the processor appears 75% idle during the transfer when the speed is above 19200 and upto 95% idle at the lower baud rates. If you find differently, please let me know, so that I look more carefully at my program.

In your program, always check for a speed setting of 9600, before trying to send the speed command. If the camera is working at a baud rate different to the one at which you are sending the command, then obviously the camera will not understand it and the speed will remain unchanged. The best way would be to send ENQs at different speeds, starting at 9600 (since that is the most likely) until you get a good response. Then if the speed is not what you want go through the above procedure to reset the speed to that which you desire.


0A - Get Picture Name

Command Parameter Meaning Response Data
00 0A 02 00 xx xx (int) Frame no <\td> What is picture name of frame # 00 04 nn 00 xx-xx Filename of the frame in ascii

Description

Gives you the file name of a particular picture in the card.

Parameters

You supply the frame number which is an integer (16 bits).

Response

An ascii string corresponding to the file name of the picture.

Hints

This may be particularly necessary since the MX-700/500 do not show the frame number on the display - only the filename is shown. Thus when using the camera you will normally know only the filename of a particular picture and not the number. However, all the commands refer to the framenumber, so this is the only way you can identify a frame number with a particular photo on the display.

0B - Get no of frames

Command Parameter Meaning Response Data
00 0B 00 00 none <\td> How many pictures in camera 00 06 02 00 xx xx (int)No of pictures in camera

Description

Enquires about the number of frames stored in the camera

Parameters

None

Response

Gives the number of frames in the camera. The result is an integer (16 bit)

Hints

This is useful when for example you want to download all the pictures in the camera.

0E - Upload picture

Command Parameter Meaning Response Data
00 0E nn nn xx-xx picture data packet- variable length 1-512<\td> Upload Picture None ? -

Description

With this command you may upload pictures from the computer into the camera. Note that you must first use the command
0F - Set name for upload, to tell the camera under what name to store the image. The image is transferred in blocks of upto 512 bytes, as described in the low level protocol.

Parameters

Blocks of image data upto 512 bytes

Response

This command seems to give no response (apart from the ACK)

Hints

Remember that the 2 bytes for the command type and the two bytes for the length indicator must be included at the beginning of each packet.

The image to be uploaded must either be exactly 640x480 or exactly 1280x960. Images with other picture sizes will still be accepted and stored on the card, but will not show on the LCD - instead they will cause a message "! Read error" to appear.

The camera will not create previews for images uploaded by this command. This means that if you view the image on the LCD in the Thumbnail (3x3 image) mode, a blank frame will be shown for the picture. Also, any PC software you use which gives you thumbnail previews before loading an image will also not show the previews. The picture is however displayed normally on the LCD in the normal mode. If you want your images to have a preview, then you must use a separate command to upload the preview - however, I haven't managed to find out how to do this.


0F - Set name for upload

Command Parameter Meaning Response Data
00 0F nn 00 xx-xx String - variable length<\td> Set name for upload 00 10 01 00 xx (byte) response

Description

This command must be sent before starting upload of an image. With it you set the name for the image which you will be uploading.

Parameters

The only parameter is the name string which must be of the form "DSCxxxxx.JPG", where xxxxx are digits 0 to 9, for example "DSC00124.JPG". Any other name format will not be accepted.

Response

A single byte is returned. I have found the following meanings:

Hints

This command must always be sent before uploading. In case a response 03 is received, then you might as well abort the upload since the data will not be accepted. The camera will still send ACKs to the packets you send, but it will not store the data.

17 - Get Image size in bytes

Command Parameter Meaning Response Data
00 17 02 00 xx xx (int) Frame no <\td> What is filesize of image # 00 18 04 00 xx xx xx xx (long) size of image in bytes

Description

This command lets you know the file length of an image before actually downloading it.

Parameters

You give the image number of which you want to know the size.

Response

The file size is returned as a long integer whose value corresponds to the length of the file in bytes.

Hints

This command is useful so that before downloading you can know in advance how much space to allocate for the incoming data. It will also give you some idea of how long it will take to download.

27 - Shoot

Command Parameter Meaning Response Data
00 27 00 00 none <\td> Shoot a picture 00 28 04 00 xx xx yy yy (int) xx= frame number where image is stored, (int)yy - unknown meaning

Description

Orders the camera to take a picture. The flash must have been prepared previously with
command 34

Parameters

This command has no parameters. Any settings you want to make (such as flash mode for example), must be done previously with separate commands.

Response

The frame number into which the new picture was stored is returned as an integer. Additionally, a second integer is returned, which I think is a status result. However I have no idea yet how to interpret this. The response will take some time. The command is acknowledged immediately, but the response message is only given after the picture is taken. Due to the time it takes for the shooting cycle, the response may thus be delayed by several seconds.

Hints

Due to the long response time, make sure that your low level protocol does not time out while waiting for the respons. The command is acknowledged immediately, but the response message is only given after the picture is taken. Due to the time it takes for the shooting cycle, the response may thus be delayed by several seconds.

If you do not actually need the flash, it seems that you may omit the Charge Flash command. However, I do not know if that would be correct, nor if it has any side effects.

I have as yet found no way to put the camera in standby (as in when the trigger is partially pressed).


32 - Set Flash Mode

Command Parameter Meaning Response Data
00 32 01 00 xx (byte) Flash mode<\td> Set flash mode 00 33 01 00 xx (byte) result 0=ok

Description

Sets the operating mode of the flashgun. There are four modes:

Parameters

A single byte indicating the flashmode is given. The values are:

0=Disabled, 1=Forced, 2=Redeye reduction, 3=Auto

Response

The response is a single byte which is 0 for OK, or 1 if the command failed.

Hints

None

34 - Charge Flash

Command Parameter Meaning Response Data
00 34 02 00 xx xx (byte) intensity(?)<\td> Charge flash 00 ???????

Description

Before shooting a picture, this command must be executed. It prepares the flashgun for action.

Parameters

The parameter for this command is said to be the flash intensity, however I seem to be getting identical results whatever I put in this parameter. I am still trying to find out more about this.

Response

I have not yet looked at the response of this command

Hints

Due to the long response time, make sure that your low level protocol does not time out while waiting for the respons. The command is acknowledged immediately, but the response message is only given after the flash has been fully charged. The response may thus be delayed by several seconds.

If you do not actually need the flash, it seems that you may omit this command before shooting. However, I do not know if that would be correct, nor if it has any side effects.

Occasionally, it has happened that as a result of this command, the camera 'hangs' and will refuse to respond to anything except power off, i.e. even the thumbweel mode switch doesnt work. This has happened only rarely - if you notice this or have any idea how this happens (or how it can be prevented), please let me know.


__ _______

Command Parameter Meaning Response Data

Description

Parameters

Response

Hints


Page last updated on 6th June 1999


Back to first page , Back to home page