Custom datalink on top of CRTP for Paparazzi UAS
Posted: Thu Dec 26, 2019 5:18 pm
Hello,
I'm trying to implement a custom datalink layer on top of syslink/CRTP to run the Paparazzi UAS communication the same way it was done for PX4 (PPRZ flight stack works fine on the F4 already).
So far I am able to send and receive syslink messages, interpret CRTP packets and implement the minimum replies for initialization. On the ground side, I have a bridge based on the same example than the one for MAVLINK.
My problem is that when I start the ground agent using the python cflib, it starts the sync process to get protocol, TOC, mem, etc. Unfortunately, most of the time one of the request message is lost and the "connected" state is never reached. However, when it happens, I get the expected result (Paparazzi messages stream packed in CRTP data for port 9).
So I have several questions:
- Is there any timing that should be respected to avoid losing messages ?
- Can I skip the init procedure, I'm only providing empty TOC anyway ?
- Can I set a timeout retry at the message level ? (I can see that there is some sort of retry at the low level)
- Is it a good idea to implement my own lower level lib to skip this init part ?
Thank you for your help.
I'm trying to implement a custom datalink layer on top of syslink/CRTP to run the Paparazzi UAS communication the same way it was done for PX4 (PPRZ flight stack works fine on the F4 already).
So far I am able to send and receive syslink messages, interpret CRTP packets and implement the minimum replies for initialization. On the ground side, I have a bridge based on the same example than the one for MAVLINK.
My problem is that when I start the ground agent using the python cflib, it starts the sync process to get protocol, TOC, mem, etc. Unfortunately, most of the time one of the request message is lost and the "connected" state is never reached. However, when it happens, I get the expected result (Paparazzi messages stream packed in CRTP data for port 9).
So I have several questions:
- Is there any timing that should be respected to avoid losing messages ?
- Can I skip the init procedure, I'm only providing empty TOC anyway ?
- Can I set a timeout retry at the message level ? (I can see that there is some sort of retry at the low level)
- Is it a good idea to implement my own lower level lib to skip this init part ?
Thank you for your help.