WDTV Tools

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.


  1. [...] Descarga | Web [...]

    Pingback by WDTV, un mundo en movimiento | arias marqués — June 24, 2009 @ 15:46

  2. Thanks great application mod for the WDTV, I use it to bind a reboot call to the eject button!

    Nice IR module.

    insmod eiri_dev.ko
    mknod /dev/ir c 241 0

    Comment by Thanks — March 6, 2010 @ 22:05

RSS feed for comments on this post. TrackBack URL

Leave a comment

You must be logged in to post a comment.

Powered by WordPress