Archive for the ‘Open Source’ Category

Rockbox – I hated it, now I like it

Monday, December 15th, 2008

On iTunes I can be listening to a podcast or an audio book then pause and sync with my iPod. When I hop into the car and hit play it continues where I left off. If I plug in my iPod when I get to work and I have iTunes there I can hit play and continue right where I left off. I want to have the latest podcasts handy at all times, and it would be nice to have some music on my digital media player as well. Syncing with iTunes mostly satisfies this goal by allowing me to select what playlists to sync, including smart playlists (which can search by relative published dates like “this week”). The last I checked, iTunes only supports auto-fill on the iPod shuffle which has always confused me. I want to have my latest podcasts, and then don’t waste the rest of the space… fill it up with some random music – it’s better than leaving it empty.

Portable media players are built to be sold, which sometimes coincides with usability and customer satisfaction, sometimes not. People use these things when they are away from their computers – running, gardening, doing housework, or driving. If a player makes me stop running or makes me pull off my garden gloves it fails to follow it’s primary purpose – play what I want and get out of the way. From what I can tell, most people don’t listen to podcasts or audio books. They load the music, shuffle, and never touch the thing outside of an occasional skip forward. When you listen to an audio book or podcast you need to pause when you get a phone call or talk to the toll booth dude – music you just let it go. Sometimes you miss something and need to scrub backwards. Often you need to fast forward past commercials. Podcast listeners also update their player daily, something that music-only users are unlikely to do. These features do not seem unreasonable, but most players perform badly with these requirements, and the iPod is no exception.

This is all fine, except I don’t use iTunes. My computers these days are filled with Linux goodness. Linux distributions normally include Rhythmbox, Banshee, or Amarok depending on which way you swing. I don’t have much experience with Amarok, but as of today Rhythmbox and Banshee both are unreliable for use with a portable media device. Yes, you can get them to work once, twice, or five times in a row, but that sixth time is a big fat failboat. They are sooooo close to being good, but in the meantime I end up not listening to my podcasts in the car.

The iPod is designed to work with iTunes and specifically attempts to lock out third-party clients – even though Apple doesn’t make a client for my platform. MTP devices as I understand are more open to different clients – but that still has not led to a reliable experience for my MTP device.

Banshee supposedly worked well syncing MTP devices, so I scored this Sansa c240 for $20 in hopes of being able to reliably listen to podcasts in my car again. Nope, it was no more reliable than the iPod – it’d flake out every few sync attempts. The firmware on this bad boy was beyond horrible. Each time the device starts the volume is at 50% – no matter where it was last time. To turn up the volume you must find a song, play it, then press the volume up button about ten times (can’t hold it) to turn it up all the way. On the plus side, at least it will remember where you were in a song if you happen to navigate back to the exact same track after booting. Oh booting – that’s another thing. It took about ten seconds to boot this thing up which is a long time to sit there waiting to find a song so you can turn up the volume. The default theme made it near impossible to see what was selected, and scrubbing through a track was super slow and difficult.

Enter rockbox, an open source firmware for a number of media players that is loaded with features. I had tried rockbox in the past on my iPod Mini, but was turned off by the unnecessary complexity of the system. This weekend though I put the latest rockbox on my Sansa, and I am rather impressed. After messing with the settings I now have a player that boots up much more quickly and resumes my podcast exactly where I was last. I solved by syncing problem quite simply – by not doing it. The Sansa is a mass storage device so I can just copy things to it manually – but once I get off my butt I’m going to just set up rsync to automatically make sure I have only the freshest of podcasts loaded when I plug it in. Rockbox can build it’s database on startup, which so far has been working quite well. With the iPod or Sansa syncing with Banshee it would always rebuild the music database, which blew away the bookmark on what I was listening to – and I spend half the drive home trying to scrub through an hour-long podcast trying to get to where I left off.

The games and applications with Rockbox are quite impressive running on this craptastic Sansa. I particularly like bubbles, which appears to be a rebuild of Frozen Bubble, a simple Linux puzzle game. Once I get my podcasts syncing correctly I’ll probably write up a script to do an automatic playlist generation. I’d like to have a playlist each day that sorts my podcasts by published date so I can just play the top item to hear the latest content.

(more…)



Nautilus Google Docs Uploader

Wednesday, April 16th, 2008

Right click, upload to Google.

I have been slightly interested in python for a while, but just never got around to actually writing anything. Not that I am enough of a programmer to be particularly swayed by one language over another – but the path of least resistance for writing plugins and such for the Linux desktop seems to by python. This was a simple project that taught me some basics, and since there isn’t a nicely developed perl module for the Google API I went on with the python.

Lets say you just made a little spreadsheet in OpenOffice

Openoffice

Now you want to share that amazingly complex spreadsheet with your lawyer on Google Docs

Upload

Now it’s up there…

google docs

and you can edit and share with friends

google edit

Nautilus, the Gnome file manager, lets you drop scripts of your choosing into ~/.gnome2/nautilus-scripts/. When you run the script on a file through the right-click menu the file name gets passed to the script. I knew this was possible, and have played around with OS X folder actions before, but I have to say that in practice this is a lot easier than AppleScript to me.

Grab the python script yourself, download and install the gdata python API, edit the file to have your own username/password, and right-click your way to uploading fun. Disclaimer: this is just a quick and dirty thing, do not expect it to be good.



Arpwatch

Friday, August 24th, 2007

To wrap up script week, I’d like to talk a little bit about arpwatch. Continuing on the theme of half-baked ideas, this was one that I was rather excited about as an entry level network engineer, but the complete lack of interest kinda took the wind out of my sails.

Here is the gist. From my experiences I’ve never seen the use of NAC, 802.1x, or even simple switch port security. I have to assume that many corporations remain blind to what devices are hard connecting to their local network. Each ethernet device has a universally unique burned-in address. It gladly shoots frames with this address out to the network as it attempts to get a dynamic address, or in response to another machine’s request. Arpwatch just sits there and listens for new devices, and creates a log entry when there is a new one.

To me it just stands to reason that a security conscious company would be interested in what mac addresses have been seen on the network, when they were first seen, what VLANs they’ve been on… especially when it is so simple. If you ask a branch office or campus LAN administrator what new mac addresses have shown up on the network TODAY, they simply cannot tell you.

So I thought it’d be a great idea to just set up a linux box with a trunk port to the corporate switches. This would be able to sniff for every ARP on the network and keep an inventory of hardware addresses. Since syslogs are a little lame, I made a database where this information was stored. You could run reports like “show me all devices that first appeared on the network on either VLAN 50 or VLAN 60 between October 10th and 16th which had 3Com network cards”. I also created scripts to use snmp to grab the dynamic cam table from Cisco switches. The idea here is to be able to tie those hardware addresses back into the cam tables to tell us which port and switch the machine had connected. This seems rather obvious to me, and somewhat simple to implement.

I seem to have trouble not with coding or implementing these things, but with marketing. As certain as I was that this is great information to have, there seemed to be no interest. I’ve not seen any other tool attempting to do the same thing.

Oh well, another ill-fated script. Here is some code. I don’t even know if I have all the pieces to this one. I certainly don’t have the database schema.

This one does the parsing and importing of arpwatch logs.
This one does the grabbing of data from switches.

This is really old, so is not exactly “good” but I still think the idea is worthwhile.