Understanding The system

Discussions and questions about the Crazyflie Nano Quadcopter
Post Reply
abrahamvee
Beginner
Posts: 19
Joined: Tue Oct 08, 2019 4:27 pm

Understanding The system

Post by abrahamvee »

Hi,
I am currently working with two Crazyflies and using the python client and I am able to connect to them and retrieve data. I've read about P2P communication on the Crazyflie blog, but they are on firmware level using C. What do I need to do to be able to use them in the python client? Or do I need to change to C completely? I am new to the whole API concept and I am trying to make sense out of it,
Thanks a lot,
Abraham
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Understanding The system

Post by arnaud »

The P2P capability of the Crazyflie allows multiple Crazyflies to exchange information without passing by a common connection to a PC. If you already have a connection from a PC to your two Crazyflies, you can already have shared information in this PC so sending P2P packet from python would not make much sense. So the P2P API is indeed only accessible from within the Crazyflie C code and is intended to be used when writing custom code in the firmware.

Technically it would be possible to make a 'bridge' that allows to send and receive P2P packet from python using a Crazyflie at gateway. I guess that would mostly be useful for test and development. This would require writing a new port in C in the Crazyflie firmware. I think this is what rbresnahan might be working on: viewtopic.php?f=9&t=3967&p=18041

It should also be possible to use an upgraded Crazyradio to send and receive broadcast P2P packet to have a PC participating in the network Created by the Crazyflie. In theory the latest master of the Crazyradio firmware is capable of it (it has PRX mode and and a working no-ack). Though I have not investigated that yet.
Post Reply