Archives for March 2005

Linksys WMP54GS with Broadcom BCM4306 chipset under Linux 2.6 kernel

For a long time (especially with the 2.4.x kernels), I’d been using a Linksys WUSB11-V26 with the Atmel RFMD 503 as the wireless NIC for my home network, using the at76c503 driver. It worked pretty well, but then I upgraded to a 2.6.x kernel and while it continued to work for a short time, when we suffered a prolonged power outage, the NIC refused to work when power came back. I discovered that my particular WUSB11-V26 only worked with the 0.90.2-140 revision of the firmware (newer firmwares wouldn’t turn the radio on) — once I learned this, everything was fine, I’d just hack the driver source to use the older firmware and everything was fine. However, when upgrading to 2.6.x, I discovered this meant also needing to upgrade to a more recent version of the at76c503 driver, which was fine since my NIC already had the 0.90.2-140 firmware downloaded to it. I built the new driver, installed it, and everything worked fine — until the powerloss. Watching the latest at76c503 driver try to download the firmware resulted in an "unexpected opcode 146" error. So, I decided it was time to buy a slightly better supported wireless NIC and stop fussing with this piece of junk.

Today, I ran out to CompUSA (instant gratification!) and bought myself a Linksys WMP54GS, which you can get at Amazon.com for around $59.99. I decided to go the PCI card route because I wanted to get 802.11g, but my host only has USB 1.1 and I didn’t want to spend the money on a USB 2.0 PCI card in addition to a new USB wireless NIC. Not only that, but most USB NICs have dinky attached antennas, and the PCI card has a screw-on antenna that can be replaced with larger and presumably better antennas. This is important depending on where in the house I need to position the antenna to get the best signal and coverage.

Since I know that wireless NICs aren’t well supported under Linux for various reasons, I decided to log all I had to do to get this particular NIC working on my machine. I run Debian, but these instructions should help get you pointed in the right direction for the most part. I hope this mini-HOWTO proves useful to you if you are in the process of installing a WMP54GS PCI NIC too; leave a comment if it did (or didn’t — maybe I can help)!

Identify what you’ve got

First, identify what you’ve actually got. This is what my machine reports:

$ lspci
...
0000:01:0b.0 Network controller: Broadcom Corporation BCM4306 802.11b/g Wireless LAN Controller (rev 03)

$ lspci -n | grep 0000:01:0b.0
0000:01:0b.0 0280: 14e4:4320 (rev 03)

Install NdisWrapper

There’s no specific driver for the WMP54GS for Linux. The trick is to use NdisWrapper, a package which loads the WinXP drivers (!) under Linux — for better or worse, this apparently works. You can download the source tarball (ndiswrapper-1.1.tar.gz) or get the Debian package (ndiswrapper-source_1.1-1_i386.deb). Note: I struggled with the Debian ndiswrapper-source and ndiswrapper-utils version 1.0rc2 which installed but did NOT work — I couldn’t set the SSID using iwconfig at all. You must use version 1.1.

So, here are the steps to download, build, and install NdisWrapper for Debian systems:

$ cd /tmp
$ wget http://ndiswrapper.sourceforge.net/debian/ndiswrapper-source_1.1-1_i386.deb
$ dpkg -i ndiswrapper-source_1.1-1_i386.deb
$ cd /usr/src
$ gzip -dc ndiswrapper-source.tar.gz | tar xf -
$ cd modules/ndiswrapper
$ debian/rules binary-utils
$ debian/rules binary-modules
$ cd ..
$ dpkg -i ndiswrapper-utils_1.1-1_i386.deb
$ dpkg -i ndiswrapper-modules-2.6.10_1.1-1_i386.deb

Install the Linksys WMP54GS driver

At this point, you now have NdisWrapper installed. But, what about the actual WMP54GS drivers? You can pull them off the CD that came with the NIC, or you can download them. According to the NdisWrapper List wiki page, you want to download this WMP54GS_20040423.exe driver. Either way, you need the following three files:

Drivers/bcm43xx.cat
Drivers/BCMWL5.inf
Drivers/bcmwl5.sys

According to the NdisWrapper Installation wiki page, you don’t need to actually “install” the self-extracting EXE on a Windows machine. Just use a archive extraction program that understands self-extracting EXE’s and extract those three files that we need. Actually, I think we only need the .inf and .sys files, but I extracted the .cat file because it was the only other file in the directory. Once you’ve got those files extracted, you “install” them using the ndiswrapper tool:

# ndiswrapper -i BCMWL5.inf
Installing bcmwl5

# ndiswrapper -l
Installed ndis drivers:
bcmwl5 driver present, hardware present

Time to load the driver

If you’ve done all the previous steps correctly, at this point the only thing left to do is load the ndiswrapper kernel module, which in turn will load the bcmwl5 driver we just installed, and you should be in business.

# modprobe ndiswrapper

Verify that it loaded correctly by checking what got written to syslog. Here’s what got written to mine:

kernel: ndiswrapper version 1.1 loaded (preempt=yes,smp=no)
kernel: ndiswrapper: driver bcmwl5 (Linksys,02/19/2004, 3.50.21.11) loaded
kernel: ACPI: PCI interrupt 0000:01:0b.0[A] -> GSI 21 (level, low) -> IRQ 21
kernel: ndiswrapper: using irq 21
kernel: wlan0: ndiswrapper ethernet device 00:0f:66:e6:0d:37 using driver bcmwl5, configuration file 14E4:4320:1737:0015.5.conf
kernel: wlan0: encryption modes supported: WEP, WPA with TKIP, WPA with AES/CCMP

Configure the interface

After that, it was just a matter of configuring the wlan0 interface in /etc/network/interfaces and then issuing an ifup wlan0 to configure it. Here’s an idea of what I use:

auto wlan0
iface wlan0 inet static
wireless_essid Panoptic
wireless_mode ad-hoc
wireless_channel 10
address 10.0.0.1
netmask 255.255.255.0
broadcast 10.0.0.255
up dhcpd -q -cf /etc/dhcpd-wlan0.conf -pf /var/run/dhcpd-wlan0.pid -lf /var/lib/dhcp/dhcpd-wlan0.leases wlan0
down kill `cat /var/run/dhcpd-wlan0.pid`

Yes, I run a DHCP server bound to the wlan0 interface to provide IP addresses via DHCP to anyone connecting to the wireless network. Don’t worry, there’s iptables rules-a-plenty that lock it all down nicely, but that, my friends is for another time …

Update: If you want to set up WPA (Wi-Fi Protected Access), check out the WPA page on the ndiswrapper wiki.

Tags: , , , ,

Boston-area OpenACS users meeting, Friday March 11, 2005

Andrew Grumet blogs about today’s Boston-area OpenACS users meeting at the MIT Sloan School of Management. Wish I could have been there; maybe I’ll be able to attend the next one, if it’s at the same place next time.

another nsopenssl-related memory leak fixed!

Yesterday, I sat down and finally reviewed the patch that Christopher Bowman provided to fix the SSL-related leak and came up with a reproducible way of demonstrating the leak and verifying the fix (see SF Bug #1160850: nsopenssl leaks SSL obj. mem w/Keep-Alive). It turns out the leak was due to AOLserver not calling the socket driver’s DriverClose callback when a HTTP Keep-Alive connection timed out, which is where nsopenssl does its clean-up of the SSL structure that’s allocated for the connection. So, the fix was in aolserver/nsd/driver.c and not in the nsopenssl module itself. That means the fix will be generally available as part of the next release of AOLserver which will be 4.0.11.

Until 4.0.11 is released, however, if you have a server that is using nsopenssl and you’re seeing this memory leak, you can “work around” the problem by disabling HTTP Keep-Alive, which is unfortunately a server-wide config. option instead of a per-socket driver option. You do this by setting the keepalivetimeout parameter to 0 (zero) in the ns/parameters section, like this:

ns_section  "ns/parameters"
ns_param    keepalivetimeout    0

Again, thanks to everyone who has helped investigate, troubleshoot, provide information about and otherwise participated in the hunt for this leak.

why can I never remember sp_helptext?

Roughly once ever year or two, I have to look at a Sybase database to do some troubleshooting and it almost always involves looking at the body of a stored procedure. Since it’s so infrequent, I can never remember what the magic incantation is to get Sybase to give up that blossom of information. Every time, I spend a good five or ten minutes Googling around until I find the Sybase cheat sheet that reminds me the answer is sp_helptext.

Tags:
,

everyone represents the company they work for

One of the hot topics of the Blogosphere lately has been people getting fired for blogging. This inspired Niall Kennedy of Technorati to mock up a wartime-era poster including the logos of various blogging companies to make his satirical comment about the recent companies overreaction to employee blogs. He posted his poster remix on Friday night. On Monday, Niall recanted.

What’s surprising to me is how folks are surprised when companies limit or otherwise censor what employees say in their personal blogs. As an employee of a company, you are always representing that company whether you, or the company, likes it or not. This is nothing new, and blogging has nothing to do with it. Niall writes, “I have always operated under the assumption that until I reach executive status at any company I work for I remain an individual voice and do not represent the organization.” Huh? Some companies consciously make the fact that every employee, and I mean every employee, represents the company as part of their explicit operation. The best example that comes to mind is the Wal-Mart Greeter, a customer service position that acknowledges the fact that a company’s relationship with its customers exists through its employees, so much so that it’s important to dedicate employees to nurture that relationship without other distractions.

In the high tech industry, Niall’s misunderstanding may have been a little more understandable — individual contributors didn’t directly interact with a company’s customers. However, through self-published public displays of individuality such as blogs, employees can and do interact with a company’s customers, partners, vendors, etc., and when you do, you are representing the company whether you like it or not.

I remember telling someone at a dinner party years ago how, “Even though it’s after work, and we’re friends, for better or for worse, I still represent my employer, right now.” The response was an incredulous, “Are you serious? How can that be?” I went on to explain that, “If I act like a fool, you will form the opinion that my employer hires fools. If I act unethically or immorally, you will form the opinion that my employer hires unethical or immoral people. If you are a customer of my company, or were considering being one, or you yourself work for a company who is a customer, how would this impression influence your decision or recommendation to do business with my company?” From the pause that followed, I could tell that he got the point. Even though I was “just an individual contributor” working for a large corporation, I was representing my company even when I wasn’t working, even in times that many people would consider my own very private, personal time. And this was long before blogs existed, let alone popular.

The upside to this is that a company can use this to their advantage, if they hire really smart, conscientious and moral people, and encourage them to speak freely. Of course, to enjoy this advantage, companies have to start hiring people like this, and that’s the hard part.

blog reading is the new personalization

Recently, the blogosphere has been hot with a buzz about how bloggers may not be “real” journalists, and thus don’t enjoy the same protection because of Apple v. Does (via Rex Hammock), even though folks like Peggy Noonan say brilliant things like this about the potential effects of blogging on mainstream media (via Steve Rubel). It’s even gotten to the point that there’s a conference called Blogging, Journalism & Credibility being formed.

Steve Rubel summarizes a discussion where David Scott Lewis suggested to Robert Scoble that he’d “get a lot more ideas from reading [100] printed trade magazines than from [1,300] blogs.” I don’t know what frightens me more: the fact that Scoble was able to find 1,300 blogs worth reading (my blogroll is still under 100), or that Lewis really believes what he said. Quite simply, good blogs update minimally once a day and some even many times a day and at worst once a week. I’m guessing that most trade magazines are distributed monthly, and contain around ten articles and ten columns. So, we’re comparing 100 magazines x (10 articles + 10 columns) = 200 things per month vs. 1,300 blogs x (1 entry per week x 5 weeks in a month) = 6,500 things per month, approximately. Considering that magazine articles are usually not shorter than 500 words and can even exceed 1,000 words, and your average blog entry is anywhere from 10 to 200 words, we’re comparing reading 100,000–200,000 words per month through magazines, or between 65,000–650,000 words per month through blogs.

However, many blog entries are duplicates of each other which presumably is where Lewis figures much time is being wasted by blog readers, having to skip over dupe entries which is what an edited magazine would help a reader avoid. I suggest that of the 1,300 blogs Scoble “reads” (presumably through an aggregator — which totally changes the meaning of “read” from the traditional sense), he could probably reduce it to 300 and not lose any information because of the wide overlap in content across many blogs. Now we’re talking 15,000–300,000 words per month of blog entries.

What I am not including in all this is the actual reading of the articles that are linked to from people’s blog entries. Yes, that adds to the blog reader’s total word counts. But, it’s also main-stream media like the magazines, so which we divide both sides of the equation and this count drops out, right?

So, after all this … what’s the point? Well, I just wanted to point out that 6-8 years ago, the Internet bubble was all a-buzz with “personalization” and “personalized portals” and “on-demand content”, etc. Editorially published content was great in its day when money was flowing like water to pay for all the warm bodies to produce it — hell, AOL is still trying to run a business around the model, even today in 2005 — but in tighter times like today, it’s just not cost-effective. User-contributed content scales better, costs less, and brings a more personal touch to the content. This is exactly what blogs are becoming today: a large source of user-contributed content on a wide variety of subject matter, both novel content as well as opinion-based value-add to someone else’s content.

This, in turn, makes RSS aggregators the new personalized portal: you subscribe to content that you’re interested in, and read new content when it becomes available. In other words, by using an RSS aggregator and reader, I can basically build myself a customized or personalized portal just for me, not just add “portlets” to a “My Portal” page with content that the portal owner wants to make available to me. This is why Scoble’s point about RSS feeds for content is now a requirement, not an option, is so poignant, although he limits his point by making it marketing-focused. It’s also why a new scheme for monetizing content other than ad delivery will need to be invented, and I don’t think the answer is just embedding ads in the feed like some content providers are trying. It’s exciting to think about the innovation that’s coming into this space and I’m hoping I’ll be able to play some part in it.

nssqlite3: SQLite 3 driver for AOLserver

Last night, I spent about three hours implementing nssqlite3. The motivations behind this included the fact that I’ve been working on a replacement for Movable Type which I currently use to manage my blog, and I’ve configured MT to use SQLite as its database. I figured it would be nice to be able to use the same database to make migration to Soapbox — the name of my blogging software package — easier, for myself and other MT users. But, this means needing a SQLite v3 driver for AOLserver, and the existing SQLite driver from Wojciech Kocjan is nssqlite2, which is for SQLite v2. So, I went ahead and implemented the driver for SQLite v3.

I sent an email to the AOLSERVER mailing list last night announcing the new SQLite database drivers [also: link, link].

I only tested the driver on my primary dev. environment so far, which is a Debian Linux box. I installed the following Debian packages to get SQLite v3: sqlite3 sqlite3-doc libsqlite3-0 libsqlite3-dev. I tested using AOLserver 4.0.10 with the following config. snippet appended to the sample-config.tcl:

#
# SQLite v3 -- nssqlite3
#
ns_section  "ns/server/${servername}/modules"
ns_param    nsdb            nsdb.so

ns_section  "ns/server/${servername}/db"
ns_param    defaultpool     sqlite3
ns_param    pools           *

ns_section  "ns/db/drivers"
ns_param    sqlite3         nssqlite3.so

ns_section  "ns/db/pools"
ns_param    sqlite3         "sqlite3"

ns_section  "ns/db/pool/sqlite3"
ns_param    driver          sqlite3
ns_param    connections     1
ns_param    datasource      /tmp/sqlite3.db
ns_param    verbose         off

I’ve created a nssqlite3 wiki page for the driver, which currently just contains a link to the initial nssqlite3 documentation. As more issues and questions arise, I’ll update the wiki page and the documentation.

Alan Greenspan, you’re my hero!

Today, Alan Greenspan Touts Idea of a National Sales Tax (via AOL News). I’ve always said that the one person in the US Government who holds all the power isn’t the President, but the Chairman of the Federal Reserve Board, Alan Greenspan. He’s my hero and idol, and yet again, today he reaffirms my faith in his incredibleness.

So, the idea is to overhaul the tax system and move from an income-based tax system to a consumption-based tax system. This is absolutely fantastic! It encourages saving (read: no more Social Security problem if people can finance their own retirement) and places more of the tax burden on those who spend money (read: big business) — this is the only system that really makes sense. While I wholly enjoy the benefits of an income-based tax system where those with large incomes can find allowances by the tax code to reduce their net income and lower their taxes, it does favor the wealthy and places more burden on the lower-income constituency. This is fine if you’re on the “right” side of the equation, taking advantage of tax breaks offered — the current system is naturally biased in favor of wealthy land owners, who were the founders of this country. However, the lower-income working class get exploited by having the tax burden placed on them. Yet, according to the article, “Democratic critics contend such a consumption tax would hit low-income Americans the hardest.” It’s this same lack of understanding that the Democratic critics exhibit that make me glad they didn’t win the last election.

More evidence of Greenspans genius: “As in past remarks, Greenspan said he supports tax changes that promote capital investment, such as the reduction of taxes on dividends.” Gee, make it more attractive for people to invest their money in big businesses, who in turn spend money and paying consumption tax! How perfect is this? Since I’m not paying income tax, I can take even more of my earned income and invest it which will make me even more money as dividends and help big businesses grow, who in turn pay the taxes to fund the government! This proposed reformation to the tax code, it’s downright Edenian! (Okay, so I just created that word, since utopian carries the negative connotation of ideal but impractical schemes, the Eden in Edenian refers to the Garden of Eden from Biblical context, which is a true paradise and state of ultimate happiness.)

Of course, I won’t be able to totally stop being a consumer, so I’ll have to pay my fair share of consumption tax. But, if it’s collected like today’s sales tax at the time of purchase, rather than today’s income tax which causes much grief and anxiety once a year, it at least makes my life easier, and businesses are already set up to collect sales tax, so it really isn’t an added burden for them. Greenspan even recognizes this by saying, “‘A simpler tax code would reduce the considerable resources devoted to complying with current tax laws, and the freed up resources could be used for more productive purposes,’ Greenspan said.”

The one thing that wasn’t mentioned in the article was whether the consumption tax would be a tiered or scaled system, where certain goods are taxed differently than others. I think certain essential items such as food products — perhaps even a small subset of food products — should either be consumption tax free or have a reduced tax. Luxury items, on the other hand, might carry an increased consumption tax, such as jewelery, automobiles, etc. Regardless, a consumption tax-based system is orders of magnitude better than an income tax-based system, especially the one we have currently implemented in the US.

Now is the time for everyone to embrace change and be vocal about something that really matters. If you’re the type to write to your local government representative, do it, and tell them it’s important that they support a reformed tax code which is consumption tax-based. Hell, people who know me know my position on voting, but if this came up as a referendum on the next ballot, I might bend my personal rules and go stand in line with the dirty huddled masses and vote, just on this issue. That’s how much this tax reform means to me.

I just hope this tax reform happens … and within my lifetime …

quick, before Sony sends another Cease and Desist!

Figured some of you may be Beatles fans and might appreciate this … I saw this come across BoingBoing today from Cory Doctorow:

Revolved: Beatles mashup album

CCC’s “Revolved” is an album of Beatles mashups with some real standout tracks, like Here, There and Everywhere (mashed with Claudine Longet’s version), That’s All Yellow (Yellow Submarine and Genesis’s That’s All), She Said Traffic (She Said She Said and Jimi Hendrix’s Crosstown Traffic), and the best track of all, Got to Get You in the Mood — Got to Get You Into My Life with a punchy Glenn Miller’s In the Mood.

Link

(Thanks, Oscar!)

Update: Dave provides this torrent of all tracks and cover art.

The whole “album” is freely available for download. Quick, go and download a copy before Sony sends them a Cease and Desist order like they did to Beatallica.

Okay, I’m sold on PurifyPlus

Christopher Bowman of Wayport in the last few weeks has helped identify two memory leaks, one [1] in nsoracle, and another [2] in nsopenssl. Here’s the commit mail of Jeremy Collins committing Christopher’s patch to nsoracle. I’m in the process of creating a reproducible test case to verify his patch to nsopenssl.

So, what’s his secret? He uses PurifyPlus and apparently it clued him in. I’ve been hesitant to use Purify because I’ve never used it before; I’ve always used a free tool called Valgrind. Since I’ve been hunting this leak in nsopenssl for the past several months with little luck, I’ve decided it’s time I really got familiar with Purify and add it to my bag of tricks. Thanks a lot, Christopher, for showing me the value of Purify.

This might explain why folks like Janine Sisk and Andrew Grumet are still seeing memory leaks, if they’re using both nsoracle and nsopenssl on their servers. Hopefully soon, we’ll find out if their leaks have gone away or not.