Single drone multiple radios

Post Reply
Posts: 1
Joined: Mon Apr 20, 2020 12:40 pm

Single drone multiple radios

Post by pgarrido »

Hi everyone,

I was wondering if it is possible to setup a system where a CF2.1 is connected to a Crazyflie Client using a Crazyradio and to another computer with a Crazyradio.

The schema is:

CrazyClient <---> CrazyRadio <---> Drone <---> CrazyRadio <---> Crazyflie lib
|Main controller-----------------------------| |----------------------Secondary system|
|--------------------CTRP---------------------| |--------------------P2P---------------------|

I have been trying with P2P communication but the second radio (the one managed by Crazyflie Lib) is only able to send these kind of packages, so I can have bidirectional communication with the "Main controller" but only unidirectional communication between secondary system and drone. This last communication uses send_packet() of Crazyradio class in order to send messages and a function registered with p2pRegisterCB in the drone.

I have found that there is no receive P2P function in Crazyflie lib, so I was wondering if it possible to enable communication between the second crazyradio and the drone somehow.

Posts: 2037
Joined: Mon Jan 28, 2013 7:17 pm
Location: Sweden

Re: Single drone multiple radios

Post by tobias »

Receiving P2P messages through the Crazyradio might be tricky. The communication protocol is not designed that way but instead designed so that the Crazyradio is always transmitting (PTX mode in shockburst protocol) and receiving data in the ack packet from the Crazyflie. There is a listening mode though, PRX where you could receive the P2P information but the driver would have to be redesigned to get it to work. Also you would probably want this to be implemented in the firmware of the crazyradio for it to be fast enough. It would have to be listening when not transmitting and this switch might take to much time to do over USB.

If you just want to listen or "sniff" the P2P communication that might be a bit easier and you could setup the Crazyradio on PRX mode with the right channel, address and datarate in a python script. The P2P communication uses address 0xXXXXXXXXFF where XX would be upper address used by the Crazyflie, normal 0xE7E7E7E7.
Post Reply