Thread Tools
Aug 30, 2019, 06:41 AM
ErskyTx Developer
Mike Blandford's Avatar
Thread OP
OK, I have fixed the SBUS range, and also which bit is the failsafe bit in the SBUS packet. I've also added the lost frame bit to the SBUS packet.
Interesting to see the level of lost packets with the X9Lite and the RX4R in range test mode, which may well have a better performance that an "old" D8R.
I reckon, from your graph, you had around 1000 lost packets in the first 30 seconds (out to about 240m).
The D8R performance may well have been affected by the BT module, and may even have been affected by the telemetry transmissions of the 900MHz receiver.

I'll test my changes and post a new version later today.

Mike
Sign up now
to remove ads between posts
Aug 30, 2019, 10:31 AM
Carbo (-nator) ;-)
Quote:
Originally Posted by Mike Blandford
I reckon, from your graph, you had around 1000 lost packets in the first 30 seconds (out to about 240m).
That's probably because I started the flight in rangetestmode 0.1mW. Without this test frame loss would have started from 1200m. I am looking forward to the result in a clean environment.

Btw. the LQ sensor works with SPort only, not with hub protocol. I will continue to log your frame loss sensor.
Aug 30, 2019, 10:36 AM
ErskyTx Developer
Mike Blandford's Avatar
Thread OP
I've posted a new version of the firmware with those changes in and also fixed a problem with reading the links at the end of binding.

I'll see if I can add a link quality indicator based on the code to which you linked, if I get that working I'll send it with application ID 5100 as well.

If it helps, I only send the total dropped packet value once per second, so the difference from one second to the next is the number of dropped packets in one second, and there should be 111 packets received in one second.

I see the X8R sends the lost packet bit, so I'll see if I can monitor that as a comparison.

Mike
Aug 30, 2019, 10:46 AM
Carbo (-nator) ;-)
That's just my convenience, the original version is already useable. On the other side sending the frames every second only sounds easy to handle. And does not use much bandwidth.
Aug 30, 2019, 01:26 PM
Carbo (-nator) ;-)
After flashing V2 I have bound again in SBus mode. iNav was changed to output FrSky- (hub-) telemetry instead of SPort telemetry. To make it short, everything went flawlessly. Even the iNav telemetry LUA script worked like it does with D16 and SPort telemetry. Some sensor names are wrong, but this is another story, nothing to do with this firmware.

To build up trust, I changed the RX number in flight to test failsafe and RTH, this worked (failsafe bit was set perfect).
Not sure why, but I could not load my waypoints from EEPROM, so I made only 2 LOS flights. Third flight was in rangetestmode, where the quad managed about 200m when failsafe hit, it came back and landed autonomous. X9D, internal XJT, FCC 170317, antenna vertical. No FPV or other TX on board. This should allow several km with default power setting.

Still lost frames look strange. Seems there is a constant number even in relatively close distance. Also some steps can be found in the lost frames graph.

Next flight tomorrow is longer.

Great work, Mike!
Last edited by Allerhopp; Aug 30, 2019 at 01:36 PM.
Aug 30, 2019, 05:48 PM
ErskyTx Developer
Mike Blandford's Avatar
Thread OP
Currently, when a frame is lost, the Rx steps on to the next channel so should pick that up.
If 50 frames in a row are lost, then it goes in to "resync" mode, picking a single channel and waiting for that to receive. This could take up to 47 frame times as the protocol uses 47 channels.
If more than 100 frames are lost in a row, it enters failsafe.
When in resync mode, every 50 frame times, it moves on to another channel in case the one it was looking at is "jammed".

If two frames are missing in a row, then it swaps to the "other" antenna, and after 2 more missing it swaps again.

At least this is what it is supposed to do, but I could have the code wrong!

Mike
Aug 31, 2019, 12:50 AM
Carbo (-nator) ;-)
Constant frame loss did not happen, when it was bound to my X9E with version 1. The actual test was made with my X9D, to use a vertical antenna and because X9D has a better radiation overall. But it is running OpenTX2.3nightly with the faster "heartbeat" protocol (you were involved imo.). I will test with a former OpenTX, to see, if this makes a difference.
Aug 31, 2019, 07:06 AM
Carbo (-nator) ;-)
Seems lost frames are not related to TX firmware version. This is a 300m waypoint flight with OpenTX2.2.3. The lost frame steps are always 100 frames.
Aug 31, 2019, 04:47 PM
ErskyTx Developer
Mike Blandford's Avatar
Thread OP
I've posted a new test version of the firmware. I caught the "100 jump" in lost packets on the debug output so I've fixed that. It was caused by a partial frame being received then causing loss of sync, which then led to "miss 50 frames" then need around 47 more to re-sync. I now don't lose sync, and if sync is lost, I predict better where in the hopping sequence to restart listening to, possibly, avoid needing 47 frames to resync.
I've also fixed some problems with the sequencing of telemetry frames that caused incorrect telemetry data occasionally.
I now also have "hooks" in place so the Rx receives SPort telemetry from the Tx. This may allow parameters to be set from a script on the Tx in the future.
Three telemetry values are now returned:
52F0 - total lost packets, sent once per second.
52F1 - total CRC errors on received packets, sent once per second.
52E0 - Percentage of lost frames, sent every 300mS

I'm not certain the RSSI calculation matches the RSSI values from a FrSky receiver, I'll need to investigate that carefully when I get time. I'll probably need to put a logic analyser on a X8R to see what it is doing.

Mike
Sep 01, 2019, 12:13 AM
Carbo (-nator) ;-)
Quote:
Originally Posted by Mike Blandford
I'm not certain the RSSI calculation matches the RSSI values from a FrSky receiver, I'll need to investigate that carefully when I get time. I'll probably need to put a logic analyser on a X8R to see what it is doing.
From my point of view the important values at the end of range are perfect. Failsafe happened with about 36dB, this matches many other FrSky RX and matches to the "default" RSSI warnings. The values on the high side are to high compared to FrSky. Imo FrSky is damping RSSI on the high side to stay below 100 (what led many users to the wrong assumption, RSSI is a percentage). If i assume, failsafe happens in 2560m with 36dB, the calculation with +6dB halving distange would give this values:
Name: RSSI.jpg
Views: 7
Size: 18.4 KB
Description:
From lay view I would not invest much time in RSSI management. If the RSSI spikes in safe distance are reduced due to your changes some damping on the high side makes RSSI a perfect match.
Sep 01, 2019, 01:00 PM
Carbo (-nator) ;-)
Wow, this is an impressive one. First part was flown in rangetestmode 0.1mW and went to about 330m. Failsafe happened where RSSI telemetry broke, again at about 36dB RSSI. Next part is a 1km waypointflight with minimum RSSI 50dB.
330m in rangetestmode calculates to about 9km total range. About the same result with 50dB in 1km. Possible only with optimal antenna arrangement of course. This is nearly the performance of the elder X-RX like X8R (400m) and about half the performance of the new RX like RX4R (700m). Lost frames in % is imo the best display format.
Name: RT_WP1km.jpg
Views: 25
Size: 223.1 KB
Description:
Again it seems you hit the default failsafe RSSI perfectly, but the higher values should be scaled smaller. If you watch, where I switched rangetest off, it is far more than 30dB (right column). There is some fluctuation at this point, but I estimate about 40dB difference, it is definitely more than it should be.
Name: -30dB.jpg
Views: 17
Size: 67.3 KB
Description:
If you think, your firmware works with D4R also, I'm standby for testing
Edit: presumably it makes sense to test the LBT version too, I will try it tomorrow.

Thank you!
Bernd
Last edited by Allerhopp; Sep 01, 2019 at 01:26 PM.
Sep 01, 2019, 03:04 PM
ErskyTx Developer
Mike Blandford's Avatar
Thread OP
That does look very good. The 1km test shows only a few dropped frames, and they may be due to the need to switch antennae.

I'll adjust the calculation of RSSI. I'm not sure why the existing calculation is what it is, and there is a 3-4dbm jump in the middle.
My new calculation will keep 36 as 36.
43 will drop to 42
47 will drop to 45
81 will drop to 71
118 will drop to 100
127 will drop to 107

I don't know about a D4R, I've never seen one. Also, I only have SBUS as an option for channel 8, so it won't appear on the D4R output(s), unless the outputs connect differently to the processor.

If anyone with a D4R is prepared to open it up and post some high resolution pictures so I can try to see what connects where I can give it a go.

Mike
Last edited by Mike Blandford; Sep 01, 2019 at 03:09 PM.
Sep 01, 2019, 03:09 PM
Registered User
midelic's Avatar
Mike,
See here.
https://fishpepper.de/2016/09/07/frs...ut-and-pinout/
Sep 01, 2019, 05:57 PM
ErskyTx Developer
Mike Blandford's Avatar
Thread OP
Thanks for that midelic.
It looks like the D4R-II will run the same code as the D8R-II. At present, you won't get any SBUS output. I should be able to do a quick change so you may be able to get SBUS out on the Tx signal, but you will lose hub telemetry input.
I think I will be able to allow channel 3 to output SBUS, but that will need some re-mapping of timers to I/O pins, and use a different timer/ timer channel for the SBUS output so will take a bit longer.

Mike
Sep 02, 2019, 01:37 AM
Carbo (-nator) ;-)
Hard to say, but eventually there are more D4Rii out there than D8R. A lot of copter pilots use(d) them with PPM. On the other side you can buy R-XSR for less than 20$. Only you can decide, if it is worth the effort.


Quick Reply
Message:

Thread Tools

Similar Threads
Category Thread Thread Starter Forum Replies Last Post
Help! Snapper7 Firmware Flash or Change D16 to D8 hootsmin Micro Multirotor Drones 4 Jul 18, 2018 04:33 PM
Discussion Frsky D8 or D16 iwchris Radios 1 May 19, 2017 12:18 PM
Question From Taranis EU to having D8, D16 and LR12? Hobgoblin76 Radios 42 Apr 26, 2017 11:14 AM
Question FrSky X8R will only bind in D8, I want D16 Dutch RC Beginner Multirotor Drones 4 Apr 08, 2017 05:39 AM
Help! Noob trying to bind! Taranis mode D16, no D8 for D4R-ii! Freshage Radios 1 Oct 24, 2016 12:11 PM