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.
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.
Joined: 04 Dec 2012 Posts: 126 Location: Seattle, WA
Posted: Wed Jul 08, 2015 14:23 Post subject:
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. 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?
Joined: 24 Mar 2015 Posts: 175 Location: Tacoma, Wa
Posted: Wed Jul 08, 2015 16:21 Post subject:
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.
Joined: 04 Dec 2012 Posts: 126 Location: Seattle, WA
Posted: Wed Jul 08, 2015 17:23 Post subject:
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.
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
Joined: 13 Mar 2014 Posts: 856 Location: Montreal, QC
Posted: Thu Jul 09, 2015 0:18 Post subject:
@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.
Joined: 04 Dec 2012 Posts: 126 Location: Seattle, WA
Posted: Thu Jul 09, 2015 0:43 Post subject:
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:
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.
Posted: Fri Jul 10, 2015 10:34 Post subject: i can be of help?
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:
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 ?
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)
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)
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.)