Opened 7 years ago

Closed 5 years ago

Last modified 4 years ago

#9750 closed defect (fixed)

wifitoggle does not work

Reported by: anonymous Owned by: developers
Priority: normal Milestone: Chaos Calmer 15.05
Component: packages Version: Backfire 10.03.1 RC5
Keywords: Cc:


wifitoggle does not work on DIR-825 B1. When the WPS button is pressed, nothing happened.

Attachments (0)

Change History (12)

comment:1 Changed 7 years ago by anonymous

Perhaps the button name used internally in RC5 changed on DIR-825 B1 as well (see Ticket: #9725)

You can confirm if the button name is the same specified in /etc/config/wifitoggle by creating a /etc/hotplug.d/button/00-log file with these contents:

logger "BUTTON: $BUTTON , ACTON: $ACTION ( $SEEN sec )"

to check the log after the button was pressed

Since wifitoggle is case-sensitive, option button value in /etc/config/wifitoggle should have the same case as reported by the log (eg: option button 'WPS' ).

wifitoggle default for button is undercase 'wps'

comment:2 Changed 6 years ago by nbd

  • Resolution set to no_response
  • Status changed from new to closed

comment:3 Changed 6 years ago by anonymous

  • Resolution no_response deleted
  • Status changed from closed to reopened

Tested not working on Backfire 10.03.1 RC6.
Got the following message on system log:-
user.err wifitoggle: device(all) not recognized

comment:4 Changed 6 years ago by anonymous

Tested on Backfire 10.03.1 final and wifitoggle does not work.
The correct button name should be 'BTN_1'instead of the default 'wps'.
Once changed to 'BTN_1' and wifitoggle works.

comment:5 Changed 6 years ago by ernst.kloppenburg@…

Here (10.03.1 final, fresh installation) wifitoggle (1-2) does not work correctly, even with the right button configured.

I have a single wireless device and have disabled it using the LUCI Interface. Now when I press the button, logread shows 'user.err wifitoggle: device(all) not recognized'

The first problem is, /etc/hotplug.d/button/50-wifitoggle in the function load_wifitoggle() loops over the sections of type 'wifi-device' but the 'disabled' option is set for the 'wifi-iface'.

# uci show wireless

There is a second problem: disabling an interface or wifi-device that is enabled will never work, because a call like 'disabled="$(uci get wireless.radio0.disabled)"' will just fail in that case. So $disabled will be neither 0 nor 1 in the last if-statement of load_wifitoggle.

comment:6 Changed 6 years ago by anonymous

I have changed function set_wifi to:


if [ "$device" = "all" ]

config_load wireless
config_foreach save_wireless wifi-device


save_wireless $device


And now can enable and disable WiFi using button on TP-Link 1043ND with Backfire 10.03.1.

comment:7 Changed 6 years ago by dani@…

tried all of the above in a r31835 without luck, i still get the device all not recognized error..


root@wr1043nd:/# uci get wireless.@wifi-device[0].disabled
uci: Entry not found

if anyone can help.. the package seems broken..

comment:8 Changed 6 years ago by dani@…

seems the wifitoggle script expects us to HAVE in /etc/config/wireless the:
option disabled 0

everything works fine now, thanks jow !

comment:9 Changed 5 years ago by anonymous

This fixed it for me (on an ASUS WL500gP with barrier_breaker/trunk):

root@openwrt:~# uci get wireless.radio0.disabled
uci: Entry not found

Ah... LUCI just removed "disabled" instead of setting it to "0".

root@openwrt:~# uci set wireless.radio0.disabled=0
root@openwrt:~# uci get wireless.radio0.disabled

Now, wifitoggle works as expected :-)

comment:10 Changed 5 years ago by anonymous

In 12.09-rc1 (WL-500W) wifitoggle works when I modify /etc/config/wireless and add "option disabled 0".

But as soon as Wifi in disabled or enabled in LUCI, "option disabled 0" will dissapear when Wifi is up again and wifitoggle does not work again. Same situation is for example when wifi is scheduled in cron to turn off (wifi down, wifi up). In the morning, when wifi up is done, SES button does not work again, message user.err wifitoggle: device(all) not recognized is logged.

Must be fixed anyway :)

comment:11 Changed 5 years ago by jow

  • Resolution set to fixed
  • Status changed from reopened to closed

comment:12 Changed 4 years ago by jow

  • Milestone changed from Backfire 10.03.2 to Chaos Calmer (trunk)

Milestone Backfire 10.03.2 deleted

Add Comment

Modify Ticket

as closed .
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.