My new backup disk finally gets going February 28, 2008
Posted by a1291762 in : computers , 4commentsI’ve got a new backup disk. The old one was 160GB, barely big enough to backup both Bree and my machines. That was before both Bree’s new machine (which has a bigger disk) and my replacement disk (which is bigger).
So I wanted something big. I also wanted something a little less annoying than the one we had before. We’ve both got laptops and having to find 2 power points plus room to put the disk next to the laptop was a pain. A bus-powered disk solves part of the problem but I don’t really care to move the disk. I liked the look of Apple’s new Time Capsule. A bit pricey though… The idea was a good one though. Attach a desktop hard disk to a router and do NAS. As fate would have it Officeworks was advertising a MyBook World Edition that day and after getting them to price match an online store I got one for significantly less than what Apple was charging.
So what exactly is it?
It’s one or two hard disks in an enclosure with a small ARM processor that runs Linux to make the storage available over a network. They’ve been hacked by the community which makes them much more useful. I went for a single-disk 750GB model because it’s half the physical size of a double-disk model yet big enough storage-wise for what we have now with plenty of room for growth. I could have got a 1TB double-disk model for only a bit more but with 2 disks comes a case twice the size, a fan that is apparently very loud and reduced reliability unless you sacrifice half the space to do mirrored RAID. The thing is, if I wanted a multi-disk setup with redundancy I’d prefer something like a Drobo (which is quite a bit more expensive but very awesome).
First thing I did was to dump the crappy software (that’s Windows-only) and try out a Samba mount. I also did some tweaks from the internets giving me drive spin-down and a ramdisk for frequently changing files (to prevent unnecessary spin-ups). I then got netatalk installed (for native AFP mounts). So far so good… but I want this thing for backups and I was already using rsync for backups. With a small tweak I got rsync going over an SSH connection. That’s when I hit the wall.
Despite having gigabit ethernet the MyBook World is reported to top out at about 4MB/s. I have a sneaking suspicion this is due to CPU overhead of the sharing daemon because I could only manage 0.5MB/s running rsync over ssh. top confirmed that it was the SSH process killing the CPU. There’s apparently a crypto co-processor on the ARM chip but this isn’t being used to speed up OpenSSH. I tried Dropbear but it was still not fast.
No problems I thought, rsync was designed to work with rsh before it worked with ssh. First though I had to find the code to build it. It took me ages but I eventually found it in the GNU inetutils package. Handily the MyBook includes a complete Linux system including a compiler. Um… Why waste disk space holding things like a compiler? Anyway, it’s nice because I don’t have to stuff around with a cross-compiler just to build a single app. I got rshd built and installed then spent a while trying to get the damn thing to work. Finally I got it going over wireless (802.11g) at 1.5MB/s. Not bad at all. With ethernet it only went up to 2MB/s, with rsync being the CPU killer this time. I haven’t checked the transfer rate for Samba, Netatalk or NFS mounts. Presumably the one with the lowest CPU overhead will yield the fastest transfer rates.
Once I get around to buying Leopard I’ll probably give Time Machine itself a go. I’ve heard reports that it works just fine with a sparse image on an AFP mount.
Update 20 February 2008
There’s also iSCSI that I can try. It looks quite a bit harder to setup (and I lose concurrent access) but it should have less protocol overhead so it could be faster. A quick search reveals no definitive numbers for the other three, certainly nothing considering the CPU overhead on the server end.
And then there’s always the option of turning the MyBook into the client and having it pull the data from my Mac. Though I’m not really sure that’ll solve the CPU overhead problem.
Polling is dead. Long Live 'hede'! February 28, 2008
Posted by a1291762 in : treo650 , add a commentI’ve removed the polling and substituted a notification hook on the ‘hede’ event. I don’t even know what that is but I know that it’s to do with input events and it slows down your device to have apps hooking it. I’m only hooking it when the LED is on though. If you leave off the LED checkbox the ‘hede’ event won’t get hooked. The only time you should notice any impact is if you ignore pending alerts.
I’ve got the AlarmTriggered events purging the followup AlarmDisplay events but the delay caused by turning the vibrate on and off means the screen still wakes up. Worse, it seems the device completely wakes up before the AlarmTriggered is delivered so I can’t even set a flag to force the device back to sleep.
Update 28 February 2008
I found this while grepping through my PalmOS headers.
#define sysNotifyEventDequeuedEvent 'hede'
This ominous sounding comment accompanied it.
Sent for each event being returned by EvtGetEvent. Be very about registering for this; you can easily impact performance (in a bad way!) Also note: for speed, notifyDetailsP points to a event structure with system-native endianness, meaning you might need to byte-swap what you read depending on what endianness your code uses. Note: future OS releases might not send this notification.
Isaac really gets going February 23, 2008
Posted by a1291762 in : isaac , add a commentFor a few days now Isaac has given us advance warning when he needs to go to the toilet. He’ll also sit on there until he’s done. He’s definitely got it now. He had more accidents than Emily did when getting started but apparently that’s to be expected with boys. Like Emily he’s still not there with poo and we had another accident but yesterday he managed to put it in the potty and was most pleased. Also like Emily, he gets confused with farts and wants to sit on the toilet to do them (or gets upset because he thinks he’s done a poo in his pants).
Isaac has this fascination with watching us empty out the potty into the toilet. Bree’s took him to watch the first time and I guess he just got fixated on it.
Update 26 February 2008
Isaac came home from kindy in the clothes we sent him in – no accidents there. He got home and asked to go to the toilet (or rather, he whinged at us, said “no” to the toilet but couldn’t tell us what he really wanted and we’ve come to recognize this as “I need to go to the toilet”). Then he told us he needed to do a poo and proceeded to do one on the toilet. Twice. There was no rushing about trying to get him on before he let go, he even held the second poo in despite having a nappy on. The one blemish was that he did a wee in his nappy just before he asked to do the poo. He was wearing a nappy though. We eventually stopped putting Emily in a nappy to sleep because she was waking up and doing a wee despite being able to hold it in or get up to go to the toilet so I’m not too concerned about that.
AttnGrab update February 20, 2008
Posted by a1291762 in : treo650 , add a commentIt turns out the polling I put in (to turn off the LED when you clear all alarms) is keeping the device awake. I’m not sure how to avoid polling (doesn’t seem to be a notification for “all alerts cleared”) but it should be possible to let the device sleep when it’s idle and when the device is asleep there’s no need to poll.
Last night I got it to detect the presence of Handspring Extensions and Attention Manager’s LED/Vibrate support so it should work on non-Handspring devices too.
I got this question about AttnGrab:
I would have a million ideas for this…what about commercialising it?
Ideas are welcome. Patches are even better. I don’t have the time to support apps (I have a day job and a family) so commercializing is out of the question. If someone else wants to take the code and do great things with it, that’s cool too (but if you want it closed-source you’ll have to start from scratch as the code is GPL licensed).
I’ve gotother projects up on Sourceforge but to date nothing collaborative has happened. I didn’t even bother with AttnGrab because being developed on board it’s hard to integrate with an SCM (same problem I had trying to submit a patch to the Bird guys).
Now OnBoard SCM… that’s a great idea, especially if it can integrate with a repository on the desktop at HotSync time. It would also give me a good excuse to find one of the partially-completed Rsrc to RCP converters and fix them to support the resources found in current apps. Sounds a bit ambitious… will definitely take me a while.
LED and Vibrate February 19, 2008
Posted by a1291762 in : treo650 , add a commentWith a hacked up version of HsExt.h on my Treo I can now get the damn thing to turn on the LED and vibrate! Why I can’t use the Attention Manager’s LED/Vibrate hooks to do this is beyond me but now that I’ve got it working I can add LED/Vibrate notifications to Attention Grabber. Hooray!
Update 20 February 2008
Attention Grabber v1.1 is out. Go get it.
I really should do some kind of check for the Handspring extensions but I’m not really sure how to do that. Even on a non-handspring device, you should be ok if you don’t turn on the LED and Vibrate options (they default to off).
Isaac's progress February 18, 2008
Posted by a1291762 in : isaac , add a commentIsaac went to kindy today and surprised them all with his potty training. He had a poo accident (we had them with Emily for some time after she was trained too) but he did all his wee in the toilet. They were really surprised at just how proud he was of his achievement.
Even more amazing, he came running to me this afternoon and said “Daddy I have to wee” before he had to wee. The only trouble is it took me a few seconds to process what he was saying and he couldn’t stop himself going before I’d yanked off his pants and got him on the toilet. Still, it’s a huge step in the right direction and pretty amazing considering 5 days ago he couldn’t even wee in the toilet unless we were extremely lucky.
He’ll be in undies or training pants (padded undies that absorb wee) unless he’s sleeping now.
Pining for hacks February 14, 2008
Posted by a1291762 in : treo650 , add a commentOh how I miss the old PalmOS hacks. Back when I had a Visor Edge the world was simple. There was a well-defined API for writing hacks that everyone used and because of this hacks did not interfere with each other. They were also generally well behaved. I think I found only 1 hack that misbehaved on my device.
Sadly, the move to ARM chips killed hacks but it also seems to have killed the co-operation between hacks too. There’s a hack manager (YAHM) for OS 5 but it seems that nobody uses it. I’ve only found 1 hack for it and it was written by the same guy. Pretty much everyone else has restored to doing their own patching. The result of this is that most apps do things the wrong way and conflicts between apps are quite likely.
I had a bunch of apps installed on my Treo until yesterday. Then I noticed the problems they’re causing, some of which don’t appear to make any sense. Of note is that they all hook the ‘hede’ event which means they can screw up input events (and that’s exactly what they do).
Keyshades
- Conflicts with Profiles causing my device to stay awake, draining the battery.
- Causes double click events when the screen is tapped. As you can imagine, this makes using the stylus rather difficult.
- Kills the option key behaviour.
Profiles
- Kills the option key behaviour.
FieldPlus
- Slows down the device (patched version doesn’t have this problem).
- Kills the option key behaviour.
PSLink
- Kills the option key behaviour.
What is the option key behaviour? Open up memo pad and press Option. You’ll see a dot in the graffiti shift indicator. Press it again and it’ll become an underlined dot. This state should _not_ clear by itself but with any of the above apps installed it does.
I had a look at alternatives for these apps.
I already had TreoKeyHack (the only YAHM hack I’ve found) installed and it doesn’t cause problems. It covers almost all the things FieldPlus does.
I found Keyshades lite which forgoes the ability toggle the backlight using a keypress but otherwise does the same thing (just run the app to toggle the backlight). A bug in the Treo650’s software makes the backlight come on when pressing Option+Shift or Option+P and changing the backlight level. Turning the Treo off and on after doing this causes the lights to turn off. Good enough for me.
I tried PalmWiki and Wikiz but they too broke the option key. However, both of them did correctly navigate to a date in the calendar, something PSLink doesn’t always do.
I can’t find an alternative to Profiles.
Strangely, McPhling causes no problems despite hooking the ‘hede’ event. It’s also got source code available so it should be possible to see what it does differently that avoids problems. Both Wikiz and PSLink have source code available. I think I’ll start with the Wikiz source, changing the ‘hede’ handling to be more like McPhling’s.
The only real problem left is that I can’t find an alternative to Profiles and I really like that app. Then again it shouldn’t be a hugely complicated app to write (detect a held key – same as McPhling, set a bunch of options, easy peasy) and I only use it to set volumes so I should be able to whip up a replacement app myself.
Update 19 February 2008
Gah! Now it seems I can’t escape the option key behavior even when I disable everything and reboot!
I used a Hex editor to let me run Profeo 600 Lite (Treo 600 – ‘H101′, Treo 650 = ‘H102′) but it doesn’t feel like a nice replacement for Profiles.
I neglected to mention too that Profiles has been giving me crashes when editing the profiles. If I don’t need to edit profiles it works ok but if I do… it’s important that the app doesn’t crash! Even more reason to just code my own.
Update 20 February 2008
I’ve removed YAHM, McPhling and Event Floater now. That means no low-level or ‘hede’ hacks (and my opt key works again!). I found Duh button launcher which gives me button launching without ‘hede’ but has no MRU list. Both it and McPhling are open source. I feel a patch coming on.
Emily wishes she was older February 14, 2008
Posted by a1291762 in : emily , add a commentShe can’t wait for her next birthday, she can’t wait to go to prep, she wants a Barbie (but I don’t think she even knows what one is).
Sigh. I wonder how long I’ve got until she wants to go out with boys ;-o
Isaac clicks, starts toilet training February 14, 2008
Posted by a1291762 in : isaac , add a commentWe’ve tried Isaac out a few times for toilet training but it wasn’t until today when it clicked. He did 2 wee+poo in the toilet today and was most proud of himself. Here’s hoping he progresses to completely trained as quickly as Emily did.
Updates February 1, 2008
Posted by a1291762 in : programs, treo650 , add a commentI’ve been too busy to post updates. Here’s a bunch of things that have happened recently.
- Nokia purchased the company I work for, Trolltech. Ironically, this means I might be able to get my hands on the source code for TreoAlertMgr (since they purchased that company too) but I’ve already written Attention Grabber and it remains my property, not Nokia’s so it won’t be going away.
- The OnBoardC/SrcEdit guys accepted my Bird patch and are keen for me to become a developer.
- I sent off the patch that makes Bird more like RsrcEdit.
- I’ve collected my patched utilities into a single file, OnBoard.zip. If you want the modified sources let me know.
- I found the source to Pocket Rogue and I got it building with PRC tools but it crashes randomly. Will post once it’s working.