Nexus One Upgrade from T-Mobile G1 on AT&T

Brady said it's time I wrote about my Nexus One, so here it is.   It hasn't even been a year since I got my G1 but it was still time to upgrade.

The primary reason I wanted to upgrade was because my G1 just didn't work anymore.  I've been running the CyanogenMod on my phone for some time which seemed to help initially, but lately I had been having tremendous problems just answering my phone.  Let that sink in - I couldn't answer calls on my phone.  That was unacceptable.

The Google Nexus One came out in January and was very interesting to me but I had two percieved problems with it: no 3G on AT&T and no keyboard.

Since getting it I will say that the performance of the phone is outstanding. I have it loaded with everything I did on the G1 and more and it still remains completely responsive.  That in and of itself is beatiful.

Android 2.1 is also very nice; there are a lot of little upgrades that make it very useful.  Backing up settings to Google is very helpful when you need to wipe your phone.  Having my ASN to get started without having to specify my ASN manually is nice.  Live backgrounds are a slick touch.  Multitouch browser that is actually responsive is great.

The virtual keyboard is working very well for me so far.  I was very concerned with not having a hard keyboard, and if I actually used the SSH app as much as I thought I might then maybe it would be more painful, but for normal messaging, tweeting, and emailing the virtual keyboard is fine.  Having a huge screen here is very helpful.

I don't really miss 3G data access since I've never had it.  All I've had so far is edge, so being stuck there is fine (for now).  I've heard rumors of a Nexus One w/ AT&T bands by this summer, so maybe I will switch when it comes available.

How about some unexpected surprises?  The vibrator.  The G1 was more noisy than powerful, mostly due to the two halves that buzzed together.  The N1 is actually powerful - which is great in your pocket, but annoying at night.  So my N1 lives on a folded-up hankie on my nightstand.

The other reason my N1 lives on my hankie is because of the blinking trackpad.  The LED in that thing is bright, so in addition to sitting on the hankie to soften the buzz, it sits upside-down to prevent an annoying pulsing light all over the room.

I wish the trackball in the LED was multi-colored; I'm not sure if this is an API problem with programs or if the feature is just missing. I do like that there is a charging indicator that is separate from the notification indicator.

The proximity sensor in the phone is also a huge help.  Being able to pull the phone away from your face during a call and be able to interact with the phone is amazing.  I know why the iPhone has had this since the beginning; it's necessary for a touch-screen phone to have.

Overall I am extremely pleased with this phone.  The form-facter is amazing and usability is a tremendous upgrade over the G1.

Nagios utils.php script for PHP plugins

I couldn't find a "utils.php" script for making it easier to write nagios plugins in PHP so I thought I'd whip one up.  This is a combination of the utils.php from CVS I found laying around the web and a port of Nagios::Plugin::Range perl module.  It seems to pass all the tests that I found for the nagios plugins range documentation.

 * Created on Sep 14, (c) 2006 by Marcel K�hn
 * GPL licensed,
 * Ported nagios range checking from Nagios::Plugin::Range
 * by Doug Warner <>
function detectOS(){
	$arr	=	posix_uname();
	return strtolower($arr["sysname"]);
function verifyOS($supportedOSarray){
	$runningOS	=	detectOS();
		return TRUE;
		return FALSE;
function machineName(){
	$arr	=	posix_uname();
	return strtolower($arr["nodename"]);
class Nagios_Plugin_Range {
	const INSIDE = 1;
	const OUTSIDE = 0;
	protected $range;
	protected $start = 0;
	protected $end = 0;
	protected $start_infinity = false;
	protected $end_infinity = false;
	protected $alert_on;
	public function __construct($range) {
		$this->range = $range;
	public function valid() {
		return isset($this->alert_on);
	public function check_range($value) {
		$false = false;
		$true = true;
		if ($this->alert_on == self::INSIDE) {
			$false = true;
			$true = false;
		/* DEBUG
		echo "  R:$this->range; V:$value; S:$this->start, E:$this->end, ".
			"SI: " . ( $this->start_infinity ? 'T' : 'F') . ', ' .
			"EI: " . ( $this->end_infinity ? 'T' : 'F') . ', ' .
			"InOut: " . ( $this->alert_on == self::INSIDE ? 'I' : 'O') . '; ' .
		if (!$this->end_infinity && !$this->start_infinity ) {
			if ($this->start <= $value && $value <= $this->end) {
				return $false;
			} else {
				return $true;
		elseif (!$this->start_infinity && $this->end_infinity) {
			if ( $value >= $this->start ) {
				return $false;
			} else {
				return $true;
		elseif ($this->start_infinity && !$this->end_infinity) {
			if ($value <= $this->end) {
				return $false;
			} else {
				return $true;
		else {
			return $false;
	# Returns a N::P::Range object if the string is a conforms to a Nagios Plugin range string, otherwise null
	protected function parse_range_string($string) {
		$valid = 0;
		$alert_on = self::OUTSIDE;
		$string = preg_replace('/\s/', '', $string);
		$value = "[-+]?[\d\.]+";
		$value_re = "${value}(?:e${value})?";
		# check for valid range definition
		if ( !preg_match('/[\d~]/', $string)
			|| !preg_match("/^\@?(${value_re}|~)?(:(${value_re})?)?$/", $string)) {
			echo "invalid range definition '$string'";
		if (preg_match('/^\@/', $string)) {
			$string = preg_replace('/^\@/', '', $string);
			$alert_on = self::INSIDE;
		 # '~:x'
		if (preg_match('/^~/', $string)) {
			$string = preg_replace('/^~/', '', $string);
			$this->start_infinity = true;
		# '10:'
		if (preg_match("/^(${value_re})?:/", $string, $matches)) {
			if (!empty($matches[1])) {
			$this->end_infinity = true;  # overridden below if there's an end specified
			$string = preg_replace("/^(${value_re})?:/", '', $string);
		# 'x:10' or '10'
		if (preg_match("/^(${value_re})$/", $string)) {
		if ($valid
			&& ($this->start_infinity || $this->end_infinity || $this->start <= $this->end)) {
			$this->alert_on = $alert_on;
	protected function set_range_start($value) {
		$this->start = (integer) $value;
		if (empty($this->start)) {
			$this->start = 0;
		$this->start_infinity = false;
	protected function set_range_end($value) {
		$this->end = (integer) $value;
		if (empty($this->end)) {
			$this->end = 0;
		$this->end_infinity = false;

Western Digital 1.5TB Green Drives - Not for your Linux Software RAID

I recently bought a couple Western Digital 1.5TB "Green" Drives (WD15EADS) to rebuild my home media storage array with higher-density disks.  I already had one Segate 1.5TB drive (ST31500341AS) I was using for a "scratch" drive  (rpm mock builds, storing MythTV recordings, secondary backup) that I had problems using at all until Seagate released a firmware update, so I was skeptical about buying more of those.  I thought the green drives would be fine; that despite their variable rotational speed, the power savings and ability to spin up to higher speeds when needed would work out fine.

Unfortunately once I had a couple of these drives in a software RAID 5 array I began to notice problems.  When copying data to the array I would see decent transfer rates of ~33MB/s for 30-40 seconds but I would then see the transfer rate drop to 200-500KB/s for 2-3 minutes.  Since the array was initially built with only the WD drives I was pretty sure the problem was isolated to those drives.  Even after adding the Seagate drive the problems remained.

To test my assumption that the WD drives were somehow causing problems I began an rsync and waited until the transfer "paused".  I then did a "dd" against each of the drives in the array, seeking to a new position in the drive between tries.  It consistently showed the WD drive only getting 100-250KB/s while the Seagate drive would get ~90MB/s.

Once replacing all the WD drives with equivalent Seagate drives the array is resyncing at ~90MB/s; almost 3 times what I was getting with the WD drives alone.

When I first started seeing these problems with the WD drives I thought it might be related to the idle command so I downloaded the WDIDLE3.exe program to increase the idle time from the default 8 seconds to 25 seconds, and then later disabling the idle time out.  When this didn't fix anything I downloaded the WDTLER.exe program to enable TLER for the drives which also didn't affect the drives at all (I didn't expect this to since I wasn't seeing data completely stop or the drives drop out of the array).

I'm not sure what to do with these WD drives; while they seem to work fine independantly, they don't perform correctly at all when put into a RAID array.  I'm beginning to get afraid that as the hard drives get larger and larger the complexity of the firmware is growing too quickly for drive manufacterers to keep them performing reliably.

Heading to New Job at Barracuda Networks

I've accepted a contractor position at Barracuda Networks as a Cloud Network Engineer.  I'll be starting pretty much immediately.

What does this mean for Mozdev?  Well, a mix of things.  I'm not going away will be the first thing I can assure everyone.  I've really enjoyed my time here and I feel that I've been able to bring a lot of great features to the community.  Of course, Mozdev itself is going through some changes which I plan on being a part of.

Moving to a new position is exciting for me.  Doubly so because I get to work with my friends again (even if remotely).  I'm looking forward to working with a team of people again and getting back into sysadmin.  My divergence into development the past 4 years has been very enjoyable and I've learned a lot about proper development techniques and design and I think my experience there will help out a lot as I move forward.

My big tasks at Mozdev right now are trying to slim down our server infrastructure; mainly getting rid of any servers that we pay for (AWS and our development server).  My other big task is documenting my day-to-day activities and try to organize tasks in a way that others can easily jump in and help out.

If you're interested in helping out at Mozdev, please let us know.  We're really hoping Mozdev can continue supporting the Mozilla community.

As for my new job, I'm excited to be starting a new career with some old friends.  I'm sure it's going to be a blast!

Jared Happy and Playing

Jared Happy and Playing

This is currently my favorite picture of Jared.

Default gnome-terminal size

Here's the command I found to set the default gnome-terminal height:

gconftool-2 /desktop/gnome/applications/terminal/exec --type string -s 'gnome-terminal --geometry=85x40'

Now when I hit "meta-t" I get the size gnome-terminal that I like.

Oh, to get "meta-t" to work, you might want to set this as well:

gconftool-2 /apps/metacity/global_keybindings/run_command_terminal --type string -s '<Mod4>t'

New Site and Domain - silfreed No More

While I've owned (and will continue to own) for about 9 years now, I think it's time I reasses my online personality.

"silfreed" will probably be a part of me for a long time, but more and more in online and open source circles I'd like people to know who I really am, not some pseudonym.  This will make it easier to communicate with people and make connections.

So, as of today, I'm beginning my migration away from  I'll probably the old domain for a long time, but I'm looking forward to the new personality I can offer from the new one.

As usual with these things, please let me know if you know anything broken.

Shippensburg University Dropping Visa

Last night I got a letter from Shippensburg University that stated they would no longer being accepting Visa cards for online payment of classes.  The reason Visa has dropped is because the university is looking to begin charging a "convenience fee" for using credit cards which will theoreteically save the university $280,000/yr.

The payment processor Shippensburg University has chosen, Official Payments, clearly supports Visa.  It is solely the desire to charge this convenience fee that has driven the university to drop Visa as a supported payment method.

It appears that Shippensburg University isn't the only one that is going this route; Brooklyn College has an almost identical story from last september.

I don't think the university has fully through through the cost savings brough to them by using credit cards.  They will incur a significant cost if they choose to only accept paper (check) transactions from students.  They will incur an even greater cost if students decide to stop taking classes from this decision.

Personally, paying by Visa was my only way of meeting their ridiculously short deadline for payment (typically two weeks from the time you get the bill), so it's likely I won't be continuing my graduate studies at Shippensburg University unless they reverse this decision.

KeePassX XML Generator in PHP - Convert PWManager to KeePassX

I couldn't get KeePassX to import my PWManager files natively, so I needed a way to do this in a multi-step fashion (I want to use keepass format so I can have the same password program/database on my computer and G1).  The easiest appeared to be:

  1. Export from pwmanager as CSV
  2. Custom script to convert from CSV to keepassx XML format
  3. Import in keepassx

So this "step 2" was the problem.

I found a forum post on the keepass xml format, so the next step was writing something to convert it, and so we have the PHP KeePassX XML Generator.

Currently it's set up to convert the CSV file generated by pwmanager (entered on stdin, xml dumped on stdout).  But I created a set of classes that should be easy to use for generating a valid keepassx xml file.

G1 AT&T Wireless/mMode settings (with MMS)

After some fiddling to get MMS working, this is my complete APN setting for AT&T Wireless (blue) mMode:

Name: mMode
APN: proxy
Port: 8080
Username: <Not set>
Password: <Not set>
Server: <Not set>
MMS proxy:
MMS port: 8080
MCC: <unchanged>
MNC: <unchanged>
APN type: <Not set>

Next G1 problem - sending text messages

The next problem I ran into is sending text messages.  I believe this is due to my old AT&T Wireless (blue) SIM card.  I found instructions on how to set the SMS Center phone number.

*Download Any Cut from the Market.
*Open Any Cut and click "New shortcut"
*Click "Activity", then "Testing", then "OK"
*Go to your home screen and click "Testing"
*Click Phone information
*Scroll all the way down
*Where it says "SMSC:" ...

I found the AT&T SMSC number in the howardforums archives: +19078319301

New Cell Phone Time - An T-Mobile G1

Of course, I love cell phones.  They're my gadget crack.  So it's not surprising to my friends and family that I bought a new one for my birthday.

I picked up a T-Mobile G1.  It's a nice touch screen device that runs an Open Source OS (Linux) with it's own software stack on top (Android).  So far the hardware is really nice; having a touch screen and a keyboard is very handy, especially for using a terminal to log into remote systems.

Brady's gone ahead and done some research for me already (here, here, here, and here).  I actually bought two G1's - a black one that I received already and am playing with that's in perfect condition, and a bronze one that I've yet to receive.  I'm going to resell the one I don't like, but I haven't seen the bronze one in-person yet to know if I like it or not.

I've only run into one real problem so far, when using the voicemail auto-dial button with the number AT&T sends down OTA I get a "invalid MMI code" error.  This is apparently due to the pound sign at the end (#) from my pin number being saved; adding a comma to the end for a pause seems to resolve this.

I'll probably need to root whichever device I end up using so I can use the wifi tethering apps; otherwise just having access to an SSH client on the road will be awesome.  Once a SIP client comes out for the phone I'll be able to officially get rid of my Nokia N81.  That was a nice phone while it lasted; it just can't compete with a touch screen and a hardware keyboard.

On the Eve of Your Second Birthday, Jocelyn

You'll be two years old tomorrow, and it's been an amazing experience watching you grow.

Your first birthday was lots of fun, but you were just beginning to interact with people around you.  You had a great time smashing your cake, but you didn't really "get" what was going on.  I imagine this birthday will be much different.

In the past year you've gained a tremendous amount of independance.  You can walk up and down stairs without help. You can tell us what you want with words (and some signs) instead of fussing as much.  You know where your toys, books, and colors are and will pull out what you would like to do (whether we want you to or not).

Your vocabulary has grown every day, learning new words and phrases making us ask, "where did you learn that?" For example: <finger on chin>, "Hmm", followed by <finger pointing in air beside head> "I have an idea!" At your last birthday you loved having us sing to you, where now you can sing the songs yourself, sing along with my clarinet to tunes you recognize (with correct intonation), and even make up your own songs such as the "Candy Cane Song" or the "Blue Song" (which frequently just repeats the subject of the song over and over in various pitches, speeds, and lengths).  You can sing the entire ABC Song and count to thirteen (fourteen and fifteen are added on, but don't sound right yet).  You know all your primary colors and can sign them.

Understanding emotions aren't out of your grasp, either.  "No cry; [it's] okay," you tell Jared.  When Mom or I pretend to be sad you run over right away to give us a hug.  You tell us when you're "so happy."  If Mom and I are having a "discussion" you interrupt with, "No Mommy! No Daddy!" to tell us we need to be quieter.

You've also grown so much.  5 inches in a year doesn't sound like much, but it means you can reach many more things you couldn't previously; the running water in the bathroom from your step-stool, the markers and crayons, and you can put Jared's bottles in the sink.  You've thinned out a good bit.  So far you have kept your curly, blonde hair, but it's gotten long enough that Mom has had to trim your bangs a couple times to keep them out of your face.  And you're so cute in pig-tails or a pony-tail!  On top of that, you got your ears pierced this last weekend and are doing a great job with letting them alone so they can heal properly.

Things you love?  Books.  You go through phases with which ones you like; earlier it was these animal board-books we had, then Christmas ones, then the "Pigeon" books, and now Dr. Seuss books.  You used to love to sit on our laps and have us read them to you, and while you still like that, now you love to tell us the stories. "LET [ME] DRIVE [THE] BUS!" you'll tell us while reading "Don't Let the Pigeon Drive the Bus."  You also love coloring; definitely with markers (the ones with the special paper are nice, but not as exciting as real ones - thank god they're washable!) but also with crayons and colored pencils.  Last year you mostly just scribbled, but you progressed to "snakes" (lines) and circles.  Now your scribbling is starting to become pictures in your mind (that Mommy and Daddy need to label on your picture so we don't forget).  You also love clouds and pointing them out.  It'll be warm out soon and we can go out and see them again.

So much has changed in the last year, and it's just the beginning for you.  I know this next year you will enjoy spending time with your brother more as he learns to sit, then crawl, then walk.  I'm sure you'll love playing with him and teaching things.  In your own right, you'll be making new friends when you move to a new class in Day Care and will probably start making friends on the playground when we go out.  And you'll continue to grow and learn, and we'll be there to help you.

Setting up an hdhomerun and "no devices found"

I'm trying to get an hdhomerun set up and my firewall is getting in the way.

After stracing the hdhomerun_config binary and seeing that the discover calls out on the network broadcast ( here) on port 65001 I did some tcpdumping (also knowing my hdhomerun was at and I'm at

$ sudo tcpdump -i br0 -nn host or host
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on br0, link-type EN10MB (Ethernet), capture size 96 bytes

11:08:07.093315 IP > UDP, length 20
11:08:07.093653 IP > UDP, length 20
11:08:07.093707 IP > ICMP host unreachable - admin prohibited, length 56
11:08:07.593858 IP > UDP, length 20
11:08:07.594196 IP > UDP, length 20
11:08:07.594239 IP > ICMP host unreachable - admin prohibited, length 56
11:08:08.093823 IP > UDP, length 20
11:08:08.094166 IP > UDP, length 20
11:08:08.094221 IP > ICMP host unreachable - admin prohibited, length 56
11:08:08.593821 IP > UDP, length 20
11:08:08.594135 IP > UDP, length 20
11:08:08.594179 IP > ICMP host unreachable - admin prohibited, length 56

11:08:14.843469 IP > UDP, length 20
11:08:14.843778 IP > UDP, length 20
11:08:14.843845 IP > ICMP host unreachable - admin prohibited, length 56
11:08:15.093830 IP > UDP, length 20
11:08:15.094152 IP > UDP, length 20
11:08:15.094228 IP > ICMP host unreachable - admin prohibited, length 56
11:08:15.593791 IP > UDP, length 20
11:08:15.594095 IP > UDP, length 20
11:08:15.594149 IP > ICMP host unreachable - admin prohibited, length 56
11:08:15.843824 IP > UDP, length 20
11:08:15.844131 IP > UDP, length 20
11:08:15.844195 IP > ICMP host unreachable - admin prohibited, length 56

So I can see that the hdhomerun is responding, but from random ports.

So poking a hole in my firewall for responses from (in case I have m udp source port 65001 I can communicate with this.  Now I'll have to see how streaming works once I get it added to MythTV.


7 Things Meme

I've been tagged by Brian.

Seven things:

  1. I was completely new to the Mozilla community when I started at Mozdev.  I barely even used Firefox (gasp! I used konqueror, so it wasn't all bad).  Now I know my way around a bit, but still seem to be too involved in Mozdev-dev to get to know the larger community much.
  2. I was a band geek in high school.  I marched snare drum and went along with our band to the Atlantic Coast Championship for the Tournament of Bands in Group 2 my senior year.  We were also quite successful in our Indoor Percussion group both my junior and senior year.  I also played clarinet, bass clarinet, and dabbled in the basoon in concert band and played electric bass in jazz band.  I was also ran the lighting side of our high school "tech crew" since I was a freshman for all plays, musicals, and presentations and knew all the ins-and-outs of the massive light box and spot room we had.  Man I wish I had some pictures of those times.
  3. I met my wife in band in high school and we started dating my senior year (over 11 years ago).
  4. I've been working with computers since 1988, web technologies since 1997 (first web company - in 1998, first blog on tripod in 1998), and Linux since 1999.  This stuff just facinates me and I sink way too much time into trying to Do It Myself.
  5. My first computer was a Commodore PC10 w/ an 8088 processor running MS-DOS 3.2.  I learned programming by transcribing programs for GW-BASIC from a 3-2-1 Contact magazine.
  6. I'm an Air Force Brat, but have now lived in the same area for 20+ years now.  The South-Central PA area may not be very tech-savvy, but does seem to have a small group of us that know better.
  7. I'm an introvert. Wait; maybe you knew that.

The rules:

  1. Link to your original tagger(s) and list these rules in your post.
  2. Share seven facts about yourself in the post.
  3. Tag seven people at the end of your post by leaving their names and the links to their blogs.
  4. Let them know they’ve been tagged.

I think most of the people I'd prefer to know more about have been tagged and I don't want to spread this disease to other circles.