What's new

Execution of custom script on button press

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

WaldemarH

New Around Here
Hi guys

I've searched around the forum and have found one thread asking about this, but then there was no more news on it. So I'm interested if this was implemented? If not, does anybody have a quick idea how it would be implemented (source file location that I could dig into)... it would take time for me to inspect the whole code to find out how everything works, so having some raw guide would be appreciated.

Anyway my problem is that pressing on the WiFi button turns both (2.4GHz and 5GHz) WiFis on, but I only want to turn on 5GHz. For now I've written the scripts to turn on/off the 5GHz wifi with cru and in a week or two I'll pimp it up to include the holidays too, but having the option to turn on the wifi in case somebody is sick or has some other type of leave would really be awesome.

Any help is deeply appreciated.

Best regards
Waldemar
 
Hi guys

I've searched around the forum and have found one thread asking about this, but then there was no more news on it. So I'm interested if this was implemented? If not, does anybody have a quick idea how it would be implemented (source file location that I could dig into)... it would take time for me to inspect the whole code to find out how everything works, so having some raw guide would be appreciated.

Anyway my problem is that pressing on the WiFi button turns both (2.4GHz and 5GHz) WiFis on, but I only want to turn on 5GHz. For now I've written the scripts to turn on/off the 5GHz wifi with cru and in a week or two I'll pimp it up to include the holidays too, but having the option to turn on the wifi in case somebody is sick or has some other type of leave would really be awesome.

Any help is deeply appreciated.

Best regards
Waldemar
If I remember correctly, those buttons are hard coded into the closed source binary blobs by Asus. Nothing one can do about it but Asus themselves.
 
Hi guys

I've searched around the forum and have found one thread asking about this, but then there was no more news on it. So I'm interested if this was implemented? If not, does anybody have a quick idea how it would be implemented (source file location that I could dig into)... it would take time for me to inspect the whole code to find out how everything works, so having some raw guide would be appreciated.

Anyway my problem is that pressing on the WiFi button turns both (2.4GHz and 5GHz) WiFis on, but I only want to turn on 5GHz. For now I've written the scripts to turn on/off the 5GHz wifi with cru and in a week or two I'll pimp it up to include the holidays too, but having the option to turn on the wifi in case somebody is sick or has some other type of leave would really be awesome.

Any help is deeply appreciated.

Best regards
Waldemar
Could you not utilise cron to run a script every minute to check if the 2.4ghz is up, and if it is, disable it via nvram?
 
Hi Jack and Peter.

Thanks for the info.

Peter that is an interesting idea. I was thinking about that line how to permanently disable the 2.4 radio and the easiest way would be to rename the driver that wl uses.. that should shut it down. But I don't know if ASUS uses some internal API to do requests.

Can anybody point me to the driver file location so that I can try that?

Thanks for helping me out guys wish you all the success in the 2020. :)

Br
Waldemar
 
"wl" is the driver (although strictly speaking it's the user interface to the radio hardware). It's used by both radios. There is no separate code.

You could probably use the following command to turn off the 2.4GHz radio depending on the router model (which you haven't stated).
Code:
wl -i eth1 down
But why bother? If you don't ever use the 2.4GHz radio just give it a unique password and hide the SSID. That seems like it would suffice for the rare occasions this scenario might occur.
 
Hi Colin

Thanks for the answer.

Anyway I thought that wl is for 2.4 and qcsapi_sockrpc is for 5.0... when I have written the script to turn on/off the radios doing anything in wl had no effect on 5.0. That is why I've got that idea.

And as wl is a standard linux app, I though that linux guys just have to write a driver and then wl acts as a front end... to simplify and standardize the behavior.

Could you explain with more details how is 5.0 using wl?

Br
Waldemar
 
Anyway I thought that wl is for 2.4 and qcsapi_sockrpc is for 5.0... when I have written the script to turn on/off the radios doing anything in wl had no effect on 5.0. That is why I've got that idea.
As I said before, the specific commands vary depending on the model of router you have, and you've never told us what that is.

And as wl is a standard linux app, I though that linux guys just have to write a driver and then wl acts as a front end... to simplify and standardize the behavior.
The router is not like a normal Linux distro, it's an embedded system. In this case wl is a binary blob supplied by Broadcom that talks directly to their hardware.
 
Hi Colin

Really appreciate the extra information. So there isn't really anything I could do. :/

Is there any kind of event that we could get that the button is pressed?

The other way would be to nag the ASUS directly to add an option that the button press doesn't turn both radio-s.

BrW
 
But why bother? If you don't ever use the 2.4GHz radio just give it a unique password and hide the SSID. That seems like it would suffice for the rare occasions this scenario might occur.

Might also turn the TX power level all the way down in the Professional tab.

Sorry that I can't look right now but wasn't there at one time a "time control scheduler" on the wireless as well? I could be mixing memories with other routers. I'm old and retired so memory isn't as important these days. Now why DID I come into this room :)
 
@colin I'll try this weekend if I get any notification when I press the button.

@Smoking As I'm living in a block there are a lot of 2.4 and no 5.0 wifi-s, so I try not to bring even more mess into this and just use 5.0. All the devices we have have 5.0 support, so not having 2.4 is no problem for us.
 
@colin I'll try this weekend if I get any notification when I press the button.

@Smoking As I'm living in a block there are a lot of 2.4 and no 5.0 wifi-s, so I try not to bring even more mess into this and just use 5.0. All the devices we have have 5.0 support, so not having 2.4 is no problem for us.
I was just adding to what @ColinTaylor said to "hide" the 2.4. Also, I'll bet there are just as many 5GHz networks but you just do not see them as the signal doesn't propagate as far. DL a program similar to WiFi Analyzer and walk around :)

https://www.microsoft.com/en-us/p/wifi-analyzer/9nblggh33n0n?activetab=pivot:overviewtab

Good Luck!
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top