How to achieve coordination between two SP1MLs?
Good evening,
I've been developing a solution using two SP1MLs to control a quadcopter. I'm using MAVLink as the protocol, however I've been getting too high packet losses between the ground station and quadcopter. Both sides use DMA with double-buffering to read the UART, so the problem probably lies in the wireless link. The problem is that both sides must stream data continuously, according to the following scheme:
Quadcopter ? Ground station
MessageSizeInterval
Heartbeat17 bytes1000 ms
Attitude40 bytes50 ms
Obstacles22 bytes50 ms
Ground station ?Quadcopter
MessageSizeInterval
Heartbeat17 bytes1000 ms
Manual control19 bytes20 ms
Misc params?? bytesOn user request
This scheme works fine when only one side is transmitting, however when both are enabled I have over 90% packet loss. The quadcopter is already waiting for the IDLE flag to transmit, however the problem still persists. The relevant configurations are:
ParamValue
Frequency915MHz
Modulation2-FSK
Data rate150kbps
Baud rate
115200
Frequency deviation
300kHz
Filter
500kHz
FEC
Enabled
Based on that, my questions are:
- How can I organize data flow so to avoid packet corruption? Should I implement a command-response architecture? Wouldn't it have too much overhead?
- Are my RF parameters okay? This is my first experience with sub-GHz radios and I'm not sure these parameters are optimal;
- Is there any other thing that could be optimized? I'd be glad to hear any other misc suggestions you might have about this project.
Thanks in advance,
Pedro
(Sorry for any mistake, English is not my native language)
#sp1ml-spirit1-stm32l1-sub-ghz #stm-32 #stm32-projects #sp1ml