Technical
Medialink problems solved
26 Dec 2006, 9:00PM
The story of my experiences with the ADS Medialink left off in my last post with an excellent solution for streaming music with a 100 line ruby script. The problem remained, though, of how to stream video. The Medialink didn't like straight avi's served from the Webrick server, and casualy presents the most unhelpful error messages ("Out of memory") when you attempt to watch a movie this way. Seeing no obvious reason for why this would be, I kept searching for more information on the device.
It turns out that the ADS Medialink is outstandingly obscure, and is barely mentioned on its manufacturer's website at all. But in my search I came across a number of similar devices which all seemed to have the same features and this "Syabas middleware". This, apparently, is the software that runs on the Medialink and many other similar devices. Syabas created this software with fairly complex capabilities, and left manufacturing the actual devices to a handful of electronics companies. A somewhat odd strategy I must say, and certainly the cause of much of my confusion when trying to find information on the software, but once you realized that all these devices are the same they become much easier to deal with.
So with this issue sorted out, it becomes fairly clear that all I needed was software that supports these Syabas-middleware based devices. The first one of these I found for Linux was called wizd, so I pulled it from cvs (they don't seem to have actual releases put together), fixed a few build problems, and let it run. Streamed a movie to my TV just perfectly. Now if only the computer in my room at school was running, so I could download a movie from it to watch ...
On Ruby, with an application to the Medialink problem
22 Nov 2006, 8:57PM
In yet another example of the compulsive buying habits of my roommates and I, we recently obtained an ADS Medialink off off woot.com. This device was designed exactly for students at Case. The Medialink plugs into your TV, connects to the wireless network (using 802.11g no less), and allows you to view movies and listen to mp3's from any other computer on the network. The video plays remarkably well for being streamed over wireless, and it plays every divx or xvid movie that I've tried. This device could not be better designed for the needs of college students. Now there's no need to haul a laptop out to the common room and hook up cables to the TV just to watch a downloaded movie, and no Ipod required to listen to music in the common room either. And it doesn't even need an ethernet cable!
The biggest problem with the Medialink (other than the extremely buggy software on the device) is the software that runs on the computers serving media files. Of course the device didn't come with any software for Linux, so I had to explore the Windows software to devise a solution for Linux. When I first looked at it, I was amazed at how simple the software was. It just started a web server, and the Medialink receiver used a web browser to connect to it. The entire user interface was done in HTML. Even more surprising was that the server software was just a Apache Tomcat with a mess of Java server pages. It's a simple, and not entirely bad idea. So I figured I could duplicate it pretty easily.
My first attempt to create some solution for Linux was to install tomcat on my laptop, and copy the jsp code over directly from the windows version. This resulted in failure, since I quickly became tired of tomcat crashing on startup without any clear error message. I removed Tomcat, and tried just using straight Apache. This also was not successful, since I could not customize the directory listing pages as easily as I liked. I didn't want to resort to PHP for this project, and that seemed to be the only solution on apache.
So I looked elsewhere. The best solution I found was the WEBrick server built-in to Ruby. It was amazingly simple make it serve mp3 files, and only slightly more complex to subclass the server and create custom directory listings. The result is under 100 lines of code, and it is faster and more reliable than the software that comes with the device. Here is the code. I still need to figure out how to stream video files to the Medialink box, but that shouldn't be significantly different than music. Other than that, it's quite usable.
OSTN Crap
22 Nov 2005, 8:50PM
So everyone's seen the posters everywhere advertising TV on your computer. Well, I can't get that with my linux box (of course), so I spent some time looking into it.
When you select one of the channels on my.case.edu, you get sent to a (useless redirect and then) a nsc file. This is cisco's shittily encrypted means of pointing a client to a stream. I messed with it a bit, and finagled the actual streams out of these .nsc files. But there's no bloody way I can get anything to display the video on linux, because it's WMV3/9 (two different numbering schemes). So until someone can come up with a reliable wmv9 decoder, OSTN is still useless with linux. Oh, and interesting thing to note: 129.5.109.55 is a Rensselaer IP. Another IP mentioned in the file is 233.127.154.14, which is some multicast IP.
I've been fighting this too long. I need to calm down with some strawberry fig newtons.
Anyways, the URL's are below the fold. I strongly encourage further hax0ring.
Blown Capacitor
19 Aug 2005, 2:59PM
After much examination, I've diagnosed my recent computer troubles to a blown capacitor on the motherboard. The motherboard will not boot at all now. A picture of the (minimal) carnage can be found here.
The street-lamp sputtered / the street-lamp muttered
7 Aug 2005, 6:59PM
Got bored; started coding. One patch merged in Evince no problem. Another patch was rejected for reasons that became obvious once I read some more of the code. Revised version of that patch is still sitting in bugzilla, so it may have been implicitly refused. I still can't get anyone to respond to this patch for NetworkManager, although it's only a one-liner and obviously correct. Overall I'm 1 for 3 this week, but at least I've done something. Update: NetworkManager patch committed. 2/3.
Went to an air show at willow run airport. About eight B-17's, a few B-24's, two A-10's, and a bunch of other random planes. Walked, err, crawled through the inside of a B-17, interesting stuff. Kept reminding me of Catch-22.
Oh, and apparently there's a meteor shower going on around now. The Perseids appear to emanate from the constellation Perseus, which rises in the north-east around 11pm. Cleveland-based readers can expect a rise time about 20-minutes earlier. The peak meteor rate is expected to be about 45 per hour.
The street light outside my house went out.
Not-so-simple Substitution Cipher
20 Jul 2005, 11:49AM
Yesterday I encountered a friend of mine working on an interesting problem. He had been given a few files full of hex bytes (in ASCII,) encrypted with a simple mono-alphabetic substitution cipher. Typically a substitution cipher is something to be laughed at when it comes to security, but there was a slight twist on this one. The encrypted data was not English text, but a windows .dll.
The normal way to attack a substitution cipher is to create a frequency distribution of the cipher text and the "probable plaintext", and correlate the results. This works well for English text, because there are few possible characters, and different letters have significantly different frequencies. But this was a binary file full of non-ascii "garbage", how could we solve this?
New Laptop
19 Jul 2005, 10:52AM
After months of deliberation, hours of consultation with that guy who knows everything about laptops, three mistrials, and a lot of cash, I ordered a laptop. The decision: an IBM Thinkpad T43.
For all those who really care about specs: 1.86 Pentium M, Radeon X300, 14.1 inch screen (SXGA+), 5.1 lbs ("travel weight"). Ram needs upgrading, HD is ok. The T line is IBM's middle-of-the-road between ultra-portables and ultra-heavy desktop replacements. To those not satisfied by specs alone and want the full logic behind my decision: read on.