Page 1 of 1

How to add a protocol to the CrazyRadio

Posted: Thu Jun 04, 2015 3:11 pm
by adjavaherian
There's some Deviation code here https://bitbucket.org/goebish/deviation ... ult#cl-249 that I would like to use to add as a protocol for communication with another nRF based quad (cx-10). Where / how exactly do I do this? Is this something I do from the client side, or do I need to add the protocol to the firmware?

Thanks!

Re: How to add a protocol to the CrazyRadio

Posted: Thu Jun 04, 2015 4:37 pm
by whoenig
Cool idea! It should be mainly on the client side (on top of the Crazyradio.py driver). However, not all the features of the nRF are exposed in the current firmware of the Crazyradio. Specifically, in the sample code you posted, dynamic payload is disabled. I believe the Crazyradio enables that feature always. It would be fairly easy to add another flag to the Crazyradio firmware though.
Keep in mind that updating the Crazyradio firmware has a certain risk, i.e. if it fails you might need an SPI programmer to reflash it.

Re: How to add a protocol to the CrazyRadio

Posted: Fri Jun 05, 2015 7:24 am
by tobias
This is very interesting. I've been following the progress for a while and it is really cool that they managed to hack the xn297 transceiver (clone of nRF24). Implementing this in the Crazyradio (nRF24LU1), CF1 (nRF24L01+) or the CF2 (nRF51) should all be possible and would open up some interesting things such as that the cfclient could control the toy drones or the Crazyflie can be controlled by their transmitters.

Re: How to add a protocol to the CrazyRadio

Posted: Fri Jun 05, 2015 3:38 pm
by adjavaherian
Ya, it would be super cool to be able to test out new control features or practice flight without risking harm to your CF2, since it's about 10X more valuable than the CX-10. So where do I start? I guess the python client actually handles the TX protocols down to the CRPA? I think the first step would simply be syncing the CX-10 to the TX. When the CX-10 is powered on, it listens for a control signal from any nRF based TX with the right protocol. You send a thrust max and the quad acks then you send a thrust min and the quad acks and syncs to the TX until it is powered down. I suppose this can be done outside of the cfclient, by simply importing the CR libs? I wanna hack on it this weekend. Thanks!

Re: How to add a protocol to the CrazyRadio

Posted: Mon Jun 08, 2015 7:08 am
by arnaud
Making a new protocol for the Crazyradio will certainly requires to change the Crazyradio firmware. Right now the firmware configures the radio for the Crazyflie. As far as I understand the CX-10 does not configure the nRF24 the same was as we do.

If you want to start hacking the Crazyradio I suggest you start from the last stable version, the trunk is not stable at all.

Re: How to add a protocol to the CrazyRadio

Posted: Mon Jun 29, 2015 11:53 pm
by adjavaherian
@arnaud, which is the latest stable on github? I'm only seeing the master branch. Thanks!

https://github.com/bitcraze/crazyradio-firmware

Re: How to add a protocol to the CrazyRadio

Posted: Wed Mar 16, 2016 1:49 pm
by DoC
Has somebody tried to create a protocol/firmware for xn297 based quadrocopters?

Re: How to add a protocol to the CrazyRadio

Posted: Wed Mar 23, 2016 11:59 am
by tobias
We haven't tried it but I see no reason for it not to work as it has been done by deviationTx. The work lies in updating the firmware. Preferably making a new interface so it can still be configured through the python driver which would make implementing new protocols a lot smother.