Author Archive
Android certificate store
by balleman on Jul.07, 2012, under Computers
Just a few notes on Android certificates – so I don’t have to re-google this in the future.
This is based on Android 2.3.7 / CyanogenMod 7.1.0.
Installing certificates (Settings – Location & Security – Credential Storage – Install from SD card) only looks on the root directory of the SD card for certificates – don’t bother putting them in sub-directories. It also removes the file after installation.
If you have individual key and certificate files that you need to package into a PKCS12 for Android to import, the following works:
openssl pkcs12 -export -inkey Android.key -in Android.crt -certfile ca.crt -out Android.p12
(Courtesy: http://forums.openvpn.net/topic9062.html)
Solaris 9 X86 e1000g APIC
by balleman on Jul.05, 2012, under Computers
I recently installed Solaris 9 x86 on some unused hardware I had laying around. The installation went fairly smoothly, which was good, given that previous attempts at creating a Solaris 9 x86 virtual machine on a variety of virtualization products proved fruitless. I was unable to get the NIC to work, however. It is an e1000-based chip, but a desktop version. After applying all available patches, I had essentially concluded that the driver just didn’t properly support the card. The behaviour was bizarre – using DHCP, the server would record the typical progression of messages, but the system would never finish configuring the interface. With manual IP configuration, I would be unable to ping to or from the system, but ARP tables would populate. Very confusing. It seemed as if the card was working, but traffic was being dropped or filtered somewhere. Eventually while trying to find information on the Realtek driver support, assuming I had to use a different card, I found a post regarding switching the system from APIC to PIC solving the problem. I made the change in the BIOS, and the network card now behaves perfectly well. Just thought I’d mention, in case some other poor soul encounters the same issue.
Home Monitoring Project – Part 2
by balleman on Mar.04, 2012, under Technology
In order to count the pulses from my water and power meters, I purchased the Dual Counter from Hobby Boards. For an enclosure, I purchased the temperature/humidity case which fit the board fine.
Per the how-to, the dual counter board expects to be connected to dry switches as input. Since the water softener already powers the water meter, it would not be possible to connect it directly as input. Also, I wanted to have LEDs to indicate pulses, for troubleshooting and direct monitoring. To provide the dry contacts for the counter board, I decided to use optocouples. I found a 10 pack of Vishay 4N37s on eBay, which seem to meet the need.
The water softener I have is a Water-Right Sanitizer Plus. Removing the front cover of the control head reveals the connection of the water meter to the PCB using a 3-pin Molex KK connector – exactly the same as a common PC fan connector. I purchased a fan splitter cable, connecting it between the PCB and meter. I salvaged a fan connector from an unused fan and made an adapter to an RJ45, to bring the connection back to the counter board. Empirically, I found that one pulse per second equated to one gallon per minute – or stated another way, each pulse represented 1/60th of a gallon.
The power meter I have is a GE I-210 / CL 200. The manual indicates each pulse represents Kt (in my case, 1.0) watt-hours of accumulation, which is the same conclusion reached in a post by Jan Bottorff. I had originally guessed a pulse was 1 kWs, as that was the most convenient and seemed reasonable, so I had to adjust this by multiplying by 3.6. I taped an optotransistor to the plastic cover in front of the IR LED. Unfortunately, I would receive a lot of false triggers when the meter was exposed to direct sunlight, so I covered the whole meter with a grey bucket zip-tied in place. I’m not sure how well the utility may like this – perhaps I should put a sign on it to indicate what’s going on in case they stop by.
I may try to post pictures later.
Home Monitoring Project – Part 1
by balleman on Feb.14, 2012, under Technology
Doug‘s recent gift of some 1-wire temperature sensors set me on the path to some more in-depth home monitoring. The extent of home monitoring to this point had been the use of two relatively ancient AP9605 (ad) boards for the SmartUPSes (ad) in my network closet and office. This combination provides SNMP-able power load and temperature readings that I graph using NetMRG.
Another home improvement project I have recently completed is having a water softener/conditioner installed. This system has a built-in water meter, which just begs to be monitored. While reading about home monitoring projects in general, I had read that some power meters output IR pulses that count energy usage. I used my digital camera after dark to confirm that my meter does indeed appear to do this. Between these two items, I clearly had a use for two counters. The other monitoring goal I had was temperature and humidity information for my crawlspace. The bottom of the insulation in my crawlspace seems to get wet in the summer from condensation, and I’d like to keep tabs on it.
The core of this project involves having a 1-wire network. For the PC interface, I elected to get a LinkUSBi from iButtonLink. I opted for the “scratch and dent” model to save a few bucks, and I have not even noticed any real cosmetic issues with it. I setup the OWFS software on my firewall by recompiling Doug’s SRPM for EL6. I’m using a phone distribution block (ad) to connect the multiple 1-wire devices back to the LinkUSBi. The one gotcha I’ve noticed with this is that the 1-wire interface requires the correct polarity and the majority of RJ11/RJ12 phone patch cables are rollovers – they swap pins. When a 1-wire device is connected with reversed polarity to the network, the LED on the LinkUSBi stays lit constantly and no devices can communicate.
The crawlspace temperature/humidity sensor I selected was the MS-TH from iButtonLink. At $64 it seemed overly expensive, but with pricing other options including kits, it still appears to be the best value for a 1-wire humidity sensor. I installed it on the beam in the crawlspace and ran a new CAT5e run to it from the network closet, patched into the 1-wire bus. I wrote a script to strip the leading spaces that OWFS provides (WHY?) and graphed the sensors in NetMRG.
In the upcoming part 2, I’ll discuss the details of the 1-wire counter setup to provide power and water metering.
Upgrade Fedora 15 to Fedora 16
by balleman on Dec.29, 2011, under Linux
The desktop upgrade from Fedora 15 to Fedora 16 was about on par with the upgrade from 14 to 15. Instead of the disaster that is Gnome 3, we’re instead greeted with GRUB 2 and new systemd quirks.
The main portion of the upgrade itself went smoothly. No unexpected surprises from anaconda until the notice that the bootloader didn’t install right.
GRUB 2
So apparently Fedora 16 incorporates GRUB 2. While its error messages seem far friendlier than GRUB classic, I really did not delve into all of its supposed benefits. One downside is that when built with RAID support (which I seem to need since my /boot partition is mirrored), the core.img file ends up >32KiB, and thus does not fit in the post-MBR gap present on my drives.
To address this, I used a gparted live CD and resized and moved the first partition of each drive (which happen to be NTFS drives for my Windows 7 install, one of which was the system volume). This provided a 2MiB gap between the MBR and first partition. Booting back into the Fedora 16 rescue mode and using grub2-install on both drives successfully installed GRUB2 and, following a reboot, allowed Fedora 16 to load.
Unfortunately, these partition table and file system hijinks left Windows 7 with a bit of a problem, seeing as it would not boot. The recommended method of using the Windows 7 installer’s “Startup Repair” feature was unsuccessful. The “bootrec /fixboot” would not fix it, giving an “unsupported filesystem” error. Using diskpart to set the Windows partition to active appears to resolve this, and the fixboot succeeds. Naturally, I ran fixmbr at some point, which wiped out GRUB again, and thus it had to be reinstalled. Success with booting both Windows 7 and Fedora 16 was then achieved.
NFS mount
The machine has one NFS share mounted via /etc/fstab. After the upgrade, this would fail to mount during boot, but would have no difficulty being manually mounted after boot. After researching a variety of wrong paths with various systemctl changes, the one I found to resolve this was “systemctl enable NetworkManager-wait-online.service”.
Update 1/8:
The upgrade of my HTPC wasn’t too painful. Mucked with partitions to make room for GRUB2 ahead of time, had to change my lirc init script to not confuse systemd, disable screensaver in gnome 3 (yes, shouldn’t be using gnome to run mythtv – need to add that to the list), re-enabling services that weren’t automatically figured out from existing init scripts, switched mounts from /dev/md* to UUID-based to get the ordering right in the new boot sequence, mythtv ownership changes, etc, etc.