Page 1 of 1

BLE Crazyflie->pc support

Posted: Mon Oct 05, 2015 1:37 pm
by Volt
Hi there

I was wondering if anyone could tell me about BLE support for receiving CRTP packets from the Crazyflie to a client.

I have searched the forums for quite a while for an answer and I have found a few posts saying that BLE is not officially supported in the python client. I am interested in finding out if I could make my own library (e.g. maybe in node) that did have support for reading/receiving TOC, logs, params, etc from the Crazyflie over BLE.

On the wiki (https://wiki.bitcraze.io/doc:crazyflie:ble:index) there is a single line after the first paragraph that implies that this functionality is not working, but that is an old version of the CF2 firmware and I can't find any mention of it in the github issues tracker, so I am hoping that the statement is out of date. As detailed below, I have successfully received some packets from the Crazyflie, which also implies that the statement on the wiki is out of date.

From my efforts so far, I can send CRTP packets to the CF2 using BLE to control the quadcopters thrust, yaw, etc. However the only packets I am managing to receive back are a few jumpled console packets at the beginning of the connection (and they seem to have significant parts of the text missing) E.g:

Console: ------------
Console: \u0000---\n
Console: is up and r
Console: \u0000unning!\n
Console: e51d7d3 (201
Console: \u00005.08.1) CLEAN\n
Console: 35313347061D
Console: 24KB of flas
Console: \u0000h!\n
Console: cation [OK]\n
Console: onnection [O
Console: \u0000K].\n
Console: nnection [OK
Console: \u0000].\n

I have tried reading and writing to the first characteristic listed on (https://wiki.bitcraze.io/doc:crazyflie:ble:index), and then separately reading and writing from the 2nd & 3rd characteristic on (https://wiki.bitcraze.io/doc:crazyflie:ble:index) (CRTPUP and CRTPDOWN) using the adapted protocol. Both methods leave me with just the jumbled up console messages and no other packets.

Anyone able to provide any hints/guidance?

I am looking to purchase a Crazyradio as that is more thoroughly supported, however it would be really nice to get it working over BLE and release a node library that allows both control and logging over BLE!

Thanks in advance for any help!

Re: BLE Crazyflie->pc support

Posted: Tue Oct 13, 2015 9:18 am
by arnaud
Hi,

First of all you should update the NRF51 with the latest version, earlier versions had a bug that prevented the downlink from working properly (it did send something like 8 downlink packets and then stops) With BLE it is currently only possible to update from an iphone, android should follow soon (and PC would actually be great in the future).

What you are seeing looks what to expect from the CRTPDown, but it seems indeed that some packets are missing.

I have implemented the downlink in the ios app and it looks like that: https://github.com/bitcraze/crazyflie2- ... swift#L232 (the packet is decoded when rxCallback is called).

Do you have some code to share?