Kannel Installer
Mon, 21.06.10
Kannel is a great platform for all things mobile. We use the SMS gateway feature with our service management system to notify customers when their machines are ready for pickup. All you basically need is a mobile phone which you can connect to your Mac via USB and Kannel.
Surprisingly, it's not available through MacPorts or Fink and compiling it from source has been rather tricky in the past. Through some experimentation I found that the CVS version works better on 10.6 and was even able to build a universal binary of it. We've been running this version for months now on a Mac mini and an old Nokia phone.
You can download the installer from here. In addition to the application it also includes launchd jobs for bearerbox and smsbox. Check /etc/kannel.conf before loading them in. The full Kannel documentation is available here.
I've only been able to test this with 10.6, let me know if you have problems on 10.5. One day I hope to find time to write a more detailed article on how to set this up...
tags: software
Hansakicker
Tue, 24.02.09
HansaWorld Enterprise is probably the most used enterprise-level business software for the Mac in Europe (maybe because it's the only one). It's been around for ages and so has picked up a bit of cruft along the way (I hear there's a native Cocoe port in the works, but we'll see). This means that when it works, it works, but when it starts to crash, you're options are to try what little tricks you may know yourself, pay an insane amount of money to have some guy look at it, or just restart it.
You can easily automate the latter with combining launchd and a bit of shell:
#!/usr/bin/env bash
# /Library/Scripts/hansakicker.sh
if ps -Ac | grep -q hansa51 ; then
logger "Hansa is running, no need to restart"
sleep 10
else
sleep 10
logger "Hansa crashed, restarting"
launchctl start my.hansa.launchd
fi
exit 0
A couple of obvious things to note: in this case the Hansa binary is called "hansa51", it may differ in your install. The sleep commands are there to calm launchd down. The second sleep comes before everything else to give CrashReporter time to finish up. Also this assumes that Hansa's being started from launchd, ie with something like:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>fi.humac.hansa5</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/Hansa5/hansa51</string>
</array>
<key>RunAtLoad</key>
<true/>
<key>WorkingDirectory</key>
<string>/Applications/Hansa5</string>
</dict>
</plist>
In the launchd part, we are simply looking for the moment Hansa's crash log is modified:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.$
<plist version="1.0">
<dict>
<key>Label</key>
<string>my.hansa.hansakicker</string>
<key>OnDemand</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/Library/Scripts/hansakicker.sh</string>
</array>
<key>WatchPaths</key>
<array>
<string>/Library/Logs/CrashReporter/hansa51.crash.log</string>
</array>
</dict>
</plist>
Once everything's been set up and loaded in, we can do a test:
touch /Library/Logs/CrashReporter/hansa51.crash.log
... which should trigger the script.
Obviously this is little more than a band-aid and you should really do something about it if this happens daily, but is more than useful for those intermittent Saturdays when you're salesforce is working and you're not. :-)
tags: software | code | tips
Ditching Transmission :(
Sun, 09.12.07
I've been a big fan of Transmission ever since it came out. I think it used to be a fantastic, native BitTorrent client that was really easy to use for the basic stuff, but could do more when you needed it to. I think they still have the best interface for creating Torrents and the extra Mac native features like hot folders and Growl support are terrific... BUT.
My troubles began some months ago when my net connection started dropping intermittently. The connection only came back when I hit the "Renew IP" button on my router. At first I thought this was a router issue, so I tried with another one - same problem. Then the issue disappeared for a while and when it came back, I thought it must be our aging (~5 years old) cable modem not keeping up with the "modern day Internet" so I got a new one and for a while things seemed to work fine when ~a week later, same problem.
Then I started to suspect my ISP with whom I had also been in contact about this issue. Since they never had anything useful to say, I decided to ditch them and try another one. Just a few days after I had ordered the new ADSL line, I accidentally came across this Transmission forum thread...
Lesson one, when troubleshooting a connectivity issue - always make sure there are no P2P apps running on the network. OK, even though the bug had cost me real money (the new modem and cancelling the ADSL subscription), I could only blame myself for not thinking of this sooner. Fine, I thought, all is well now... BUT.
Now there's a new problem - my downloads intermittently result in corrupt files - Transmission says the file is complete while 0.2 % of it is yet to be downloaded. Furthermore I'm seeing some really weird behaviour when downloading small (< 3MB) files - the progress indicator will sometimes actually start decreasing going back and fourth between 128K done and 46K... wth? :-)
So anyways, I felt like venting some steam. I really hope the team can pull it together and get Transmission back as the rightful king of BT clients on OS X. In the meantime, I'll be using BitTornado, which btw also has a GUI on OS X, just launch it using "pythonw2.5" (on Leopard). It looks absolutely gross, but it works, or you can use the curses or headless versions.
And yes, I should be filing bug reports instead of whining about in on by blog.
tags: software | bugs
<< Older entries