Skip to content

Fixes and Improvements - #603

Merged
ExtremeFiretop merged 1 commit into
ExtremeFiretop:devfrom
Martinski4GitHub:dev
Sep 22, 2026
Merged

ExtremeFiretop merged 1 commit into
ExtremeFiretop:devfrom
Martinski4GitHub:dev

Conversation

@Martinski4GitHub

Copy link
Copy Markdown
Collaborator
  • Fixed bug due to restarting the HTTP daemon right before starting to flash the F/W image. This was causing the previously authenticated login session token/cookie to become invalid.

  • Modified and improved functions used to login to the primary router and AiMesh nodes.

  • Added code to double-check that the current login session token/cookie is still valid before proceeding to flash the F/W image. If it's not valid, a 2nd login is attempted. If that fails, the router is rebooted to make sure the router goes back to a fresh state.

  • Miscellaneous improvements and fine-tuning.

- Fixed bug due to restarting the HTTP daemon right before starting to flash the F/W image.
  This was causing the previously authenticated login session token/cookie to become invalid.

- Modified and improved functions used to login to the primary router and AiMesh nodes.

- Added code to double-check that the current login session token/cookie is still valid before proceeding to flash the F/W image. If it's not valid, a 2nd login is attempted. If that fails, the router is rebooted to make sure the router goes back to a fresh state.

- Miscellaneous improvements and fine-tuning.
@Martinski4GitHub

Copy link
Copy Markdown
Collaborator Author

@ExtremeFiretop,

When you get a chance, please review and validate the changes in this PR. I found a bug introduced in PR #601 where the code was restarting the HTTP daemon right before starting the F/W flash. All other changes are to improve the code and add more error checking and handling.

Talk to you later, bud.

Comment thread MerlinAU.sh
[ -z "$httpStatusSTR" ] && [ -s "$responseFPath" ]
then
## MUST check & verify *IF* this is TRUE for AiMesh Nodes ##
if ! grep -qE 'url=index[.]asp|url=GameDashboard[.]asp' "$responseFPath"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ExtremeFiretop,

When you get a chance to test and validate this PR code on your AiMesh nodes, please pay special attention to the above line #5535 with the if statement. I'm not sure if AiMesh nodes respond the same way as a primary router when a WebUI administration login is performed. If not, the above line will need to be modified,

Have a good one, bud!!

@ExtremeFiretop

Copy link
Copy Markdown
Owner

Yeah your right on this one 😅
I think the 2AM commits were starting to catch up with me.

I moved the httpd restart too close to the actual flash. The intended flow should obviously be:
restart -> login -> flash

but I ended up with:
login -> restart -> flash

which risks invalidating the session I had just created.
So your change here makes sense and fixes that properly.

Overall I think this PR is good and I’m going to merge it in tonight! I think the additional logging for the future is a smart call.

I did spot what looks like one small bug around the new temp files used during the parallel AiMesh node checks.
Since those checks can run concurrently, they can potentially end up sharing the same curl response/log files and step on each other.

I don’t think that needs to hold this PR up though. I’ll merge this as-is and address that separately in a small follow-up PR so we keep the fix focused and easy to review. This is FUN! The most fun we have had in a bit ;)

Thanks for catching the session ordering issue, happy SOMEBODY is keeping me honest and testing my work ;)
I actually didn't test that last commit, but it's why it's not out the door already ;)

Apparently 2AM me should not be trusted with firmware flashing ordering 😄

@ExtremeFiretop

Copy link
Copy Markdown
Owner

Btw did you notice, we may end up needing to pivot the project at some point down the line?
https://www.snbforums.com/threads/announcement-asuswrt-merlin-will-not-be-supporting-wifi-8-models.97913/

We are fine for the current WiFi 7 and BE models, but not WiFi 8 models going forwards.
I expect the firmware may get forked, and we may need to follow that.

@ExtremeFiretop
ExtremeFiretop merged commit 0fca04f into ExtremeFiretop:dev Sep 22, 2026
1 check passed
@Martinski4GitHub

Martinski4GitHub commented Sep 22, 2026 •

Copy link
Copy Markdown
Collaborator Author

Yeah your right on this one 😅 I think the 2AM commits were starting to catch up with me.

I moved the httpd restart too close to the actual flash. The intended flow should obviously be: restart -> login -> flash

but I ended up with: login -> restart -> flash

which risks invalidating the session I had just created. So your change here makes sense and fixes that properly.

Overall I think this PR is good and I’m going to merge it in tonight! I think the additional logging for the future is a smart call.

I did spot what looks like one small bug around the new temp files used during the parallel AiMesh node checks. Since those checks can run concurrently, they can potentially end up sharing the same curl response/log files and step on each other.

Great catch, bud!!!! I just submitted another PR to address this issue.
That's the unfortunate result of not being able to test and verify on an actual AiMesh node; but that's why I need a 2nd pair of eyes!!!

I don’t think that needs to hold this PR up though. I’ll merge this as-is and address that separately in a small follow-up PR so we keep the fix focused and easy to review. This is FUN! The most fun we have had in a bit ;)

Yeah, it certainly is a very interesting set of events. Normally, this would not happen during the automatic F/W updates since they are separated by 15 minutes (between nodes and primary router), so while an edge case, it could happen "out in the wild" to some unexpected user doing manual F/W updates.

Thanks for catching the session ordering issue, happy SOMEBODY is keeping me honest and testing my work ;) I actually didn't test that last commit, but it's why it's not out the door already ;)

Apparently 2AM me should not be trusted with firmware flashing ordering 😄

LOL!!! No worries, bud. It happens to the best of us. That's why we have each other's backs.

@Martinski4GitHub

Copy link
Copy Markdown
Collaborator Author

Btw did you notice, we may end up needing to pivot the project at some point down the line? https://www.snbforums.com/threads/announcement-asuswrt-merlin-will-not-be-supporting-wifi-8-models.97913/

Yeah, I briefly saw the post title, but I didn't have time to read the actual posts until the past weekend.
It was not completely unexpected. RMerlin had been giving small hints here and there, but it was never "official" until now.
Going on 14 years!!! That's true passion and commitment!!!

But ultimately, if the hobby project is becoming a chore and no longer fun, it's time to hang up your hat. It's also probable that he wants to retire and enjoy some peace and quiet without worrying about merging another set of GPLs and making more F/W builds.

We are fine for the current WiFi 7 and BE models, but not WiFi 8 models going forwards. I expect the firmware may get forked, and we may need to follow that.

I suspect we might have only about 4 to 5 more years of future RMerlin F/W updates before he completely stops the project. At that point, the future of add-on development and support may be in limbo.

Frankly, I'll likely move on and get a different router brand. I'm not going to spend close to $1K or more on an ASUS router that often seems to be under-developed, poorly tested, and barely passing QA standards (or ASUS is lowering their standards to be able to pass their own testing).

Ubiquiti routers look very tempting. I also have a GL.iNet travel router that I always use to remotely connect back home when traveling for vacation or on work-related trips, so I may look more into their routers as well. And I've been reading about the Firewalla Gold Plus routers, which also look very promising.

In any case, we'll see what happens, and where we are in the next 4-5 years, before any decisions are made.

Take care, bud!!

@ExtremeFiretop

ExtremeFiretop commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

Great catch, bud!!!! I just submitted another PR to address this issue. That's the unfortunate result of not being able to test and verify on an actual AiMesh node; but that's why I need a 2nd pair of eyes!!!

It's no problemo my friend, I have a node and I know what I'm looking for when testing the changes. "I can help guide us through the darkness" 😉 i had started working on my own PR. It's slightly different on the design but you submitted yours first so I just said forget it and merged yours instead. Mine would probably just have a different set of bugs, at least yours were easy typos mostly 😂

Yeah, it certainly is a very interesting set of events. Normally, this would not happen during the automatic F/W updates since they are separated by 15 minutes (between nodes and primary router), so while an edge case, it could happen "out in the wild" to some unexpected user doing manual F/W updates.

Agreed, it's not something that happens usually just due to the fact they should be staggered when ran automatically. But as you pointed out and I found it, if triggered manually on both within a short timeframe, you can run into this and go "what the heck happened? The node said it was flashing, then rebooted but didn't update?"

It's why I figured this is both an interesting challenge for us to tackle and if we succeed it's one less edge case to address. I think we are on the right track to closing this vulnerable window for the nodes.

LOL!!! No worries, bud. It happens to the best of us. That's why we have each other's backs.

I got your back, you got my back, together, we pump out something that works how we intended it would 😉

@ExtremeFiretop

Copy link
Copy Markdown
Owner

Btw did you notice, we may end up needing to pivot the project at some point down the line? https://www.snbforums.com/threads/announcement-asuswrt-merlin-will-not-be-supporting-wifi-8-models.97913/

Yeah, I briefly saw the post title, but I didn't have time to read the actual posts until the past weekend. It was not completely unexpected. RMerlin had been giving small hints here and there, but it was never "official" until now. Going on 14 years!!! That's true passion and commitment!!!

But ultimately, if the hobby project is becoming a chore and no longer fun, it's time to hang up your hat. It's also probable that he wants to retire and enjoy some peace and quiet without worrying about merging another set of GPLs and making more F/W builds.

We are fine for the current WiFi 7 and BE models, but not WiFi 8 models going forwards. I expect the firmware may get forked, and we may need to follow that.

I suspect we might have only about 4 to 5 more years of future RMerlin F/W updates before he completely stops the project. At that point, the future of add-on development and support may be in limbo.

Frankly, I'll likely move on and get a different router brand. I'm not going to spend close to $1K or more on an ASUS router that often seems to be under-developed, poorly tested, and barely passing QA standards (or ASUS is lowering their standards to be able to pass their own testing).

Ubiquiti routers look very tempting. I also have a GL.iNet travel router that I always use to remotely connect back home when traveling for vacation or on work-related trips, so I may look more into their routers as well. And I've been reading about the Firewalla Gold Plus routers, which also look very promising.

In any case, we'll see what happens, and where we are in the next 4-5 years, before any decisions are made.

Take care, bud!!

I used to run a pfsense router I built myself long ago, had even patched the kernel using some steps I found online. It was fun back then, but I ended up going to a more consumer product hoping to have less issues.

I ended up deep in the rabbit hole here with you 😂 funny how that is eh.
Some day I'll probably end up looking elsewhere too. I may not go back fully custom like before with a custom PC running a custom version of Pfsense.

But like you said there's lots of other good router options out there...
Many good brands, ASUS was my default choice back in the day when I started this journey back in 2018-2019 of moving my network to a more consumer product line.

Nothing forces me to stay, I already struggles to swallow the purchase of the BE98 Pro.
If WiFi 8 is going to be even more expensive, it's time to move on.

I'll probably hold on to my WiFi 7 setup with ASUS as long as I can, I don't see a rush to move anytime soon when barely any of my devices (only a handful) are WiFi 7 and 6GHz capable today.

But we should start thinking about what the future path will be for us. I hope to continue working with you in some capacity here and there, even if we end up on different product lines. It's been fun over the years working with you back and forth on stuff and getting to know you as a person.

@Martinski4GitHub

Copy link
Copy Markdown
Collaborator Author

Btw did you notice, we may end up needing to pivot the project at some point down the line? https://www.snbforums.com/threads/announcement-asuswrt-merlin-will-not-be-supporting-wifi-8-models.97913/

Yeah, I briefly saw the post title, but I didn't have time to read the actual posts until the past weekend. It was not completely unexpected. RMerlin had been giving small hints here and there, but it was never "official" until now. Going on 14 years!!! That's true passion and commitment!!!
But ultimately, if the hobby project is becoming a chore and no longer fun, it's time to hang up your hat. It's also probable that he wants to retire and enjoy some peace and quiet without worrying about merging another set of GPLs and making more F/W builds.

We are fine for the current WiFi 7 and BE models, but not WiFi 8 models going forwards. I expect the firmware may get forked, and we may need to follow that.

I suspect we might have only about 4 to 5 more years of future RMerlin F/W updates before he completely stops the project. At that point, the future of add-on development and support may be in limbo.
Frankly, I'll likely move on and get a different router brand. I'm not going to spend close to $1K or more on an ASUS router that often seems to be under-developed, poorly tested, and barely passing QA standards (or ASUS is lowering their standards to be able to pass their own testing).
Ubiquiti routers look very tempting. I also have a GL.iNet travel router that I always use to remotely connect back home when traveling for vacation or on work-related trips, so I may look more into their routers as well. And I've been reading about the Firewalla Gold Plus routers, which also look very promising.
In any case, we'll see what happens, and where we are in the next 4-5 years, before any decisions are made.
Take care, bud!!

I used to run a pfsense router I built myself long ago, had even patched the kernel using some steps I found online. It was fun back then, but I ended up going to a more consumer product hoping to have less issues.

I ended up deep in the rabbit hole here with you 😂 funny how that is eh. Some day I'll probably end up looking elsewhere too. I may not go back fully custom like before with a custom PC running a custom version of Pfsense.

But like you said there's lots of other good router options out there... Many good brands, ASUS was my default choice back in the day when I started this journey back in 2018-2019 of moving my network to a more consumer product line.

My first ASUS router was the RT-AC68U. It was a solid device, and once I found the RMerlin's F/W available, I was even more impressed with all the customization I could do. That was followed by the RT-AC86U and now the RT-AX86U_PRO. All very good routers at a very good, reasonable price. The RT-AC86U has the "stuck nvram command" issue (for which I wrote a custom script to work around the problem); but otherwise, it served me well for many years, and is still going strong now as an AP, or as a double-NAT router used for add-on testing & development purposes.

But now, IMO, the newer BE-class ASUS routers are unreasonably more expensive, while the quality and robustness of the F/W have not improved or increased along the way. This is no longer acceptable in my book.

Nothing forces me to stay, I already struggles to swallow the purchase of the BE98 Pro. If WiFi 8 is going to be even more expensive, it's time to move on.

I'll probably hold on to my WiFi 7 setup with ASUS as long as I can, I don't see a rush to move anytime soon when barely any of my devices (only a handful) are WiFi 7 and 6GHz capable today.

But we should start thinking about what the future path will be for us. I hope to continue working with you in some capacity here and there, even if we end up on different product lines. It's been fun over the years working with you back and forth on stuff and getting to know you as a person.

Yeah, perhaps we could collaborate on some other projects; but if we end up using different router brands/platforms, it would make it much more difficult to work together since we couldn't test and validate the application on the intended H/W and F/W platform unless it works on both!!

But as mentioned before, no hard decisions can really be made at this point. We'll see where we are in 3 to 5 years.

In the meantime, let's continue on this journey and have fun with this project and with RMerlin's F/W while we can.

Take care and have a good night, bud!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants