This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
doc:crazyradio:usb:index [2013-01-05 23:43] arnaud [Continuous carrier mode] |
doc:crazyradio:usb:index [2013-07-11 17:54] arnaud [Radio protocol] |
||
---|---|---|---|
Line 46: | Line 46: | ||
^ bmRequestType ^ bRequest | ^ bmRequestType ^ bRequest | ||
- | | 0x40 | SET_RADIO_CHANNEL (0x01) | channel | + | | 0x40 | SET_RADIO_CHANNEL (0x01) |
- | | 0x40 | SET_RADIO_ADDRESS (0x02) | Zero | Zero | 5 | Address | | + | | 0x40 | SET_RADIO_ADDRESS (0x02) |
- | | 0x40 | SET_DATA_RATE (0x03) | + | | 0x40 | SET_DATA_RATE (0x03) |
- | | 0x40 | SET_RADIO_POWER (0x04) | + | | 0x40 | SET_RADIO_POWER (0x04) |
- | | 0x40 | SET_RADIO_ARD (0x05) | + | | 0x40 | SET_RADIO_ARD (0x05) |
- | | 0x40 | SET_RADIO_ARC (0x06) | + | | 0x40 | SET_RADIO_ARC (0x06) |
- | | 0x40 | ACK_ENABLE (0x10) | + | | 0x40 | ACK_ENABLE (0x10) |
- | | 0x40 | SET_CONT_CARRIER (0x20) | + | | 0x40 | SET_CONT_CARRIER (0x20) |
- | | 0x40 | SCAN_CHANNELS | + | | 0x40 | START_SCAN_CHANNELS |
- | | 0xC0 | SCAN_CHANNELS | + | | 0xC0 | GET_SCAN_CHANNELS |
- | | 0x40 | LAUNCH_BOOTLOADER (0xFF) | Zero | Zero | Zero | None | | + | | 0x40 | LAUNCH_BOOTLOADER (0xFF) |
==== Set radio channel ==== | ==== Set radio channel ==== | ||
Line 161: | Line 161: | ||
==== Channels scanning ==== | ==== Channels scanning ==== | ||
+ | |||
+ | This function is implemented in Crazyradio version 0.5 and over. | ||
^ bmRequestType ^ bRequest | ^ bmRequestType ^ bRequest | ||
+ | | 0x40 | START_SCAN_CHANNELS (0x21) | Start | Stop | Length | ||
+ | | 0xC0 | GET_SCAN_CHANNELS (0x21) | ||
+ | Scan a range of channels and compile a list of channel from which an ack has been received. The command START_SCAN_CHANNELS should be executed first with start being the first scanned channel and stop the last one. Those should be within 0 to 125. The data is the packet payload sent on each channel, it should be at least one byte long. | ||
+ | All parameters, except the channel, are used unmodified during the scan. If the datarate is set to 2MBPs the scan is done every second channel. To get the list of channel that answered GET_SCANN_CHANNELS should be called just after a scan. Up to 63 bytes are returned corresponding to up to 63 channels on which the packet was acknowledged. | ||
+ | |||
+ | Note. After scanning the channel will be let to the last scanned channel. | ||
==== Launch bootloader ==== | ==== Launch bootloader ==== | ||
Line 178: | Line 186: | ||
===== Radio protocol ===== | ===== Radio protocol ===== | ||
+ | |||
+ | The Crazyradio dongle is currently only operating in PTX mode. To get downlink from the copter the ACK payload is used, which means that data are received only when data are sent. In the case of Crazyflie, to have bidirectional communication even when no data is send, a null packet (0xff) is sent periodically to pull the downlink data stream. | ||
+ | |||
+ | For Crazyflie the communication protocol is described in [[projects: |