User Tools

Site Tools


projects:crazyflie:crtp

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
projects:crazyflie:crtp [2013-04-02 15:38]
arnaud [Serial port]
projects:crazyflie:crtp [2015-07-15 16:31]
127.0.0.1 external edit
Line 22: Line 22:
 CRTP is implemented in 3 layers: CRTP is implemented in 3 layers:
  
-<code>+<ditaa>
  +-----------------------+  +-----------------------+
    Application/ports   |    Application/ports   |
Line 30: Line 30:
        CRTP Link       |        CRTP Link       |
  +-----------------------+  +-----------------------+
-</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 56: Line 56:
  
 ===== Serial port ===== ===== Serial port =====
 +The serial port is configured in 115200 8N1. CRTP packets are sent and received asynchronously using the following packet format:
 +
 <code> <code>
   7               0   7               0
Line 70: Line 72:
 +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
 :   :   :   :   :   :   :   :   : :   :   :   :   :   :   :   :   :
-+---+---+---+---+---+---+---+---+ 
-|            DATA 30            | 
 +---+---+---+---+---+---+---+---+ +---+---+---+---+---+---+---+---+
 |            Cksum              | |            Cksum              |
Line 89: Line 89:
 |    Data      4-..  |         | The data in the packet | |    Data      4-..  |         | The data in the packet |
 |   Cksum    4+size  |         | Checksum. Sum of all the bytes, excluding //Start//, modulo 256. | |   Cksum    4+size  |         | Checksum. Sum of all the bytes, excluding //Start//, modulo 256. |
 +
 +==== Example ====
 +To send setpoints to the [[projects:crazyflie:crtp:commander|commander]] send: 
 +<code>
 +0xaa 0xaa 0x30 0x0e 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x3e
 +</code>
 +
 +To ping Crazyflie:
 +<code>
 + ->   0xaa 0xaa 0xf0 0x01 0x01 0xf2     # Sent to the copter 
 + <  0xaa 0xaa 0xf0 0x01 0x01 0xf2     # Received from the copter
 +</code>
projects/crazyflie/crtp.txt · Last modified: 2021-06-24 16:48 by kimberly