How can crazyflies transmit data to dongle

Discussions about all things Bitcraze
Post Reply
1016
Beginner
Posts: 6
Joined: Tue Mar 27, 2018 7:10 am

How can crazyflies transmit data to dongle

Post by 1016 »

Hi,

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

1. I am getting an error when trying to run swarmSequence.py-> cannot import name 'CachedCfFactory'.
I followed a post (https://github.com/bitcraze/crazyflie-l ... /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?
Last edited by 1016 on Wed Mar 28, 2018 12:46 am, edited 2 times in total.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

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

Post by arnaud »

Hi,

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: https://wiki.bitcraze.io/doc:crazyradio:usb:index
Post Reply