02.22.07

Interesting Tivo trivia bit

Posted in Tech/Geek at 5:47 pm by Craig

Tivo logoSo I just noticed something amusing about the Tivo logo. The colors on the letters “Tivo” — red, green, yellow, blue. Those are, in order, ANSI code sequence numbers 31, 32, 33, and 34. The reason I discovered this is I was editing my MOTD file on my tivo<->wifi bridging gumstix and thought I’d be geeky and change it to include ANSI colorization with the right colors for Tivo. And I bet you soup to nuts that the reason the colors are there in that order in the logo is because some geeky engineer at Tivo long ago did the same thing, ANSI-colorizing some rendition of “Tivo” somewhere, and it stuck when they made the official logo.

11.17.06

Slow network connections and how software lets you down

Posted in Apple, Tech/Geek at 11:49 am by Craig

As broadband connections become increasingly commonplace, at least amongst the set of folks who write software apps, and in particular open source apps where there’s no sales and marketing people reminded the engineers that there’s still lots of narrowband out there, applications have started sprouting a mass of features whcih automatically kick off data communications whenever a network connection appears. This is horrible when your “normal” connection is fast, but when you take your laptop somewhere and are connecting by EDGE, or what passes for broadband at a seaside hotel in Barbados, you end up having your very narrow pipe filled with all this somewhat useless “junk” data. This problem is especially nasty when you’re on a fleky link which loses a substantial percentage of the packets sent over it, when your DNS service is flakey, or when your connection tends to get disconnected (and requires reconnection) generally within a few minutes of the original connection. The disconnection/reconnection thing will often lead to this situation:
  1. Connect
  2. All your apps (firefox, IM client, dashboard widgets, software update, each individual app’s update-checker, etc, etc) suddenly kick off their HTTP requests (first of course sending a DNS lookup request for their relevant hostname)
  3. Pipe is clogged for a minute or two with all this junk flowing back and forth (it’s all TCP of course, no UDP here except maybe for DNS, where ironically you probably do actually want the packets to get through more reliably so these apps don’t all hang while waiting for DNS to maybe timeout, or maybe succeed on the 4th retry with 3 timeout delays before it works)
  4. Pipe has now been up for too long, so Cingular drops your EDGE connection
  5. Go back to step one, repeating step 2 as well for the new pipe.
Result: you can not actually use your link for “real” data flows. Even if all you wanted to do is, say, connect to your webmail and scan subject lines for urgent items, or maybe do the same via IMAP. So here’s my proposal to software folks: implement a system-wide “Operate in crappy link mode”, and then have all applications check for crappy link status before firing off their junk data trawls. Heck, I’m so bugged about this after a week of suspended productivity that I think I’ll learn enough Cocoa to actually write a Mac control panel or something to implement this flag. Then, when you go on vacation, you just go to the control panel and turn on crappy link mode. For that week, your software updates and background RSS polling and Plaze updating anbd whatnot is just put on hold so that you can actually get shit done. [update] reformatted now that I’m back in decent-connection land

10.06.06

S3 backups

Posted in Coding, Sysadmin, Tech/Geek at 3:20 pm by Craig

I’ve been thinking of using S3 to store backups of various machines (basically all linux/OSX ones), but what’s been holding me back is the inability of S3 to do rsync on the server side. rsync really needs an instance of rsync running “near” where the data is stored in order to do its cleverest compression/do-not-transmit smarts. Rsync is basically a win if you have a high-bandwidth link between the rsync server and the backing store, and a lower bandwidth link beterrn the rsync server and client. With S3, you’d have to run the rsync server side yourself, remote from S3, which kind of defeats the purpose of rsync… But then I had a brainstorm. Amazon’s ECC service, which parallels S3, allows you to create a virtual machine and turn it on/off as needed in the amazon compute cloud. The ECC instances have high-bandwidth connectivity to S3 storage, and so would be ideal for running an rsync server! You can set up an ECC instance which serves rsync, and then your backup script can turn the instance on, do the rsync, then shut the instance down when it’s done. Now all I have to do is actually create the ECC instance, then create some kind of wrapper around the whole thing which does the startup-backup-shutdown wrapping around the ECC API, and voila!

12.07.05

Commercializing open source-based projects

Posted in Tech/Geek at 2:44 pm by Craig

One of the dramatically misunderstood things about open source in the commercial world is how to create, feed and maintain a successful “community” around a product. A great case study in how to do things better vs worse is in a new Ars Technica review comparing the gumstix platform (actually the waysmall 200bt) to the BlackDog pocket server. As gizmodo put it:
Two micro Linux servers enter, one micro Linux server leaves.
I wish I had more bandwidth available to help more companies recognize how to build successful open-source based products — there’s a metric shitload of money to be made in doing that.

08.25.05

Just moved blog directory

Posted in General, Tech/Geek at 5:43 pm by Craig

Apologies if it means that your RSS feed broke or re-sucked all the entries — I just switched from managing my own copy of worpress-CVS to using the gentoo package instead. A lot easier to keep up to date this way, now that WP is fairly stable.

07.05.05

How I wifi-enabled my Tivo

Posted in Tech/Geek at 10:19 pm by Craig

Since I moved my T1 line from the old house to the temporary one, for some reason my Vonage link has become seriously worse. Connection quality if flakey, as though packet latency had gone way up or something. It could be that my QoS stuff is not doing the right thing any more or something, but in any case, my Tivo refuses to succesfully make its outbound daily calls any more. But I figured that it’s just trying to make a PPP connection to a dialup ISP somewhere, then surely transfers the data over some TCP/IP channel, so I figured if I could just get my Tivo onto my LAN, everything would be peachy. I did some digging around, and discovered that I was right in my hypothesis. Now the trick is: how to get the Tivo onto my LAN. There are a range of crack-open-the-box solutions, but I’m not interested in cracking open the box. Luckily, the Tivo has a serial port on it, intended for use as a way to plug in an IR tranceiver (so the Tivo can control a cable box). The Tivo even conveniently comes with a serial cable to plug in there. It turns out that you can have the Tivo use this serial port a couple of ways
  1. You can connect it to an external modem, and have the Tivo use that for calls
  2. You can have the Tivo establish a PPP link directly over the serial cable, without dialling
  3. You can get a debugging console on the Tivo over this serial port
Now the second of these is the most useful here. If I could connect the other end of the serial cable to something which could run a PPP daemon, then route from that thing onto my LAN, I’d be all set. The trouble is, I don’t have any computers anywhere near my TV/Tivo setup. Luckily though, I do have ready access to lots of gumstix and the various add-on cards it can use. So I screwed a connex card to a waysmall board (with 2 serial ports) and a cfstix into which I added a netgear MA701 wifi adapter. I recompiled the gumstix kernel to include PPP support plus all the iptables/routing stuff I needed, compiled pppd and iptables userspace apps too, disabled all the bits I didn’t need (to keep filesystem size down), and then was ready to go. Connected the Tivo IR serial port to the Tivo-supplied cable, and hooked that to a gumstix serial cable, and plugged it into the non-console serial port on the waysmall board. Plugged the whole setup in, and then logged in to the gumstix via SSH over the wifi (I had configured wlan0 to auto-up on my LAN). Then some tinkering with pppd options and reading through Tivo hacking websites, and I came up with the following script, which I placed in /etc/init.d/S99tivopppd on the gumstix:

#!/bin/sh
#
# Start the PPP Deamon for Tivo....
#
start() {
        echo "Starting pppd..."
        /bin/echo 1 > /proc/sys/net/ipv4/ip_forward
        /usr/sbin/iptables-restore < /etc/tivo.iptables
        /usr/sbin/pppd /dev/ttyS2 115200 persist noauth passive local deflate 15 bsdcomp 15 nocrtscts nodefaultroute mru 1492 mtu 1492 10.0.241.1:10.0.241.2
}
stop() {
        echo -n "Stopping pppd..."
        killall pppd
}
restart() {
        stop
        start
}
case "$1" in
  start)
        start
        ;;
  stop)
        stop
        ;;
  restart|reload)
        restart
        ;;
  *)
        echo "Usage: $0 {start|stop|restart}"
        exit 1
esac
exit $?                                                                                                                                                                                                
/etc/tivo.iptables is just:
# Generated by iptables-save v1.2.11 on Sat Jun  4 18:12:49 2005
*nat
:PREROUTING ACCEPT [55:6836]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [7:823]
-A POSTROUTING -o wlan0 -j MASQUERADE 
COMMIT
# Completed on Sat Jun  4 18:12:49 2005                                                                                                                                                                
this enables NAT from any interface (ie ppp0 when it comes up) onto the wifi LAN. Starting the /etc/init.d/S99tivopppd script, I now have a pppd daemon on the gumstix which waits for the Tivo to connect. On the Tivo side, configure the dial options to use the dial prefix “#211″ and it will then not dial a number, but instead use pppd directly on the serial port (which is what the “#2″ means), and connect at 115200 (which is what the “11″ means). I then initiated a test call on the Tivo while watching /var/log/messages on the gumstix, and lo! It worked!
tivostix kern.notice pppd[470]: pppd 2.4.1 started by root, uid 0
tivostix kern.info pppd[470]: Using interface ppp0
tivostix kern.notice pppd[470]: Connect: ppp0 < --> /dev/ttyS2
tivostix kern.warn pppd[470]: LCP: timeout sending Config-Requests 
tivostix kern.notice pppd[470]: local  IP address 10.0.241.1
tivostix kern.notice pppd[470]: remote IP address 10.0.241.2
tivostix kern.info pppd[470]: LCP terminated by peer (User request)
tivostix kern.notice pppd[470]: Connection terminated.
tivostix kern.info pppd[470]: Connect time 1970.8 minutes.
tivostix kern.info pppd[470]: Sent 98388 bytes, received 15238 bytes.                                                                                                                  
Not sure exactly why it’s reporting such a long connect time for the PPP link — I guess it looks like it’s actually reporting the time from when the pppd on the host side started, rather than the time when ppp was actually connected, and the connection only happens every so often. Anyway, this seems to be working pretty good, for a while now. I have an uptime of 16 days on the tivostix, with record of 16 succesful daily calls in /var/log/messages — one about every 27 hours.

MAKE interview

Posted in Tech/Geek at 3:07 pm by Craig

MAKE magazine interviewed Gordon and me and the podcast is now available.

12.10.04

Festsupportivus

Posted in Tech/Geek at 1:04 pm by Craig

I have a new name for family-holiday season, à la Festivus. It’s called Parentaltechsupportivus. Does winter cause an increase in incidence of router failures, random port blockings and other things of the sort, or is it just that proximity to a time when I’ll be able to physically beat on their computing equipment causes parents to just notice it more?
Dear  Craig Odd situation.   I  can send and receive email,  but cannot connect with the internet Do you have a prognosis and prescription?

04.21.04

Building new server

Posted in Tech/Geek at 7:50 am by Craig

So, while doing some work for a client, I’ve developed a need for a PCI-X slot, which on opening my existing box it turns out I don’t have. So I figured, in for a dime, in for a dollar – I’ll just go ahead and upgrade my server. Well, actually probably keep the old one, but build a new fancier one. Might as well go 64-bit while I’m at it. Went down to Fry’s and found a nice MSI dual-opteron motherboard, with onboard dual 10/100/1000, sound, and VGA. Added 2 opterons and a couple gigs of RAM, couple HDs, and a nice quiet-looking case. Get home, and of course as usual just after Fry’s closes, I discover the first problem. In this case, everything seems to go pretty smoothly, except that they’ve once again changed the shape of the power connector that goes from the PSU that came in my case to the MB. Looks like the power connector I need from the PSU is supposed to have 24 pins (and another with 8 pins, and another with 5 pins), but the one I have is an ATX one with only 20 pins (and another with 4 pins).
Ok computer spec designing jackasses, I have a simple question: It’s fucking power. It’s the same basic voltages that it’s always been. Why the fuck do you suddenly need more pins than you did before? Assholes, now I have to go back to Fry’s and get a PSU with the right connector. The perfectly fine-working PSU that I already have just became useless. Well, unless one of my readers wants it. It’s a 420W “Silent PurePower” ATX PSU – it’s yours if you’re in the bay area and either want to pick it up from my house, or buy me lunch/dinner somewhere near me, and I can bring the PSU to the food.
Hopefully with the new PSU, there will be no additional gotchas.

03.24.04

Laptop power brick

Posted in Tech/Geek at 1:11 am by Craig

So I’m flying to England this weekend, and decided since I have the miles to upgrade myself to “Premier Cattle” class, which means a slightly larger seat, but more importantly for a ten hour flight — laptop power. But of course you need a special power brick to plug in. So, I shop around. Pretty well everything I find is both hideously expensive, and ugly, plus just has one problem or another with it. Everything except the iGo Juice. From the website descriptions, it sounded ideal, doing not only Car/Air DC input, but also AC input — so you don’t need to carry both your regular brick and this one — one does it all. The thing works with my G4 powerbook (plus comes with about a dozen other tips for other laptop models), and is reasonably good looking on the website. So I ordered it. After returning the hardcover for some MP3 player that Amazon tried to fulfill my order with initially, I finally got the thing today. Open the box, and it’s even better than I expected. It looks great. It feels solid. The connectors plug into place snuggly. Best of all, they provide you with 3 double-sided velcro cable ties to make storing the cables nice and tangle-free. They provide a nice little carrying bad to hold the 3 cables, brick, and bag of tips (though I’ll probably just stuff the brick cables and the one tip I need into my regular bag). Plug it in: brick has a blue LED on it. Tremendous Kudos to whoever designed this product — truly a well executed product. These guys deserve 100% market share with this thing — it’s truly awesome. Will report on experience of in-plane use once I land in the UK, but based on the AC performance, three thumbs up.

« Previous entries