stillhq.com : Mikal, a geek from Canberra living in Silicon Valley http://www.stillhq.com The life, times, travel and software of Michael Still en Copyright (c) Michael Still 2000 - 2006 blosxom simplerss20 v20050208hh 180 http://blogs.law.harvard.edu/tech/rss Early Father's day /diary/toys Sat, 16 May 2009 18:21:00 PST The kids aren't going to be in the same country as me for US father's day (I get two this year!), so they gave me my present early. I now have a complete set of UK police riot armor -- the helmet, shield, and leg protectors. This has already come in handy whilst parenting hyperactive children. I wonder if its legal for me to own such things in Australia? <br/><br/> Digging a bit further, it appears: <li>Possessing soft body armor (for example ballistic Kevlar) is illegal in the ACT except for those employed by licensed security organizations -- <a href="http://www.austlii.edu.au/au/legis/act/consol_reg/pwr1997294/index.html#s12">PROHIBITED WEAPONS REGULATION 1997, section 12</a>. <li>In fact, the Commonwealth customs regulations mostly seem concerned with the possession or import of armor intended to stop bullets -- <a href="http://www.austlii.edu.au/cgi-bin/sinodisp/au/legis/cth/num_reg_es/ciar20054n249o2005622.html?query=armour">CUSTOMS (PROHIBITED IMPORTS) AMENDMENT REGULATIONS 2005 (NO. 4) (SLI NO 249 OF 2005)</a> <br/><br/> I can't see any mention of riot armor (which wouldn't stop a bullet) though, nor a reference to militaria, apart from militaria fairs needing a permit. I wonder if anyone else has thoughts on this? <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000056&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000056&tag=toys&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/000056.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000056.html http://www.stillhq.com/diary/toys/000056.html CCD Barcode Scanner /diary/toys Thu, 14 May 2009 21:46:00 PST I just picked up a CCD barcode scanner cheaply on eBay. The plan is to use it to bulk enter a bunch of books into my book database. Many US books don't have bookland barcodes, but instead have something which looks like this: <br/><br/> <div align=center> <img src="/diary/barcode-question.png"> </div> <br/><br/> So, the barcode has no problems with the big barcode on the left, however it doesn't recognize the little barcode on the right. So, does anyone know what format that little barcode is in? What mode do I need to put my barcode scanner into to get both barcodes read, either at the same time or individually? <br/><br/> <i>Update</i>: once again the Intern has earn his Intern-chow (or whatever it is he eats when he's allowed out of his cage). The deal was I needed to scan the magic "make all possible barcode types work kthxbye" barcode in the book of exactly 1 billion configuration barcodes. It all works well now. I wont mention the Intern's name, because I want to hire him and need more security through obscurity in my life. <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000055&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000055&tag=toys&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/000055.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000055.html http://www.stillhq.com/diary/toys/000055.html Roomba Battery Repack 1 /diary/toys/roomba Wed, 25 Feb 2009 16:43:00 PST I bought two different versions of the Roomba battery repack kits from ebay and the first one arrived today. This is the nicer of the two versions, because it includes pre-soldered tabs on the battery wires. It cost me an extra dollar, and was about $26 including shipping. To be honest, if I'd found this one first I probably wouldn't have bought the one without the tabs. <br/><br/> Here is the contents of the kit: <br/><br/> <div align=center> <a href="http://images.stillhq.com//events/pictures/20090225-roomba//roomba_battery_repack-img_9872.jpg"><img src="http://images.stillhq.com//events/pictures/20090225-roomba//roomba_battery_repack-medium-img_9872.jpg"></a> </div> <br/><br/> Note that there are no instructions in the kit. <br/><br/> The first step is to open up the battery case. The screws are pretty obvious, although the triangular screw driver than the kit ships with sure made this easier. Then you need to crack open the case, which for some reason is glued shut. That took a bit of patience, a jewelers screw driver, and in the end a hammer. I started out not wanting to bash the case too much, but it was glued pretty solidly. In the end it opened up just fine though: <br/><br/> <div align=center> <a href="http://images.stillhq.com//events/pictures/20090225-roomba//roomba_battery_repack-img_9873.jpg"><img src="http://images.stillhq.com//events/pictures/20090225-roomba//roomba_battery_repack-medium-img_9873.jpg"></a> </div> <br/><br/> Now you just need to put the new pack in, making sure to get the tabs in the right places. Screw the lid shut, and go for it. My roomba is charging at the moment, and I'll let you know how it goes once that's done. <br/><br/> (You might recall this means that I now have two fully functional roombas. I'm thinking of building the serial control cable, hooking up arduinos, and having some sort of swarming vacuum system. Its a pity I don't know anything about swarming algorithms...) <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/roomba/000002&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/roomba/000002&tag=toys&format=.png" border="0" alt="S"></a>) roomba(<a href="http://www.stillhq.com/roomba"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/roomba/000002&tag=roomba&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/roomba/000002.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/roomba/000002.html http://www.stillhq.com/diary/toys/roomba/000002.html New Roomba batteries /diary/toys/roomba Sun, 22 Feb 2009 14:32:00 PST For some reason I am the Roomba battery kiss of death. I've been through two batteries in about three years. Last time I just bought a new Roomba on special instead of replacing the battery. Its hard to justify three Roombas in the house though, so this time I'm trying something different -- I've bought replacement cells for the batteries from ebay, and will install them in the yellow shell myself. This sounds like its pretty easy to do, and there are several supplies who sell these cells. <br/><br/> I'll let you know how I go. <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/roomba/000001&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/roomba/000001&tag=toys&format=.png" border="0" alt="S"></a>) roomba(<a href="http://www.stillhq.com/roomba"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/roomba/000001&tag=roomba&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/roomba/000001.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/roomba/000001.html http://www.stillhq.com/diary/toys/roomba/000001.html Via M10000, video, and a Belkin wireless USB thing /diary/toys Wed, 26 Dec 2007 15:25:00 PST I've had a Via Eden M10000 literally lying around since soon after I moved to the US two years ago, and I finally decided that it was time for a full blown home workstation the other day, having got fed up with the small screen on my laptops. Sometimes I really miss my 30 inch monitor at work, and the 24 inch I am using at home is a much better substitute than a laptop screen. <br/><br/> Anyway, getting the machine working was surprisingly difficult given its a three or four year old design. The problems: <br/><br/> <ul> <li>The PCI 802.11g wireless card didn't work. In fact, the machine wouldn't boot with it installed. I suspect this was a PCI version problem, as I have had pain with this card in the past. <li>The PCI 802.11b wireless card I tried next wasn't much better. The connection would drop out randomly, and the machine would occasionally lock up. This was the card I used as my first access point about six years ago (using hostap), so perhaps its just old. It got swapped out as well. <li>The Belkin USB 802.11g thingie didn't work reliably. It would stay connected to the network for five minutes before something went wrong. This made me annoyed, especially when it turns out this is because the latest release of Ubuntu (gutsy) installs an old version of the rt73usb driver, which is known not to work with this card. <a href="https://help.ubuntu.com/community/WifiDocs/Driver/RalinkRT73#head-cfea35eda750890a23c58873b4183271cc3a650c">Following these instructions from the canonical wiki</A> which tell you to install <a href="http://rt2x00.serialmonkey.com/wiki/index.php/Downloads">drivers from here</a> fixed the problem. Its annoying that Ubuntu ships with known broken drivers though. <li>Next, video. The video card built into the mother board sucks. I'm running a t24 inch LCD at 1920x1200, and there was significant ghosting on the monitor. Additionally, I couldn't run at 24 bit, I had to use 16 bit because the video card was running out of RAM bandwidth. <li>Not to worry, I installed a Matrox G450 I had lying around, and now the monitor works nicely as well, with no ghosting. <li>Finally, the whole thing is much louder than I expected from an Eden machine (there is a fan on the board, a fan in the case, and the hard disk). Then again, given I built the entire machine for $90, I can't complain too much. </ul> <br/><br/> <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000054&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000054&tag=toys&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/000054.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000054.html http://www.stillhq.com/diary/toys/000054.html Configuring the n800 /diary/toys/nokia/n800 Mon, 18 Jun 2007 21:47:00 PST In the battle to install ntpdate on my newish n800, I came across <a href="http://mg.pov.lt/770/reflash-n800.html">this excellent setup page</A>. It was really very useful. I ended up with an NTP client from <a href="http://www.guardiani.us/index.php/N800_custom_packages#netdate">here</a>. <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nokia/n800/000001&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nokia/n800/000001&tag=toys&format=.png" border="0" alt="S"></a>) nokia(<a href="http://www.stillhq.com/nokia"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nokia/n800/000001&tag=nokia&format=.png" border="0" alt="S"></a>) n800(<a href="http://www.stillhq.com/n800"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nokia/n800/000001&tag=n800&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/nokia/n800/000001.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/nokia/n800/000001.html http://www.stillhq.com/diary/toys/nokia/n800/000001.html Dell e310 upgrade /diary/toys Fri, 16 Mar 2007 08:35:00 PST I'm starting to get annoyed with the reliability of the USB chip sets in my external disks (of which I have six), so I am considering upgrading to a home theatre style case for my Dell e310 so I can have room to move the disks to inside the case. There are of course warts -- the Dimension e310 appears to have a BTX mother board ( <a href="http://forums.3dgamers.com/archive/index.php/t-12904">which</a> <a href="http://www.techspot.com/vb/all/windows/t-48956-Chassis-for-a-Dimension-E310.html">causes</a> <a href="http://www.support.dell.com/support/edocs/systems/dim3100/en/sm/techov0.htm#wp1058089">people</A> <a href="http://www.support.dell.com/support/edocs/systems/dim3100/en/sm/specs0.htm#wp1052310">pain</A> ). Additionally, no one seems to make a BTX home theatre PC case, which sucks. <br/><br/> So, I might end up having to replace the entire machine, which isn't so cool. I'm gonna put all of this on hold until I can apply more thought to it. <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000053&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000053&tag=toys&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/000053.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000053.html http://www.stillhq.com/diary/toys/000053.html Free on demand from Comcast /diary/toys Sat, 03 Mar 2007 10:32:00 PST Catherine and I have had analog Comcast cable TV in the US since we moved into our apartment here. We've resisted going digital because of the brain dead requirement that you use the Comcast set top box (which sucks), and therefore it not working with MythTV. If they shipped a digital decoder card which worked in a PCI slot with Linux, I would upgrade right away. <br/><br/> I've told them that a bunch of times, and they've offered us free upgrades about four times. <br/><br/> In the end they must have got the hint, because they just gave us a free "on demand" digital box for our analog cable. It's free for a year, and appears to be a <a href="http://broadband.motorola.com/consumers/products/dct700/">Motorola DCT 700</a>, which seems to just be a embedded computer which uses a two megabit connection to Comcast to deliver programs. <br/><br/> Now I'm meant to be activating the device, but I've been on hold with Comcast for 15 minutes. The user documentation even promises the call should only take three to four minutes. Of course plugging the MythTV box into the back of the Motorola box also broke our existing analog reception, so I might end up giving on the call and backing out the cabling change until Comcast gets with the program... <br/><br/> More device gossip as it comes to hand. <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000052&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000052&tag=toys&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/000052.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000052.html http://www.stillhq.com/diary/toys/000052.html Debugging reboot problems with a n800? /diary/toys Mon, 26 Feb 2007 09:45:00 PST The n800 seems to be spontaneously rebooting, which is very annoying. It's also at the same time going through a lot more battery life when idle than I would expect. Does anyone know of a good tool for tracking down what the device thinks is happening (I don't have R&amp;D mode installed on the machine). <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000051&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000051&tag=toys&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/000051.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000051.html http://www.stillhq.com/diary/toys/000051.html Let it be known I am open to bribes /diary/toys Sat, 24 Feb 2007 18:34:00 PST My subsidised Nokia N800 arrived today, and I've been playing with it a little. It's not immediately obvious how to install software, let alone get root on the thing so you can start developing. More details as I find my way around the wiki. <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000050&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000050&tag=toys&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/000050.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000050.html http://www.stillhq.com/diary/toys/000050.html Ordered: Nokia N800 /diary/toys Wed, 21 Feb 2007 13:19:00 PST <a href="http://www.maemo.org/">I get to start playing in two days</a>. <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000049&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000049&tag=toys&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/000049.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000049.html http://www.stillhq.com/diary/toys/000049.html Random idea /diary/toys Wed, 07 Feb 2007 17:45:00 PST I'm tired after a trip, so this is short and incoherent. You know how Sun used to hand out demo hardware for evals a couple of months ago? I wonder if they'd give me one to try MythTV backend on? I wonder if it would suck? <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000048&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000048&tag=toys&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/000048.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000048.html http://www.stillhq.com/diary/toys/000048.html Video4Linux 2 webcam applications? /diary/toys Sun, 31 Dec 2006 09:49:00 PST Hi, I've spent some time poking around for a video4linux 2 webcam application which doesn't suck. All I want is something very simple -- grab a frame from the specified camera and dump it to a file on disk in a format I can use. I don't want a config file. I don't want a web server. I don't want it to scp the file somewhere. Just grab a frame. <br/><br/> I can't find such a thing. I have some code myself which nearly does the job, but it's video4linux 1 and needs a rewrite. Should I just give in a write the code myself? <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000047&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000047&tag=toys&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/000047.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000047.html http://www.stillhq.com/diary/toys/000047.html Tick of death /diary/toys Thu, 28 Dec 2006 21:59:00 PST It's times like this that I don't mind that people make fun of me for using RAID 1+0 on my home server. One of my Seagate 400gb PATA drivers emits a ticking noise and is no longer detected by any of my Linux boxes. I don't think that's a good sign for the data on that machine. Luckily, the RAID array can run in degraded mode for a bit until a new disk arrives. <br/><br/> Now to find out how much Seagate warranty support sucks. <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000046&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000046&tag=toys&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/000046.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000046.html http://www.stillhq.com/diary/toys/000046.html Jon's Nokia E61 WEP problems /diary/toys Tue, 26 Dec 2006 09:26:00 PST <a href="http://jon.oxer.com.au/blog/id/152">Jon is having problems getting WEP to work on his new Nokia</a> but he doesn't have comments turned on so I can't reply to him on his blog. There are a couple of people at work who have claimed to get this working. It's not a work day today, but I will ping them tomorrow and see if I can get their instructions for you... <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000045&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/000045&tag=toys&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/000045.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000045.html http://www.stillhq.com/diary/toys/000045.html OMG, Kernel modules /diary/toys/nslu2 Fri, 18 Aug 2006 22:16:00 PST So, once you've Debian bootstrapped the NSLU2 slug, there isn't any way I can see to get new kernel modules for DebianSlug. However, you can <a href="http://www.student-zw.fh-kl.de/~pasc0010/debianslug/kernel-modules/kernel-2.6.16_preempt/">download the unslung kernel modules, unpack them and use the kernel module from that</a>. Unpacking looks like this: <br/><br/> <ul><pre> wget "http://www.student-zw.fh-kl.de/~pasc0010/debianslug/kernel-modules/ kernel-2.6.16_preempt/kernel-module-raid1_2.6.16-rc4-git9-r0.0_ixp4xxle.ipk" ar -x kernel-module-raid1_2.6.16-rc4-git9-r0.0_ixp4xxle.ipk tar xvzf data.tar.gz cd lib/modules/2.6.16/kernel/drivers/md/ </pre></ul> <br/><br/> And there you go. <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000004&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000004&tag=toys&format=.png" border="0" alt="S"></a>) nslu2(<a href="http://www.stillhq.com/nslu2"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000004&tag=nslu2&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/nslu2/000004.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/nslu2/000004.html http://www.stillhq.com/diary/toys/nslu2/000004.html Debian bootstrap complete /diary/toys/nslu2 Fri, 18 Aug 2006 11:53:00 PST <a href="http://www.nslu2-linux.org/wiki/DebianSlug/Bootstrap">Debian bootstrap is easy, but time consuming on the slug</a>. That is all. <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000003&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000003&tag=toys&format=.png" border="0" alt="S"></a>) nslu2(<a href="http://www.stillhq.com/nslu2"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000003&tag=nslu2&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/nslu2/000003.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/nslu2/000003.html http://www.stillhq.com/diary/toys/nslu2/000003.html Belkin UPS working /diary/toys Fri, 18 Aug 2006 09:51:00 PST <a href="http://www.stillhq.com/diary/toys/000043.html">I've had some troubles with drivers for my Belkin 375VA USB UPS</a>, not that I have tried very hard. I finally got it working today with the help of Will the intern (who rocks by the way) and only a little bit of effort, so I thought I should document it here so I know how to next time. First off, you need to install nut and nut-usb for Ubuntu (or whatever you're using): <br/><br/> <ul><pre> $ sudo apt-get install nut nut-usb </pre></ul> <br/><Br/> Now, create a configuration entry for the USB UPS. This lives in /etc/nut/ups.conf, and mine looks like this: <br/><Br/> <table><tr><td> <img src="/diary/pictures/belkin_375va.jpg"> </td><td> <ul><pre> [belkinusb] driver = newhidups port = auto desc = "Belkin UPS, USB interface" vendorid=050d </pre></ul> <br/></br> The vendor ID here needs to match the UPS, which for my Belkin is 050d:0375. Next, you need a upsd.conf file in the same directory. Mine looks like this: <br/><br/> <ul><pre> ACL all 0.0.0.0/0 ACL localhost 127.0.0.1/32 ACCEPT localhost REJECT all </pre></ul> </table> <br/><Br/> This stops hosts other than local host connecting to the daemon. Now, you need a upsd.users file, which defines what users can use the UPS: <br/><Br/> <ul><pre> [admin] password = thisisnotthepassword allowfrom = 127.0.0.1 actions = set instcmds = all </pre></ul> <br/><Br/> Now, start the USB UPS driver. Let's start it in debug mode first... <br/><br/> <ul><pre> $ sudo /lib/nut/newhidups -u nut -D -a belkinusb rk UPS Tools: New USB/HID UPS driver 0.28 (2.0.3) debug level is '1' Detected a UPS: Belkin /Belkin UPS Using subdriver: Belkin HID 0.1 Path: UPS.BELKINConfig.BELKINConfigVoltage, Type: Feature, Value: 120.000000 Path: UPS.BELKINConfig.BELKINConfigFrequency, Type: Feature, Value: 60.000000 Path: UPS.BELKINConfig.BELKINConfigApparentPower, Type: Feature, Value: 375.000000 Path: UPS.BELKINConfig.BELKINConfigBatteryVoltage, Type: Feature, Value: 12.000000 Path: UPS.BELKINDevice.BELKINModelString, Type: Feature, Value: 66.000000 Path: UPS.BELKINDevice.BELKINModelStringOffset, Type: Feature, Value: 0.000000 Path: UPS.BELKINDevice.BELKINUPSType, Type: Feature, Value: 1.000000 Path: UPS.BELKINControls.BELKINTest, Type: Feature, Value: 0.000000 Path: UPS.BELKINControls.BELKINAudibleAlarmControl, Type: Feature, Value: 2.000000 Path: UPS.BELKINControls.BELKINDelayBeforeShutdown, Type: Feature, Value: 0.000000 Path: UPS.BELKINControls.BELKINDelayBeforeStartup, Type: Feature, Value: 0.000000 Path: UPS.BELKINPowerState.BELKINInput.BELKINVoltage, Type: Feature, Value: 1208.000000 Path: UPS.BELKINPowerState.BELKINInput.BELKINFrequency, Type: Feature, Value: 599.000000 Path: UPS.BELKINPowerState.BELKINOutput.BELKINVoltage, Type: Feature, Value: 1208.000000 Path: UPS.BELKINPowerState.BELKINOutput.BELKINFrequency, Type: Feature, Value: 599.000000 Path: UPS.BELKINBatterySystem.BELKINVoltage, Type: Feature, Value: 139.000000 Path: UPS.BELKINBatterySystem.BELKINCharge, Type: Feature, Value: 100.000000 Path: UPS.BELKINStatus.BELKINPowerStatus, Type: Feature, Value: 49152.000000 Path: UPS.BELKINStatus.BELKINBatteryStatus, Type: Feature, Value: 16.000000 Path: UPS.PowerSummary.iProduct, Type: Feature, Value: 20.000000 Path: UPS.PowerSummary.iSerialNumber, Type: Feature, Value: 42.000000 Path: UPS.PowerSummary.iDeviceChemistry, Type: Feature, Value: 68.000000 Path: UPS.PowerSummary.iOEMInformation, Type: Feature, Value: 4.000000 Path: UPS.PowerSummary.Rechargeable, Type: Feature, Value: 1.000000 Path: UPS.PowerSummary.Charging, Type: Input, Value: 1.000000 Path: UPS.PowerSummary.Charging, Type: Feature, Value: 1.000000 Path: UPS.PowerSummary.Discharging, Type: Input, Value: 0.000000 Path: UPS.PowerSummary.Discharging, Type: Feature, Value: 0.000000 Path: UPS.PowerSummary.ConfigVoltage, Type: Feature, Value: 12.000000 Path: UPS.PowerSummary.Voltage, Type: Feature, Value: 1208.000000 Path: UPS.PowerSummary.Current, Type: Feature, Value: 0.000000 Path: UPS.PowerSummary.CapacityMode, Type: Feature, Value: 2.000000 Path: UPS.PowerSummary.RemainingCapacity, Type: Input, Value: 100.000000 Path: UPS.PowerSummary.RemainingCapacity, Type: Feature, Value: 100.000000 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Input, Value: 120.000000 Path: UPS.PowerSummary.RunTimeToEmpty, Type: Feature, Value: 120.000000 Path: UPS.PowerSummary.DesignCapacity, Type: Feature, Value: 100.000000 Path: UPS.PowerSummary.FullChargeCapacity, Type: Feature, Value: 100.000000 Path: UPS.PowerSummary.WarningCapacityLimit, Type: Feature, Value: 30.000000 Path: UPS.PowerSummary.CapacityGranularity2, Type: Feature, Value: 1.000000 Path: UPS.PowerSummary.RemainingCapacityLimit, Type: Feature, Value: 30.000000 Path: UPS.PowerSummary.CapacityGranularity1, Type: Feature, Value: 1.000000 Path: UPS.PowerSummary.ACPresent, Type: Feature, Value: 1.000000 Path: UPS.PowerSummary.ACPresent, Type: Input, Value: 1.000000 Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Input, Value: 0.000000 Path: UPS.PowerSummary.BelowRemainingCapacityLimit, Type: Feature, Value: 0.000000 Path: UPS.PowerSummary.ShutdownImminent, Type: Input, Value: 0.000000 Path: UPS.PowerSummary.ShutdownImminent, Type: Feature, Value: 0.000000 upsdrv_updateinfo... upsdrv_updateinfo... =>Got 1 HID Objects... upsdrv_updateinfo... upsdrv_updateinfo... upsdrv_updateinfo... [snip] </pre></ul> <br/><Br/> You get the idea. You can see here that it's found the UPS, and listed a bunch of information about the USB capabilities of the device. It will then sit in a loop forever checking the status for the device. Now, let's hit control C on that, and start it as a daemon... <br/><Br/> <ul><pre> $ sudo /lib/nut/newhidups -u root -a belkinusb Network UPS Tools: New USB/HID UPS driver 0.28 (2.0.3) Detected a UPS: Belkin /Belkin UPS Using subdriver: Belkin HID 0.1 </pre></ul> <br/><br/> Next, start the NUT UPS daemon... <br/><br/> <ul><pre> $ sudo upsd Network UPS Tools upsd 2.0.3 Connected to UPS [belkinusb]: newhidups-auto Synchronizing...done </pre></ul> <br/><br/> Finally, you can use the command line tool to check on the state of the UPS... <br/><br/> <ul><pre> $ upscmd -l belkinusb@localhost Instant commands supported on UPS [belkinusb@localhost]: test.battery.start.quick - Unavailable test.battery.start.deep - Unavailable test.battery.stop - Stop the battery test beeper.on - Enable the UPS beeper beeper.off - Disable the UPS beeper load.off - Turn off the load immediately </pre></ul> <br/><br/> Unfortunately, <a href="http://lists.alioth.debian.org/pipermail/nut-upsdev/2005-August/000082.html">the UPS doesn't support power cycling it's ports (which is what I was really hoping for), it only supports powering them down, and then waiting for human intervention</a>, which is a shame. You can still shutdown the machine gracefully when things are going flat. <a href="http://www.stillhq.com/diary/toys/000044.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/000044.html http://www.stillhq.com/diary/toys/000044.html Recovering from a bad flash /diary/toys/nslu2 Thu, 17 Aug 2006 18:29:00 PST <a href="/diary/toys/nslu2/000001.html">In the previous post</A> I mentioned that I had a couple of bad experiences with the Debian installer and the Linksys upload web page. <a href="http://www.nslu2-linux.org/wiki/HowTo/TelnetIntoRedBoot">Luckily, it's really easy to recover from these</a>. You do that with the magical RedBoot sequence (RedBoot is the boot loader the slug uses). Do something like this: <br/><br/> Download the Linksys firmware from their web site. I tried this technique with the Debian installer image and it didn't work, so I only know it works with the Linksys firmware. Put that firmware on a web server on your local LAN which the slug will have access to. Then, connect to the boot loader. You do that by running this command... <br/><br/> <ul><pre> sudo arping -f 192.168.0.1; telnet 192.168.0.1 9000 </pre></ul> <br/><br/> ...and then power cycling the slug. You'll end up with this: <br/><br/> <ul><pre> $ sudo arping -f 192.168.0.1; telnet 192.168.0.1 9000 ARPING 192.168.0.1 from 192.168.0.100 eth0 Unicast reply from 192.168.0.1 [00:0F:66:7D:1E:09] 10.717ms Sent 17 probes (17 broadcast(s)) Received 1 response(s) Trying 192.168.0.1... Connected to 192.168.0.1 (192.168.0.1). Escape character is '^]'. == Executing boot script in 1.670 seconds - enter ^C to abort ^C RedBoot&gt; </pre></ul> <br/><br/> You have to be pretty quick on the draw here with the control C, as you have about 2 seconds to hit the sequence before the slug starts to boot normally instead. Now that you're logged in, you can download the new firmware: <br/><br/> <ul><pre> ip_address -h 192.168.1.100 <b>The IP of the HTTP server</b> load -r -v -b 0x01000000 -h 192.168.0.100 -m http /NSLU2_V23R25.bin <b>Load the firmware file</b> fis write -f 0x50060000 -b 0x01060000 -l 0x7a0000 <b>Write it</b> reset <b>Reboot</b> </pre></ul> <br/><br/> And you should be back at the Linksys firmware. Note that you will still have the network settings that you had set before... <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000002&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000002&tag=toys&format=.png" border="0" alt="S"></a>) nslu2(<a href="http://www.stillhq.com/nslu2"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000002&tag=nslu2&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/nslu2/000002.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/nslu2/000002.html http://www.stillhq.com/diary/toys/nslu2/000002.html Slugging away /diary/toys/nslu2 Thu, 17 Aug 2006 18:23:00 PST <table> <tr> <td><img src="/diary/pictures/nslu2.jpg"></td><td> I've been sitting on a Linksys NSLU2 for a few weeks until I time to hack at it. That time came today. The NSLU2 (called a slug) is a Linksys NAS device, which runs Linux natively. There are two USB 2.0 ports, and a wired ethernet port. The CPU runs at 133MHz normally, but that can be bumped up to 266MHz by removing a resistor from the board. <a href="http://www.nslu2-linux.org/wiki/Main/HomePage">Thanks for the NSLU2 Linux project</A> you can also run your own distro on them, and do cool random things. Oh, and they're cheap at about $60 to $90 US. <br/><br/> So, let's talk about the install of Debian on this thing. First off, you need to use the Linksys user interface to configure the network settings. I recommend a static IP, because otherwise it's going to use DHCP, which will make it hard to find later... <br/><br/> There is a Debian installer option, which uploads firmware via the Linksys web interface, and then you run through the installation with ssh. That's a great idea, and I would be much more keen on it if it had worked. I gave it a couple of tries, and then declared it not working. <br/><br/> Instead, I went for the <a href="http://www.nslu2-linux.org/wiki/DebianSlug/HomePage">DebianSlug image</a>, which isn't as Debiany as the Debian installer option. Think ipkg instead of dpkg. You need to grab <a href="http://www.slug-firmware.net/s-dls.php">the firmware image</a>, and a program called <a href="http://nslu.cvs.sourceforge.net/nslu/">upslug2</a>, for which you can find a source download at <a href="http://sourceforge.net/project/showfiles.php?group_id=116564&package_id=164337">SourceForge</a>. Do the normal source building thing with upslug2. <br/><br/> Next, you need to grow another arm, and try the magical reset sequence, which is <a href="http://www.nslu2-linux.org/wiki/SlugOS/UsingTheBinary">documented under the heading "Flashing the image" on this page</a>. Then, run upslug like this: <br/><Br/> <ul><pre> $ sudo ./upslug2 -i <i>path to firmware image from before</i> Password: LKG7D1E09 00:0f:66:7d:1e:09 Product ID: 1 Protocol ID:0 Firmware Version: R23V63 [0x2363] Upgrading LKG7D1E09 00:0f:66:7d:1e:09 . original flash contents * packet timed out ! being erased - erased u being upgraded U upgraded v being verified V verified Display: &lt;status&gt; &lt;address completed&gt;+&lt;bytes transmitted but not completed&gt; Status: * timeout occured + sequence error detected 7983f+000000 ...u------------------------------------------------------------ </pre></ul> <br/><Br/> This takes a while. Be patient, it probably hasn't crashed. Probably. <br/><br/> The slug will reboot, and now you can ssh into it to play. Use the username root, and the password opeNSLUg. At this point it's a useful computer, and you can keep it like this if you don't mind using ipkg for everything and dealing with the rather limited set of packages available. If you need pointers on where to go from here, then I recommend you try a <i>turnup help</i> on the command line, and play with <i>ipkg update</i> and it s friends <i>ipkg list</i> and <i>ipkg install</i>. There are <a href="http://www.nslu2-linux.org/wiki/OpenSlug/InitialisingOpenSlug">more instructions here if you want them</a>. </td></tr></table> <br/><br/><i>Tags for this post: blog(<a href="http://www.stillhq.com/diary"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000001&tag=blog&format=.png" border="0" alt="S"></a>) toys(<a href="http://www.stillhq.com/toys"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000001&tag=toys&format=.png" border="0" alt="S"></a>) nslu2(<a href="http://www.stillhq.com/nslu2"><img src="http://www.stillhq.com/tagicon.cgi?post=/diary/toys/nslu2/000001&tag=nslu2&format=.png" border="0" alt="S"></a>) </i> <a href="http://www.stillhq.com/diary/toys/nslu2/000001.commentform.html">Comment</a> http://www.stillhq.com/diary/toys/nslu2/000001.html http://www.stillhq.com/diary/toys/nslu2/000001.html