(2014-07-15) N900 FM Transmitter Script Update and Projects Compiled

I've managed to get a few of my C projects compiled on the N900 which is pretty neat; you'll need to download the binaries to your desktop or something first. The N900 Busybox built in wget version doesn't support SSL:

wget https://edgley.org/n900/derezz.gz
wget https://edgley.org/n900/cede.gz
wget https://edgley.org/n900/copy.gz
gzip -d derezz.gz
gzip -d cede.gz
gzip -d copy.gz
chmod +x derezz
chmod +x cede
chmod +x copy

You can use {} expansion if you're running bash ({derezz,cede,copy}.gz). I've not changed how they work, so they are a bit more difficult to use with the inbuilt keyboard (use of FN keys and FN + CTRL characters).

I've also made some significant changes to fmt -- my originally named FM Transmitter script -- which has now been renamed to 'audiabus'. It now allows for proper shuffling of the playlist; you can download it from here:

wget https://edgley.org/n900/audiabus.bash.gz
gzip -d audiabus.bash.gz
chmod +x audiabus.bash

It also has less redundant crap (the station name and station descriptions were totally irrelevant), less spelling issues and some nice command line switches. It does require bash to be installed and symlinked to /bin/bash though you can easily change it to bash4 if desired.

The help screen looks like this:

USAGE: audiabus (-)[lhdrbv]

 l      Display the generated playlist prior to playing
 d      Set media directory to use
 f      Set station frequency to use (107900 is 107.9)
 b      Set station boost level (118 is safe)
 h      Display this help screen
 v      Display version number

For clarity, the switches can be parsed with or without the "-"; I did this simply to make it easier to use on the N900 itself.

It also does a lot of error checking, making sure you have mplayer, sudo, fmtx_client and less installed; and if not, it will reduce functionality. This works nicely, as I can test the majority of the script on my desktop and in some respects serves as a simple bash randomised playlist media player. Pressing Ctrl + C to quit also works a lot better as it traps the signal and runs a cleanup routine. Now you don't need to manually disable the FM tramitter after you close.

I expect to add a few more bells and whistles in the future, like the ability to select the media player (so you don't *have* to use mplayer). I would also like the ability to skip songs, but the shuffle has made this less of a problem (I don't listen to the same 10 songs every time I drive to and from work).

Update 2014-07-17: It can now skip songs! Press 'l' after a song has started and it will skip to the next one in the list. All this really does is kill the mplayer process, but it works the same.