It’s been a while since I’ve had time to update this blog, so here’s a rambling omnibus catch-up.
The Laptop and the OpenBSD 4.4 Snapshot
I finally had a chance to burn the 4.4 snapshot I’d downloaded but, unfortunately, I only got dumps when I tried booting it on my laptop. So I grabbed the 4.3-install CD. I’ll download another snapshot shortly and give it another shot. I hope it’s not due to a change in ACPI/APM. I have a couple things ahead of it on my todo list before I’ll find out.
OpenBSD 4.3 on Laptop
I’ve run 4.3 on this laptop before, albeit wired rather than wireless. I typically run my router with my SSID hidden and with WPA. This has made it difficult given the fact that some operating systems don’t fare so well with hidden SSIDs, and OpenBSD pre-4.4 lacked WPA. Still, I wanted to use OpenBSD on this laptop with this card, which uses the bwi driver, even if it means using WEP until I can install 4.4.
I installed 4.3 Thursday night and started my updates Friday morning, and just before an IPv6-related patch was released (which failed when I rebuilt the kernel on my desktop but I’ll save that subject for later after I get a chance to see what happened). The install was fast, but it takes a while to build the system on a sub-ghz computer — and I’ll be honest, I don’t like compiling anything on this poor little old laptop.
Wireless Configuration with bwi
Anyway, I had a chance today while watching some college football to configure wireless and set up X. I figured I would at least have to broadcast my SSID again. I considered turning off all encryption to see if I could connect at all but that wasn’t necessary. The biggest issue seems to be timing intervals — I get watchdog timeouts before getting a DHCP offer from the router. This was time-consuming and annoying because it would go through that charade for a few minutes before giving me a login.
Running “ifconfig bwi0” showed that I didn’t have a lease (so did looking at the router). So I took it down, brought it back up, ran dhclient, and got my lease. Now I can shell in from the laptop (which I’m doing now).
(Edit: I wrote a script that adds a sleep period that allows enough time for the router to give me a lease; I’ll add that to my rc.local tomorrow.)
Comparisons of Broadcom 43xx Between Operating Systems
Let me give some impressions about differences between FreeBSD, OpenBSD, and Linux as it relates to Broadcom 43xx-based wifi. Broadcom has an excellent and well-earned reputationwith their communications equipment. While their chips work very well in Windows and in Apple products where they can protect their intellectual property by agreement, it’s been a long road for open source operating systems in trying to support these chips. I understand Broadcom’s reasons for not divulging anything that could harm their business. I respect that. I also commend their decision this summer to release a Linux-specific driver for other 43xx cards (not mine), which I presume was made because of Dell’s offering of Ubuntu on laptops (Dell is a big client of Broadcom) and perhaps a shot at getting more of these particular chips in the burgeoning netbook niche.
This card wasn’t my first choice, it was just what remained after selling another laptop and card combination (to a friend who was impressed with OpenBSD and didn’t want to install it himself) and my USB wifi adapter (Atheros) swiped by another friend. I held onto this card because I knew there was active development among the Linux community. I crossed my fingers. And I also cursed a lot.
I’ve now used this card in Windows XP, Linux (2.6 but not 2.4), FreeBSD (6.2, 7.0), and OpenBSD 4.3. Needless to say, it works wonderfully in Windows. The manufacturer has all the leverage when it gets to write a driver that’s designed to work in only one operating system. Too bad I don’t have that operating system on my laptop.
It’s been hit and miss in Linux. I wanted to use it in DSL but between the older versions of ndiswrapper, 2.4 kernel, and wireless extension/tools, it just wasn’t to be. The card has been a pain in the ass to configure in kernel 2.6 since the bcm43xx driver was split up (bc43 and bc43legacy), and it wasn’t very easy to configure before then depending which version of wireless extension/tools were used. The one distro that had it working easiest and as I wanted it to (hidden SSID, WPA) had too many shortcomings for me to continue using it.
I’d briefly used the card in FreeBSD 6.2 early last year, but preferred the native Atheros driver to using ndis. Prior to installing OpenBSD 4.3, I decided to try a quick FreeBSD install to see how easy it would be to set it back up like I want. Getting it to work with a hidden SSID was a failure. I was able to use wpa_supplicant once I un-hid the SSID. I decided to give 7.0 a quick shot to see if it was any better with respect to ndis or wpa_supplicant. The one thing I appreciated was having wpa_passphrase in 7.0 (missing in 6.2?). One thing I don’t like about FreeBSD is having config and setup in /boot/loader.conf and in /etc. I was able to get it working in both 6.2 and 7.0. To FreeBSD’s credit, ndisgen is much easier than manual ndiswrapper configuration in Linux was.
Despite the issues I mentioned above, OpenBSD is by far the easiest to set up this card. By FAR. The card has been detected as “Broadcom 4306” whether it’s been configured or not. I obtained the recommended firmware using pkg_add, which installs it in the appropriate firmware directory in /etc. Once that was installed, I manually entered:
ifconfig bwi0 nwid "mynetwork" nwkey "mywepkey"
ifconfig bwi0 up
I looked to make sure it was correct (ifconfig), then:
and I had my lease.
Another point in OpenBSD’s favor is how the configuration files are all in /etc. It’s very easy to set up new interfaces: set up /etc/hostname.if (where if is the interface name) for each interface — e. g., hostname.url0, hostname.bwi0, hostname.ral0, and so on. When all goes well, these are scanned at boot and the interfaces brought up (or attempted). See the man page for hostname.if for details whether using DHCP or whatever. It’s very easy.
As I noted earlier, I’m getting watchdog timeouts using hostname.if so I’m going to see what I can do about that or else stick with starting the network via script or alias (edit: see other edit above). I’m content either way because, short of installing Windows (not going to happen), it works and it works easily.
So even though Windows is by far the easiest way to use this card, OpenBSD wins the ease contest among the BSDs (actually, DragonflyBSD deserves credit because they wrote the driver), and FreeBSD trumps Linux in getting bcm43xx cards set up with WPA. The newer bc43/legacy drivers very well may work best (short of Windows), but that’s been the most difficult setting up with my particular card.
I’m still going to try getting a 4.4 snapshot installed so I can use WPA.
Don’t Pass the Kool-Aid… Yet
Finally, not everything has been smooth sailing. OpenBSD can be finicky about certain things. That’s to be expected when security is Priority One.
There are some USB-related issues I’ve experienced. The first is the inability to use a USB keyboard during installation, which is a longstanding issue among the BSDSs (I’ve had mixed success with FreeBSD in this regard with it working in one release and breaking later; I was able to use my USB keyboard during my lone install of NetBSD 3.1). My primary desktop is all USB, no PS/2, no onboard networking, and no PCI slots. So I installed on another computer and moved the hard drive back here.
FreeBSD and OpenBSD also have a similar issue in requiring a particular port for USB keyboards — they seem to work in only one port, no other. Unfortunately for my desktop, it’s the same one required for the USB-ethernet adapter. The solution is a USB hub inserted into that port so both devices can share the address.
Next USB issue: I inserted a USB stick to transfer some config files. I couldn’t mount it. I checked dmesg and saw that the stick wanted to draw twice as many milli-amps as the USB port allows. Not just one stick, all of them. So I took the mouse out of my external USB hub — which is powered — and inserted in it. Voila. Fortunately the mouse can work in another unpowered USB port in the computer. Not a big problem and it’s not OpenBSD’s problem that this rinky-dink computer is underpowered and quirky.
I’ve also encountered issues with ACPI, which isn’t limited to any particular operating system because BIOS writers seem to have their heads up their asses. This has been on both laptop and desktop. I wrote about the ACPI issues I had on my desktop (while using FreeBSD 6.2) that made me choose between powering down and using my floppy — an easy choice for me to make. OpenBSD has some trouble with the same computer: I can’t halt it and even pressing the power button to shut it off after halting causes it to reboot (whoops!). OpenBSD works wonderfully on the laptop but FreeBSD won’t boot without first disabling ACPI. Like I wrote above, this is beyond the BSDs. Some Linux distros also have had (more or less) trouble with either or both of these particular computers. It’s something that comes with the territory, just like the thing with ndis or any other device requiring proprietary code to operate properly.
Everything considered, I’m pretty satisfied with the performance of OpenBSD on my computers. It installs with a lean configuration, making it ideal for the “classic” computers I use. It’s installed on my primary desktop complete with X. It’s now on my laptop. I also run it on a server here at the house. It’s proven itself to be worthy of use across the board. (I also boasted of its superior sound driver in a post on my Linux blog.)
I’m down to Linux on one hard drive now, and that’s become a spare since I bought a much larger one for the desktop. I have some data and multimedia on it to copy over to the desktop computer and then I’ll probably repartition it for use with OpenBSD. Maybe stick it in the server. Maybe use it as a floater between computers.
Who knows, and who knows when I’ll get around to it with my schedule lately.