Confirmed: SES radiooff button bug

Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware
Author Message
AdamWu
DD-WRT Novice


Joined: 07 Mar 2011
Posts: 26

PostPosted: Tue Apr 15, 2014 3:29    Post subject: Confirmed: SES radiooff button bug Reply with quote
I am configuring another dd-wrt router and wanted to use the SES radio-off on my main router (600DHP) for quick testing, only to find out that it doesn't work.

After I went through some trouble shooting, it seems the gpio is functional, and I can see status change when I pull pin 5.

Then I went to the source, and surprisingly found out something looks like a universal bug:

In router/rc/resetbutton.c
line 1254: switch (ses_mode) {
line 1256: case 1:
... { Turn on radio and set ses_mode=0 }
line 1271: case 2:
... { Turn off radio and set ses_mode=1 }

And:
line 628: static int ses_mode = 0;
...
line 712: ses_mode = 1; {if radiooff_boot_off is set}

So, it seems the entire source could only set ses_mode into either 0 (radio on), or 1 (radio off)

But, the code to turn radio off require ses_mode=2

As a result, it seems any router that enables the ses radiooff function will be unable to turn the radio off using the ses button.

Or maybe I miss understood the code. Razz


Last edited by AdamWu on Thu Apr 17, 2014 22:52; edited 1 time in total
Sponsor
rykr
DD-WRT Novice


Joined: 08 Nov 2010
Posts: 21

PostPosted: Wed Apr 16, 2014 8:37    Post subject: Reply with quote
Hey, I think you might be on to something. We are having the same issue here: https://secure.dd-wrt.com/phpBB2/viewtopic.php?t=260147
AdamWu
DD-WRT Novice


Joined: 07 Mar 2011
Posts: 26

PostPosted: Thu Apr 17, 2014 22:54    Post subject: Reply with quote
rykr wrote:
Hey, I think you might be on to something. We are having the same issue here: https://secure.dd-wrt.com/phpBB2/viewtopic.php?t=260147


Thanks for the confirmation.

I did some review of the changes on this file, and confirmed that it is indeed a bug, introduced about 6 months ago:

http://svn.dd-wrt.com/changeset/22508/src/router/rc/resetbutton.c

When converting the relevant code from "if..else" to "switch", the bug was introduced.

Could any of the Devs create a ticket for this? Thanks~
AdamWu
DD-WRT Novice


Joined: 07 Mar 2011
Posts: 26

PostPosted: Fri Apr 18, 2014 5:09    Post subject: Reply with quote
Nevermind, I just found out I could register account myself in the trac website. I will open the ticket mtself.

For some reason I had the impression only a dev can open ticket Razz
R/\ZV/\N
DD-WRT User


Joined: 04 Dec 2013
Posts: 91
Location: Râmnicu Vâlcea, România

PostPosted: Sat Apr 19, 2014 15:42    Post subject: Reply with quote
AdamWu wrote:
rykr wrote:
Hey, I think you might be on to something. We are having the same issue here: https://secure.dd-wrt.com/phpBB2/viewtopic.php?t=260147


Thanks for the confirmation.

I did some review of the changes on this file, and confirmed that it is indeed a bug, introduced about 6 months ago:

http://svn.dd-wrt.com/changeset/22508/src/router/rc/resetbutton.c

When converting the relevant code from "if..else" to "switch", the bug was introduced.

Could any of the Devs create a ticket for this? Thanks~

My router have 2 USB ports.
Also, the reset button supposed to eject USB stick, but it has never functioned in dd-wrt environment.

"Use SES Button to remove drives"
In router's management webpage/Services/USB appear this setting.

The cause it could be the same bug?

_________________
TP-LINK TL-WDR3600 v1.4
AdamWu
DD-WRT Novice


Joined: 07 Mar 2011
Posts: 26

PostPosted: Sun Apr 20, 2014 2:30    Post subject: Reply with quote
R/\ZV/\N wrote:

My router have 2 USB ports.
Also, the reset button supposed to eject USB stick, but it has never functioned in dd-wrt environment.

"Use SES Button to remove drives"
In router's management webpage/Services/USB appear this setting.

The cause it could be the same bug?


As far as I can tell, there is no function that uses the reset button to umount USB in resetbutton.c

There is code to umount USB using SES button, and that part of the code looks correct to me.
R/\ZV/\N
DD-WRT User


Joined: 04 Dec 2013
Posts: 91
Location: Râmnicu Vâlcea, România

PostPosted: Sun Apr 20, 2014 8:20    Post subject: Reply with quote
AdamWu wrote:
R/\ZV/\N wrote:

My router have 2 USB ports.
Also, the reset button supposed to eject USB stick, but it has never functioned in dd-wrt environment.

"Use SES Button to remove drives"
In router's management webpage/Services/USB appear this setting.

The cause it could be the same bug?


As far as I can tell, there is no function that uses the reset button to umount USB in resetbutton.c

There is code to umount USB using SES button, and that part of the code looks correct to me.

Oh, well... Sad
And your router is... ?

_________________
TP-LINK TL-WDR3600 v1.4
ricktendo
DD-WRT Novice


Joined: 20 Feb 2014
Posts: 38

PostPosted: Sun Apr 20, 2014 14:29    Post subject: Reply with quote
Bug still present in latest build?

Because its not working for me
mellimalo
DD-WRT Novice


Joined: 29 Mar 2014
Posts: 9

PostPosted: Sun Apr 20, 2014 15:16    Post subject: Reply with quote
I think so, there is a new ticket related to this issue created after the latest build had appeared .

Ticket 3369 (4/18/14)

http://svn.dd-wrt.com/timeline
AdamWu
DD-WRT Novice


Joined: 07 Mar 2011
Posts: 26

PostPosted: Mon Apr 21, 2014 0:54    Post subject: Reply with quote
R/\ZV/\N wrote:

Oh, well... Sad
And your router is... ?


WZR-600DHP

BTW, I noticed the resetbutton.c do have a separate branch for some router which have dedicated wifi on/off button, and that branch is also correct.

So this bug will not affect those routers.
ricktendo
DD-WRT Novice


Joined: 20 Feb 2014
Posts: 38

PostPosted: Mon May 26, 2014 19:10    Post subject: Reply with quote
Still not working, on build 24118
rykr
DD-WRT Novice


Joined: 08 Nov 2010
Posts: 21

PostPosted: Wed May 28, 2014 22:31    Post subject: Reply with quote
Still not working on build r24160
KrypteX
DD-WRT Guru


Joined: 18 Jan 2014
Posts: 2411

PostPosted: Sun Nov 09, 2014 13:17    Post subject: Reply with quote
Ticket http://svn.dd-wrt.com/ticket/3369 seems to be fixed since 25252. Anyone tried if the SES/WPS button now actually turns the Radio Off (or Unmounts the USB device) ?
ricktendo
DD-WRT Novice


Joined: 20 Feb 2014
Posts: 38

PostPosted: Tue Nov 11, 2014 22:50    Post subject: Reply with quote
KrypteX wrote:
Ticket http://svn.dd-wrt.com/ticket/3369 seems to be fixed since 25252. Anyone tried if the SES/WPS button now actually turns the Radio Off (or Unmounts the USB device) ?


24461 is the last one that I am able to install without bricking my WRT54Gv6, otherwise I wold test this
ricktendo
DD-WRT Novice


Joined: 20 Feb 2014
Posts: 38

PostPosted: Tue Dec 09, 2014 4:22    Post subject: Reply with quote
Seems to be working now Very Happy
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum