Can I use this HOWTO for Vlsys M-PLAY 202 Plus?I have recently built my MythTV on Kubuntu Edgy (my first ever linux) in a Zalman HD160 enclosure. This case comes with a VFD/IR module made by IRTrans. I have been googling on how to enable this little piece of hardware, and the only info I found is this.
IRTrans provides linux drivers on their website. Base on the info from the mythtvtalk forum, and a little bit of messing around with the source code, I finally get the hardwares to work.
note: all the commands below are for Debian based distro . If you are using other distro, you are on your own, as I don't know anything about their commands.
If you are using a 64 bit system, download the 32 to 64 bit compatibility libraries:
Get the checkinstall package:Code:sudo apt-get install ia32-libs libc6-i386 libc6-dev-i386
Install the softwaresCode:sudo apt-get install checkinstall
This is the daemon for receiving the IR signal. According to the README, it replaces the lirc daemon, so you can stop the lircd daemon. Since I don't have other IR device, I don't have any issue stopping it. If that is not the case for you, you need to check if this irserver is compatible. The last command below pevents lircd from autostart on boot up.
Don't uninstall it, as the extra tools offered by lirc, e.g. irw, irexec, are quite useful.Code:cd /etc/init.d sudo lirc stop sudo update-rc.d -f lirc remove
Download the compiled version of the server. Decompress the package and copy the program (irserver) to /usr/sbin/ directory:
Create a 'remotes' directory, this is where the server stores the remote control configuration:Code:tar -xvzf irserver.tar.gz chmod 766 /path to irserver/irserver sudo cp /path to irserver/irserver /usr/sbin
You can create this remotes directory in several other places: /etc/irserver/remotes, /usr/share/irtrans/remotes, or ~/.irtrans/remotes. Putting it where is up to you, but I don't recommend putting it in ~/.irtrans/remotes as the server has no access right to your home during system bootup. Thus, making auto-start fails.Code:sudo mkdir -p /usr/local/share/irtrans/remotes
Note: Make sure you have only one remotes directory (out of the 4 options above) in your system.
To test run the server, do the following but substitute x with the correct usb port #:
Press any button on the remote, you should see some printout on the terminal. Now it is time to setup the remote control.Code:irserver -codedump -debug_code -loglevel 4 /dev/ttyUSBx
Learning the remote control
Download the ASCII client off the IRTrans website. The executable is already included in the zip. With the irserver running, run the irclient:
The steps to learn the remote are:Code:cp /path to irclient/ sudo chmod +x irclient sudo ./irclient localhost
- Select "2 - Learn" to start learning.
- Select "1 - Select remote", I enter 'Zalman' for mine.
- Select "2 - Learn Timing". Just press any button on the remote.(note: I am not sure if this step is necessary.)
- For each button on the remote, do "3 - Learn Command [Based on timing]". Enter the command name, then press the button on the remote that maps to this name.
Note: The server treats the volume knob on your case as 2 IR codes, so you need to learn those as well
- After you finish, select "99 - Exit" twice to exit
Note: I have yet to find out the difference between item 3 (Based on timing) and 4 (Command with timing). If someone know, please drop me a note.
A Zalman.rem file is created in /usr/local/share/irtrans/remotes/ directory. I include a copy of my Zalman.rem config here, in case you don't want to mess with this learning part. I also have a lircrc to use with MythTV. I grabbed this off the web, and make some changes to match my button names. (thanks Jarod Wilson and Hugo van der Kooij for the config file). Copy the lircrc to ~/.mythtv/ directory.
These configs are by no mean perfect. You certainly need to tweak it to suit your need.
Remove the .txt extension from these files before using them.
This is actually a forked version of the lcdProc package, so uninstall lcdproc if you have it:
Download the IRTrans lcdproc driver source code and untar it:Code:sudo apt-get uninstall lcdproc
Configure with the irtrans driver, compile and install:Code:tar -xvzf /path to saved tar/lcdproc.tar.gz
checkinstall will ask you some questions about the package (lcdproc). Just enter lcdproc in the description field. The default version number is messed up (don't know why), change it back to 0.4.3.Code:cd /path to saved tar/lcdproc ./configure --enable-drivers=irtrans make sudo checkinstall
The daemon LCDd is installed in /usr/local/sbin, and the client lcdproc is in /usr/local/bin
Using checkinstall to install giving you the ability to uninstall it with your distribution's standard package management utilities(Adept or Synaptic).
Modify the LCD configuration file, it is in the same directory you type checkinstall in. Use your favorite editor, I use nano here:
Find this entry in the [server] section and make the change:Code:nano LCDd.conf
Chnage other settings (Heartbeat, backlight) according to your preference.Code:Foreground=no
Copy this file to the /etc directory:
Code:sudo cp /path to saved tar/lcdproc/LCDd.conf /etc
Make the servers autostart
You can auto start modules by putting the sysV init script in /etc/init.d directory. Use /etc/init.d/skeleton as a template. Here are the 2 scripts I use, remove the .txt extension and copy them to /etc/inid.d/.
Make the scripts executable:Code:sudo cp irserver /etc/init.d sudo cp LCDd /etc/init.d
Make them autorun when boot up:Code:sudo chmod 766 /etc/init.d/irserver sudo chmod 766 /etc/init.d/LCDd
Notes the . at the end. I set the scripts with sequence codes 97 and 98, so that irserver script starts before LCDd script (LCDd depends on irserver).Code:sudo update-rc.d -f irserver start 97 2 3 4 5 . sudo update-rc.d -f LCDd start 98 2 3 4 5 .
Reboot and check if these 2 daemons start:
MythTVCode:ps -e | grep LCDd ps -e | grep irserver
Run mythfrontend, go to Setup > Apperance > LCD device display. Enable LCD device. That's it