What's new

User scripts upon button press and LEDs

  • 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!

b0ngz

New Around Here
Hello,

I just bought a AC68U that will replace a WRT160v3 running DDWRT.

I'd like to migrate a script that runs when the SES\WPS button on the wrt160v3 in DDWRT is pressed. I read the WIKI post about user scripts but I didn't find a section regarding scripts that get executed when a certain button is pressed. Is there a way to activate a script upon pressing the WPS button?

I'm also having a hard time understanding how to control the LEDs on the AC68U and can't find its GPIO documentation where it states LED colors supported along with their assigned values. executing gpio in SSH returns "not found".

Thanks in advance for any comments given!
 
Hello,

I just bought a AC68U that will replace a WRT160v3 running DDWRT.

I'd like to migrate a script that runs when the SES\WPS button on the wrt160v3 in DDWRT is pressed. I read the WIKI post about user scripts but I didn't find a section regarding scripts that get executed when a certain button is pressed. Is there a way to activate a script upon pressing the WPS button?

I'm also having a hard time understanding how to control the LEDs on the AC68U and can't find its GPIO documentation where it states LED colors supported along with their assigned values. executing gpio in SSH returns "not found".

Thanks in advance for any comments given!


There's no user script linked to the WPS or reset button at this time.

The gpio command isn't implemented. Use the led_ctrl command instead, as not all LEDs are controlable through GPIO anyway.

Code:
led_ctrl lednumber state

led definitions:
Code:
#define LED_POWER                       0
#define LED_USB                         1
#define LED_WPS                         2
#define FAN                             3
#define HAVE_FAN                        4
#define LED_LAN                         5
#define LED_WAN                         6
#ifdef RTCONFIG_LED_ALL
#define LED_ALL                         0xFE
#endif
#define LED_2G                          7
#define LED_5G                          8
#define LED_USB3                        9
#ifdef RTCONFIG_LAN4WAN_LED
#define LED_LAN1        10
#define LED_LAN2        11
#define LED_LAN3        12
#define LED_LAN4        13
#endif
#define LED_TURBO                       14
#ifdef RTCONFIG_QTN
#define BTN_QTN_RESET                   15
#endif
#define LED_SWITCH                      20
#define LED_5G_FORCED                   21      // Will handle ledbh & nvram flag

state is either 0 or 1.
 
If WPS button is configured as radio-on/off button, could it also include one 'sync' command? It'd be nice for cases when router is unresponsive and needs to be forcefully shut down.
 
Thank you very much for the detailed reply and the time you've dedicated on the firmware Rmerlin.
 
If WPS button is configured as radio-on/off button, could it also include one 'sync' command? It'd be nice for cases when router is unresponsive and needs to be forcefully shut down.

If it's unresponsive, then it most likely won't be able to run a sync command (or any other script either). Otherwise, you could do the same thing just through SSH.
 
If it's unresponsive, then it most likely won't be able to run a sync command (or any other script either). Otherwise, you could do the same thing just through SSH.

Unresponsive as in not being able to telnet or ssh in...yes it happens sometimes, routing and running apps (dl master/transmission) still work but can't get in; user fault but that's exactly why the sync would be nice, to minimize chances of any permanent corruption.
 

Latest threads

Sign Up For SNBForums Daily Digest

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