2006/12/18

Cool product - Nite-Ize LED upgrade for Mini MagLite

Like many in the PNW, we were without power all weekend. Like a bad squirrel, I found myself without some things that I really missed (or would have ended up missing shortly). While making a run to the store to address some of those deficiencies, I looked at the very empty flashlight aisle. One of the few items left was the Nite-Ize LED upgrade for Mini MagLites. Now, I have probably a dozen mag lights floating around. I'm on my last set of batteries for my SureFire G2, and for close to the price of a replacement set of batteries (at retail prices), I was able to upgrade one of my MiniMags to clean bright LED goodness (I have lots of AA batteries).

http://www.niteize.com/productdetail.php?category_id=28&product_id=110

Performance-wise, I was very pleased. The light was a pretty consistent brightness until it stopped completely. It's not as bright as a SureFire, but it was very bright. I put in an almost-dead set of batteries and it carried me through a good 12 hours of solid use. I haven't worn out the fresh set I put in after that, yet.

Target had them for $7.44. I'm not sure how long that's good for, they're usually $9.99. It was about a two minute upgrade and the kit I had came with a tailcap switch as well. An added plus is that you keep the parts you pull out, so you can always switch back if the LED module fails.

If you have lots of mini-mags, I'd strongly recommend getting this upgrade for a couple of them; I can't imagine you'd be disappointed.

2006/12/14

Another cast-off article of goodness (using a BlackBerry with no service)...

The resident VP at our office came to me recently and asked me to wipe and decomission a couple of BlackBerries. Of course, I agreed and found myself with two locked BlackBerries with no service.

In order to get them wiped clean of all company data I first had to get them unlocked. I had no idea who they belonged to, and knowing our users they wouldn't remember the passwords even if I asked. It turns out that this part was easy. Enter the wrong password ten times to lock the device. Install the BlackBerry Desktop Manager on your system. Connect the device and install the most recent version of the Handheld OS. It wasn't a trivial task, but it wasn't difficult, either.

Once I'd gotten into the devices and wiped all of the data, I found myself with two devices capable of doing address book synchronization, note taking, and so forth. There doesn't appear to be anything wrong with either of them; someone probably decided they were too important to use an old one (insert eye-rolling smiley here). I did confirm that the cellular service to these devices was shut off by attempting to make some calls.

The BlackBerries were model 7750, a Verizon-specific model. A quick google didn't indicate any way to unlock them to use with another network, and it's old (or primitive) enough that it doesn't use SIM cards, anyway. Since I'm a T-Mobile user, and don't want to spring for extra service anyway, our new toys are going to have to be stand-alone when they're not tethered to my computer.

I determined what my goals were going to be for the device:
- synchronize my address book from Thunderbird (manually if necessary).
- Import calendar from Outlook (Wife uses OL and manages our events).
- synchronize notes to and from the device.
- Add reference material (probably not much - only about 5MB available on the device).
- Synchronize tasks at some point.
- Composing email offline and then syncing would be nice, too.
- Remove annoying Verizon wallpaper.

I initially ran into trouble getting the address book going, so I tabled that. I started working on getting notes off of the device. This was amazingly easy and required no skill at all. I simply configured the BlackBerry Desktop Manager to export notes from the device to a CSV (comma separated value) file. The output looks like this:

"Note Title","Note Body","Categories"
"Fox jumping","Test memo. Tqbfjotld",

Not perfect, but easily workable.

I started working on the wallpaper, but hit a wall there as well; it looks like the device may be locked down to prevent people from removing Verizon's branding.

Back to the address book. While there is no ability to directly sync the address books yet, I was able to export the address book as a CSV. However, the format isn't 100% compatible with the BlackBerry's import format. All of my initial attempts to import were met with errors, or no data at all reaching the BlackBerry. For one thing, it doesn't list what each of the fields are. What I ended up doing was creating a dummy entry in the BlackBerry's address book, then exported it so I could see what it was expecting as input. I got:

"First Name","Middle Name","Last Name","Title","Company Name", ... and so on.

Good. Next, I created a dummy entry in my Thunderbird address book so I could figure out which fields were which. It turns out that this was a pretty good idea. In each field, I entered the field name that the BlackBerry expected. When I opened up the CSV in OpenOffice Calc, I just had to move the dummy record to the top and save it. Future import operations worked just fine. To summarize, now the process to export from Thunderbird's Address Book to the BlackBerry is as follows:

1 - Export CSV from Thunderbird.
2 - Open in OpenOffice.org Calc, move the dummy account (field names) to the top row.
3 - Save as CSV
4 - Use Intellisync to import the file to your device.

To do:

I can't get the calendar to sync with Outlook's CSV format yet. The techniques I used on Thunderbird's Address Book aren't getting me there.

Since I haven't settled on a task manager / calendar of my own for the PC yet, I can't get started with that.

Work on email. Not a huge rush there as I can always type into a note and copy/paste after the sync.

Reference. I installed a free ASV Bible, but I'm looking for more. I haven't settled on anything else just yet.

Verizon Wallpaper. I think I'm stuck with that. Everything I've found online about setting your wallpaper requires a web-enabled BlackBerry.

Script the address book sync somehow (and the calendar once I get that worked out).

References:

Blackberry - Necessary drivers and apps, documentation.
OpenOffice.org - Used for manipulating CSV files, faster than notepad =)
Olive Tree ASV Bible - Download from Handango

2006/12/12

Wireless router project w/Linux.

I wrote this up several months ago, but never finished it. The project ended up being a bit of a bear; I never completed it because the problem I was trying to solve went away through other means. Still, it's a good start and look at getting Linux running fom the perspective of a Windows guy with only a little Linux experience.

-----------------

I've been working on setting up a wireless router which will route a wireless signal back to some ethernet clients (backwards to the way most people consider normal). Working with what I have has been quite a challenge.

I started out using an IBM Thinkpad T21 with some issues as my platform. My goal was to use an Intel 2100 MiniPCI as my wireless card and an old 3Com 10Mbps PCMCIA card for my clients. As an alternate plan, I lined up a standard Intel Pro/100+ MiniPCI and an old Lucent WaveLAN PCMCIA card.

For software, I originally thought I'd use a Linux CD distribution, but some research into my options didn't leave me terribly impressed. I could always do something with Windows, which would be the easiest, if not the most satisfying option.

There's been a bit of work recently in distributions that will fit into small spaces, such as compact flash. A lot of this work has been focused on an embedded platform called (http://www.soekris.com/). One distribution designed for these boards (but apparently works with just about any x86 box) is Pyramid. Pyramid is based on Ubuntu Linux. I started trying to get Pyramid going, but after a day's work figuring out how to get the IMG file onto my HDD and get it to boot, I realized that they haven't enabled PCMCIA yet. Pyramid is still in beta.

I then moved to Pebble Linux, based on Debian, which is the predecessor to Pyramid. It has PCMCIA support and decent hardware support, from what I've read.

I hooked my laptop's 4GB hard drive to my SUSE 10.1 workstation via a USB adapter and opened up a terminal session as root. I used cfdisk to clear the partitions, create a new partition, and make it bootable. Then, I did mke2fs to format the parition.

At this point, I downloaded and extracted the Pebble v42 tarball. The tarball is essentially like a zip file in windows, but keeps a lot more attributes intact. I extracted the tarball to a directory off of my home directory, and was somewhat concerned to see an error popup multiple times:

tar: : Cannot mknod: Operation not permitted.

As I found out later, mknod allows you to create special folders, like /dev/hda. Not realizing this, I ignored the error and continued on. Still as root, I attempted to run the pebble.update script, which is used to copy and configure Linux on the target partition. I then got the following error:

cp: setting attributes for 'filename': Operation not supported

Followed by:

Failed to install Pebble Linux onto /media/disk.

Poop.

I checked /media/disk (which is where my Hard Drive on /dev/sda1, the USB adapter, was mounted). It seemed like all the files were there. I started hacking on the script to bypass the errors, but it just went from bad to worse. I screwed with permissions, ownership, and all kinds of stuff before throwing my hands up in frustration.

I threw the drive into the laptop, plugged into the network, and booted off of a DamnSmallLinux CD. I erased all the data off of the drive, redownloaded the Pebble v42 install to the RAMdisk and extracted it. Without error. I then ran the pebble.update file. Without error. Now we're getting somewhere! DSL is a Debian-based distribution, too, which might explain why it worked without a hitch, unlike SUSE.

I popped the DSL disc, rebooted, and was greeted by a friendly ISOLINUX notice as the system booted. It looked like standard Linuxie stuff, but I watched as the text flew by. ETH0 and the wireless connection were not detected. Startup continued, then the login prompt, then a bunch of gibberish about no.cat.auth and Windows Update. I'm really not sure what Windows Update has to do with anything...

I powered down and switched to my alternate configuration with the MiniPCI LAN card and PCMCIA wireless card and rebooted. Same thing. Back to the net...

It turns out that in Linux you use something called modules to load drivers into the kernel at boot time. There's a file, /etc/modules that lists the modules that are enabled. I edited it to include the eepro100 module and attempted to add "wlan.o", thinking that was probably the wavelan driver. I rebooted and saw in the boot process that the internal NIC appeared to be detected, but still no love from the wireless card. I looked back at /etc/modules and realized that none of them had the .o after the name except the one I added. Whoops. Removed the .o and rebooted. Still no good.

Long story short (too late!), I found that this system uses orinoco_cs instead of wavelan_cs. Set that module up, added the PCMCIA modules, and rebooted. I still don't think I'm getting anywhere. I commented a few lines out of inittab and now get to a login prompt, but the keyboard was unresponsive.

I did a few more reboots to try to make some sense out of what was up. Then I noticed it. I had ETH0 and ETH1! My wireless card was loaded, just not as WLAN0! I went and edited /etc/network/interfaces and set ETH1 to DHCP and ETH0 to static at 192.168.90.1. I rebooted...

Now that the wlan0 errors are out of the way, I was able to see more of the boot process.

I'm not sure that I'm going to end up finishing this project since my need has gone away, but it was certainly a good learning experience!

References:
http://www-128.ibm.com/developerworks/library/l-wap.html?ca=dnt-429
http://www.nycwireless.net/tiki-index.php?page=PebbleLinux
http://www.nycwireless.net/pebble
Damn Small Linux.