This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:crazyflie:crtp [2013-02-22 07:24] macke |
projects:crazyflie:crtp [2021-06-24 16:48] (current) kimberly |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP center round important 60%> | ||
+ | This page has deprecated and will be archived. Please go to [[https:// | ||
+ | </ | ||
====== Crazy RealTime Protocol ====== | ====== Crazy RealTime Protocol ====== | ||
The protocol used to communicate with the Crazyflie is called the Crazy RealTime Protocol, or CRTP in short. It's a simple protocol mainly designed to suit the radio chip used on the Crazyflie but the protocol can also be used on other physical links. | The protocol used to communicate with the Crazyflie is called the Crazy RealTime Protocol, or CRTP in short. It's a simple protocol mainly designed to suit the radio chip used on the Crazyflie but the protocol can also be used on other physical links. | ||
Line 22: | Line 25: | ||
CRTP is implemented in 3 layers: | CRTP is implemented in 3 layers: | ||
- | <code> | + | <ditaa> |
| | ||
| | ||
Line 30: | Line 33: | ||
| | ||
| | ||
- | </code> | + | </ditaa> |
* **CRTP Link** is responsible for transferring the packets between the Crazyflie and the host. It will typically handles packet size and error detection. | * **CRTP Link** is responsible for transferring the packets between the Crazyflie and the host. It will typically handles packet size and error detection. | ||
Line 44: | Line 47: | ||
| | | | ||
| | | | ||
+ | | | ||
| | | | ||
| | | | ||
Line 56: | Line 60: | ||
===== Serial port ===== | ===== Serial port ===== | ||
- | This is mostly for legacy support but has been used during development to log data at higher speeds. The support for using the serial port might be broken currently though. | + | The serial port is configured in 115200 8N1. CRTP packets are sent and received asynchronously |
< | < | ||
+ | 7 | ||
+ | +---+---+---+---+---+---+---+---+ | ||
+ | | | ||
+ | +---+---+---+---+---+---+---+---+ | ||
+ | | | ||
+ | +---+---+---+---+---+---+---+---+ | ||
+ | | Port | ||
+ | +---+---+---+---+---+---+---+---+ | ||
+ | | | ||
+ | +---+---+---+---+---+---+---+---+ | ||
+ | | DATA 0 | | ||
+ | +---+---+---+---+---+---+---+---+ | ||
+ | : : | ||
+ | +---+---+---+---+---+---+---+---+ | ||
+ | | Cksum | | ||
+ | +---+---+---+---+---+---+---+---+ | ||
+ | |||
+--------+--------+--------+--------+--------+--....--+--------+ | +--------+--------+--------+--------+--------+--....--+--------+ | ||
- | | 0xAA | 0xAA | Header | Length | Data0 | Packet | CRC32 | | + | | 0xAA | 0xAA | Header | Length | Data0 | Packet | Cksum | |
+--------+--------+--------+--------+--------+--....--+--------+ | +--------+--------+--------+--------+--------+--....--+--------+ | ||
+ | |||
+ | </ | ||
+ | ^ **Field** ^ **Byte** ^ **Bit** ^ | ||
+ | | | ||
+ | | | ||
+ | | ::: | | ||
+ | | ::: | | ||
+ | | Size | ||
+ | | Data | ||
+ | | | ||
+ | |||
+ | ==== Example ==== | ||
+ | To send setpoints to the [[projects: | ||
+ | < | ||
+ | 0xaa 0xaa 0x30 0x0e 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3e | ||
+ | </ | ||
+ | |||
+ | To ping Crazyflie: | ||
+ | < | ||
+ | | ||
+ | < | ||
</ | </ | ||
- | ^ **Field** ^ **Byte** ^ | ||
- | | | ||
- | | | ||
- | | Size | ||
- | | Data | ||
- | | CRC | |