Communication protocol
Note
This demo is based on a 5MP camera
From camera to host
Start |
CommandType |
payloadLength |
payload |
Stop |
---|---|---|---|---|
0X55AA |
CMD(bit[8:0]) |
lenght(Little-endian,bit[32:0]) |
payload |
0x55BB |
start |
cmdtype |
payloadlength |
payload |
stop |
---|---|---|---|---|
55aa |
01 |
image length |
image date |
55bb |
55aa |
02 |
info length |
camera info |
55bb |
55aa |
03 |
04 00 00 00 |
yy mm dd version([7:4].[3-0]) |
55bb |
55aa |
05 |
04 00 00 00 |
yy mm dd version([7:4].[3-0]) |
55bb |
55aa |
06 |
09 00 00 00 |
“streamoff” |
55bb |
From host to camera
Start |
Command |
Parameter |
Stop |
---|---|---|---|
0X55 |
CMD |
parameter |
0xAA |
CMD |
Command effect |
parameter |
---|---|---|
0x01 |
Set camera resolution |
|
0x02 |
Start streaming mode |
|
0x03 |
Set brightness |
|
0x04 |
Set contrast |
|
0x05 |
Set saturation |
|
0x06 |
Set EV |
|
0x07 |
Set white balance |
|
0x08 |
Set special effects |
|
0x09 |
Focus control |
|
0x0a |
Exposure control |
|
0x0b |
Gain control |
|
0x0c |
White balance control |
|
0x0d |
Manual gain |
|
0x0e |
Manual exposure |
|
0x0f |
getting information |
Get the basic information of the camera. For example: the resolution supported by the camera, whether the camera supports auto focus |
0x10 |
Taking Pictures |
|
0x11 |
Set sharpness |
|
0x12 |
Debug mode |
|
0x21 |
Stop streaming mode |