Tollef Fog Heen's blog

tfheen Sat, 30 Dec 2006 - A moderately complicated OpenWRT setup

At home, I have had a setup with a wireless router for quite a while. It's more or less a stock OpenWRT setup, but I have split the joined all the wired ports into one virtual interface (actually, I think they're just on one VLAN) and split off the wireless. The wireless is open to the world, but I have a fair amount of packet filters there so it doesn't get too annoying. Some people have no shame and run bittorrent and other file sharing utilities on other people's open wireless.

Anyway, my setup is no longer so simple. I bought a WRT54GL to provide better reception in other parts of the flat and wanted to join those two. After a little bit of reading, I found what I wanted: WDS. Due to a previous misconfiguration of the WRT54GS, the WDS connection was joined onto the br0/LAN segment and not the wireless segment. That was easily enough fixed, but it's always a bit scary to change network settings on headless devices. (I did manage to lock myself out, but I could ssh through in from the wireless network, so I just used the WRT54GL to bounce through.) Once that bit was up, I could set up WDS, I did as the documentation told me and did it with lazywds (anyone can do WDS with you) enabled. It worked, so I turned it off and rebooted both routers (again..), and it still worked. Yay!

[23:25] | tech | A moderately complicated OpenWRT setup

tfheen Wed, 13 Dec 2006 - Initial impressions of the Samsung Z5F

I have been walking to and from work lately and have become increasingly restless over not having anything to listen to, so I bought a small media player, a Samsung Z5F. First impression is it's tiny. Really tiny and I used a little while to get used to touch-buttons. Upgrading the firmware is trivial, both from Linux and Windows: the firmware download is a zip file, inside there's .dat file which you place in the root directory. When you disconnect, the player says "new firmware detected. Upgrade?", I answered yes (who wouldn't? It gives me 30% better battery life and gapless MP3 playback), it rebooted, upgraded itself and rebooted again. After a long (probably 15-20 seconds) wait where it just displayed the Samsung logo, during which I was a bit scared it was bricked, it booted up fine.

It works well, it plays music and podcasts, but I have run into one strange problem with it. I was about 1/3 through the latest episode of Lugradio when I wanted to go ten seconds back to catch something somebody said, but it entirely failed to seek backwards. It seems like it either doesn't support seeking in big .ogg files or doesn't support seeking in big files or doesn't support seeking in .ogg files. Anyway, annoying bug. I'm going to download the MP3 instead to see if it has the same problem or not.

Apart from that, it's a lovely, tiny little player with 44 hours of battery life and 4GB storage. Nice little toy.

Update (2006-12-26): I got an email from one of the firmware developers about the problem of seeking in large Ogg Vorbis streams and this is now fixed. The fix isn't public yet, but is somewhere in Samsung's QA chain. And the problem is only large Ogg Vorbis files, not large MP3s, so it can be worked around in most cases. Yay!

[22:25] | tech | Initial impressions of the Samsung Z5F

tfheen Fri, 08 Dec 2006 - Javascript, Greasemonkey and clipboards

One of the jobs of an archive administrator in Ubuntu processing sync requests. The job is fairly simple: read a sync request (in the form of a bug report), make sure it includes the relevant information and is either filed by or seconded by a person with the appropriate permissions. Then, it's downloading the source, injecting it into the correct queue and marking the bug as closed.

The by far most boring bit of this is actually closing the bugs: opening the bug report, clicking on the relevant task, marking as "Fix released", assigning to myself, pasting the update report from an editor and clicking "submit". Rinse and repeat, today for 73 bugs.

To help this, I started looking into writing a greasemonkey script. Just add a button besides the submit button which would then be labeled DTRT or something like it, but ran into some trouble which is really obvious: Javascript run in the content's security context can't access your clipboard. A small hack to greasemonkey.js fixed this and I now have a shiny GM_fromClipboard function. After playing around with this for a while, I thought it wouldn't help me at all since the javascript is called in the page content's security context, but any event listeners I add seemingly aren't. Nice. (This is of course due to the whole concept of closures and how Javascript works.)

Anyway, I ended up with a script that does the right thing. It needs a greasemonkey patch.

[22:21] | Ubuntu | Javascript, Greasemonkey and clipboards

Tollef Fog Heen <tfheen@err.no>