June 2009 Archives
Wed Jun 10 23:56:10 EDT 2009
WD HD Media Player Fun Facts
I was recently asked to take a look at customizing a WD HD media player. I can't stand TV (I don't even own one), and I don't watch that many movies, but this little thing is cool nonetheless. It's tiny, and it runs linux. To make changes to it, you can make some blind changes to the firmware, and hope you did it right, or you can hook up a serial cable to the connector on the inside.
You'll need a level converter to convert from RS232 to TTL. I didn't have one on hand, but found a handy kit at nkcelectronics. You could bread board it easily enough, or buy a premade cable. It just depends on what you have around and how much hassle you want.
For those of you who are used to running minicom at 9600 baud for other things, you'll only see gobbly gook. You need to set up minicom for 115200 8N1.
I hooked up a serial cable to the connector inside the device, and started poking around. I thought I'd post a few facts about what's on the inside.
- The hostname is Cynthia
- Here's a list of all the files on the box as it comes from the factory.
- Here is the original firmware from the factory.
- Here's a little info on the processor.
system type : Sigma Designs TangoX processor : 0 cpu model : MIPS 4KEc V6.9 Initial BogoMIPS : 292.86 wait instruction : yes microsecond timers : yes tlb_entries : 32 extra interrupt vector : yes hardware watchpoint : yes ASEs implemented : mips16 VCED exceptions : not available VCEI exceptions : not available System bus frequency : 198000000 Hz CPU frequency : 297000000 Hz DSP frequency : 297000000 Hz
Unfortunately, the proprietary chip they use is what does most of the "stuff" that this box is useful for. All of the programs that communicate with it are also closed source. There isn't a good way to say, play a movie from the command line. It would be really nice to have a way to simply control playback.
Also, another bugger about this thing, is that they stuff the repeat settings into flash. That means if you are trying to work around the lack of interface by jacking right into the IR port with eirid, every time you hit the repeat button, it will be one off from where it was last time. Watch on the console after you hit the repeat button! A second or two later, you'll see it saving the new "config" to memory. It doesn't actually use this repeat setting on the next playback, it's just there to annoy you!
For instance, let's say you programatically press the repeat button once. This bring you to repeat-1 (repeat this movie). Now you shut off the power, turn it back on and try to do the same thing again. What will you get? You'll get the next repeat option up, which is repeat all. If you pull that movie out, put in a new one and try to hit repeat again, you'll shut off repeat all together!
What would make sense here is if that saved setting actually did anything. That way you could just check the last setting, and leave it if already set. It doesn't make a difference though, and your movie will not repeat even if the last repeat setting is stuffed in memory. I needed to manually change the video playback mode in the config file (somewhere in /tmp if I remember correctly). When you change the file in any way, it is automatically saved to memory. So what I did was reset it to no repeat in the file, and then programatically send the commands to repeat through the IR interface.
More info on the player can be found here.