(6) Send sleep command
6、 Image packet protocol
In the following example, the device address is 0 × 00
1. Initialization (01h)
This command sets the image parameters, such as: whether to use compression method, image format, image size
Note: P1 is 04, fixed, do not change this data
P2 value: set to 0x07 means that the image data is in compression mode and JPEG format, which is fixed and unchanged. The user does not change this data
P3 value: if P2 value is non-0x07 (i.e. non compressed image data), P3 value is valid, set the image size P4 value: P2 value is 0x07, it means that the image data is compressed, and the image format is determined by P4 value
For example:
The host sends AA 00 06 01 04 07 00 07 13, and the normal return message is AA 00 03 0e 01 0f
AA 00 06 01 04 07 00 07 13 means that the camera is initially jpfg image format, and the image format is 640 * 480;
AA 00 06 01 04 07 00 05 11 means that the camera is initially in JPEG image format, and the image format is 320 * 240; AA 00 06 01 04 07 00 03 0f means that the camera is initially JPEG image format, and the image format is 160 * 120;
2. The command is reserved (02h)
3. Register setting (03h)
No use, no access and no settings
4. Getting images
for example
The host sends AA 00 03 04 05 09, and the normal response is AA 00 03 0e 04 12
After waiting for 5.5 seconds for an image to be shot, the host computer will receive the command: AA 00 06 0A 05 Ao CB 00 7a AA 00 03 04 05 09: the command to take a picture
AA 00 06 0A 05 A0 CB 00 7a: it means that the data length of the frame is: oxcba0 = 52128bytes
The host obtains a frame of image data through this command. After receiving this command, it will first return to ACK and then send it
Data command, which contains the size of JPEG image data
5. Snapshot settings (05H), do not use
6. Set packet size 06h)
for example
The host sends AA 00 03 06 02 08, and the normal response is AA 00 03 0e 06 14
AA 00 03 06 02 08; indicates that the packet is set to 512 bytes
AA 00 03 06 01 07; indicates that the packet is set to 256 bytes
AA 00 03 06 04 0A; indicates that the packet is set to 1024 bytes
The host sets the size of each packet of image data sent by the camera through this command. This command must be sent before getting the image command. If it is not set, the default value is 512bytes per packet. It must be noted that the size of the last packet of images is uncertain
7. Set baud rate (07h)
For example:
The host computer through this command refers to the baud rate of the camera. The default is 115200bps. After power on, the host must default baud rate to establish a connection with the camera.
8. Reset (o8h)
9. Sleep / wake up (09h)
AA Ad dr 04 09 P1 P2 Sum
Answer: AA addr030e09sum
Host sends AA 00 04 09 00 09 normal response AA 00 03 OE 09 17
AA 00 04 09 00 00 09: indicates that the camera is in sleep mode
AA 00 04 09 01 00 0A: wake up the camera
10. Image data length (OH)
AA addr 06 0A 05 P1 P2 P3 sum ‖ image size
This command is not sent by the host computer, but sent to the host computer by the camera hair. This command is issued after waiting for several seconds after answering the image command (shooting).
P1, P2, P3 is the size of the frame image, P3, high byte, P1, low byte
AA 00 06 0A 05 00 A0 00 AF: indicates that the size of the image is 0 x 100
AA 00 06 0A 05 A0 D5 00 84: indicates that the size of the image is 0 xd5a0
11. Synchronous (0dh)
Establish handshake connection command with camera
AA Addr 02 OD Sum
Answer: AA addr 03 0e od sum
Host sends AA 00 02 0d 0d normal response AA 00 03 0e 0D 1B
12、ACK(0ch)
Answer command
Format: AA addr 03 0e command ID number sum
for example
AA 00 03 0e 01 0f: reply to initialization command
AA 00 03 0e od Ib: reply synchronous signal
AA 00 03 0e 07 15: answering baud rate setting command
13、NAK(Ofh)
Error response signal of camera or host computer
AA addr 03 0f command ID number sum
14. Infrared command (20h switch)
format
AA Addr 03 20 PI Sum
Answer: AA addr 03 0e 20 sum
For example:
AA 00 03 20 00 20: turn off the infrared light
AA 00 03 20 01 21: it means to turn on the infrared lamp
P1: when it is 0, it means that the infrared lamp is turned off; when it is 1, it means that the infrared indicator light is turned on
15. Image instruction setting instruction (22h)
Format:
AA Addr 03 22 PI Sum
A: AA addr 03 0e 22 sum
For example:
AA 00 03 22 00 22: indicates that the image command is set as best
AA 00 03 22 01 23: indicates that the setting image command is better
AA 00 03 22 02 24: indicates that the setting image command is general
16. Packet fetch instruction (2eh)
Format:
AA Addr 04 2E P1 P2 Sum
Answer: AA addr 02 2E sum
For example:
AA 00 04 2E 00 00 2e: data with package number 0
AA 00 04 2E 05 00 2e: the data with package number 5 is taken
AA 00 04 2E 00 01 2e: the data with package number 256 is taken
P1 and P2 are packet numbers. The packet numbers start from 00 and can be up to 255. Any packet data in the order can be used at will during packet retrieval. You can also use this instruction to retrieve packet data.
AR0230---1/2.7 HD 2M Wide Dynamic
Fatigue Monitoring Camera Module
Motion DV Camera-720P-120 Degree Wide Angle Camera Module
Night Vision Monitoring Camera Module
Monitoring - Doorbell - Law Enforcement Instrument Camera Module
Ten Thousand Trillion Industrial Camera Camera Module
13423810014
0755-29433686
daming@cameras-module.com
2/F, Building H, Zhiyihan Industrial Park, Yuanling Village, Shiyan Town, Baoan District, Shenzhen 518108
We use cookies to enhance your browsing experience. Continuing to browse indicates that you agree to our cookie policy.