A small Python script to connect to the internet over Bluetooth DUN (dialup networking) using my Nokia Symbian phone and my Linux laptop.
This was written on Arch Linux but should work elsewhere too. It uses bluez5 to enable bluetooth, rfcomm to create the serial port and wvdial to create the PPP connection and manage routes/DNS. Many newer phones use Bluetooth PAN instead of DUN so this method won’t be applicable.
Once upon a time this all worked automagically with NetworkManager. Since bluez5 it fails with this error:
Method "Connect" with signature "s" on interface "org.bluez.Serial" doesn't exist
Apparently we’re supposed to use the new Serial.ConnectFD DBUS API instead.
(more…)
My latest project was to have wireless audio streaming from my Symbian mobile phone over Bluetooth to a a new set of speakers. I used PulseAudio, Bluez5 and Arch Linux running on a Raspberry Pi. It all works really well. I can connect/disconnect from the phone and everything is automatically started on boot. I’m enjoying it now as I type this.
Update 2017-03-05: hciconfig is deprecated
(more…)
Java Generics are a neat hack to save some typing. They have a bunch of problems though. Most of these are due to the lack of runtime type information. Today a friend asked why you can’t create do:
new ArrayList<String>[10]
The compiler gives the error error: generic array creation.
Following is a short explanation of what generics can and cannot do in Java.
(more…)
Comments Off on Java Generic Array Creation Error
I was looking around online for a simple, good looking, web-based countdown timer. The best I could find were using Flash, ugh. So I did what any self-respecting software developer would do and wrote one myself! :)
(more…)
After upgrading my file server from Ubuntu 10.04 Lucid to Ubuntu 12.04 Precise I had a few problems with Samba. Mac OS X 10.6 clients were very very slow. A 1MB file would take several minutes to transfer completely, making browsing photos and general use impractical. Windows (Vista and 7) clients could not connect at all, the file server did not appear in the browse list and typing the name manually did not work either. Unsurprisingly, Linux Samba clients worked perfectly.
(more…)
I bought the Acer Iconia A501 on special from Telstra for $200 a while back. It’s a good tablet and that was a great price for it, however I’ve been annoyed that Telstra hasn’t bothered to release the Android 4.0 Ice Cream Sandwich update that Acer released for unbranded devices. Acer blames Telstra for not releasing it and Telstra blames Acer for not making it available. Bleh.
Fortunately it was not too hard to unbrand the device and upgrade all the way to Android 4.0.3 and presumably 4.1 when Acer finishes that update too.
(more…)
This code is obsolete and probably doesn’t work anymore.
Most ABC radio shows are available to download as MP3s, usually with a convenient podcast feed. Unfortunately sometimes, probably due to copyright stupidity, they make a programme available only by Windows Media or RealPlayer streaming. I’ve written a simple tool to snatch this streaming audio from ABC’s servers.
(more…)
WebDL is a collection of Web TV downloader scripts with a consistent user interface. I’ve previously released these separately, but a while ago I refactored them to share common code and packaged them into a single utility. You can use this interactively or to download any shows matching a glob from a cronjob. Currently supported are ABC iView and SBS OnDemand. I’ll probably add more in the future.
(more…)
I use rdiff-backup to keep a copy of the latest version of all my files and compressed differential backups going a year in the past. This works great except when I have a GNOME login and a ~/.gvfs directory. These are special FUSE directories that root user cannot even enter or even lstat(), which causes an annoying error to be emailed to me every night.
I finally got sick of this and have hacked a solution, I’m not proud of it, but it’ll make the emails stop!
$ curl -L --silent https://delx.au/code/rdiff-shutup.patch | sudo patch --backup -p0
Comments Off on Dirty rdiff-backup hack to fix gvfs
I recently retired an old server of mine, cerberus. It was hosted in a remote data centre to which I have no physical access. My goal was to zero the drives before powering it off for the last time.
(more…)
Comments Off on Remote Wipe of Debian Linux Server