It’s been ages since I did an update on the main network machine here, and I bit the bullet over the weekend. 250+ packages emerged with surprisingly little trouble, and all I was left to do was build the updated kernel and reboot.
I usually end up with something that doesn’t restart after the reboot, usually because of a kernel module that needs to be rebuilt after the kernel (because I forget to remerge the package before the reboot, oops). This time the culprit was Asterisk (the phone system), which I also often have trouble with after an update due to a couple of codec modules external to the Asterisk build. This time however the problem ended up being due to the Asterisk CAPI channel driver failing.
Thinking it was the usual didn’t-rebuild-the-module problem, I went looking for the package I had to rebuild… only to find it was masked. Turns out the driver for the ISDN card in the box, a FritzCard PCI, is no longer maintained and doesn’t build on modern kernels, which has resulted in the Gentoo folks hard-masking the entire set of AVM’s out-of-tree drivers.
Help was at hand in the form of a Patton SmartNode 4552 ISDN VoIP router I’d bought months ago to replace the Fritz card. Even though there isn’t much information about how to configure the SmartNode for Asterisk around, I managed to get the setup working in only a couple of hours. I even managed to get the outgoing routing for the work line set up right!
Eventually I’ll get something posted here that goes into a bit more detail about the configuration. Let me know in a comment if you need to hurry me up!
Archive for category Hardware
Upgrading from Cisco
Aug 21
In case you weren’t aware, I am a VoIP nutcase. I have an Asterisk phone system at home, and all the phones in the house are VoIP of some description (either real VoIP devices or analogue handsets through an ATA). While I haven’t converted to VoIP as a replacement for PSTN, I have some connectivity to VoIP providers both here and overseas (and soon to be more, to help the phone-home situation while I’m overseas).
I’ve been a user of Cisco IP phones, buying 7960s and a couple of 7970s through a well-known internet site (maybe it starts with an “e”, not sure). The phones have been excellent, and I’ve even written a few XML apps to supplement their use here. The 7960s are getting a bit dated now, however, and I found myself contemplating buying 7971s (or even something newer, like the 7965 or 7975). Before I committed myself further into the relationship with Cisco, though, I thought about what I was really getting out of using Cisco phones.
Like many users of second-hand Cisco gear, I only purchased the hardware. I do occasionally succumb to a nagging feeling of being an “outlaw” (at least in the eyes of Cisco), but admittedly that feeling usually only comes when I find out that Cisco has released another new version of SIP software that I can’t get because I haven’t paid for SmartNet. The last time I had this thought though, I had a realisation: even if I did pay for SmartNet, the only thing I’d get would be the firmware: Cisco will only support their phone software when connected to their CallManager server (yes, even the SIP firmware). Anyone running Cisco phones against anything other than CUCM gets no support from Cisco in the event something doesn’t work–and based on the information floating around, the problems are many.
So basically I would be paying Cisco to allow me to run one of the worst SIP implementations in embedded existence, with no opportunity to report problems with it in my environment. Hmm, let me think about that for a minute…
At around the same time, I happened across the NerdVittles site, and in particular the post where NerdUno nominated the Aastra 57i as the “World’s Best Asterisk Phone“. I started to do some research into it, and was astounded at the level of support the manufacturer (a Canadian company which a few years ago acquired the telephony business of a little mob called Nortel) and the community provide for this phone and Asterisk. Looking through the phone manual, I found functions that only work with Asterisk! I found a full set of integration scripts that provide XML applications, right through to automatic provisioning tools. Possibly the best thing was that on the product page for their phones — right there on the page that descibes the product — are links to current versions of firmware, documentation, XML application development guides, even a Linux-based application to encrypt the phone configuration files. Not hidden in some obscure hard-to-find portal, or behind a registration-only support site.
I started to think of the possibilities… I’d be able to freely modify the phone configuration (even via a HTTP interface if I so chose), without having to make trial-and-error changes to a cryptic and totally undocumented configuration file. I’d be able to write XML apps without having to do laborious debugging to cater for why the parser was choking on XML that was perfectly okay according to the documentation but apparently tripped over an undocumented field length restriction or character encoding limitation. I could get access to things like Visual Voicemail, BLF, integration with Asterisk functions like day/night mode and call parking. I could keep the phones up-to-date for new functions and bug fixes. With a click of a mouse I could get proper Australian tones!
So, I decided to give one a try. Finding nothing on that “e” site I went looking for a vendor locally, and found several places that would sell one to me (legitimate e-tailers, no less! Zounds! A VoIP phone with a warranty? You jest!). It took a while for my chosen vendor to source it for me, but I’ve had it now for a couple of weeks. It’s probably going to take a while for it to live up to it’s full potential in my installation, but since that potential is so much greater than what I have been able to do with the Ciscos I think I’m already ahead.
More in the coming weeks as the Aastra settles in.

We watched WALL-E the other day. A bit of trivia for Apple Mac fans (if you didn’t already know) is that WALL-E’s startup sound — heard when he’s finished his solar recharge — is that of a post-1997 Mac computer (with Steve Jobs on the board of Pixar and Disney, WALL-E was never going to make The Microsoft Sound (: ). Coincidentally, at around the same time as I saw WALL-E I was going through that modern malaise of mobile-phone-alert-tone-taedium… So, inspired by this bit of cinematic crossover coolness, I decided to get some Mac-chime action for my handset.
The first thing was obviously to get hold of the audio file. This turned out to be surprisingly easy, thanks to Google pointing me to a piece of software called MacTracker. MacTracker is actually a reference guide for Apple products (computers all the way back to the Macintosh XL, the MessagePads, printers, displays, even iPods and mice), but part of the information it holds about the computers is their startup and death chimes.
There’s no option in MacTracker to export the audio files, but by opening the app package (“Show Package Contents” in Finder) it’s possible to navigate to where the chime sound files are stored. Then from Finder, all I had to do was zap the file to the phone via Bluetooth. On the phone, opening the Bluetooth message gave me an option to save the “music” file, which I did — this adds the file to the Music Player, but importantly makes it easily selectable in the configuration of the alert tones.
So now when I receive an SMS I hear the death chime of a Macintosh LC, and the startup sound of the Twentieth Anniversary Macintosh alerts me to incoming e-mail. I’m going to apply similar configuration to my desktops: on-and-off for the last ten years I’ve been using a Homer Simpson soundbite to advise incoming mail, and it’s a bit tired now…
Next task will be to replace the startup sound on my N810 with something a bit retro-Mac!
Living with an iPod touch
Dec 11
I held out for a long, long time. I'd even talked myself entirely out of getting one. Like they say in the classics though, "you think you've escaped, but they pull you back in". I now have a 32GB iPod touch and it's doin' alright, even though it took me nearly a week before I bothered putting any media on it!
I think what finally did it for me was the App Store. I love being able to simply go to an app on the device and easily look for software, installing what I like with no fuss. I especially like the fact that my downloads are synced with my computer, so that I don't have to keep track of all the individual items I've installed (unlike my phone; I can't think where all the sis and sisx files for different stuff I've installed might be).
My Facebook friends will know that I'm much more active there suddenly. Why? The Facebook app on the Touch — I no longer have to start up a computer or open a browser to update my status or reply to comments. I had a bit of this function with Fring's Facebook interface on my phone, but the large screen of the Touch makes things like this much more friendly.
I came very close to getting an iPhone actually — but not to use as a phone. This was after I'd realised that it's just as valuable as an Internet-connected device as an actual phone. The cost of iPhone service is still a bit prohibitive to me though, especially for an occasional-use device.
One of the things that had turned me off was the closed nature of the iTunes ecosystem (iPod, iPhone, Apple TV, iTunes). People sometimes ask me about Skype, and I say that the worst thing about it is that it Just Works. I mean, it's a closed system with no interconnections other than those provided by Skype themselves — by this nature it should fail, and yet because it works (arguably) better than any other desktop VoIP product it enjoys immense success. Same goes for Apple's stuff: the iTunes ecosystem Works And Works Bloody Well.
I've been thinking for ages about sync for calendar and contacts and stuff; I've been hunting for services and software and tools for ages. I could build something myself, and indeed started to (I've looked at Google Apps, used Chandler, checked out Ovi, and played with Sync4J before it was called Funambol). I could spend time and effort coming up with something myself…
Or I could just buy an iPod.
New gadget: Nokia E71
Aug 23
I have been in the mobile phone market on-and-off for nearly 12 months. There wasn’t really anything wrong with the N70, I guess I was just getting a little fidgety with lots of new “shiny” going around. The trip to the US in May, and seeing an iPhone in person for the first time, probably didn’t help, nor (obviously) did the local release of iPhone 3G. Once I’d talked myself out of getting an iPhone though, the itch was still there… and I must say it’s being well-and-truly scratched by the E71.
I’ve had this phone for just on a week now, and it’s certainly one of the best phone purchases I’ve ever made. In a nutshell, the key things about it are:
* QWERTY keyboard, in a form factor not much larger than the N70. Importantly, it’s much smaller than the E61 that preceded it (now there’s a phone that was just MADE of ugly). Despite it’s size the keyboard is amazingly easy to type on, although I may have to update this after I give my thumbnails a trim.
* Symbian OS. Maybe I’m biased, as the owner of a Psion 5, but to me Symbian has an edge over other phone OSes. Not only with the functions in the handset and Nokia’s Series 60 interface, but the range of third-party apps for Symbian (or Series 60 specifically) is great. Almost straight after charging the battery I downloaded PuTTY (SSH client) and “vejotp” (S/Key one-time-password utility). Plus, the recent news that Nokia intends to open-source Symbian is a great thing.
* Nokia Maps and A-GPS. While the iPhone glitterati download the entire UBD or Melways every time they walk down the street thanks to Google Maps, I get quick GPS mapping for zero download (the last few times I’ve used it, the download counter has stayed stuck on “0.0kb” even though A-GPS is supposed to cost a bit of data every startup). It’s not the most accurate GPS ever made, for sure, but it’ll do me for now at least.
* Built-in podcast support. I was getting more and more frustrated with the way that Amarok and iPod fought with each other over my podcasts. It never seemed to work as well as it did on iTunes! Now, I can use the device I download the podcasts with to listen to them as well. It’s self-contained, tidy (no more podcasts mixed in with the music library and causing havoc), elegant.
* Wi-fi capability and SIP client. Being able to connect to the home network obviously means that I can do things like update my podcasts without having to second-mortgage the house to pay for HSDPA data. The SIP client is very cool too: I’ve connected it to my Asterisk box, and now have a cordless home phone and mobile in one device.
* Solid construction. It’s got to be the most sturdy-feeling phone I’ve ever owned. The case is metal, and it has a nice weight to it. The buttons feel solid, almost like real keyboard keys.
* Drop-dead gorgeous. I got the grey version, the metal casing looks like titanium and has a glossy finish (which is a little prone to fingerprints, but cleans easily). The screen is just amazing, usable in daylight, bright and colourful and incredibly high resolution.
I’ll mention more as time goes on, but for now I am very happy!
Motion Computing Tablet PC
Aug 13
Thanks to work, I am now the possessor of a rather cool piece of kit: a tablet PC. It’s a Mobile Computing LE1700, and I’m quite impressed with how it works. The big question though is of course… Will it run Linux?
At the moment it’s still running Windows XP Tablet Edition, but that’s only because a Hardy Heron install DVD is quite some way away from me right now.
I just trained Microsoft speech recognition and this paragraph has been dictated using speech recognition. The recognition rate is actually quite good for the amount of training I’ve done, although I am having to go back and correct quite a few minor errors.
Back to handwriting recognition, which is outstanding: it’s only just now, as I write on the screen of this device, that I realise how poor my handwriting has become! Almost certainly this is due to lack of practice and under-use! I can tell as I’m writing that its recognition is somewhat dictionary-based, as if I pause or lift the pen it will make a guess abort what I’ve written which it will change as I complete the word.
Credit where credit is due, I think tablet Windows looks pretty good. Having used it before just putting Ubuntu on, I’ll be expecting a bit more from Linux…
On the hardware side, the machine looks quite sturdy and solid — so much so it’s a bit or the weighty side. I did install the additional battery pack though, and I’m sure that if I was adopting a proper tablet-PC posture it wouldn’t feel as heavy as it does. It has a 3G modem built-in, which works fine with my Telstra USIM (that’s how I’m posting this now), and the usual complement of Wi-Fi, Bluetooth, PC-Card, SD and infra-red. It even has a place to stow the pen-stylus.
As I said, I don’t have a Linux disc handy to start setting up properly so the big Linux question will have to wait for a while. Some early Googling shows that there is support for most of the hardware components in it (the digitiser is Wacom, the Wi-Fi is Intel 3945, I’ve even seen support for the 3G adapter. It’s the interface and application level that I’m worried about — the state of handwriting recognition, whether XRandR lives up to the promise, and so on. I’ll post more as I get used to it and see what it can do…
Way back in May I had a hard disk in my laptop fail, and after the warranty replacement disk showed up it took me a few days to get around to doing the replace. It didn’t get off to a very good start though…
In the past when I’ve done this kind of recovery I copied the details of the partition table and copied each partition in turn off the failed drive. This time however in my haste (or something) I imaged the entire 80GB in a single file by using dd pointing at the disk device node (/dev/sda, say) instead of each partition.
When it came to restore, this brought me undone. I tried the reverse of what I’d done to create the image, just dd to the disk device node, but at around the point where the first partition would have ended it failed with an I/O error.
Assuming that I did actually have a valid image of the entire drive, I needed to find a utility that would treat a disk file as an image of an entire drive, partition table and all. Then, theoretically, I could copy each partition out of the source file in the same way I was used to.
As usual, the lazyweb came through for me. I found a beaut utility called kpartx, apparently part of multipath-tools. I also found some blog posts describing how to use the tool for what I needed. What kpartx does by itself is scan a block device or normal file (significant, as I’m sure when I first used it I had to use losetup) and create device-mapper mappings to the partitions it finds. kpartx was just what I needed!
This blog post describes the process I went through (and no losetup here either). For me, I let kpartx create device-mapper nodes for the partitions in the disk image, and then used dd to copy from each of those partitions to the real partitions in the new disk (carefully created using fdisk to match the originals). Then I set up grub on the new disk, and installed it into the laptop. It worked first go!
So now on its third hard drive, this Sony Vaio (same one with the weird wireless issue in Hardy) gets yet another lease on life. The battery is almost expired though, so I think it won’t be long before it goes to the Old Hardware Shelf…
Edit: I realised my confusion about losetup. kpartx uses losetup under the covers if it detects that you’re trying to work on a disk file instead of a block device. When you use the -a or -l switches to kpartx, if it needs to it straps up a loop device for you and automatically works on that; running kpartx with the -d removes not only the device-mapper nodes but the loopback node as well.
A couple of weeks ago I had bootup problems with my old Sony laptop. I had replaced the hard disk in it last year (February), and everything was pointing to another busted hard disk. First time I’d had a machine outlive two hard disks!
Sure enough, I put a different disk in the laptop and it worked, and the original disk in a USB caddy failed (but only after working successfully a couple of times, leading me to think it was a transient problem and reassemble the laptop, at which point it failed again… sigh).
Through persistence and determination (and a couple of goes in the freezer) I managed to get a copy of the disk onto another drive. I then went shopping, but decided to check the warranty on the dud drive: lo-and-behold, it still had nearly four years of a five year warranty to run. Better yet, unlike the Western Digital I had to send at my own cost to Singapore for replacement, Seagate have an address in Australia that can be used.
Sod it, I said, anything more than the original 80GB (since for less than what I paid for the 80GB a year ago I’m looking at 160GB or more!) is wasted on this particular machine, so I completed the RMA, found a box to pack the drive in, and sent it off.
The address in Australia is a mail forwarder to Seagate in Singapore. I had to keep that in mind when I checked their order status page, which a week later was still showing “awaiting your return”. Nevertheless, it wasn’t long before the page changed to “shipped”. Looking a bit closer I could see that my 80GB drive must have put on a bit of weight on the way to its birthplace, as Seagate was sending me a 100GB drive in return!
Having left Singapore last Thursday the drive arrived on Monday, but due to work commitments (plus having to fix the Slug first) I wasn’t able to do anything with it until today. Stay tuned for the recovery exercise…
MythTV fun and games
Apr 1
Bad things don’t always come in threes. For my MythTV setup, four bad things all happened at once. First was that the governments of the Australian states that run Daylight Savings Time (DST) decided to jump on the energy-saving bandwagon and change the end-time for DST this year. Second was that the OzTivo folks changed the API for connecting to their program guide data, and closed the old API interface on the same weekend that DST was originally due to finish. Third, for some reason that I’m still investigating, my run-an-emerge-world-at-least-every-fortnight MythTV backend had an old timezone-data package, so any times it handled that should have still been DST weren’t. Fourth, Shepherd isn’t quite as smart as I thought it was, and I didn’t find out until too late…
Let me get something straight: Shepherd is the bees-knees of EPG grabbers for Australian MythTV users. If you’re a MythTV user in .au and not running Shepherd, stop reading this right now and go and update your system to use it–you’ll be glad you did. If I had just looked at some of the output it has been generating since OzTivo announced it’s changes, most of the agro I’ve suffered the last few hours would have been avoided.
In a nutshell, Shepherd is a “meta-grabber”. It includes code that can get program data from a dozen or so sources, and keeps looking up sources until it fills your listings with data goodness. It automatically updates these individual source grabbers as well, so you should never need to worry about its up-to-date-ness (more on that later though). It also fetches extra program data from IMDB and TVDB, and can even automatically grab station icons for you. Highly, highly recommended.
I could see that some of my EPG data was coming from OzTivo because I had seen the notes that they had put in the program data advising of the API change. The weird thing I saw was that for a program I was recording in the same timeslot each day, sometimes the message would be there and other times not. While I thought that this was a little strange, I figured that the OzTivo folks were just being overly cautious and trusted Shepherd to do all the updates it needed.
Then, ever since Sunday morning when the southern states *didn’t* switch back from DST, I’ve had recording times out by an hour–programs trying to record an hour early. So as I mentioned, I had ye-olde timezone data on the backend, which can’t have helped depending on the data source (although I’m trying to work out if this actually is a contributor as I would have thought it would send the recordings an hour late… plus, others who have confirmed their timezone data have had the same problems). For a couple of programs, I actually had double entries: one an hour too early, then a second one at the right time. This was weird, and I still can’t explain it!
A manual run of mythfilldatabase showed why I was getting the repeated OzTivo API messages. Shepherd had downloaded the updated grabber alright, but the new version has a Perl dependency that wasn’t satisfied and it couldn’t run. Rather than bail out, Shepherd elected just to keep running with the old grabber. Given the circumstances, I’m still deciding how I feel about that. :-
So once I was confident that the grabbers were working okay again, I decided to get the EPG straight. I remembered that mythfilldatabase will not replace any existing data it thinks is valid, which is why only data post-April-5-or-so looked nice again. So, with a mailing list post or two as encouragement, I truncated (database-admin-speak for “deleted all the data from”) the “program” and “programrating” fields in the mythconverg database and ran mythfilldatabase. After about 20 minutes, voila, fixed guide data!
So now I’m thinking of how I can alert myself to a problem with Shepherd. I used to just check the result of the last mythfilldatabase run through Information Centre or mythweb, but since Shepherd ends cleanly so does mythfilldatabase. Looks like I might have to come up with something hackish to look for Perl runtime errors in the mythfilldatabase log and do a Nagios passive service check or something… Sigh, as if I needed another little project to keep me busy…

1113