Getting Adaptec afacli working on Ubuntu

In order to get afacli working on Ubuntu Hardy, I did these things:

1. Get afa-apps-snmp.2807420-A04.tar.gz from Dell.

2. Get libstdc++2.10-glibc2.2 from Debian afacli depends on libstdc++-libc6.2-2.so.3.

Since I’m running Ubuntu x86_64, I put libstdc++-libc6.2-2.so.3 in /usr/lib32. Installing the rpm package under Ubuntu provides rpm2cpio which I used to extract afaapps-4.1-0.i386.rpm like this:

$ rpm2cpio afaapps-4.1-0.i386.rpm | (cd / && cpio -iudvm)

That’s it. You now have /usr/sbin/afacli.

Tags: , , ,

I take that back, Wolfram Alpha is made of win!

Last week, I wrote that Wolfram Alpha still couldn’t answer such important (ha) questions such as “How is babby formed?

As you might expect, Wolfram Alpha’s gotten smarter already. Look:

Wolfram Alpha knows!

That’s what I call awesome. Well done, guys.

Wolfram Alpha may be cool, but …

Wolfram Alpha may be cool, but it can’t answer the really important questions, yet, such as “How is babby formed?” …

Wolfram Alpha's attempt to answer "How is babby formed?" fails.

You know it’s bad when …

This morning, I got a spam email with this subject line:

We are too lazy to change subjects every day, please buy our viagra

Wow, has it really come to this? Is there anyone left on this planet who wants to buy Viagra that doesn’t know how to get it, that spam like this has a non-zero conversion rate?!

I think spammers are now just sending spam to prove they can do it these days. They’re probably distributing URLs that link to sites that serve malware that exploit browser vulnerabilities simply to grow their botnets, under the guise of Viagra spam.

I’m waiting for the day when these botnet owners start distributing code to do large-scale grid crypto cracking. Imagine what kind of crypto you can brute-force in near-realtime with a grid of a few hundred thousand modern computers? That’s a supercomputer that no single organization could probably afford to purchase and manage.

Tags: , , ,

A simple “google for” Tcl script

I make extensive use of Google throughout the day and I’ve always got “g” set up as the keyword for a Quick Search in Firefox. However, I also spend a lot of time at shell prompts, and sometimes I don’t want to bounce to a browser just to Google for something.

So, tonight, I wrote a small Tcl script that lets me “google for” at the prompt. Just save the previous link and rename it to “google” and move it somewhere in your PATH like /usr/local/bin, then make it executable with chmod 755.

The script requires Tcl with tDOM installed, as well as Tidy–both of these things are installed out-of-the-box on MacOS X 10.5 Leopard.

Once you get the script installed, you can do something like this:

'google for' screenshot

If you notice, for Google search queries that have a special result like the one above, the script displays it separately before the results. The script also emits the search query URL so you can just Control-click on it in Terminal and then select “Open URL” and have it pop up in your browser, which also works for any of the search result URLs.

I don’t know if anyone else would find this script useful, but it’s already saved me a ton of time–especially when I’m on a slow 64 kb/s GPRS connection like I am this evening. Either way, I’m releasing this script into the public domain.

Tags: , ,

Vodacom 3G speed tests in Johannesburg and at Sun City

Just a quick post with a few speed tests captured at Cresta Shopping Center in Johannesburg and at Sun City near Pilanesburg.

Cresta Shopping Center

Vodacom 3G speed test at Cresta Shopping Center

Sun City

Vodacom 3G speed test at Sun City

Tags: , , ,

Vodacom 3G with Huawei Mobile Connect E172 in South Africa

This morning I stopped into the Vodacom store in Cresta Shopping Center, where I picked up a Huawei Mobile Connect E172 USB adapter for around R2,400 (roughly USD $240) without a contract. I purchased a SIM card for another R12, and signed up for a 5GB/mo data bundle for R980.

Vodafone E172 (Huawei Mobile Connect) USB adapter

First impression: If this is 3G, then 3G just isn’t that impressive. Right from the shopping center, my speed tests were showing 82 ms pings (nice!) but only 1,075 kb/s down and 324 kb/s up. It’s very usable, but nowhere close to the “7.2 mbit/s” sales pitch of 3G. Still, the low latency makes it suitable for VoIP calling which is great.

What does impress me is the fact that right now I am sitting in Pilanesburg at Kwa Maritane and I’m able to get a GPRS connection, 539 ms ping with 47 kb/s down and 28 kb/s up. I’m practically “in the middle of nowhere” and I can still get GPRS. Back in America, this would almost certainly be a dead spot with no reception at all.

I’ll be here for the week, trying to survive on this slow connection–it’s okay for pushing and pulling emails without attachments and simpler web pages, but it’s going to make doing most of my work really challenging. I might have to pop down to Sun City to see if I can get better speeds to work with.

Tags: , , , , ,

My Mongolian ball-in-cage puzzle, solved!

I love problem solving and puzzles. My friend Christina brought me back a fun one from her trip to Mongolia. Here it is, solved:

Mongolian ball-in-cage puzzle, solved

Apparently this puzzle type is what Stewart Coffin calls “Locked Nest.”

It may not look like much, but the challenge is to assemble it from a completely disassembled state. It’s not only geometrically challenging, having to visualize the pieces in their final states, but physically challenging, having to hold the thing together as you put it together. Several times, while I was working on the puzzle, a pin would slide out or a rod would be out of alignment and the pin would miss it.

This is definitely a puzzle I’ll enjoy solving many times over. It’s quite challenging.

Tags: , ,

Opening up Windows Firewall for File and Printer Sharing

By default, Windows Firewall’s setting for File and Printer Sharing is set to “subnet” scope: only allow requests from the same subnet as itself. This is generally a good default security policy that balances safety with convenience, but on my home network, I run several different subnets (wired, wireless, VPN, etc.) and this tends to be an issue.

Here’s a very simple VB script that can be run with Windows Scripting Host to expand the scope from “subnet” to “any”:

Set objFirewall = CreateObject("HNetCfg.FwMgr")
Set objPolicy = objFirewall.LocalPolicy.CurrentProfile

Set colServices = objPolicy.Services
Set objService = colServices.Item(0)
objService.Enabled = TRUE
objService.Scope = 0

I stick that in a file named winfw-smb-scope-any.vbs and run it from a DOS prompt with cscript.exe. Done!

Do you have any other handy scripts you think are really useful? Tell me about them in the comments … thanks!

Tags: , , ,

TiVo Hacking: Getting a Linksys WUSB54G working

So, I have a TiVo Series 2 stand-alone DVR with a Product Lifetime subscription. For years, I’ve had it connected to the home network using a Linksys WUSB11 wireless network adapter, but it finally died. I went and grabbed a Linksys WUSB54G as a replacement, but found out that the TiVo doesn’t support it. No problem, I know the TiVo runs Linux and there’s plenty of documentation on how to “hack” the TiVo so I can load my own kernel modules on it, etc.

It turns out that the Linksys WUSB54G v4 uses the Ralink 2570 chipset. Fortunately, there’s been effort on native Linux drivers for the Ralink family of wireless chipsets. The hurdle, of course, is that the TiVo’s MIPS R5432 is big-endian, so it presents a bit of a challenge porting the driver to the TiVo.

Working off the latest code for the legacy rt2570 driver from CVS, I’ve gotten it to compile using TiVo’s Linux 2.4.20 kernel. Loading the module, however, results in this:

rt2570: init
usb.c: registered new driver rt2570
rt2570: idVendor = 0x13b1, idProduct = 0xd
rt2570: idVendor = 0x13b1, idProduct = 0xd
rt2570: using permanent MAC addr
rt2570: Active MAC addr: 00:12:17:89:f5:02.
rt2570: driver version 1.0.0
Unaligned Access to 0x80230b2b in kernel mode at 0xc0217be4
Unaligned Access to 0x80230b2d in kernel mode at 0xc0217c04
Unaligned Access to 0x80357076 in kernel mode at 0xc021b3dc
Unaligned Access to 0x80357076 in kernel mode at 0xc021b408
Unaligned Access to 0x80357076 in kernel mode at 0xc021dc2c
Unaligned Access to 0x80357076 in kernel mode at 0xc021dc08
Unaligned Access to 0x80357076 in kernel mode at 0xc021cd8c
Unaligned Access to 0x80230f47 in kernel mode at 0xc0217be4
Unaligned Access to 0x80230f49 in kernel mode at 0xc0217c04
Unaligned Access to 0x80231155 in kernel mode at 0xc0217be4
Unaligned Access to 0x80231157 in kernel mode at 0xc0217c04

So, now I get to go fishing through /proc/ksyms and try to fix up all these unaligned access errors. Hopefully, I’ll be able to get through all of this and get the driver working.

Anyone out there have experience porting Linux device drivers like this? Got any tips or techniques that might help me? I’d really love any help I can get …

Update: I’m posting my debugging progress in a rt2x00 forum thread. Given enough eyeballs, all bugs are shallow, right?

Update: I’ve gotten it working! I’ve addressed the majority of the unaligned access traps and I can now use my WUSB54G as a wireless NIC on my TiVo! Here’s a patch against rt2570-cvs-2008102616 of the driver and the corresponding kernel module binary:

If you have a SA2 TiVo and want to use a Linksys WUSB54G as your wireless NIC, this driver is what you want. It works for me, anyway!

Tags: , , , , ,