ERSKYTx (was ersky9x) Questions

erskyTx runs on many radios and upgrade boards
ersky9x was a port of er9x for use on the sky9x board.
User avatar
MikeB
9x Developer
Posts: 17564
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKYTx (was ersky9x) Questions

Post by MikeB » Mon Jun 21, 2021 10:55 am

I had to do a fiddle for 200Hz that resulted in a 100uS error every second. This causes the offset error.
I've done a change that should fix that, so a new test version is posted.

How long does it take for 25Hz and 50Hz to lock in? Is it too long?

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!


yds
Posts: 34
Joined: Fri Apr 10, 2020 6:38 pm
Country: United States
Location: Dirtee Jerzee

Re: ERSKYTx (was ersky9x) Questions

Post by yds » Mon Jun 21, 2021 11:47 am

spinorkit wrote:
Mon Jun 21, 2021 9:05 am
25 Hz 0:50 0x9C40 +/- counting down then eventually +/- < 0xf
are you sure 25Hz is still supported on the ExpressLRS side? IIRC, when I was sending you feedback about `ELRS.bas`, selecting 25Hz on ELRS 2.4GHz module would unceremoniously switch to 50Hz -- I think you dropped the 25Hz option for 2.4GHz from ELRS.bas cuz of that.. :?:

yds
Posts: 34
Joined: Fri Apr 10, 2020 6:38 pm
Country: United States
Location: Dirtee Jerzee

Re: ERSKYTx (was ersky9x) Questions

Post by yds » Mon Jun 21, 2021 1:09 pm

MikeB wrote:
Mon Jun 21, 2021 10:55 am
How long does it take for 25Hz and 50Hz to lock in? Is it too long?
With my ELRS 2.4GHz module switching among 150Hz, 250Hz & 500Hz is fast enough not to really notice..

150Hz to 50Hz gets the offset into 0x2000, then it counts down to and settles in single digit territory same all the other PktRates

I believe this has more to do with how quickly the TX and RX re-bind at the new PktRate than anything on the ErSkyTX side.. :?:

yds
Posts: 34
Joined: Fri Apr 10, 2020 6:38 pm
Country: United States
Location: Dirtee Jerzee

Re: ERSKYTx (was ersky9x) Questions

Post by yds » Mon Jun 21, 2021 2:18 pm

MikeB wrote:
Sun Jun 20, 2021 6:45 pm
Not sure about 200Hz, I'll look at the code again.
The 25Hz is too slow at present. My timer uses a 0.5uS resolution and I alternate between 2.5mS (5000 period) and "the rest". In the case of 25Hz "the rest" is 37.5mS giving a period of 75000, which is too large for a 16 bit timer, so I default to 4mS (250Hz).

I'll see if I can sort this, but I currently rely on the 5000 count for the 2.5mS for running the mixer at the right time.
Mike, something @pafleraf mentioned in EdgeTX discord about changes made for the upcoming initial release vs OpenTX:
pafleraf wrote:
Mon Jun 21, 2021 1:15 pm
Plus, we increased the max interval, so that ELRS can use the 15Hz mode (long range)

yds
Posts: 34
Joined: Fri Apr 10, 2020 6:38 pm
Country: United States
Location: Dirtee Jerzee

Re: ERSKYTx (was ersky9x) Questions

Post by yds » Mon Jun 21, 2021 2:59 pm

OK, I knew this all sounded familiar.. it was @pafleraf over on EdgeTX discord asking me to test ELRS at 25Hz on the T-Lite with ExpressLRS 2.4GHz module:
yds wrote:
Sat Jun 05, 2021 1:15 pm
25Hz gets bumped to 50Hz when I press ENTER
I suppose ExpressLRS 900MHz TXen can go all the way down to 15Hz PktRate, while the lowest 2.4GHz can do is 50Hz :?:


spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: ERSKYTx (was ersky9x) Questions

Post by spinorkit » Tue Jun 22, 2021 8:55 am

MikeB wrote:
Mon Jun 21, 2021 10:55 am
I had to do a fiddle for 200Hz that resulted in a 100uS error every second. This causes the offset error.
I've done a change that should fix that, so a new test version is posted.

How long does it take for 25Hz and 50Hz to lock in? Is it too long?

Mike
Thanks Mike, this fixes the 200 Hz.
ersky9x-B5r223 21.06.2021 11:45:41
200 Hz 0:200 0x1388 +/- < 0xf
100 Hz 0:100 0x2710 +/- < 0xf
50 Hz 0:50 0x4E20 counting down then eventually +/- < 0xf
25 Hz 0:50 0x9C40 +/- counting down then eventually +/- < 0xf

When set to 50 Hz and powered off, my 'PRO typically takes ~90 s to count down after start up. I'm not too concerned about that.

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: ERSKYTx (was ersky9x) Questions

Post by spinorkit » Tue Jun 22, 2021 9:04 am

yds wrote:
Mon Jun 21, 2021 2:18 pm
MikeB wrote:
Sun Jun 20, 2021 6:45 pm
Not sure about 200Hz, I'll look at the code again.
The 25Hz is too slow at present. My timer uses a 0.5uS resolution and I alternate between 2.5mS (5000 period) and "the rest". In the case of 25Hz "the rest" is 37.5mS giving a period of 75000, which is too large for a 16 bit timer, so I default to 4mS (250Hz).

I'll see if I can sort this, but I currently rely on the 5000 count for the 2.5mS for running the mixer at the right time.
Mike, something @pafleraf mentioned in EdgeTX discord about changes made for the upcoming initial release vs OpenTX:
pafleraf wrote:
Mon Jun 21, 2021 1:15 pm
Plus, we increased the max interval, so that ELRS can use the 15Hz mode (long range)
Hi yds,
The master branch ELRS.lua still only goes down to 25 Hz for the 900 MHz chips:

Code: Select all

local SX127x_RATES = {
    list = {'25Hz(-123dbm)', '50Hz(-120dbm)', '100Hz(-117dbm)', '200Hz(-112dbm)'},
    values = {0x06, 0x05, 0x04, 0x02},
    rates = { 25, 50, 100, 200 },
}
local SX128x_RATES = {
    list = {'25Hz(-120dbm)', '50Hz(-117dbm)', '150Hz(-112dbm)', '250Hz(-108dbm)', '500Hz(-105dbm)'},
    values = {0x06, 0x05, 0x03, 0x01, 0x00},
    rates = { 25, 50, 150, 250, 500 },
}
They may well have disabled 25 Hz for 2.4GHz though.

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: ERSKYTx (was ersky9x) Questions

Post by spinorkit » Tue Jun 22, 2021 9:10 am

MikeB wrote:
Sun Jun 20, 2021 6:45 pm
The 25Hz is too slow at present. My timer uses a 0.5uS resolution and I alternate between 2.5mS (5000 period) and "the rest". In the case of 25Hz "the rest" is 37.5mS giving a period of 75000, which is too large for a 16 bit timer, so I default to 4mS (250Hz).

I'll see if I can sort this, but I currently rely on the 5000 count for the 2.5mS for running the mixer at the right time.

Mike
Mike,
Personally, I don't think it is worth changing the timer code to go much below 50 Hz. I don't see any down-side to sending packets at a harmonic of the RF packet rate given it still locks. If the ELRS master does end up supporting 15 Hz on 900 MHz, you could go to 45 Hz perhaps.

yds
Posts: 34
Joined: Fri Apr 10, 2020 6:38 pm
Country: United States
Location: Dirtee Jerzee

Re: ERSKYTx (was ersky9x) Questions

Post by yds » Tue Jun 22, 2021 4:12 pm

spinorkit wrote:
Tue Jun 22, 2021 9:10 am
Personally, I don't think it is worth changing the timer code to go much below 50 Hz. I don't see any down-side to sending packets at a harmonic of the RF packet rate given it still locks. If the ELRS master does end up supporting 15 Hz on 900 MHz, you could go to 45 Hz perhaps.
Mike, what he said ^^^ practically speaking ELRS on 915MHz at 50Hz PktRate already flies farther than any video link can handle.. 8-)

at first I thought that 15Hz was a typo, but @pafleraf used 15Hz in several messages.. perhaps there are plans to have ExpressLRS go that slow to eek out a even more range? I believe TBS Crossfire also has some mode it dips into below 50Hz.. maybe 4Hz -- something crazy slow..

Mike, FYI unrelated to this thread, OpenTX is dropping a hotfix to fix FrSky ISRM pulses -- dunno if ErSkyTX is effected:
pafleraf wrote:
Tue Jun 22, 2021 3:21 pm
for those using FrSky ISRM on current EdgeTx: OTX is publishing a hotfix to an issue which could cause serious troubles and cause signal from the receiver to cease mid-flight. We are impacted as well.

User avatar
MikeB
9x Developer
Posts: 17564
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKYTx (was ersky9x) Questions

Post by MikeB » Tue Jun 22, 2021 7:14 pm

I've just posted a new test version for both the 'PRO and the X9E. This should sync. faster at low packet rates.

I don't believe erskyTx has the problem with the ISRM pulses, thanks.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

yds
Posts: 34
Joined: Fri Apr 10, 2020 6:38 pm
Country: United States
Location: Dirtee Jerzee

Re: ERSKYTx (was ersky9x) Questions

Post by yds » Tue Jun 22, 2021 10:56 pm

MikeB wrote:
Tue Jun 22, 2021 7:14 pm
I've just posted a new test version for both the 'PRO and the X9E. This should sync. faster at low packet rates.
Mike, offset in this latest build seems to drop down to single digits faster than I can switch from ELRS.bas to the DEBUG screen.. the worst I saw was 3 digits for a moment when I dropped from 500Hz to 50Hz and it took a couple of beats for the RX to rebind.. that's really nitpicking on my part.. I cannot really find anything to complain about.. once in a while the worst I see in the offset field is 10 or 11 regardless of PktRate 8-) 50Hz is the slowest I can test my ExpressLRS 2.4GHz TX

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: ERSKYTx (was ersky9x) Questions

Post by spinorkit » Wed Jun 23, 2021 9:09 am

MikeB wrote:
Tue Jun 22, 2021 7:14 pm
I've just posted a new test version for both the 'PRO and the X9E. This should sync. faster at low packet rates.
Mike
Mike,
On my 'PRO I now get:
ersky9x-B5r223 22.06.2021 20:03:11
200 Hz 0:200 0x1388 +/- < 0x9
100 Hz 0:100 0x2710 +/- < 0x9
50 Hz 0:50 0x4E20 counting down for ~18s from R9M boot tune then +/- < 0x9
25 Hz 0:50 0x9C40 counting down for ~18s from R9M boot tune then +/- < 0x9

So that looks great!
Many thanks,
Kit

User avatar
MikeB
9x Developer
Posts: 17564
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKYTx (was ersky9x) Questions

Post by MikeB » Wed Jun 23, 2021 10:34 am

OK, I'll leave it there, looks like it is all good.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: ERSKYTx (was ersky9x) Questions

Post by spinorkit » Fri Jun 25, 2021 11:02 pm

Mike, the one remaining thing that makes ELRS hard to use with ErskyTx is that you need OpenTx to flash R9M modules with the ELRS firmware unless you solder on wires (to small,fragile pads) so you can use a STLink to program it.

Flashing ELRS to the R9M is a 2 step process, first flashing a new bootloader using the frsky .frk format. This much you can do using Ersky Maintenance mode Update SPort (so long as you have the protocol set to e.g. XJT). I note that this new bootloader contains STK500 code based on yours:
https://github.com/ExpressLRS/ExpressLR ... c/stk500.c

The next step, flashing the firmware.elrs file, uses the STK500 protocol. I wonder, do you think there is any chance this 2nd step would work using the ErskyTx maintenance mode Update Multi?

User avatar
MikeB
9x Developer
Posts: 17564
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKYTx (was ersky9x) Questions

Post by MikeB » Sat Jun 26, 2021 9:45 pm

Quite a good chance the Update Multi would work. What do you do on openTx? How does openTx know it is flashing a ELRS module?
In case you don't know, from the erskyTx bootloader, you have an option of running an "app". One available app is update Multi (which may, in some cases, be better that the one in maintenance mode). If the update multi in maintenance mode doesn't work, I could probably put an app together.

If you flash the ELRS bootloader using the .frk format, then flash the ELRS code, can you revert to FrSky firmware? I have a R9M I could use for testing, but I would need to be able to put FrSky firmware back.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: ERSKYTx (was ersky9x) Questions

Post by spinorkit » Sat Jun 26, 2021 10:05 pm

Thanks Mike, I have only ever used Ersky, but apparently on OpenTX 2.3.12 or later they use a function in the Tools menu called "Flash external ELRS":
https://github.com/ExpressLRS/ExpressLR ... ing-R9M-TX

I would be interested to know more about "apps". Are they part of the firmware or more like scripts? Should I look in the ErskyTx source on GitHub?

If you can flash the R9M via the Tx you can put the FrSky firmware back. The new ELRS bootloader somehow supports the old FrSky one. But if you use STLINK like I did it is a one way trip.

I do have a "virgin" R9M 2019 I can try things out with though.

User avatar
MikeB
9x Developer
Posts: 17564
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKYTx (was ersky9x) Questions

Post by MikeB » Sat Jun 26, 2021 10:19 pm

I build the erskyTx bootloaders separately from erskyTx itself. All the source code is here: https://github.com/MikeBland/OpenRcBootloader.
There is a sub-directory there called "apps", where all the source code for the apps resides. I need to commit a few changes I have on my PC.

apps load into RAM, and are completely self-contained.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: ERSKYTx (was ersky9x) Questions

Post by spinorkit » Sat Jun 26, 2021 11:38 pm

So to run an app would you go in to maintenance mode, choose "Update firmware" and select an app from the SD card?

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: ERSKYTx (was ersky9x) Questions

Post by spinorkit » Sun Jun 27, 2021 4:48 am

Hi Mike,
I tried using the Maintenance mode Update Multi to flash my unmodified R9M 2019 (after successfully flashing the r9m_elrs_bl.frk bootloader).
I tried all the options (inverted/non-inverted, COM1, COM2) to flash the firmware.elrs file (actually named as firmware.bin) without success.
Do you think I need to use the Trainer jack trick on the 'PRO to power up the R9M at the right point? There does not seem to be a "finding device" stage.

User avatar
MikeB
9x Developer
Posts: 17564
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKYTx (was ersky9x) Questions

Post by MikeB » Sun Jun 27, 2021 9:34 am

I've had a quick look at how openTx updates ELRS, I think it is using the SPort signal as half-duplex at 57600 baud. Multi uses the SPort signal for data from multi to the radio and the PPM signal for data to multi.

If you could check with the ELRS people if that is the case, I should be able to sort either an app, or maintenance mode.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: ERSKYTx (was ersky9x) Questions

Post by spinorkit » Sun Jun 27, 2021 10:02 am

Thanks Mike, I've asked the devs to confirm that on Discord: https://discord.com/channels/5963500221 ... 7636976692

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: ERSKYTx (was ersky9x) Questions

Post by spinorkit » Sun Jun 27, 2021 11:08 am

Mike, pafleraf, who implemented that in OpenTx replied "he is 100% correct, as usual", so apparently your deductions are correct!

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: ERSKYTx (was ersky9x) Questions

Post by spinorkit » Sun Jun 27, 2021 11:27 am

Mike, to be more specific, prior to saying that pafleraf responded "MPM", after
AlessandroAU said:
"@pafleraf did the implementation, I think it's the same as the frsky upload method".

So I presume pafleraf means it is like the multi-protocol module method, which presumably is what you were describing?
Last edited by spinorkit on Mon Jun 28, 2021 8:43 am, edited 1 time in total.

yds
Posts: 34
Joined: Fri Apr 10, 2020 6:38 pm
Country: United States
Location: Dirtee Jerzee

Re: ERSKYTx (was ersky9x) Questions

Post by yds » Sun Jun 27, 2021 8:01 pm

MikeB wrote:
Sun Jun 27, 2021 9:34 am
I've had a quick look at how openTx updates ELRS, I think it is using the SPort signal as half-duplex at 57600 baud. Multi uses the SPort signal for data from multi to the radio and the PPM signal for data to multi.
Mike, FYI here's the NV14 Nirvana FlySky-OpenTX-Test-Branch commit for adding Flashing of ExpressLRS..

yds
Posts: 34
Joined: Fri Apr 10, 2020 6:38 pm
Country: United States
Location: Dirtee Jerzee

Re: ERSKYTx (was ersky9x) Questions

Post by yds » Sun Jun 27, 2021 8:13 pm

MikeB wrote:
Sat Jun 26, 2021 9:45 pm
If you flash the ELRS bootloader using the .frk format, then flash the ELRS code, can you revert to FrSky firmware? I have a R9M I could use for testing, but I would need to be able to put FrSky firmware back.
Mike,

yes, with the dual bootloader you can revert back to og FrSky fw for R9M -- all you need to do is flash the FrSky R9M .frk same as normal upgrade. ExpressLRS Wiki: Flashing R9M TX

User avatar
MikeB
9x Developer
Posts: 17564
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKYTx (was ersky9x) Questions

Post by MikeB » Sun Jun 27, 2021 8:52 pm

In the test versions thread, I've just added a test version of an app for the 9XR-PRO (called FlashElrs_atmel.app).
On the SD card, make sure you have a directory called "apps" in the root, then copy this app to it.
In bootloader mode, select "Run App", then select this app.
It may work, or it may not!

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

spinorkit
Posts: 48
Joined: Sun Dec 31, 2017 12:21 am
Country: New Zealand

Re: ERSKYTx (was ersky9x) Questions

Post by spinorkit » Mon Jun 28, 2021 9:46 am

Brilliant,that "just worked"!
My unmodified R9M 2019 (the one without all the dangly wires) is working fine and is now transmitting within the legal 915-928 Mhz band for New Zealand.

Thanks Mike!

splinter182
Posts: 2
Joined: Wed Jul 14, 2021 4:24 am
Country: -

Re: ERSKYTx (was ersky9x) Questions

Post by splinter182 » Thu Jul 29, 2021 5:48 am

Does version 223B5 support elrs on 9xtreme or ar9x boards?

User avatar
MikeB
9x Developer
Posts: 17564
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: ERSKYTx (was ersky9x) Questions

Post by MikeB » Thu Jul 29, 2021 2:11 pm

I think the 9Xtreme is supported, it does have "XFIRE" as a protocol for the external module, and it looks like the synchronising code is also in.
The AR9X board supports "XFIRE" on the external module, although I'm not sure the hardware will work, you will need a diode, at least, to make the SPort signal bi-directional. The synchronising code is not included for the Atmel processor.

Mike
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

grifild
Posts: 14
Joined: Tue May 25, 2021 12:35 pm
Country: -

Re: ERSKYTx (was ersky9x) Questions

Post by grifild » Thu Jul 29, 2021 10:51 pm

I can confirmed that R9 TX Module flashed with ERLS is working on AR9X with diode installed between S.Port and TX1.
R9M Module flashed through FlashElrs_atmel.app that Mike posted in the test version thread.
After Mike added XFIRE protocol to AR9X I checked it with Crossfire Micro TX it also works but I can't change settings through crossfire basic script it just crashed with different errors. Few days ago I tried ERLS and it's works great. Telemetry and ERLS.bas script from erls github also works perfectly.
Just one problem that I can't receive power level of ELRS, because ERSKYTx has only 6 custom sensors fields for Telemetry and for TX Power ERLS used telemetry sensor field number 7

I only checked everything on the table, but the R9M RX is already installed in the copter. I will be testing ERLS in the field this weekend.


Post Reply

Return to “erskyTx (was ersky9x)”