Skip to content

Protocol

mtribiere edited this page Apr 21, 2021 · 3 revisions

The protocol is based on a simple UDP Request -> Reply system. The car is considered as the server and the remote the client.

Datagram description :

+--------+-----//------+
| OPCode |    Data     |
+--------+-----//------+
  1 Byte    X Byte(s)

Message description

OPcode Description Data Example
0x00 Reserved
0x01 Connection request from client "HELLO" in ASCII : 0x48 0x45 0x4C 0x4C 0x4F (5 Bytes) 0x01 0x48 0x45 0x4C 0x4C 0x4F
0x02 Connection reply from server "OK" in ASCII : 0x4F 0x4B (2 Bytes) 0x02 0x4F 0x4B
0x03 Motor command order Data[0] : Speed Command : 0-0xFF
Data[1] : Direction :
- 0x00 : Forward
- 0x01 : Backward
Data[2] : Steering :
- 0x00 : Neutral
- 0x01 : Right
- 0x02 : Left
0x03 0xFF 0x00 0x01

Clone this wiki locally