Williams: That's when I reach for my revolver...
Yes, there are standards. But as we all know, given 10 people and a standard, you'll end the day with 12 or 13 differently behaving "standards-compliant" implementations. People suck. Youd think it would be easy to agree on an AT command for "prefer 3G / prefer 2G / 3G only / 2G only". NO SIMPLE FOR YOU. But NetworkManager has to work around huge amounts of stupid. Here's a run-down of some of the mobile broadband hardware thats available today and what about it sucks."
Posted Mar 23, 2009 20:18 UTC (Mon)
by davecb (subscriber, #1574)
[Link]
My leaky memory says a colleague created a
--dave
Posted Mar 23, 2009 21:20 UTC (Mon)
by rathann (subscriber, #50815)
[Link] (5 responses)
Posted Mar 24, 2009 0:10 UTC (Tue)
by pabs (subscriber, #43278)
[Link]
Posted Mar 24, 2009 10:03 UTC (Tue)
by dcbw (guest, #50562)
[Link] (3 responses)
There's no reason why you need a longer association timeout if things work correctly. It should not take more than 20 or 30 seconds to associate with an access point. If you are near the margins of the network, move closer, deploy another access point in the weak coverage area, or get a better client antenna. If there is a lot of intereference, you need to reconfigure the wifi network to use non-overlapping channels, or use the 802.11a band so your network isn't overrun with microwaves from the break-room at lunch.
Hacking around shit with one-off config options that don't actually fix the source of the problem is not the way to make things better; it's a way to create an unmaintainable, untestable pile of junk.
Posted Mar 24, 2009 10:36 UTC (Tue)
by rathann (subscriber, #50815)
[Link] (2 responses)
Posted Mar 24, 2009 13:17 UTC (Tue)
by dcbw (guest, #50562)
[Link]
I'm opposed to blindly increasing it with no specific reason *why*, and no attempt to figure out what the real casuses of connection failures are.
Posted Mar 25, 2009 11:22 UTC (Wed)
by nhippi (subscriber, #34640)
[Link]
If OTOH only the association is slow, and the rest of networking is reliable, it is a bug somewhere in the stack. And it should be rather fixed than worked around (by adding a configuration option, in this case)
"Make that thing configurable" is often a sign of "cult of workarounds". The cultists prefer enforcing endusers to twiddle settings randomly until things work, instead fixing the underlying bugs.
Posted Mar 23, 2009 23:37 UTC (Mon)
by endecotp (guest, #36428)
[Link] (5 responses)
The article is about getting these things to work with network manager. But in my scenario I would want to plug it in to something like my NSLU2 or even my OpenWRT router to provide connectivity for the whole LAN. My NSLU2 isn't going to be running the GUI network manager app: I would need to be able to configure the thing at the "ifconfig" level. I do hope that they aren't putting too much of the support for these things at too high a level.
Posted Mar 24, 2009 0:14 UTC (Tue)
by pabs (subscriber, #43278)
[Link] (3 responses)
NM isn't the only network management solution in town, there are at least wicd & connman.
Posted Mar 24, 2009 0:43 UTC (Tue)
by sbdep (subscriber, #13282)
[Link] (2 responses)
Depending on the card, it usually takes a udev rule to prod the card/dongle to switch from USB mass storage to usb modem mode (for USB dongle devices that need this prodding), then a ppp peer config and a chatscript to tell the card to initialize and connect to the network, then "dial" the magic number to get a data connection.
Posted Mar 24, 2009 1:47 UTC (Tue)
by drag (guest, #31333)
[Link] (1 responses)
Well you see that's the problem. That is not really true. It never really was, but it is rapidly getting less and less true.
Like the blog says you can have different interfaces for each card and often you can have multiple serial devices, 3 or more, for configuring a card. The pppd tools are not really capable of configuring them correctly.
---------------------
Take, for example, my Sony 3G phone. I can configure it using pppd and use it like that, but that is essentially 'gimp legacy mode'. The thing sets up a virtual ethernet port over USB and that is what is actually suppose to be used. What is suppose to happen is that the OS sends configuration stuff over one of the serial connections and then you connect through the usb-ethernet adapter.
The reason they are doing this is because PPP has too much overhead and it will choke out over USB before the user can get high speed internet access.
Plus I expect there are all sorts of extra settings that you miss out on just using regular pppd and scripts.
So if you were to benchmark the network performance of Linux vs Windows over celular data networks you'll find that Linux is usually slower, has more reliability issues, and tends to have higher latency.
Posted Mar 24, 2009 10:14 UTC (Tue)
by dcbw (guest, #50562)
[Link]
Posted Mar 24, 2009 0:52 UTC (Tue)
by camh (guest, #289)
[Link]
Posted Mar 24, 2009 1:04 UTC (Tue)
by ras (subscriber, #33059)
[Link] (9 responses)
But he lost me at the end when he said:
> But thats why NetworkManager rocks; we pony up the cash to make sure our shit works.
He must be living in some parallel universe. I have _never_ had the good fortune to see NetworkManager work as it supposed to.
Posted Mar 24, 2009 2:03 UTC (Tue)
by drag (guest, #31333)
[Link] (1 responses)
This 'modem' effort is relatively recent push on the part of the network-manager folks.
Previously they concentrated on 802.11 wireless and that sort of thing and thus far, as my personal experience can tell, that stuff works very well now.
Of course it is not perfect, but it is much better then the nightmare configuring Fedora for multiple networks used to be. (hell, getting my workmate's Motorola phone working on it took multiple weeks to get working in a usable manner. And even after that he would have to occasionally log into Windows when it would refuse to connect after a while)
Although I found Debian's configuration stuff worked pretty well for command-line user types. Quite liked it once I figured it out..
I think that Network-manager is more capable, and hacker friendly, then people think it is. Originally it was horrible.. but its had a couple rewrites as far as I can tell. I figure if somebody doesn't know what Network-Manager dispatcher is for then they are probably missing out on some cool possibilities.
The only thing that has been missing out for me is good command line tools, but they seem to be fixing that.
Posted Mar 24, 2009 10:22 UTC (Tue)
by dcbw (guest, #50562)
[Link]
Was having that discussion the other day with somebody too... With Mac OS X for example, you might actually be able to create new software that doesn't need to go through a few iterations before it's actually useful to most people, becuase there isn't as much variation in hardware or OS.
But with Linux, so many people use it in so many configurations, and with so much hardware (and so many drivers of differing quality), that if you don't release stuff early and get people testing it, you'll just go through the same pain whenever you release it later.
Posted Mar 24, 2009 10:09 UTC (Tue)
by dcbw (guest, #50562)
[Link] (1 responses)
*Most* of the problems NM has are caused in whole or in part by bad drivers, and that's why its important to have the code so we can fix those drivers. Binary drivers, on the other hand, cannot be fixed, and no maintainable solution can be had by working around their bugs.
And of course there are bugs in NetworkManager, and features that people want that aren't yet implemented. For example, when the wifi connection fails (timeout, AP forcibly disconnected you, you loose signal, etc) nm-applet will pop up the "Type In Your Key" dialog. People hate that. I understand why. The underlying cause was either (a) the driver failed, or (b) the key was wrong, or (c) the access point is crap. So I'm going to work around that by making NM Just Try Harder.
But there comes a point when Just Try Harder fails, because the driver or hardware have problems, and NM just can't work around it any more. Then we get to fix the driver anyway, which we should have done the first time around anyway.
Posted Mar 24, 2009 23:46 UTC (Tue)
by ras (subscriber, #33059)
[Link]
My first clash with NM was when someone complained to me they were not getting a DHCP lease. At the time I didn't even know what NM was, or that it was running, but soon found out when I used my the normal tools to debug the problem (ip, ping, dhclient, etc), and then something was undoing my changes. Things obviously changed, but the configuration files for those tools were untouched. Weird, it was like there was a ghost in the machine. Sniffing around I noticed some of the daemons had connections to dbus, which was a new development. I dumped the dbus messages, and eventually the path lead to NM. So it appeared someone had decided to redesign the entire configuration system for networking, moving away from configuration files I could look at in conjunction with man pages and make some sense of. Instead I was confronted with undocumented babble flying across a software bus. You can probably tell how impressed I was with that development.
Still, the solution was simple enough. Disable NM manager, debug the problem as I would normally, then re-enable NM. The problem was unrelated to NM - it was a bug the in firmware of a wireless router. The only issue NM caused was one of visibility - while NM was running it was impossible to tell at what point things were going wrong.
My second clash with NM was on a machine that has a broken wireless switch. Ie it had an internal wireless card that was fully functional, but because of the broken switch you could not turn it on. The owner plugged in a second wireless card, which worked perfectly when I configured it manually. Network manager refused to do anything with the second wireless card. I considered finding the bug in NM, but then visions of all those dbus interconnections rose up and I thought better of it. Any event driven daemon with its fingers in that many pies was probably a nightmare inside. So I just blacklisted the first wireless card, and NM was happy.
There were other clashes whose details escape me now, but suffices to say I have never had a machine which NM "just worked" on. There was always some situation in which it bugged out. Admittedly I tend to work on problems which have defeated others, so the machines tend to have some kink. But not the final one, which occured last weekend. It was a newly installed Ubuntu 8.10 machine. The owner wanted to use one of those 3G USB dongles described the article. To NM's credit the dongle just worked. Having proved the dongle worked we disconnected it, and asked NM to reconnect to 802.11. Do you think it would do that? Nope. Again I had not trouble doing it manually, NM wouldn't. In the end I just told the guy to reboot his machine if he wanted to change from 3G to 802.11.
So now we come to this 3G modem thing. It is great you NM guys are working on it. But what have you produced? I haven't looked, but is it a generic tool we can all use to probe these things, or some code deep within the guts of NM that only NM can use? It is not just an NM problem. Servers and openwrt boxes also have this problem, and they don't run NM.
Posted Mar 24, 2009 13:05 UTC (Tue)
by dwmw2 (subscriber, #2063)
[Link] (4 responses)
That isn't to say there aren't still some problems though — the lack of support for Bluetooth DUN and PAN is painful, although hopefully that should be fixed soon.
Watching the system automatically unmount all my NFS file systems while I was in the middle of a 'yum update' from NFS, just because there was a brief power glitch to the Ethernet switch, wasn't a particularly fun experience either...
Posted Mar 24, 2009 13:21 UTC (Tue)
by dcbw (guest, #50562)
[Link] (2 responses)
Posted Mar 24, 2009 13:25 UTC (Tue)
by dwmw2 (subscriber, #2063)
[Link] (1 responses)
Posted Mar 24, 2009 13:37 UTC (Tue)
by dcbw (guest, #50562)
[Link]
Posted Mar 24, 2009 13:36 UTC (Tue)
by dcbw (guest, #50562)
[Link]
NetworkManager is both the carrot and the stick. If NM just worked around broken stuff and proprietary drivers, it would be a hacktower of doom and we may still be stuck largely in 2006-wireless land.
Examples of driver/stack fixes due to NetworkManager:
- mac80211 adhoc mode association event and ibss merging timeout fixes
Posted Mar 24, 2009 18:40 UTC (Tue)
by AlexHudson (guest, #41828)
[Link]
Dan's update to F10 today fixes the problem for me, and I'm in "just works" land again, thank goodness. Plug in stick, NM kicks it, I'm online.
I would go as far as to say NM is better than any other system I've seen on any platform; it simply rocks. It doesn't always work, it has rough edges, it's not perfect for the static IP crowd yet. But my goodness, it's pretty darn keen.
Posted Mar 25, 2009 1:59 UTC (Wed)
by dag- (guest, #30207)
[Link]
Very concerning, especially if you need to make it just work with requiring some closed logic from the vendor...
Williams: That's when I reach for my revolver...
VFS just for modem brain-damage, with each
operation having a pointer-to-function
and a pointer-to-string-parameter. The
usual code was 'send string and expect
return code', but sometimes there was a whole
mess of stuff in the code (;-))
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
The E169 uses the "option" driver in the kernel. Earlier kernels (maybe about 2.6.26 and earlier) need the usb_modeswitch utility to switch the USB stick from a "CDROM" with drivers to the actual modem. In the later kernels, the "option" driver does this automatically.
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
"He must be living in some parallel universe. I have _never_ had the good fortune to see NetworkManager work as it supposed to."
I was saying that a year or so ago, but I've changed my mind. Since then, I have had it working relatively sanely on a few machines. It is getting better.Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
Williams: That's when I reach for my revolver...
- fix wpa_supplicant adhoc/infra mode switching
- driver scan capabilty advertisement (automatically handle ap_scan=1/2)
- always respect specific SSID probe scans
- always return scan success/fail information instead of dropping it on the floor leading to userspace timeouts
- age scan results on resume so userspace doesn't get stale AP lists
- driver conformance to WEXT APIs, especially for WPA support around 2006/2007
- D-Bus control interface for wpa_supplicant
- Huge input to next-generation kernel wireless APIs so we don't repeat the mistakes of WEXT (especially with feedback from kernel->userspace, a large weakness of WEXT)
- improved ethernet driver support for carrier detection
Williams: That's when I reach for my revolver...
Same for Nokia E71