WDTV Tools

June 30, 2009

event-osd r170 Released

Filed under: event-osd — Tags: , , , , — Elmar Weber @ 19:24

A new version of event-osd has been released. event-osd allows you to modify the OSD of the Western Digital TV HD on the fly when the user navigates through his media collection.

This is a bug fix release for r162. It fixes a bug that could freeze up the WDTV’s OSD display when the user tries to eject a device on which event-osd operated.

The new application image is available for download at http://sourceforge.net/project/downloading.php?group_id=261153&filename=event-osd-r170-wdtv.zip.

All event-osd files can be found at http://sourceforge.net/project/showfiles.php?group_id=261153&package_id=324606. The documentation is in the event-osd wiki at http://sourceforge.net/apps/trac/wdtvtools/wiki/event-osd.

June 29, 2009

Compile Kernel Modules for the WDTV – A Tutorial for the WDTV Tools VMware Image

Filed under: kernel, tutorials, vmware — Tags: , , , , , , , , — Elmar Weber @ 16:05

As written in the introductory article for the WDTV Tools VMware Image I’m writing a series of tutorials for it. The first tutorial is available at the WDTV Tools Wiki. The tutorial describes how to compile new kernel modules for the WDTV and demonstrated it by adding Bluetooth support.

A future tutorial will show how to compile Bluetooth software and create an application image that contains all the software required to interface the WDTV with other Bluetooth devices.

June 17, 2009

WDTV Tools Development VMware Image

Filed under: vmware — Tags: , , , , , , — Elmar Weber @ 15:44

I created a VMware image based on Debian Linux that already contains everything to get you started with development for the WDTV. The focus is on getting programs compiled, but you can also use it to create the filesystem images for your OSD mods and applications.

The image is hosted at SourceForge as RAR and ZIP file for your convenience. The VMware image extracts to about 900 MB, so make sure you have enough space available before extracting.

You can use the VM with a number of VMware products, the easiest way to use the VM is VMware Player. It also supports VMware Workstation >= 5.0 and VMware Server >=1.0. If you use Virtual Box or another virtualization solution it can probably import the VMware image.

The VM has no graphical UI because you need to do all the stuff in the command line anyway. You can either use the console directly in the VMware program or you can connect to the VM via SSH (for Windows I recommend PuTTY). The VMware’s IP address is shown before you login. The username is “wdtv” and the password “!develop” (both without “”). If a password is required anywhere it is the same (e.g. root, but you should use sudo).
If you work within the VMware, so this does not apply for SSH, the default keyboard layout is currently German, which means you will find the “!” above the one (”Shift + 1″).

The WDTV Tools Subversion repository is already integrated into the VMware, so you can fetch updates to the toolchain or kernel with ease. The mipsel C compiler for the WDTV is already in the path, the toolchain is located in the wdtv. directory.

A series of future tutorials that shows basic stuff like compiling new software for the WDTV and distributing it, will be based on this VMware.

June 14, 2009

event-osd r162 Released

Filed under: event-osd, osd — Tags: , , , , , — Elmar Weber @ 16:41

A new version of event-osd has been released. event-osd allows you to modify the OSD of the Western Digital TV HD on the fly when the user navigates through his media collection.

The r162 version introduces an extended event config file format that supports multiple events and also adds support for new features. The most important feature is the ability to change the working directory of the script to the current directory of the OSD. This solves as a workaround for paths with special characters because the shell of the WDTV firmwares is not able to deal with them directly. You can specify that the current working directory (cwd) is changed by using a config file like the following one:


version=2


[event0]
type=directory_change
pattern=/
script=/my/script.sh
cwd=true
media_type=video

More changes in detail are:

  • added: option to execute script in the newly changed directory. This is a workaround to eliminate problems with special characters in the current path. See documentation for details. Thanks to LaurentG for suggesting this.
  • added: option to specify several events in one file, see documentation for details
  • added: support for future extensions in the event file format
  • fixed: OSD working copy was not cleaned on restart

The new application image is available for download at http://sourceforge.net/project/downloading.php?group_id=261153&filename=event-osd-r162-wdtv.zip.

All event-osd files can be found at http://sourceforge.net/project/showfiles.php?group_id=261153&package_id=324606. The documentation is in the event-osd wiki at http://sourceforge.net/apps/trac/wdtvtools/wiki/event-osd.

event-osd is part of the WDTV Tools project. For more tools and information take a look at the WDTV Tools homepage: http://wdtv.elmarweber.org.

June 11, 2009

Some OSD Mods

Filed under: applications, event-osd, osd — Tags: , , , , , — Elmar Weber @ 04:36

Take a look over at the WDTV Forum, there is some serious development going on. LaurentG and juliojs use event-osd to skin your folders according to your own templates and data. Thanks to LaurentG’s great idea to use the folders as an options menu a new world of possibilities opens up. For example is ninja76 working on an integration of torrents into the UI and realtebo integrates file downloads via the IRC network.

I can’t wait to see more mods that bring the little black one to shine even more.

June 7, 2009

Tutorial: How to Create Application Images (app.bin) Files

Filed under: applications, tutorials — Tags: , , , , — Elmar Weber @ 21:32

The question popped up a few times in the forums, so I created a tutorial on how to do it: http://sourceforge.net/apps/trac/wdtvtools/wiki/Tutorials/CreateApplicationImage.

The assemble-app-bin.sh script that is introduced in the end is also available in the SVN repository via

# svn co https://wdtvtools.svn.sourceforge.net/svnroot/wdtvtools/trunk/appbinutils

June 5, 2009

wiidtv – Using the Wiimote With the WDTV

Filed under: osd, wiidtv — Tags: , , , , , , , — Elmar Weber @ 01:42

Just a quick hacked demo of the Wiimote controlling the Western Digital TV HD. The more the Wiimote is rolled the faster it scrolls. But it’s currently not really usable because of the rather poor performance of the WDTV GUI when the scrolling gets faster.

If you want to try this here is a quick howto (you should know how to handle yourself with telnet or SSH on the WDTV):

  1. You need
    • eiri application image
    • optware (opt.bin)
    • USB bluetooth adapter that is supported by Linux (if you have one it probably is)
  2. You need to install some packages on your WDTV for bluetooth support – and because some people reported problems with the busybox tar you should also install the GNU tar:

    # ipkg install bluez-utils tar
  3. Download the bluetooth kernel modules and install them (you need to be in a directory that is writeable, so when using WDLXTV you should a directory in /opt/):

    # wget http://wdtv.elmarweber.org/temp/bt.tar.gz
    # tar xvfz bt.tar.gz
    # sh insert.sh

    If everything works you should get no messages, if you get a notice that firmware_class is already loaded that’s OK, but no other message should appear.
  4. Next must setup your bluetooth adapter. If not already done, first connect it to the WDTV. Now you should see it with # hciconfig -a if no device called hci0 is listed there was a problem with the bluetooth adapter. Take a look at dmesg | tail do get possible error message.

    Next you can bring the bluetooth adapter into play with # hciconfig hci0 up. To check if everything works you can do a quick # hcitool scan to show any bluetooth devices in your vicinity. Even if you don’t have any active bluetooth devices you can assume that everything works when you don’t get any error messages.

  5. The last step before using the Wiimote with your WDTV you need the wiidtv application and install it.

    # wget http://wdtv.elmarweber.org/temp/wiidtv.tar.gz
    # tar xvfz wiidtv.tar.gz
  6. Now you can put it all together by starting the wiidtv application and connecting your Wiimote. Start wiidtv with

    # sh wiidtv.sh

    and then you must set your Wiimote into discovery mode by pressing the 1 and 2 buttons at the same time. The wiidtv program will connect with the first Wiimote it finds and use it. You have 10 seconds to do this, if there is no Wiimote found until then the program exits, so have your Wiimote ready and near your WDTV. In case your Wiimote was detected you’ll feel a short vibration from it, this is the signal that wiidtv is connected to it.

    Control is very limited, you can scroll up/down by tilting / rolling the device (simulates up down remote command, if you have thumbnails enabled you’ll be out of luck). With the B button you can enter a directory or play a file and with A you return to the previous view. Finally, you can disconnect the Wiimote by pressing the Power button for a few seconds.

I’ll release an application image ASAP. As usual the sources are in the SVN if anyone wants to give it a hack.

June 4, 2009

Preview Release of eiri: A Command Line and Network Interface to the Infrared Port

Filed under: eiri — Tags: , , , , , , — Elmar Weber @ 01:03

I had some time to finish the IR adapter I’ve been working on. A preview release of eiri (extended infrared interface) is available at http://sourceforge.net/project/downloading.php?group_id=261153&filename=eiri-r128-wdtv.zip.

eiri is an improved alternative to irset. It allows you to send IR commands to the WDTV GUI from the command line, thus enabling third party applications like web pages or SSH to control the WDTV GUI. Compared to irset it fixes some bugs, namely the 100% CPU utilization and it supported repeated keys (so you can hold down UP/DOWN and it is executed again without the need to press it again). Furthermore it adds a network mode that can be used to control the WDTV from a remote device over the network. The rest of this article first describes the command line interface and then the network mode.

The command line program is called irsend or eiric and can be used to send an arbitrary sequence of commands where a command can be one of POWER, HOME, UP, LEFT, ENTER, RIGHT, DOWN, BACK, STOP, OPTION, REWIND, PLAY, PAUSE, FORWARD, PREVIOUS, NEXT, SEARCH, EJECT or a number larger than 0 that is interpreted as a wait in milliseconds. For example

# irsend UP 1000 ENTER

will emulate an UP command from the remote, then wait 1000 milliseconds (1 second) and finally send the ENTER command. It is the same as when you press the UP and ENTER keys consecutive on the remote with a delay of one second. More complex combinations are possible but always remember to put a wait between two commands because the WDTV GUI won’t be able to process most commands if they are executed without delay.

A second feature of the preview release of eiri is the network mode. the eiri daemon (eirid) starts a TCP server on port 14247 that listens for connections from clients. When you connect your client two things happen and can be done

  1. You can send command sequences in the same way you can do with the irsend command line program. The communication is done in ascii mode (No UTF-8 or other encoding) and each line must be terminated with a n character or otherwise no commands are executed. So you would send the string “UP 1000 ENTERn” to achieve the same as the irsend call done above.
  2. You are notified about any commands received from the real remote. For each command a line is send to your program in the form of 4177951108:HOME:0 where the first parameter is the IR code, the second one the alias and the third parameter the repeat count. Repeat count comes into play when the user holds a key pressed. It is increased by one each time a pressed key is resend. If another key is pressed is it reset to zero. Even when you don’t use the notifications you should still read them and flush them into the digital nirvana because otherwise it can happen that some buffer runs full and your process cannot communicate any longer with eiri.

As with all preview releases the target audience are advanced end users and developers that want to test things. The goal is to test if the application works on a broader base of devices. The application image does nothing permanently to your WDTV, so if you experience any problems simply delete the application from your USB stick.

June 3, 2009

event-osd Tutorial Available

Filed under: event-osd, osd — Tags: , , , , , — Elmar Weber @ 02:59

A tutorial for event-osd is available at the Wiki: http://sourceforge.net/apps/trac/wdtvtools/wiki/event-osd/tutorial.

The wiki page for event-osd also has a used by section, so if you have an application that uses event-osd you’re welcome to add a link to it (or mail it to me or leave it here in a comment).

June 2, 2009

event-osd r112 Released

Filed under: event-osd, osd — Tags: , , , , — Elmar Weber @ 04:01

The second release of event-osd is out. event-osd is a notification system for the WDTV’s GUI that allows you to modify the OSD on the fly.

This release works with the media library enabled and should now work on all WDTVs with ext3-boot 0.9.2 and WDLXTV >= 0.5.2.

Besides the main bugfix some smaller changes have been made: app.event files are now converted with dos2unix, so if the file has Windows file endings it still works. Furthermore some system calls have been optimized so that there is less overhead when the directory changes.

You can download the new release from http://sourceforge.net/project/downloading.php?group_id=261153&filename=event-osd-r112-wdtv.zip.

As always, the documentation for developers is available at the Wiki at http://apps.sourceforge.net/trac/wdtvtools/wiki/event-osd.

A video showing event-osd in action with appletrailerfs:

Powered by WordPress