I have translated the whole CRTP communication protocol in Ada and I'm receiving radio packets in the CRTP_PORT_LINK.
The crtpservice module seems to handle a sort of acknowledgement between the Crazyflie and the python client, and the packet channel seems to
determine what response the Crazyflie has to send to the client.
In the original C code, there are 3 possible responses:
Code: Select all
typedef enum {
linkEcho = 0x00,
linkSource = 0x01,
linkSink = 0x02,
} LinkNbr;
Code: Select all
void crtpserviceHandler(CRTPPacket *p)
{
switch (p->channel)
{
case linkEcho:
crtpSendPacket(p);
break;
case linkSource:
p->size = CRTP_MAX_DATA_SIZE;
crtpSendPacket(p);
break;
case linkSink:
/* Ignore packet */
break;
default:
break;
}
}
I noticed that, in the client side, I get these messages when I connect to my Crazyflie:
Code: Select all
INFO:cflib.crazyflie:Callback->Connection initialized[radio://0/2/2M]
INFO:cflib.crazyflie:We are connected[radio://0/2/2M], request connection setup
WARNING:cflib.crazyflie:Got link error callback [Dongle communication error (ackStatus==None)] in state [1]