20080526 catching up with linux mobile networking - plembo/onemoretech GitHub Wiki

title: Catching up with Linux: Mobile Networking link: https://onemoretech.wordpress.com/2008/05/26/catching-up-with-linux-mobile-networking/ author: lembobro description: post_id: 525 created: 2008/05/26 18:19:16 created_gmt: 2008/05/26 18:19:16 comment_status: open post_name: catching-up-with-linux-mobile-networking status: publish post_type: post

Catching up with Linux: Mobile Networking

This long holiday weekend gave me the chance to tackle a few technological loose ends here at home. The main activity turned out to be reconfiguring my wireless router and the growing number of wifi devices in the house. I say “turned out to be” because none of this was planned. My use of the past tense may also be a little premature, as I write this it looks like the new processes I’ve introduced may still need some tweaking.

Apart from changing my Linksys router’s WEP security so that it now uses a passphrase instead of just a HEX key, I’ve also enabled NetworkManager on the home laptop running CentOS 5, after actually having some success using it on our own XO machine. More on the XO later, first some notes on WEP security as supported on the Linksys WRT54GL Wireless Router.

The WRTG54GL supports a number of wireless security standards methods including WEP key and WPA. I’d prefer to use the more advanced WPA, but most consumer wireless client devices, like the Nintendo Wii and DS Lite consoles we have here at home, don’t support it.

One major annoyance with using WEP on Nintendo and Windows XP is that neither product recognizes a passphrase as input, and makes you instead enter in the 26 character primary HEX key that gets generated by the router when you save the passphrase (at the latest firmware level the router actually generates 4 HEX keys off the passphrase, to allow it to change keys with the client during a session).

Both CentOS and the XO, both of whose NetworkManager code is based on Fedora’s, allow passphrases as input, making life so much easier.

Over the last few years I’ve used a pretty static configuration for our Linux laptop by hacking up the files under /etc/sysconfig/network-scripts. I had tried using NetworkManager a couple of times but didn’t have much luck getting it to work reliably.

Last week the old 802.11b Linksys network card we’d been using in the Linux laptop started acting flaky, so I went out and got a new TP-Link WN510G 802.11 b/g card to replace it. The new card uses the Atheros chipset, so that presented the opportunity to dump ndiswrapper and go to the native card driver provided by the madwifi project. I’d worked with Atheros cards before, so this didn’t present a real challenge. The big advantage going with a native Linux driver over the Windows drivers that ndiswrapper supports is that we don’t have to recompile the driver on every new kernel upgrade.

As long as I was changing everything anyway, I thought it might be worthwhile to give NetworkManager another try — especially because the XO already uses it and I really didn’t want to spend time learning how to hack the latter’s network config files.

Setting things up correctly took some time, mostly because of a lack of good, clear documentation (a chronic problem in the open source world). The initial problem I had was not understanding the role of the Gnome key infrastructure in how NetworkManager had been engineered to work. It also would have helped if the setup gave you a choice of using the default “secure” configuration that prompted you for an access password to allow apps like NetworkManager to access the keyring or allowing this to happen automatically. As it was I had to Google around a bit to piece together how to hack things so that the latter would work. The resulting setup, which only connects the machine to the network when someone logs in, is obviously more secure than the “always on” of my previous configuration, but will present a serious impediment to remote management.

The nice thing about this new setup is that if I take the laptop “off campus” outside range of the home router, connecting to someone else’s router is simply a matter of choosing from a list on a drop-down menu, just like with Windows XP.

We have experienced a few issues with the connection getting dropped and only being able to re-establish it by recycling the whole network stack, and then logging out and then back in again for a new session. Still not sure whether that’s a function of a problem in the every minute polling done by NetworkManager or something more fundamental like ACPI kicking the machine into hibernation mode or just locking the desktop when the screensaver comes on.

The only discomfort I have now is with the fact that NetworkManager effectively virtualizes my connection configuration, so I no longer have control over it by hacking the files under network-scripts. But that’s one of those things, like mounting and unmounting removable media via fstab (on a Gnome desktop that’s now all controlled by Nautilus), that needed to give way to the better idea.

Copyright 2004-2019 Phil Lembo