I have been trying to get telemetry to work with my OpenLRS RX and TX. Been trying out different setups and baud rates but not got it to work.
The transparent serial bridge is working perfectly but when I try to connect the RX to the APM Telemetry port (port 3) I cannot connect via Mission Control. Running a serial monitor I can see traffic - ascii in the beginning saying something like "<startup_mode: ground>" and then binary. Seems to be ok... but not good enough to connect.
I think the problem might be related to bandwidth. OpenLRS supports 750 byte/seconds from the RX to TX. After looking at the documentation and source code I have not figured out how much data MAVLink protocol is configured to send per second.
Does anybody know?
That might explain it.
Leaves me with two options then,
1) investigate the options on lowering the amount of data APM pushes to the telemetry port per second.
2) writing a light version of the telemetry protocol - will not work with the nice Mission Planner interface :(
what is the range you are seeking w/ the OpenLRS? What is your goal in using OpenLRS for telemetry?
I already got OpenLRS to control the airplane. I could buy 2.4 GHz XBee for telemetry but it be really sweet if I could tunnel the telemetry via OpenLRS. It only supports 750 kilobytes/s (not bit) downstream and 100 kilobyte upstream (ground to aircraft).
Looking at the source code there are several occasions where the MAVLink send algorithm is called. In the main loop, medium_loop and slow_loop.
gcs_data_stream_send(<freq min>,<freq max>);
Some questions I hope someone can answer,
- What is the maximum amount of data (in bytes) sent when gcs_data_stream_send is called?
- Would MAVLink protocol still work if the gcs_data_stream_send under fast_loop and medium_loop are disabled?
- Is it possible to strip down the MAVLink protocol on the APM without changing anything in Mission Planner? So for example it only sends position without info like gyro/IMU etc.
I've been pondering on using the OpenLRS as a telemetry-only TX/RX so will be interested to see how you progress with this.
I had another look at the specification for MAVLink.
This means I could in theory send two full payload packets at 2 Hz via the OpenLRS RX/TX link. Very nice.
... back to the garage for some testing! :)
The OpenLRS transparent serial bridge as carrier of MAVLink protocol works. I ran QGroundControl instead of Mission Planner which had lots of more functionality and configuration possibilities regarding telemetry.
Throughput was at 700-850 bytes per second. Not sure if this was limited by OpenLRS or the protocol. But I suffered 30% receive loss and 78% send loss. Tweaking of data link did not help.
Even HUD worked pretty smoothly.
Great work! when you get something going well please do a blog post. For some people this could be a viable XBee alternative.
WRT Mavlink - the APM planner does request data streams at a certain update rate per second - this is exposed on the setup tab as 'Telemetry rates'
Also - is OpenLRS full duplex?
Updated to latest version or APM planner. Setting very low values on the updates for telemetry did not make any difference. No connect. You could see that some packages were coming through but not enough to setup a stable connection.
Switching to QGroundControl made it work instantly.
I will for sure write a blog post about this will all tests are done.
Hmm I wonder if it is the initial request for all the parameters - What does the console say? Michael O will probably have to chime in. It would be great to get Open LRS working with the 'out of the box' software.
Jesper, what part is the connect failing at? i asume getting param 0 of xxx is the error message you get?
to bypass try pressing control-T, after you have started the planner and picked the com port