Monday 14 July 2008

N800 as Remote Speaker and Overdue LCA Overview

Well it has been a long time, I really don't have any excuse. So much for blogging about LCA, ey? I actually have a half written blog post about it still sitting on my Zaurus, but I never got around to finishing it. My Internet Tablet functioned beautifully (except for a bug regarding the bluetooth keyboard requiring me to reboot it every now and again to get the on screen keyboard to come back) and was all I really needed there. The only use the Zaurus got was a little bit of showoff, typing that unpublished blog post when I didn't want to pull out that bulky dell keyboard and listen to music on the train when I didn't want to exhaust the N800's batteries. The only time a full sized laptop would have been particularly handy was during some of the tutorials where it was impossible to keep up on the tablet.
It was awesome being able to meet so many people including some of Nokia's employees and seeing the N810 in the flesh, as well as Linus himself. If you must know I saw him four times - after a kernel talk I saw him sneak into an unmarked room, when he walked in on the kernel dev panel talking about kernel debuggers ("Linus! We were just talking about... ice cream.... Would you like some ice cream Linus?"), when he ducked up the stairs to grab a snack and during the meal on the last day.
By now there isn't much point in posting info about any of the talks since it has well and truly been blogged to death. If you haven't already go watch the vids - In particular I recommend Tux' Angels: Incident Response Revealed (about IT forensics using open source tools) and Viktor Olier's talk on the RepRap (I think it was titled The Replicators are Coming or something).

Nightwish was *awesome*. I did have to miss out on the Penguin Dinner that night to make it, but ohh was it worth it. Unfortunately I missed out on a shirt since they had stopped selling them before interval when I was planning on getting one. No matter - I have since ordered some Nightwish and Sonata Arctica merchandise from overseas. Google paying for the bar tab at the Students party followed by gelato was pretty sweet - I think that brings the total meals of mine that Google has paid for to 5 :-)


But anyway, moving on to today's post: I now have found yet another use for my Internet Tablet!

When it's late at night and I'm at college and want to watch a video or listen to music without disturbing my neighbors I use a 5 meter headphone extension cable to reach my bed. I've been meaning to look into a bluetooth headset but haven't got around to it yet. Anyway, I've come back home for a few weeks while uni is on break and it's late at night and I want to watch a video without disturbing my mother. Problem is I forgot to pack my headphone extension cable and it's too cold and uncomfortable to sit next to the computer watching it.
So I started wondering if there was any way that I could use my Internet Tablet as remote speakers across the room - then I could plug my earphones into them and effectively have (almost) wireless earphones. Turns out that it is possible and not too difficult at all.
The two are connected via wireless using my Linksys WRT54GL - which wouldn't be necessary if I could get my laptop to use ad-hoc properly or if either device supported functioning as master. Another option that I haven't looked into yet is using bluetooth PAN, or possibly hacking the tablet to look like a bluetooth A2DP headset, but that's for another time and probably another person to hack into existence.
On my tablet I opened a terminal and ran:
esd -public -tcp -nobeeps
I then opened a second terminal window and SSHd into my laptop. There I ran:
export DISPLAY=:0
export ESPEAKER=192.168.1.101 (My Internet Tablet's IP)
mplayer -ao esd -delay -0.3 video.avi

I had to use the -delay -0.3 parameter as the audio was slightly delayed due to the overhead of sending it over the network and I found that number gave pretty good lip sync - you would probably have to fiddle around with it to find the optimal setting for your situation. This technique should work for any application that can use esd to output sound.