Broadcasting P2P packets

Firmware/software/electronics/mechanics
Post Reply
danteppc
Beginner
Posts: 8
Joined: Tue Mar 09, 2021 9:41 am

Broadcasting P2P packets

Post by danteppc »

Hello!

I'm working on a scenario where one Crazyflie broadcasts P2P packets and two Crazyradios tune in.

Something like the examples/app_peer_to_peer, but instead of CF<->CF, like this CR<-CF->CR.

I thought maybe flashing the P2P app on the Crazyflie and then running crazyradio-firmware/examples/prx.py would work but it didn't. I was only able to make CR-CR and CF-CF work, not CR-CF-CR.

Generally speaking, what are the limits of creating a mesh of nRF24LU1+ and nRF51?

Any thoughts?
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Broadcasting P2P packets

Post by arnaud »

Hi,

This should technically work but the limitation is mostly with the Firmware of the Crazyradio. What you want in that case is a "sniffer" mode that listens to one channel/address and prints all received packets. Unfortunately the Crazyradio does not have such a mode implemented.

There is a couple of way forward though
- (ab)using the PRX mode on newer Crazyradio build. You can install a recent Crazyradio build as described in the crazyswarm project (bullet point 5), and use the python driver from the crazyradio firmware repos to set the radio in PRX mode on the boardcast address. This is not 100% ideal since the crazyradio will send back ACK packet for each p2p packet received, but it should work fine practically.
- Implementing a sniffer mode in the radio. This is more complicated and a bit risky since the Crazyradio does not have a safe bootloader and if you 'brick' it, it needs to be reprogrammed with an SPI programmer (a raspberry pi can be used for that). Not impossible but hard.
- Implementing a sniffer on an nRF51 or nRF52 board. I have a prototype sniffer that runs on BBC Micro:bits V1. The advantage is that these sniffer will be able to receive P2P packets that are bigger than 32 bytes, while Crazyradio can only do 32Bytes packets. If you are interested I can dig my old prototype firmware, it should work on all nRF51 dev board (including the cheap micro:bit).

As a side note, I am interested if you can share a bit more details about your use-case. I am currently designing the next Crazyradio based on an nRF52840 and one of the goal is to more easily serve more complex use-case like P2P and mesh.
danteppc
Beginner
Posts: 8
Joined: Tue Mar 09, 2021 9:41 am

Re: Broadcasting P2P packets

Post by danteppc »

Thank you for this info!

In my case I wanted to receive a signal from CF by two CRs in situation where CRs are blind so the CF acts as router/repeater. In the end I only decided to use CR->CF->CR instead of CR<-CF->CR or CR<->CF<->CR since the code was already there.

My final goal is to create a mesh network made of CFs and CRs (e.g. CR<->CF<->CF<->CR relay chain, range extender). However I'm having second thoughts on moving forward with the current firmware, since it may take quite a time. But now I look at Bluetooth 5 and I see a dedicated specification for Mesh networking:

https://www.bluetooth.com/learn-about-b ... ents/mesh/

I think it's the way forward for drones like Crazyflie to implement BT5 too.
Post Reply