--- tags: LRWA2 Protocol --- # MCU to IPC Protocol ## Baudrate 115200 bps ## Packet Format |<font color=blue> Header</font> | <font color=blue> DeviceId </font> | <font color=blue> Timestamp</font> |<font color=blue> Checksum </font> | |----------|------|--------|--------------------| |1 byte|1 byte|8 byte|1 byte| ## Field Format * **Header** 0xFA * **DeviceId** 0x01 - Sensor A 0x02 - Sensor B * **Timestamp** (unsigned long 8 byte in x64 platform) <font color=blue> Unit: ms Byte Order: Little-Endian </font> Timestamp value is the counter from MCU booting * **Checksum** (unsigned char) Sum of 8 bytes Timestamp ```javascript=1 byte[] packet = new byte[11];//the packet from RS232 // // Do packet capture.... // for(int i = 2 ; i <= 9;i++) checksum += 0xFF&packet[i]; ```