User Tools

Site Tools


doc:crazyradio:usb:index

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 Both sides next revision
doc:crazyradio:usb:index [2012-05-17 13:53]
arnaud
doc:crazyradio:usb:index [2012-05-17 14:14]
arnaud
Line 12: Line 12:
 | EP1IN/OUT | Bulk    | Data endpoints. Used to send and receive radio packets | | EP1IN/OUT | Bulk    | Data endpoints. Used to send and receive radio packets |
  
-==== Dongle configuration ====+==== Data transfer ==== 
 + 
 +The radio dongle being configured in PTX (emmiter) mode it sends packet to the copter and waits for the acknowledge. The acknowledge can contains a Payload which is the mean to receive data. If the auto acknowledge is disable there is no IN transaction. 
 + 
 +To send a packet the following sequence must be followes: 
 +  * Send the packet to EP1_OUT. Its length should be between 1 to 32Bytes 
 +  * Read the ACK from EP1_IN. The first by is the transfers status and the following bytes are the content of the ACK payload, if any. 
 + 
 +<ditaa> 
 +                       1..32Bytes 
 +               <------------------------> 
 +              +-------------------------+ 
 +To EP1_OUT:   | Packet to be transmited | 
 +              +-------------------------+ 
 +                 1Byte       1..32 Bytes 
 +               <------> <--------------------> 
 +              +--------+----------------------+ 
 +From EP1_IN:  | Status | Ack payload received | 
 +              +--------+----------------------+ 
 +</ditaa> 
 + 
 +The status byte contains flags indicating the quality of the link: 
 + 
 +^ Status  Bit   ^ Role                    ^ 
 +| 4..7          | Number of retransmition | 
 +| 2..3          | Reserved                | 
 +| 1             | Power detector          | 
 +| 0             | Ack received            | 
 + 
 +==== Dongle configuration  summary ====
  
 Crazyradio vendor requests summary: Crazyradio vendor requests summary:
Line 27: Line 56:
 |          0x40 | LAUNCH_BOOTLOADER (0xFF) | Zero     | Zero   | Zero    | None    | |          0x40 | LAUNCH_BOOTLOADER (0xFF) | Zero     | Zero   | Zero    | None    |
  
-=== Set radio channel ===+==== Set radio channel ====
  
 ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^ ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^
Line 36: Line 65:
 The radio channel is set as soon as the setup transaction is completed which takes about 1ms. The new frequency is going to be used for the following transfered packets. Default value for the radio channel is 2. The radio channel is set as soon as the setup transaction is completed which takes about 1ms. The new frequency is going to be used for the following transfered packets. Default value for the radio channel is 2.
  
-=== Set radio address ===+==== Set radio address ====
  
 ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^ ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^
Line 53: Line 82:
 The default address is 0xE7E7E7E7E7. The default address is 0xE7E7E7E7E7.
  
-=== Set datarate ===+==== Set datarate ====
  
 ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^ ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^
Line 65: Line 94:
  
  
-=== Set radio power ===+==== Set radio power ====
  
 ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^ ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^
Line 71: Line 100:
  
  
-=== Configure auto retry (ARD/ARC) ===+==== Configure auto retry (ARD/ARC) ====
  
 ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^ ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^
Line 99: Line 128:
 By default ARD=32Bytes (0xA0) and ARC=3. By default ARD=32Bytes (0xA0) and ARC=3.
  
-=== Continuous carrier mode ===+==== Continuous carrier mode ====
  
 ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^ ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^
Line 110: Line 139:
 | Not 0         | Auto ack enable (default) | | Not 0         | Auto ack enable (default) |
  
-=== Continuous carrier mode ===+==== Continuous carrier mode ====
  
 ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^ ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^
Line 123: Line 152:
 | Not 0         | Dongle in continuous carrier mode | | Not 0         | Dongle in continuous carrier mode |
  
-=== Launch bootloader ===+==== Launch bootloader ====
  
 ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^ ^ bmRequestType ^ bRequest                 ^ wValue   ^ wIndex ^ wLength ^ data    ^
Line 134: Line 163:
 A PC client for the bootloader is part of the Crazyflie ground station program. A PC client for the bootloader is part of the Crazyflie ground station program.
  
-==== Data transfer ==== 
- 
-The radio dongle is configured in PTX mode (in the Nordic terminology) which means that it sends packet to the copter and waits for the acknowledge. The acknowledge can contains a Payload which is the mean to get data from the copter. 
- 
-The packet is to send is sent to the EP1 and the ack status is then received from the EP1. There are no buffering in the radio dongle, the ACK must be received by the PC before the next packet can be sent. 
- 
-<ditaa> 
-                       1..32Bytes 
-               <------------------------> 
-              +-------------------------+ 
-To EP1_OUT:   | Packet to be transmited | 
-              +-------------------------+ 
-                           1..32 Bytes 
-               1Byte <--------------------> 
-              +-----+----------------------+ 
-From EP1_IN:  | Ack | Ack payload received | 
-              +-----+----------------------+ 
-</ditaa> 
- 
-This protocol permits to transfer about 500 packets per seconds. 
 ===== Radio protocol ===== ===== Radio protocol =====
- 
- 
doc/crazyradio/usb/index.txt · Last modified: 2020-05-12 14:12 by kimberly