Tracing packet path and drone processes

Firmware/software/electronics/mechanics
Post Reply
rbresnahan
Beginner
Posts: 7
Joined: Mon Oct 14, 2019 5:46 pm

Tracing packet path and drone processes

Post by rbresnahan »

Hello all, I recently purchased a Crazyflie 2.1 and am looking into P2P communication between drones as relay points. Being quite new to this I am having trouble tracing the order of operations for both the drone-side processes and the handling of packets on the drone-side.

I'd appreciate any insight on how the drones handle the CRTP packets, where to find the main() of the Crazyflie itself, and whether development of this has already progressed and I'm just horrible at finding resources.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Tracing packet path and drone processes

Post by arnaud »

Documentation is generally pretty parse on implementation so the source code if often the best documentation for this kind of things. This is something that we are trying to improve by having a documentation folder in the code repos and by updating it at the same time as we update the code. So hopefully implementation documentation will get better.

If you are interested in P2P communication, you should not use CRTP since it is specifically designed to communicate with one computer. Similarly the main() of the Crazyflie should not be something you actually need to modify since we are using an RTOS. For the sake of completeness, CRTP packets are handled by link drivers initialized in comm.c and handled in crtp.c. The main() function, that starts FreeRTOS and the system task, is in main.c.

We have actually very recently implemented basic P2P broadcast communication and a way to easily run your code in the Crazyflie. We described it in today's blog post: https://www.bitcraze.io/2019/10/app-lay ... unication/. The blog post contains the links to all documentation and examples you should need to get started running code in the Crazyflie and sending/receiving P2P packets. If not, feel free to ask more questions here.
Post Reply