I say it's a bug, BS says it's not. Your thoughts?

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
SteveJenkins
DD-WRT User


Joined: 04 Dec 2012
Posts: 126
Location: Seattle, WA

PostPosted: Wed Jul 08, 2015 4:45    Post subject: I say it's a bug, BS says it's not. Your thoughts? Reply with quote
I reported this bug today:

http://svn.dd-wrt.com/ticket/4729#comment:1

BS closed it almost immediately saying "rc_startup is started before any wireless configuration. so your setting is likelly overwritten. its no bug. its your responsiblity to use it in a way that it works if you overwrite settings manually"

I appreciate everything BS has done, but with all due respect, that really sounds like a cop out.

Based on the testing I demonstrated in that bug report, I showed it's possible to set the interference mitigation mode on eth1 via rc_startup on a single radio unit (using a sleep command workaround).

I also showed it's possible to use rc_startup to set the interference mitigation mode on eth2 on a DUAL radio unit with the workaround -- but can't find any method to set automate setting the mode for eth1 on boot.

If I can do something for the eth2 antenna via rc_startup, but can't do the exact same thing for eth1 on the same device... that sure sounds like a bug to me.

Am I off my rocker here? I'd sure like to give BS the benefit of the doubt that he just doesn't understand the issue, and I'm certainly open to understanding how I may not understand the issue. But it feels like he's trying to sweep this issue under the rug.

Thoughts?

_________________

My Max-Speed DD-WRT settings | K2.6 vs K3.x Speeds Head to Head | My Overclocking Settings | My blog: SteveJenkins.com | My Job: CheatCodes.com
Sponsor
JAMESMTL
DD-WRT Guru


Joined: 13 Mar 2014
Posts: 856
Location: Montreal, QC

PostPosted: Wed Jul 08, 2015 5:30    Post subject: Reply with quote
Try an ipup script as that should execute after all interfaces are up. Problem solved

http://www.dd-wrt.com/wiki/index.php/Script_Execution

Another approach would be with a cron keepalive style setup where you check the status every few minutes and if your conditional check fails execute script to setup your config as you like it.

You could also try adding a sleep 5 before your commands but I would go with either a or b or a combo of the two.

FWIW I do agree with BS in that you should ensure your own timings.

Cheers
SteveJenkins
DD-WRT User


Joined: 04 Dec 2012
Posts: 126
Location: Seattle, WA

PostPosted: Wed Jul 08, 2015 14:23    Post subject: Reply with quote
Thanks, JAMESMTL. I really appreciate your reply.

I agree with you that one should certainly be responsible for one's own timings. But what chaps me is that:

1) Running this command (setting interference mitigation mode) from the startup script works with single radio units.

2) Running this command from the startup script works for the eth2 adapter on dual radio units.

3) But it breaks for the eth1 adapter on dual radio units.

BS seems to be trying to convince me that it's not possible to set these options from rc_startup. And yet my tests show that those commands are indeed having an effect: the default mode is 1, yet I'm able to set it to 3 in the two successful cases above. It's ONLY the eth1 on a dual radio unit that chokes.

That said, I'll look into an ipup script. However, the fact that you suggested adding a sleep 5 before my commands implies that you didn't look closely enough at my examples, because I did use a sleep command. Smile Still, it's not enough to set the mode for eth1 on a dual radio unit.

The inconsistent behavior is why I still believe this is a bug. Also, the fact that the GUI Command box won't allow you to set the mode for eth1 on a dual radio unit supports the notion that something is wrong inside the firmware.

Works fine with sleep command on single radio, works fine for eth2 on dual radio, but won't set from rc_startup OR the GUI Command box (long after everything is finished booting) on a dual radio unit?

That sure smells like a bug to me...

_________________

My Max-Speed DD-WRT settings | K2.6 vs K3.x Speeds Head to Head | My Overclocking Settings | My blog: SteveJenkins.com | My Job: CheatCodes.com
tmo1138
DD-WRT User


Joined: 24 Mar 2015
Posts: 175
Location: Tacoma, Wa

PostPosted: Wed Jul 08, 2015 16:21    Post subject: Reply with quote
It's not a bug.. it's a behavior based on your observations that you are trying to leverage for your needs. The problem is it's not consistent. Putting "sleep" in any code (regardless of the platform) is relying on a race condition in an attempt to leverage it in your favor. That's got "code smell" and "antipattern" written all over it.
SteveJenkins
DD-WRT User


Joined: 04 Dec 2012
Posts: 126
Location: Seattle, WA

PostPosted: Wed Jul 08, 2015 17:23    Post subject: Reply with quote
Hi, tmo1138. I appreciate your insight, and would love to have you continue in this conversation to help me get to the bottom of this (and I'm certainly open to this being user error if you can help show that to me).

I've done some further testing, from the command line, without any user-created scripts running, without any sleep commands, etc. And I still believe there's something strange happening with interference mitigation on eth1 on dual radio devices.

I've tested it on three different units with the most current (as of yesterday) firmware. And until someone else who actually has a dual radio device runs these same tests and tells me they get different results, it will be hard to persuade me that there's no bug. This occurs even on a default install after a 30/30/30 reset.

As submitted in http://svn.dd-wrt.com/ticket/4732 :

The interference mitigation mode for eth1 on a dual band device seems to "reset" to NULL after a seemingly random number of seconds. This appears to only occur on DUAL radio devices (2.4Ghz + 5Ghz) and ONLY for eth1 (2.4GHz).

There doesn't seem to be any consistency in how long it takes, or at what time it happens.

No user-installed scripts are running on the unit:

Code:
root@gateway:~# nvram get rc_startup

root@gateway:~# ls /jffs/etc/config/
root@gateway:~#


After being set manually, the interference mitigation mode for eth1 resets itself to NULL within 44 seconds:

Code:
root@gateway:~# date
Wed Jul  8 09:24:35 PDT 2015
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# wl -i eth1 interference
root@gateway:~# wl -i eth1 interference
root@gateway:~# date
Wed Jul  8 09:25:19 PDT 2015


Here it resets within 62 seconds:

Code:

root@gateway:~# wl -i eth1 interference 3
root@gateway:/~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# date
Wed Jul  8 09:26:14 PDT 2015
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# wl -i eth1 interference
root@gateway:~# date
Wed Jul  8 09:27:16 PDT 2015


Here it resets within 21 seconds:

Code:
root@gateway:~# wl -i eth1 interference
root@gateway:~# wl -i eth1 interference 3
root@gateway:~# date
Wed Jul  8 09:33:00 PDT 2015
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# wl -i eth1 interference
root@gateway:~# date
Wed Jul  8 09:33:21 PDT 2015


Here it resets within 33 seconds:

Code:
root@gateway:~# wl -i eth1 interference 3
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# date
Wed Jul  8 09:33:34 PDT 2015
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# wl -i eth1 interference
root@gateway:~# date
Wed Jul  8 09:34:07 PDT 2015


Here it resets within 36 seconds:

Code:
root@gateway:~# wl -i eth1 interference 3
root@gateway:~# date
Wed Jul  8 09:34:30 PDT 2015
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# wl -i eth1 interference
root@gateway:~# date
Wed Jul  8 09:35:22 PDT 2015


Here it resets within 19 seconds:

Code:
root@gateway:~# wl -i eth1 interference
root@gateway:~# wl -i eth1 interference 3
root@gateway:~# date
Wed Jul  8 09:36:30 PDT 2015
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# wl -i eth1 interference
root@gateway:~# date
Wed Jul  8 09:36:49 PDT 2015


Here it seems to reset almost immediately and then again within 23 seconds:

Code:
root@gateway:~# wl -i eth1 interference 3
root@gateway:~# date
Wed Jul  8 09:36:54 PDT 2015
root@gateway:~# wl -i eth1 interference
root@gateway:~# wl -i eth1 interference
root@gateway:~# wl -i eth1 interference 3
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# date
Wed Jul  8 09:37:04 PDT 2015
root@gateway:~# wl -i eth1 interference
root@gateway:~# date
Wed Jul  8 09:37:17 PDT 2015


On my final test it waited 1 min 54 seconds to reset:

Code:
root@gateway:~# wl -i eth1 interference 3
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# date
Wed Jul  8 09:37:28 PDT 2015
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# wl -i eth1 interference
Auto Wireless LAN Interference mitigation is enabled and not active
root@gateway:~# wl -i eth1 interference
root@gateway:~# date
Wed Jul  8 09:39:22 PDT 2015


Again, this behavior occurs on three separate E4200 dual radio units, all running the same build. Perhaps this resetting issue is contributing to the behavior observed in #4121 and #4729 (or perhaps all of them are part of some bigger issue?).

Regardless, something strange and inconsistent is happening with interference mitigation + eth1 + dual radio devices.

I also find it strange that after a reboot (including a 30/30/30 reset), the default eth1 interference mitigation mode is "unset" (no reply to the 'wl -i eth1 interference' query) while the default for eth2 is Mode 1. Perhaps both are defaulting to Mode 1, but this "reset to NULL" issue is occurring before I can query the eth1 adapter?

_________________

My Max-Speed DD-WRT settings | K2.6 vs K3.x Speeds Head to Head | My Overclocking Settings | My blog: SteveJenkins.com | My Job: CheatCodes.com
JAMESMTL
DD-WRT Guru


Joined: 13 Mar 2014
Posts: 856
Location: Montreal, QC

PostPosted: Thu Jul 09, 2015 0:18    Post subject: Reply with quote
@steeve

Correct I had not re-read your ticket after reading your first post about it. However like I stated in my original post, sleep would not be my first choice in dealing with the issue.

Following your last post I checked the same commands on my r7000 which is also a dual radio unit. The default on the r7000 is mode 7 (bitmask 1,2,4) for both radios. Making changes on either eth1 or eth2 do not reset even 30 minutes later.

Is this behavior your witnessing unique to that router model, chipset, driver? Is mode 3 supported by that radio in the first place? No idea but it is not strictly a dual radio issue.
SteveJenkins
DD-WRT User


Joined: 04 Dec 2012
Posts: 126
Location: Seattle, WA

PostPosted: Thu Jul 09, 2015 0:43    Post subject: Reply with quote
JAMESMTL wrote:
Correct I had not re-read your ticket after reading your first post about it. However like I stated in my original post, sleep would not be my first choice in dealing with the issue.


It's not my first choice either... however, I'm trying to make the process as straightforward as possible for those who use my E4200 Speed Tweaking blog post, and I'd love to keep those users out of the shell if possible. That's why my preference is to find a solution that can rely solely on the GUI.

Quote:
Following your last post I checked the same commands on my r7000 which is also a dual radio unit. The default on the r7000 is mode 7 (bitmask 1,2,4) for both radios. Making changes on either eth1 or eth2 do not reset even 30 minutes later.


First, you rock. THANK YOU for actually testing it out with a dual radio Broadcom unit!

My E4200 used to support Mode 7 when I was running Fractal builds, but now it only runs 0-3. I don't remember when that change was made, but I do remember it happening, because I had to adjust my blog post. Are you running K3 or K26?

Quote:
Is this behavior your witnessing unique to that router model, chipset, driver?


Your guess is as good as mine. All I can say for sure is that I have three E4200 v1 routers in three different cities running the most current firmware, and all three are acting the same way.

In fact, I just connected to my E4200 in Utah to test, and today it only wants to do modes 0-2. It seems to ignore my requests to do mode 3, though when I attempt a setting outside its range, it "complains" and offers 3 as an option:

Code:

root@access-point:~# wl -i eth1 interference 3
root@access-point:~# wl -i eth1 interference
root@access-point:~# wl -i eth1 interference
root@access-point:~# wl -i eth1 interference 2
root@access-point:~# wl -i eth1 interference
Wireless LAN Interference mitigation is enabled.
root@access-point:~# wl -i eth1 interference 3
root@access-point:~# wl -i eth1 interference
root@access-point:~# wl -i eth1 interference 1
root@access-point:~# wl -i eth1 interference
Non-wireless LAN Interference mitigation is enabled.
root@access-point:~# wl -i eth1 interference 2
root@access-point:~# wl -i eth1 interference 7
interference
        Get/Set interference mitigation mode. Choices are:
        0 = none
        1 = non wlan
        2 = wlan manual
        3 = wlan automatic

root@access-point:~# wl -i eth1 interference 3
root@access-point:~# wl -i eth1 interference


I've seen this behavior before on my Seattle-based router, too. Sometimes a reboot fixes it, and sometimes it just eventually lets me set it from the command line (before it resets to null).

Quote:
Is mode 3 supported by that radio in the first place?


Yes.

Quote:
No idea but it is not strictly a dual radio issue.


Thank you again for posting your results. Though the fact that mode 7 is available to you has be scratching my head. What build are you using (can y you post the filename)?

_________________

My Max-Speed DD-WRT settings | K2.6 vs K3.x Speeds Head to Head | My Overclocking Settings | My blog: SteveJenkins.com | My Job: CheatCodes.com
imranjamadar
DD-WRT User


Joined: 02 Dec 2012
Posts: 134

PostPosted: Fri Jul 10, 2015 10:34    Post subject: i can be of help? Reply with quote
SteveJenkins wrote:
JAMESMTL wrote:
Correct I had not re-read your ticket after reading your first post about it. However like I stated in my original post, sleep would not be my first choice in dealing with the issue.


It's not my first choice either... however, I'm trying to make the process as straightforward as possible for those who use my E4200 Speed Tweaking blog post, and I'd love to keep those users out of the shell if possible. That's why my preference is to find a solution that can rely solely on the GUI.

Quote:
Following your last post I checked the same commands on my r7000 which is also a dual radio unit. The default on the r7000 is mode 7 (bitmask 1,2,4) for both radios. Making changes on either eth1 or eth2 do not reset even 30 minutes later.


First, you rock. THANK YOU for actually testing it out with a dual radio Broadcom unit!

My E4200 used to support Mode 7 when I was running Fractal builds, but now it only runs 0-3. I don't remember when that change was made, but I do remember it happening, because I had to adjust my blog post. Are you running K3 or K26?

Quote:
Is this behavior your witnessing unique to that router model, chipset, driver?


Your guess is as good as mine. All I can say for sure is that I have three E4200 v1 routers in three different cities running the most current firmware, and all three are acting the same way.

In fact, I just connected to my E4200 in Utah to test, and today it only wants to do modes 0-2. It seems to ignore my requests to do mode 3, though when I attempt a setting outside its range, it "complains" and offers 3 as an option:

Code:

root@access-point:~# wl -i eth1 interference 3
root@access-point:~# wl -i eth1 interference
root@access-point:~# wl -i eth1 interference
root@access-point:~# wl -i eth1 interference 2
root@access-point:~# wl -i eth1 interference
Wireless LAN Interference mitigation is enabled.
root@access-point:~# wl -i eth1 interference 3
root@access-point:~# wl -i eth1 interference
root@access-point:~# wl -i eth1 interference 1
root@access-point:~# wl -i eth1 interference
Non-wireless LAN Interference mitigation is enabled.
root@access-point:~# wl -i eth1 interference 2
root@access-point:~# wl -i eth1 interference 7
interference
        Get/Set interference mitigation mode. Choices are:
        0 = none
        1 = non wlan
        2 = wlan manual
        3 = wlan automatic

root@access-point:~# wl -i eth1 interference 3
root@access-point:~# wl -i eth1 interference


I've seen this behavior before on my Seattle-based router, too. Sometimes a reboot fixes it, and sometimes it just eventually lets me set it from the command line (before it resets to null).

Quote:
Is mode 3 supported by that radio in the first place?


Yes.

Quote:
No idea but it is not strictly a dual radio issue.


Thank you again for posting your results. Though the fact that mode 7 is available to you has be scratching my head. What build are you using (can y you post the filename)?


Will your script work on my WZR-DHP1750? by not killing the router?

its a broadcom unit with the following specs;


Quote:
CPU Frequency RAM Flash Ethernet Wireless USB Serial JTAG
Broadcom BCM4708 800 MHz 512 MB 128 MB 4x LAN
1x WAN BCM4360 a/c 1300 MBps
BCM4331 b/b/n 900 MBps 1x 3.0
1x 2.0 internal ?
SteveJenkins
DD-WRT User


Joined: 04 Dec 2012
Posts: 126
Location: Seattle, WA

PostPosted: Fri Jul 10, 2015 14:25    Post subject: Reply with quote
Hi, imranjamadar. You don't need to run any script to test this if you have a dual radio Broadcom unit.

All these can be done from the command line. Please let me know what you find? Thanks

It's also possible (though unlikely) that this could be limited to only the E4200.

_________________

My Max-Speed DD-WRT settings | K2.6 vs K3.x Speeds Head to Head | My Overclocking Settings | My blog: SteveJenkins.com | My Job: CheatCodes.com
SirSilentBob
DD-WRT User


Joined: 09 Oct 2007
Posts: 258

PostPosted: Sun Jul 12, 2015 2:26    Post subject: Reply with quote
SteveJenkins,

I have a R7000. Is there anything you want me to try on my unit? I've been trying to look up info what exactly the modes do, but haven't found anything. just wondering if you knew specifically and if it was something that you could BRIEFLY explain.

Here's the configuration options for an R7000:

Code:
~# wl -i eth1 interference

Mode = 7. Following ACI modes are enabled:
        bit-mask 1:  Reciever Desense based on glitch count
        bit-mask 2:  Limit pktgain based on hwaci (high pwr aci)
        bit-mask 4:  Limit pktgain based on w2/nb (high pwr aci)

~# wl -i eth1 interference get
interference
        NON-ACPHY. Get/Set interference mitigation mode. Choices are:
        0 = none
        1 = non wlan
        2 = wlan manual
        3 = wlan automatic
        4 = wlan automatic with noise reduction

        ACPHY. Get/Set interference mitigation mode. Bit-Mask:
        0 = desense based on glitches
        1 = limit pktgain based on hwaci (high pwr aci)
        2 = limit pktgain based on w2/nb (high pwr aci)
        3 = enable preemption
        So a value of 15 would enable all four

~# wl -i eth2 interference

Mode = 7. Following ACI modes are enabled:
        bit-mask 1:  Reciever Desense based on glitch count
        bit-mask 2:  Limit pktgain based on hwaci (high pwr aci)
        bit-mask 4:  Limit pktgain based on w2/nb (high pwr aci)

~# wl -i eth2 interference get
interference
        NON-ACPHY. Get/Set interference mitigation mode. Choices are:
        0 = none
        1 = non wlan
        2 = wlan manual
        3 = wlan automatic
        4 = wlan automatic with noise reduction

        ACPHY. Get/Set interference mitigation mode. Bit-Mask:
        0 = desense based on glitches
        1 = limit pktgain based on hwaci (high pwr aci)
        2 = limit pktgain based on w2/nb (high pwr aci)
        3 = enable preemption
        So a value of 15 would enable all four


It would seem that by default on a R7000 mode 7 is set. I ASSUME it's sorta similar to the whole linux file permissions sort of thing, where 1 is execute, 2 is write and 4 is read, and then they can be allowed in any combination needed. so 7 = Bitmasks 1, 2 & 4 are ENABLED ??? Also, the "So a value of 15 would enable all four" line confuses me, since the values right above it are 0,1,2,3...

_________________
Netgear R7000 w/r31780M <KONG> build

Netgear R6700 (Un-opened with stock. My backup/emergency router if the R7000 takes a dump...)

2x Buffalo WHR-HP-GN 28493 (Used for 2.4 Ghz bridge when needed.)

Asus WL-500g Premium (1x v1 & 1x v2) (Still have, but retired for now.)

1x Linksys WRT54G v8 >>DD-WRT v24SP1 (The other routers needed something to point at and make fun of.)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC 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 can attach files in this forum
You can download files in this forum