This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
doc:crazyradio:usb:index [2013-08-03 01:54] fred Fixed typos |
doc:crazyradio:usb:index [2020-05-12 14:12] (current) kimberly |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | <WRAP center round important 60%> |
+ | This page has deprecated and moved to the new documentation framework of the main Bitcraze website. Please go to [[https:// | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ====== | ||
The Crazyradio dongle is based on a Nordic semiconductor nRF24LU1 chip. The radio communication is done using the Nordic " | The Crazyradio dongle is based on a Nordic semiconductor nRF24LU1 chip. The radio communication is done using the Nordic " | ||
- | This page documents the protocol used in version 0.40 of the Crazyradio dongle. Future version (up to 1.0) will be kept compatible. | + | This page documents the protocol used in version 0.52 of the Crazyradio dongle. Future version (up to 1.0) will be kept compatible. |
+ | |||
+ | ===== Radio configuration ===== | ||
+ | |||
+ | Crazyradio is configured in PTX mode. It can communicate with Nordic chips compatible with the nrf24L family (at least nrf24L01p, nRF51 and nRF52 tested). In order to communicate with the Crazyradio the target has to be configure correctly: | ||
+ | |||
+ | * PRX mode | ||
+ | * One active pipe with the address configured in the Crazyradio dongle, by default it is 0xE7E7E7E7E7 | ||
+ | * 5 byte address | ||
+ | * Dynamic payload length enable | ||
+ | * Payload with ack enable | ||
+ | |||
+ | The Crazyflie is already configured that way. The relevant source code can be seen in [[https:// | ||
===== USB protocol ===== | ===== USB protocol ===== | ||
Line 166: | Line 184: | ||
^ bmRequestType ^ bRequest | ^ bmRequestType ^ bRequest | ||
| 0x40 | START_SCAN_CHANNELS (0x21) | Start | Stop | Length | | 0x40 | START_SCAN_CHANNELS (0x21) | Start | Stop | Length | ||
- | | 0xC0 | GET_SCAN_CHANNELS (0x21) | + | | 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. | 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. | ||
Line 172: | Line 190: | ||
All parameters, except the channel, are used unmodified during the scan. If the data rate is set to 2MBPs the scan is done every second channel. To get the list of channels 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. | All parameters, except the channel, are used unmodified during the scan. If the data rate is set to 2MBPs the scan is done every second channel. To get the list of channels 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 set to the last scanned channel. | + | <WRAP center round info> |
+ | //**Note**// | ||
+ | After scanning, the channel will be set to the last scanned channel. | ||
+ | </ | ||
+ | <WRAP center round important> | ||
+ | // | ||
+ | On some platform, an empty scan will return a buffer of 64 bytes. This is though to be a USB host implementation bug, see [[https:// | ||
+ | </ | ||
==== Launch bootloader ==== | ==== Launch bootloader ==== |