SOLUTIONS

MADMATCH SOM PROTOCOL SPECIFICATION

Technical documentation for integrating with the MadMatch SOM video stream and command protocol. Built for reliable, secure communication over TCP/IP or UART.

MadEye MadMatch SOM facial recognition device
VIDEO STREAM PROTOCOL

MadMatch SOM Video Stream Protocol

Each video frame is sent as a binary packet over TCP/IP. The packet begins with a fixed 32-byte header, followed by image data and metadata sections.

32-BYTE HEADER STRUCTURE

The header is fixed at 32 bytes and split into two 16-byte blocks.

Offset Size Field Description
0 – 11 12 Magic String ASCII "MADEYE_EVENT"
12 – 15 4 Reserved Unused (must be ignored)
16 – 19 4 Packet Size Total packet size (big endian)
20 – 31 12 Reserved Unused (must be ignored)
i
All reserved bytes should be ignored by receivers and set to zero by transmitters unless specified otherwise in future revisions.

PACKET LAYOUT (BYTE FLOW)

The structure of each video stream packet.

Offset Section Description
0 – 31 Header (32 bytes) Fixed header
32 – 35 Image Size Length of image data (N bytes)
36 – N JPEG Image Data Encoded video frame
N+1 – N+4 Detection + Identification Optional metadata block
Last byte LRC (Checksum) Checksum of all bytes before it

FACE DETECTION

ValueMeaning
0No face
1Too small
2Bad posture
3Valid face

IDENTIFICATION

ValueMeaning
0None
1Identified
2Not identified
3Low score
4Error

CHECKSUM (LRC)

XOR of all bytes excluding final byte.

char lrc(char* data, int size) {
    int checksum = 0;
    for(int i=0;i