after hours struggling with the various docs found on the internet and digging into the code of the minidrone.js library, I finally succeded in making my drone to take off using gatttool on Raspberry Pi.
So it’s time to give back to the community and here below are the commands/actions I had to perform to achieve that. Hope it helps !
Connect to the drone
First, turn on your drone (obvious but don’t forget it :-))
Let’s assume the MAC address of your drone is “E0:BB:E0:BB:E0”.
In order to connect to your drone with your gatttool, you have to start :
sudo gatttool -b "E0:BB:E0:BB:E0" -t random -I (don't forget the "-t random" part).
In order to take off, it seems that you have to enable notifications on some characteristics prior sending any command.
These characteristics are the following : “fb0e”, “fb0f”, “fb1b”, “fb1c” (**).
In order to achieve this, you have to write 0100 to their CCC descriptor (https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.descriptor.gatt.client_characteristic_configuration.xml).
To find these descriptors with gatttool, type : char-desc
You should have something like this:
handle: 0x00bc, uuid: 9a66fb0e-0800-9191-11e4-012d1540cb8e
handle: 0x00bd, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x00be, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x00bf, uuid: 9a66fb0f-0800-9191-11e4-012d1540cb8e
handle: 0x00c0, uuid: 00002902-0000-1000-8000-00805f9b34fb
handle: 0x00c1, uuid: 00002803-0000-1000-8000-00805f9b34fb
For the characteristic fb0e, the CCC descriptor is the handle with uuid containing 2902 right after the handle of uuid 9a66fb0e-0800-9191-11e4-012d1540cb8e, ie. the handle : 0x00bd.
For fb0f, it is the handle 0x00c0, etc…
Once you have the handles of the CCC descriptors for each characteristic mentioned in (**) you have to subscribe to, in gatttool type :
char-write-req 0x00bd 0100
char-write-req 0x00c0 0100
The “take off” command has to be sent to the “fa0b” characteristic.
To get its handle, in gatttool type: characteristics.
You then have a list containing a line like this;
handle: 0x0042, char properties: 0x04, char value handle: 0x0043, uuid: 9a66fa0b-0800-9191-11e4-012d1540cb8e
The characteristic handle you have to use here is the value handle : 0x0043
So, in gatttool , send the take off command to your drone:
char-write-cmd 0x0043 040102000100
If everything is ok, it should now take off .
Here are some resources that help me a lot: