Page 1 of 1

How can crazyflies transmit data to dongle

Posted: Tue Mar 27, 2018 7:40 am
by 1016

I am a Master's student.
I have 2 questions.

1. I am getting an error when trying to run> cannot import name 'CachedCfFactory'.
I followed a post ( ... /issues/72) but it still doesn't work.
I have previous version of crazyflie-lib-python and compare it with latest version. There are no CachedCfFactory and it works well in previous version.
So, i am curious about CachedCfFactory's role. Is it important?

2. How can crazyflies transmit data to dongle?
In this post viewtopic.php?f=5&t=1729&p=8932&hilit=prx#p8932, arnaud said Crazyflie currently we keep it in PRX mode all the time. It means that crazyflies only send 'ack' data to dongle. But with python example like basicparam, we can get lots of parameters from crazyflies. How it it possible?

Re: What is CachedCfFactory and How can crazyflies transmit data to dongle

Posted: Tue Mar 27, 2018 8:33 am
by arnaud

1. You are most likely using the example from the git master branch but a released lib. To keep everything in sync you should run "pip3 uninstall cflib && pip3 install -e ." in the lib folder, this way you will get the latest version installed and the example should work. To answer your question: CachedCfFactory creates a Crazyflie object setup to use a folder to cache parameters and log Table Of Content. This greatly reduces the connection time so it is important if you fly multiple Crazyflie at once. If you only fly one, the benefits is not that huge and you can create the Crazyflie object the traditional way.

2. The nRF24 radios can add payload to the acknowledgement packet. So, Crazyradio sends packet to the Crazyflie and the Crazyflie ack the received packet with the data that needs to be communicated back. The drawback is that the client needs to pull data from the Crazyflie by sending "null" packet even if it has nothing to send. The advantage is that it ease greatly timing and synchronization: if you are connecting multiple Crazyflies the Crazyradio will be at the center of a star-network and is synchronizing the communication with everyone, we do not need to care about packet collision. You can find more info about how the radio is operating in the wiki: