ExpressLRS icon indicating copy to clipboard operation
ExpressLRS copied to clipboard

Repeated unrecoverable Failsafe in Flight since Switch to ELRS 4.1.0

Open SabrCat opened this issue 1 month ago • 26 comments

Current Behavior

I have experienced five full blackouts of my aircraft since I have switched over from ELRS 3.5.6 to ELRS 4.1.0 about a month ago. The behavior has been the same every time:

The aircraft goes into failsafe and falls out of the sky. Remote reports "telemetry lost". When the aircraft is found, the receiver is blinking slowly. No matter how close I get to the receiver with the remote, no reconnection of the link happens until the plane is power cycled. After power cycle the aircraft functions as normal.

https://github.com/user-attachments/assets/76a07928-32e0-4a33-b87b-95076ffbfeed

This has happened to me on two planes. Both share the exact same receiver (Happymodel EPW6) and share the same receiver firmware. See below for screenshots of the WebUI. One plane is my park jet eurofighter, 3s, drone motor, fairly new. It only had one flight on ELRS 3 before I switched my fleet over. The other is my RCFactory Edge540 indoor plane. This plane has already flown one full winter season on ELRS 3 and has never had a single connectivity issue in this time, flying several times a week over the winter. When on ELRS 3, I most likely had arming misconfigured such that ELRS was never armed as CH5 went entirely unused. Regardless the standby transmit power seems to have been enough to fly my planes safely for years. I have also flown many other aircraft under ELRS 3.5.6, mostly with the Happymodel receivers, but some with others. I have never once experienced an in flight failsafe before I made the switch to ELRS 4. Even when a receiver lost its antenna mid flight due to poor mounting, I was able to fly the plane home.

The incidents:

  1. The eurofighter, first flight of any of my fixed wings since I switched to ELRS 4. I was recovering out of a dive, and the plane disconnected, impacted the ground nose first and exploded the nose. Thankfully the EPP sheet construction protected the rest. For this, only the firmware on the remote and receiver was switched over, at this point I was not aware I had to configure ELRS to arm, so this flight was done with CH5 unused and ELRS never armed. Two other aircraft were in the air at the time, both 2.4ghz, I think at least one ELRS.
  2. The eurofighter, high alpha pass maybe 10m away from me. Plane once again shut off and impacted nose first. no configuration changes were made since incident 1, they happened within about 20 minutes of each other. After this incident, I realized I now had to configure arming, configured it to be set to switch -> on to always be armed. Since then I have had two flights of the eurofighter and one flight of another fixed wing outside, the issue has not reoccurred.
  3. My Edge540 indoor. Arm configured as permanently on, transmit strength set to 250mW dynamic. Flying near me, at most 4m away, the plane suddenly goes into failsafe, which was misconfigured for the 4d ESCin the plane, so the plane slammed into full reverse, shredded it's propeller and landing gear and spun around until the propeller departed the aircraft. Only pulling the power calmed the plane. I do recall another failsafe trigger happening earlier the same session, but I do not recall enough details to write about it. Two ELRS tinywhoops were in the air at the same time.
  4. My Edge540 indoor, today. No configuration changes from incident 3. Hovering 2m in front of me, the plane shuts off and falls to the ground. Receiver blinks as usual, after power cycle I continued flying for several minutes on the same battery with no further issues. Two ELRS tinywhoops were in the air at the same time.
  5. My Edge540, today. Same flying session as incident 4. No configuration changes since incident 3, maybe three or four batteries after incident 4 happened. Was flying maybe 10 m away from me, straight and level, low power. Plane shuts off and lands. Power cycle reestablishes connection. Battery turns out to be drained enough to only allow for 10 seconds of extra flight before the 3.5V cutoff.

Steps to Reproduce

Unfortunately I am not able to provide any as the issue seemingly appears at random intermittently.

Possible Solution (Not obligatory)

Details

I am still running an ELRS 3.x version of the ELRS lua script on my remote as I did not have an SD card reader handy at the time I made the switch, and the old script appears to work fine (except for triggering RX wifi).

While doing the firmware upgrade on the Edge, I also switched the channels for aileron, elevator and rudder servos from 50hz to 333hz. The servos appear to now respond with much higher bandwidth.

The hardware modifications on the radiomaster pocket were done approximately a year before I upgraded to ELRS 4. All flights under ELRS 3 with the modified hardware and edgeTX firmware have had no communication issues.

Installation photo of the receiver on the Edge:

Photo Image

Debugging information:

Unfortunately I did not think to look into the ELRS script on the pocket before power cycling the aircraft.

The longest period the aircraft sat before power cycling without ever reconnecting to the remote was approximately 2-3 minutes on the first eurofighter crash.

As a brownout was suspected, I ran a battery on the Edge540 dry under full throttle and violent servo motions. No repeat of the disconnect behavior was observed. The Edge has also flown without issue for over a year on electronics that have not changed since I built the plane, making a brownout unlikely.

The receiver appears to enter failsafe state, not no pulses state, as evidenced by the ESC slamming into full reverse on incident 3. If no pulses had been sent, the ESC would have defaulted to no power to the motor.

A mid air press of the button on the receiver causes a jerk of the aileron servo, but does not cause disconnection of the receiver as observed in the incidents, as soon as the button is released the plane operates normally. This makes a loose cable or similar pressing the button unlikely to be the reason.

Incidents 4 and 5 occurred in the same flying session, which went through 8 batteries, each lasting around 5-10 minutes. During this time the aircraft flew normally even through heavy acrobatic maneuvers, except for the two blackouts.

I have not been successful in ever provoking the blackout intentionally.

Your Environment

  • TX hardware: Radiomaster Pocket internal module.
  • RX hardware: Happymodel EPW6
  • Handset model: Radiomaster Pocket, screen modified to an OLED, slightly modified setup of https://www.printables.com/model/1374465-flip-foldable-oled-screen-for-the-radiomaster-pock
  • OpenTX version (including nightly number): 2.11.3 from https://github.com/DongkwanYi/OLEDBOXER/tree/main/firmwares (one line code change to support the OLED, otherwise stock EdgeTX
  • ExpressLRS version (TX & RX MUST MATCH): 4.1.0
  • Packet Rate: 333 Hz Full
  • Telemetry Ratio: 1:128
  • user_defines:
  • ELRS lua script from ELRS 3.x, see Details.
WebUI screenshots Image Image

I am well and truly stumped here. I was going to maiden a fairly expensive plane tomorrow, but I will hold off for the moment and fly my low risk aircraft until I have a better handle on the issue. Thanks in advance for giving this a look!

SabrCat avatar Oct 28 '26 04:10 SabrCat

A fixed-wing pilot upgraded ELRS from 3.5.6 to 4.1.0, and since then his planes have dropped out of the sky 5 times in a month.

Same story every time: the plane suddenly loses link and falls while it's close to him, and the receiver won't reconnect at all until he unplugs the battery and plugs it back in.

What stands out is that most of the time there were other ELRS quads flying at the same time. He's also still using an old Lua script, and he changed a few other settings along with the upgrade.

No devs have replied yet, and the cause is still unknown.

GyroGhost avatar Oct 28 '26 04:10 GyroGhost

  1. A fixed-wing pilot upgraded ELRS from 3.5.6 to 4.1.0, and since then his planes have dropped out of the sky 5 times in a month. Same story every time: the plane suddenly loses link and falls while it's close to him, and the receiver won't reconnect at all until he unplugs the battery and plugs it back in. What stands out is that most of the time there were other ELRS quads flying at the same time. He's also still using an old Lua script, and he changed a few other settings along with the upgrade. No devs have replied yet, and the cause is still unknown.

What do you mean by "he still uses his old Lua Script?" After Update from 3.x to 4.x he still uses Lua script from 3.x on his radio station/module still or I am missing something here?

komodev avatar Oct 28 '26 04:10 komodev

just copy your 4.1.0 Lua to your station or module brother and set it up correctly, you don't have to open a thread for things like this where obviously you did not follow the installation instructions correctly and now asking community to resolve your issue? do everything as it says in instructions, set up station and RX proper way and you will be good to go. SD card is not so expensive, in this hobby you should at least have few of them ready for any scenario where you use SD :)

Cheers but you caused this, not ELRS.

komodev avatar Oct 28 '26 04:10 komodev

To my understanding the lua script does not run when it is not actively open on the screen. Thus I suspect the connection issues have nothing to do with the slightly old script. I will fix that next and see if that changes anything.

SabrCat avatar Oct 28 '26 04:10 SabrCat

Also, my apologies if I misread these here, but especially the first two replies to this post read fully like bots posting. What is going on?

SabrCat avatar Oct 28 '26 04:10 SabrCat

@SabrCat

Thanks for the detailed report. Agreed, the Lua script is just a config UI, so I wouldn't expect it to be the cause, but updating it removes one variable.

A few things that might help narrow it down:

  • If it happens again, check the ELRS Lua on the radio before power cycling the plane, to see what state the TX thinks the link is in.
  • Try reverting the RX and TX to 3.5.6 with everything else the same. If it never happens on 3.5.6, that points to a 4.x regression.
  • Try 250Hz instead of 333Hz Full, and see if it changes anything.
  • Since other ELRS craft were in the air in 4 of the 5 incidents, it's worth confirming none of the other pilots share your binding phrase.

Good call holding off on the maiden until this is figured out.

GyroGhost avatar Oct 28 '26 04:10 GyroGhost

I just tried to help you out here, nothing else. If I Was in your position and no SD card present, I would revert back to 3.x version you used and for which your Lua is inside station. When you resolve the SD situation then upgrade to 4.1.0 normally and copy 4/x lua and delete old one before you copy it so you don't mix them though they are now named differently. There are new and different functionalities included in 4.x Lua...

Hope this helps, You will never make it work normally that way, trust me... Been there, tried that.

komodev avatar Oct 28 '26 04:10 komodev

@SabrCat

Thanks for the detailed report. Agreed, the Lua script is just a config UI, so I wouldn't expect it to be the cause, but updating it removes one variable.

A few things that might help narrow it down:

  • If it happens again, check the ELRS Lua on the radio before power cycling the plane, to see what state the TX thinks the link is in.
  • Try reverting the RX and TX to 3.5.6 with everything else the same. If it never happens on 3.5.6, that points to a 4.x regression.
  • Try 250Hz instead of 333Hz Full, and see if it changes anything.
  • Since other ELRS craft were in the air in 4 of the 5 incidents, it's worth confirming none of the other pilots share your binding phrase.

Good call holding off on the maiden until this is figured out.

totally agree with you but it's so late and I went to sleep and returned to fast reply top this guy, was not aware he does not have SD to copy lua to... I also advize him to revert back and try set it up correctly all the way from packet rates to everything and see what works best, if everything works flawless he can think about moving to 4.x later, it will not run anywhere I guess.

Have a good night guys, hope you resolve this by thew morning as this is not a big of a issue imho.

komodev avatar Oct 28 '26 04:10 komodev

okay hold on something got really confused here. I do have a SD card in the remote. It does work. At the time I did the upgrades I only had my phone and no way to write to the SD card in the remote. Hence I left it at the old version, seeing as it appeared to work fine. At least for the eurofighter I did all configuration except packet rate through the web UI too.

Next time I get a remote and my laptop in the same place I will upgrade the lua script and re-flash both receiver and remote, see if the issue still reproduces afterwards. Unfortunately that won't be super easy to test as the issue seems to be quite intermittent. I do suspect the lua script is not the cause of this, it doesn't run while I fly. Though of course some configuration could have gotten messed up. Will report back once I have enough test flights with the updated script in to be reasonably sure that it is fixed, or that the issue still reproduces.

SabrCat avatar Oct 28 '26 04:10 SabrCat

Alright, now we talk. Yes brother, you do that. I never flash it if I don't have a way to access it via laptop or PC in case something goes wrong with flashing. Did it from the phone app few times but stick to my PC again now :)

have a good night and hope you will fix it when you get your hands on it, cheers Mickey

komodev avatar Oct 28 '26 05:10 komodev

A fixed-wing pilot upgraded ELRS from 3.5.6 to 4.1.0, and since then his planes have dropped out of the sky 5 times in a month.

Same story every time: the plane suddenly loses link and falls while it's close to him, and the receiver won't reconnect at all until he unplugs the battery and plugs it back in.

What stands out is that most of the time there were other ELRS quads flying at the same time. He's also still using an old Lua script, and he changed a few other settings along with the upgrade.

No devs have replied yet, and the cause is still unknown.

@BADERFPV please keep your bots on the leash 😆

jurgelenas avatar Oct 28 '26 06:10 jurgelenas

okay hold on something got really confused here. I do have a SD card in the remote. It does work. At the time I did the upgrades I only had my phone and no way to write to the SD card in the remote. Hence I left it at the old version, seeing as it appeared to work fine. At least for the eurofighter I did all configuration except packet rate through the web UI too.

Next time I get a remote and my laptop in the same place I will upgrade the lua script and re-flash both receiver and remote, see if the issue still reproduces afterwards. Unfortunately that won't be super easy to test as the issue seems to be quite intermittent. I do suspect the lua script is not the cause of this, it doesn't run while I fly. Though of course some configuration could have gotten messed up. Will report back once I have enough test flights with the updated script in to be reasonably sure that it is fixed, or that the issue still reproduces.

You do not need sd card reader for pocket. Just connect the radio directly to your PC and select usb storage mode. Also v3 Lua would not cause the issues that you have observed.

jurgelenas avatar Oct 28 '26 06:10 jurgelenas

Haha fair enough 😅 The bot got a bit too excited and off the leash this time. It does help me dig through issues sometimes, but clearly it still needs some training on when to stay quiet.

Sorry for the noise and the half-baked suggestions in the thread. Leash tightened 🐕

GyroGhost avatar Oct 28 '26 06:10 GyroGhost

Unfortunately I come here again bearing bad news. I've updated the ELRS script on my pocket, I have reflashed the firmware on the TX and RX side with fresh ones from the web flasher (both 4.1.0). And still, in flying 7 batteries today, I got the issue to reoccur once.

The failure happened on the third flight of today. This time it was while handling the plane after a landing just to turn it around and take off again. The remote was at maybe 50cm distance from the aircraft. I did have sd card logging configured, but unfortunately only when my motor cut was off, and while handling the plane I had the motor cut on. I do still have logs of the immediately preceding flight and of the throttle test after rebooting the RX.

I did scroll through the ELRS script while in the broken state, see the attached video. I did also try to reboot the TX, which did not resolve the issue, only a power cycle of the RX resolved the problem.

The receiver sat in the blackout state for ~3-5 minutes, the web server never started nor did it ever reconnect, the link just stayed dead.

After the issue happened, I tried to provoke it again by holding the antenna extremely close to the receiver and other things, I have still not been able to reproduce the problem intentionally in any way.

1_flight3_before_blackout.csv

2_after_rx_powercycle_throttle_test.csv

3_after_rx_powercycle_second_log.csv

models.json dump from the RM pocket internal module. Model 6 is my Edge540.

https://github.com/user-attachments/assets/2258b93a-b88e-4bc7-8129-138eb25ed924

I am just stumped here. So long as this keeps happening I can basically only fly this plane as any other plane in my arsenal would likely not survive a random mid-air failsafe. And I don't want to just downgrade again as I am fairly sure, but not fully sure that the issue is caused by the upgrade to 4.1.0

If there's any other data I can provide to help diagnose this please ask!

SabrCat avatar Oct 28 '26 23:10 SabrCat

Can you downgrade to 4.0.0 on the receiver and test. There was quite a change to 4.1.0 to fix an issue with the RX and brownouts holding the PWM pins at current values for a period of time, which caused runaways on round based vehicles. There was quite some substantial testing of the code, but I'd like to check anyways since you seem to be able to reproduce your issue quite easily.

pkendall64 avatar Oct 29 '26 21:10 pkendall64

Quite easily is unfortunately an overstatement. I can reproduce the issue about once every few flight hours, seemingly entirely at random and I have not found any way to reliably trigger it yet. There is definitely something strange going on, the receiver blinks so the main loop on the 8266 isn't dead, yet there is no radio communication happening anymore. I have hacked together a modification to the source code that automatically takes a full core dump on signal loss to investigate the issue, and have flashed that firmware onto my receiver to test today. It works as in that I can still fly as normal, but in my shorter flying session today I have not been able to recreate the issue again. Today there were also fewer people flying at once and nobody flying ELRS, which may have had an effect. I am not sure. I will try to recreate the issue again on my modified 4.1.0 firmware to hopefully pinpoint what causes it. Doing a negative test on 4.0.0 would unfortunately take like 30-40 flights for any sort of confidence in the results.

SabrCat avatar Oct 29 '26 23:10 SabrCat

Quite easily is unfortunately an overstatement. I can reproduce the issue about once every few flight hours, seemingly entirely at random and I have not found any way to reliably trigger it yet. There is definitely something strange going on, the receiver blinks so the main loop on the 8266 isn't dead, yet there is no radio communication happening anymore. I have hacked together a modification to the source code that automatically takes a full core dump on signal loss to investigate the issue, and have flashed that firmware onto my receiver to test today. It works as in that I can still fly as normal, but in my shorter flying session today I have not been able to recreate the issue again. Today there were also fewer people flying at once and nobody flying ELRS, which may have had an effect. I am not sure. I will try to recreate the issue again on my modified 4.1.0 firmware to hopefully pinpoint what causes it. Doing a negative test on 4.0.0 would unfortunately take like 30-40 flights for any sort of confidence in the results.

You are doing a good job. As I followed from start. The other day at least 6-7 ppl were flying ELRS near you that day when it happened 5x in few flights. After some FW customization you might have a progress but I underatand your frustration totally because nobody flied ELRS when you wanted to test it hehehh. Who knows, we will see at the end, you might find a patch for it. If it comes to interference with other RX with ELRS flashed flying around you.

Hehh it was so easy with version 3.x we flew 10 of us and nobody had a single issue for 2 years.

Good ol' times boy...

komodev avatar Oct 29 '26 23:10 komodev

ELRS 3.5.6 has been my workhorse for several years now, and I have never even had a single radio issue. Not sure what's going on here, but whatever it is I want to get to the bottom of it, I just can not trust my remote anymore at the moment, and a remote I can't trust is not one to fly expensive planes with. And if it does happen to be a firmware issue of some kind, it would affect more than just me. We shall see.

SabrCat avatar Oct 29 '26 23:10 SabrCat

I know what you are talking about I was also long time on 3.5.x versions and was very stubborn to move to 4.x but after 4.01 was out I decided to give it a try, then 4.1.0 came out more stable and I thought this was a piece of cake when I noticed strange things with my telemetry packets sending back via MavLink to my ground station, actually Nomad on my radio station than passed via ESP32 with Backpack installed to my Antenna Tracker hhuhuhhh very complex setup but when you set everything to work, it work flawless, just the packet rates and telem ratio must be 1:2 which is shame. I was hoping for 1:8 or something like 1:16 but tried it and there was no chance, GPS even did not want to lock anything if not reverted to 1:2. Open Source is like this, lot of work and lot of us constantly testing and helping to develop it better and better every single revision in order to avoid those situations in future, but new will arise so :D Never-ending story heheheh god help us.

komodev avatar Oct 30 '26 01:10 komodev

I read through the 4.x RX code after seeing this. I haven't reproduced anything, so this is just what I think could be going on.

The EPW6 uses the PWMP6 layout, which has no BUSY pin (GPIO5 is servo 6). As far as I can tell only PWMP6 and PWMP7 are like that among the 2.4 GHz receivers, which might be why so few people see this.

Without BUSY the driver just waits fixed times between radio commands, so a command that overlaps another one can get lost.

After the link drops, with lock on first connection the radio is set up once in LostConnection() and then only the DIO1 interrupt touches it. I don't see anything that would un-stick it:

  • DIO1 is edge triggered
  • Config() doesn't clear IRQ flags
  • IsrCallback() returns without clearing when the status reads 0

So if one flag stays set, or the RX command gets lost, the radio stays deaf until a power cycle. While connected, telemetry would kick it back to life, but not while disconnected.

That fits what's described here:

  • LED blinking, no relink even right next to the radio
  • TX reboot doesn't help, power cycle does
  • no Wi-Fi AP showed up, so it doesn't look like it rebooted

A few 4.x things could make it more likely:

  • the stricter status check from 4.0.1
  • the timer being started from inside the radio interrupt, which turns interrupts back on there (the comment even warns the radio can hang)
  • the 4.1 PWM changes together with 333 Hz servos

Worth testing:

  • RX 4.0.0 vs 4.1.0
  • servos back at 50 Hz
  • a normal ESP8285 RX with radio_busy removed from its hardware config, plus lots of link drops

When it's dead, check whether DIO1 is stuck high.

Possible fixes I'd look at (not built or tested):

  • clear the IRQ flags on reconfigure and when an empty status is read
  • re-init the radio every few seconds while disconnected with the rate locked
  • don't re-enable interrupts when the timer is started from inside the radio interrupt

Itay-Sharoni avatar Nov 01 '26 12:11 Itay-Sharoni