Brian C. Lane
Brian C. Lane

AIS feed is up again

Share Tweet Share

A few weeks back my ancient Compaq laptop stopped booting (two LOUD beeps, no display, no drive noises). This system has been used in the garage to act as a serial to WiFi bridge for my AIS receiver, and to log temperatures for the garage and freezer temps you see at digitemp.com. The AIS data feeds the Live AIS view of Puget Sound.

The laptop was exiled to the garage after its power connector broke for the 3rd time and I had to hard-wire it by soldering it directly to the motherboard. Its battery hadn't been holding a charge all that well either. I installed Fedora 11 or 12 on it, choosing to encrypt the whole drive. This ended up being a bit of a mistake, after power outages I would have to try to remember the passphrase, and after it finally failed I pulled the drive to read it with a USB to IDE adapter and was stumped until I looked at my password list and realized I had written it down.

My first attempt to replace it was to use a serial to Ethernet board from Wiznet. It looks like the perfect solution, 2 ports for only $30. The first hurdle was configuring the board. The manual is full of details on howto set it up via the serial port, and it didn't come request an IP from my DHCP server (a WRT54GL running Tomato). I futzed around with serial cables and solder, swapping pins, creating gender changers, I even made a really nice crossover cable. And still got no response back from the board.

I broke down and fired up their configuration utility. Which, it ends up, configures it via the network port. Since my XP KVM instance is NAT'd their scan (probably a simple UDP broadcast) didn't get a response. The examples in the manual used 192.168.11.X addresses, so I added an alias to eth0 and nmap'd the subnet which returned an active device at 192.168.11.100 which seems to be the default static IP assignment of these Wiznet boards. After that it was a matter of manually specifying the IP for their config tool and setting up the real IP and serial port baudrates.

With my faith in hardware partially restored I plugged in one of my Link45 1-wire adatpers and tried to talk to it. No dice. No matter what baudrate I tried it wouldn't respond. I plugged it into my FTDI based USB to serial adapter and it worked fine (9600bps, send it an h and it prints out the help screen). I checked the config screen again. No options to change DTR (1-wire adapters typically are powered by the DTR line). I pulled out my voltmeter and started probing the board. Weird voltage levels on the DTR pin, kinda like it isn't connected to anything.

I then notice that the RS232 converter chip they are using is a 3232, which I'm familiar with, having used it in a few projects myself. It is a 4 port (2 ins and 2 outs) RS232 level converter. A nice chip. Except that it doesn't have enough pins to implement a full RS232 port, and the Wiznet device has RTS/CTS connected. I read the manual again, and right there is a nice table with the pinouts. Sure enough, no DTR line. So much for that solution.

I ended up taking an old 2U server I had lying around (Which surprised me by being an AMD 1.3GHz system with 1G RAM). I had a spare WRT54GL, coincidentally I had modified it to add serial ports and ran into the same problem -- no DTR line. I setup DD-WRT on it and configured it as a client for my existing WiFi network. Plugged in the server and presto, I was up and running from the garage again. I re-installed the system with Fedora 14, this time not encrypting the drive -- there is no console on it, I could hook up a spare PS/2 keyboard but blind-typing the passphrase after a power outage doesn't appeal to me. Initially I tried using boot.fedoraproject.org for the install, but it was taking too long so I did a USB boot instead. This turned out to be just about as slow as bfo but it finally finished after letting it run overnight.

I immediately added the new system to my backuppc configuration so I don't have to worry about losing any customizations I may make. The only thing missing right now is a UPS. My last APC 500 died this week so its time to pick up a couple of new ones, probably smaller CyberPower units since their 1500VA ones have been working well for me on my servers.


Receive Updates

ATOM

Contacts