[PLUG] Linksys w/ dd-wrt suddenly goes south
Keith Lofstrom
keithl at kl-ic.com
Thu Jul 3 17:29:17 UTC 2008
On Wed, Jul 02, 2008 at 02:15:14PM -0700, Roderick A. Anderson wrote:
> I have a Linksys WRT54GL running dd-wrt v23 standard that has suddenly
> started going south at random times (as in several times a day). It is
> on a LAN with a Win2k server providing Active Directory services.
> Previously the LAN used route-able IPs and now is on a private IP range.
> There is most certainly residue of the old LAN still on the server.
>
> When the Linksys goes down I can still get a wireless connection but my
> N800 reports it as a link-local connection. Typically I've seen this
> when the DHCP lease does not include gateway information.
>
> Currently I'm thinking it is flaky hardware but I'm looking for other
> ideas. There is a replacement Linksys coming, hopefully today, but I'm
> hedging my bets in case it is something missed during the LAN changeover
> and now a Windows service (DHCP, DNS) has come active and is using the
> old network settings.
> Keith Lofstrom wrote:
If the traffic is increasing, or the load on the wall power circuit
> is increasing (an air conditioner is attached, sagging the line power)
> or the WRT is in a hotter room or any number of other environmental
> conditions apply, then it may not be a flaky WRT. Instead, it can be
> a flaky wall wart power supply. Many of these seem to be marginal,
> and in stressful conditions they can crap out, causing resets. Increased
> traffic load means increased packet power, which increases the load
> on the wall wart.
>
> Note that you can power a WRT with many 16V IBM Thinkpad laptop
> adapters. See the somewhat obsolete writeup at:
>
> http://www.keithl.com/Linksyspower.html
>
> Note that since the sale to Lenovo, some new Thinkpads use a different,
> larger diameter barrel on the AC adapter. So check the connector size,
> and voltage, first before ordering. I know that the AC adapters for
> the THinkpad 560, 570, T20, and T30 will work, and probably others,
> and you can find these cheap on Ebay.
>
> Also, just try cleaning the connector on the output of the wall wart.
> If it is corroded, you may be losing power right there.
On Thu, Jul 03, 2008 at 06:13:52AM -0700, Roderick A. Anderson wrote:
> I didn't think of this and I am using the same socket that the Sonicwall
> was using. Could be a marginal wall-wart. It has been pretty hot here
> during the day. The flip side to that is all the comm equipment is here
> and it is on a UPS so hopefully I'm not getting caught by the
> side-splash of an infinite-improbability-drive.
Keith responds:
I don't think I made myself clear. This is not a "digital" thing.
It has more to do with a summation of small problems putting your
Linksys over the edge on apparently random occasions.
Your Linksys was designed for a home environment, working straight
out of the box and through some short warranty period, on average,
without too many resets. Let's say that the average Linksys has
a "power safety margin" of 1.5 under these conditions. If the
margin drops below 1.0, it may fail. The margin reducers rarely
line up, but they do from time to time.
1) Unless you have an "offline" UPS, it only makes things worse.
An offline UPS converts wall AC power to battery voltage to output
AC power, and removing wall power has no immediate effect on the
output AC power. If you need steady power, you must have one of
these.
The vast majority of storebought UPSs are the cheaper "online"
variety - the output is connected to wall power until it fails,
and then a relay switches the output from wall power to battery
generated power when the wall voltage drops below a threshold
(and switches again when the wall power comes back).
During the transition, as the relay contacts are moving from one
source to another, the output voltage drops to ZERO; usually
for one or two line power cycles. Most monitors and CPU power
supplies have enough internal energy storage to keep running through
the zero voltage time. Not so the Linksys - its internal energy
storage is trivial, just enough to keep running between the lobes
of a robust power sine wave when drawing maximum power. The Linksys
will do a power-on reset if power is gone for a very brief time.
2) If you are transmitting more packets than a typical home setup
( back in the era the Linksys was designed for, 1Mbit DSL ), then
Linksys sucks down more power than it was designed for. It needs
very steady power to keep running in these conditions. It will
not get it under condition (1).
3) The Linksys draws 6 Watts transmitting. The wall wart provides 1
amp, on average, approximately. On average, the wall wart provides
that at 12V, but looking at the waveform with an oscilloscope, under
ideal conditions, the voltage bounces around between 8V and 16V
with an 8.3 millisecond period. Power is current times voltage,
so 1A times 8V is 8W, only a small margin over 6W needed. If the
margin goes negative, the Linksys loses power and resets.
4) The voltage waveform from your wall socket is not ideal. If a
heavy load goes on line, like an industrial motor or a refridgerator
or an air conditioning pump anywhere on your branch circuit, it will
"sag" the power line voltage, possibly tripping the UPS, or else
just passing it through. This can push the margin negative. There
are voltage regulators upstream of your wall socket, but they take
some time to respond to loads. In fact, the load of a shaded pole
induction motor at startup looks pretty close to a dead short.
5) The power connectors from the wall wart to the Linksys are
pretty crappy. If you want a good, low resistance power connection
between units, you want gold-plated connectors. If you don't have
that, then the connectors can corrode over time, increasing their
resistance. Of course, that doesn't affect the unit new out of
the store (Linksys as a 100 foot, 100 second warranty as near as
I can tell). So if corrosion over time causes half an ohm of
resistance in the connection (typically on the inner connection
pin, but also on the barrel) then that will take away about half
a volt of the supplied power under low voltage conditions. You
can clean the connectors to improve this, although you should not
do this frequently or it will take off the chrome plating.
6) Miscellaneous other margin-reducing events. For example, the
original WRT was flashed in the factory, for the first time, under
near-ideal conditions. Flashing it a second or third time under
non-ideal conditions will make a few of the NVRAM bits a little
"weaker" and sensitive to smaller margins. Some instructions on
a processor require more power than others. Some patterns of
signals on interconnect wires require more power than others.
There are lots of little effects like this, some in hardware, some
in software. Aging plays a big role in many of these effects.
It is the sum of all these effects that can push a Linksys into the
negative margin regime. With intermittent results; if the transmit
packets occur during a line voltage sine wave peak, there is plenty
of margin. If a burst of transmit packets occur while the AC cycle
is crossing zero, after a motor-induced power sag, on a hot day when
resistance is high, over somewhat corroded connectors, and you go
into negative margin and reset your Linksys. Or your Actiontec, or
whatever cheap unit you've got.
Why does a laptop AC adaptor improve this scenario? Primarily, it is
because the adapters have a large energy bucket inside, and are designed
to produce a regulated DC output voltage under a wider range of power
line conditions, to a heavier load. They can produce 40 Watts, not 6W,
and they can provide it over many missing power line cycles. Think of
it as a minature offline UPS. If you use a 16V adapter, the Linksys
internal regulator draws 6W/16V or about 0.4 amps during transmitting,
and this means less power loss due to corrosion. Empirically, using
16V laptop AC adaptors for powering Linksys devices JUST WORKS, with
almost no unexplained resets compared to the marginally inadequate
wall warts. Again, read the web page I mention above.
Computer people often have a hard time understanding soft margins.
It is assumed that something is either good or bad, without a gray
area. That is NOT how things work in the real world. I promised
to give a lecture to PLUG, "bits are a myth" (Real Soon Now), where
I explain the analog nature of the "Real World" and why the digital
approximation often fails. Robust systems are designed with this
in mind. Robust software is designed to sense marginal conditions
and recover quickly from small nondeterministic behavioral upsets.
That means NEVER assuming that a sequence of correct instructions
always produces the same result. Always, always, test the result!
As we enter the era of unsteady power supply, and gigantic high speed
systems pushed right to the margin of failure, system designers and
programmers must take these effects into account or watch their
products exhibit "mysterious" "flaky" behavior in the field. There
is actually nothing mysterious about the behavior; it is a fact of
life. The mystery is why programmers cling to the myth of complete
mechanical determinism when experience contradicts it so often.
Keith
--
Keith Lofstrom keithl at keithl.com Voice (503)-520-1993
KLIC --- Keith Lofstrom Integrated Circuits --- "Your Ideas in Silicon"
Design Contracting in Bipolar and CMOS - Analog, Digital, and Scan ICs
More information about the PLUG
mailing list