TrackingHardware
Software
Mega PlanEtc. |
Main /
V2PacketFormatsSerial PacketsThe startup handshake is two-part. The Uno sends an ACK message to initiate. The Pi responds with a CFG packet. The Uno then responds with an ACK. Any transmission errors result in the sending of a NAK. Upon receipt of a NAK, the receiving system will automatically resend the last packet transmitted. Socket connected systems may send packets directly through on a retransmit message. For these messages, described in the later section on socket packets, there is no checksum. That is computed on the Pi in the retransmit process. This simplifies the client code necessary for controlling the robots. The general framing is as follows:
Sample Packet - Move Foward 10cm/s
Header The header/synchronization sequence uses three sequential octets consisting of 0xBD. This byte was selected because it would not naturally appear in packets.
Length This is a single octet and represents the number of octets in the payload. Checksum This is a single octet and is the XOR combination of all octets in the payload and the length. Payload
The valid payloads are as follows:
TCP Socket PacketsThe general framing is as follows:
Sample Packet - Retransmit to Uno - Close Claw
Header The header/synchronization sequence is handled by TCP. Packet Length This is the total length of the Data Data The valid data segments are as follows:
|