Casio WQV-1 Wrist Camera protocol

[Version 1.01, January 2012]

Physical link characteristics

Basic frame format

A frame is structured in a way that is very similar to the IrLAP format, although the protocol is somewhat simplified (thanks to Daniel Plakosh for pointing this out). A good description of IrLAP frames can be found on Microsoft’s web site in the DDK for Win2k. (I’m omitting the actual reference because deep links into MSDN typically have a very short half life...)

The following table describes the various components of such a frame:


BOF (C0h)


Address byte


Control byte


Data, if any


16-bit Checksum

(high byte first)


EOF (C1h)

Initial connection setup

The following exchange always takes place when a new connection between the PC and the watch is started. Note that the PC always initiates the connection by sending data to the watch (direction ">").

>

FFh

B3h

(possibly repeated)

<

FFh

A3h

<hh> <mm> <ss> <ff>

>

FFh

93h

<hh> <mm> <ss> <ff><assigned address>

<

<adr>

63h

(possibly repeated)

>

<adr>

11h

 

<

<adr>

01h

 

It is interesting to note (though not essential for the protocol) that the <hh>:<mm>:<ss>:<ff> sequence sent by the watch is the time-of-day at the time the request was received, represented as hours, minutes, seconds, and 1/256th of a second.

Upload of all images from the watch

> <

   

(see "Initial connection setup")

>

<adr>

10h

01h

<

<adr>

21h

 

>

<adr>

11h

 

<

<adr>

20h

07h FAh 1Ch 3Dh 01h

>

<adr>

32h

06h

<

<adr>

41h

 

After this prelude, the actual data is "pumped" from the watch to the PC. This happens by repeating the following exchange as often as necessary for getting all the images:

>

<adr>

<get>

 

<

<adr>

<ret>

05h Data

Here, <get> and <ret> are cycled through a list of values to implement some kind of simple packet numbering:

The data stream consists of repetitions of the following structure for each image (note that the size of this structure is 1C3Dh bytes, which also occurs in the prelude as sent from the watch):

struct {
char name[24]; // space padded
unsigned char year_minus_2000, month, day;
unsigned char minute, hour;

unsigned char pixel[120*120/2]; // one nibble per pixel
};

Finally, the exchange is terminated by this sequence:

>

<adr>

54h

06h

<

<adr>

61h

 

>

<adr>

53h

 

<

<adr>

63h

 

Upload of a single image from the watch

> <

   

(see "Initial connection setup")

>

<adr>

10h

00h

<

<adr>

21h

 

>

<adr>

11h

 

<

<adr>

20h

07h FAh 1Ch 3Dh <number of images>

>

<adr>

32h

06h

<

<adr>

41h

 

After that, the image is downloaded just in the same way as for the multi-image download.

Download of an image onto the watch

> <

   

(see "Initial connection setup")

>

<adr>

10h

04h FAh 1Ch 3Dh

<

<adr>

21h

 

>

<adr>

11h

 

<

<adr>

20h

06h

After this prelude, the actual data is sent from the PC in the same format as used by the upload. This happens by repeating the following exchange as often as necessary:

>

<adr>

<put>

05h Data

<

<adr>

<ack>

 

Again, <put> and <ack> are each cycled through a list of values:

Finally, the exchange is terminated by this sequence:

>

<adr>

31h

 

<

<adr>

42h

06h

>

<adr>

51h

 

<

<adr>

41h

 

>

<adr>

53h

 

<

<adr>

63h