Setting Up LIRC For The IMON VFD and LCD Display
Please see the credits section for information on the people who have contributed to this guide.
UPDATE: Users of Ubuntu 9.10 Karmic should see this page:
UPDATE: I have created a PPA with a pre-release version of LIRC 0.8.6 which seems to solve all the problems addressed by this page. The package is currently compiled for Jaunty.
LIRC steps for Jaunty:
Follow the Read about installing instructions
Run Synaptic and select lirc-modules-source and lirc packages
- Apply
At a Terminal window prompt: sudo dpkg-reconfigure lirc
- Reboot
LCDproc steps for Jaunty:
Follow the Read about installing instructions
Run Synaptic and select the lcdproc package
- Apply
Edit /etc/LCDd.conf and change the Driver= line to imon or imonlcd as appropriate. For the imonlcd driver go do the imonlcd section and make sure the Protocol= line is set correctly for your device (0 for older LCDs, 1 for newer LCDs)
sudo /etc/init.d/LCDd stop; sudo /etc/init.d/LCDd start
The rest of this page will help with older Ubuntu releases.
My intention is to make the instructions more generic over time to work with more IMON display models.
NOTE: The model-specific sections might make more sense as separate pages that links back and forth to/from this page. I'm starting with a monster page just to get everything in one place before splitting
NOTE: We have found that the ffdc model designator can refer to either the older VFD (Vaccuum Fluorescent Display) or the newer LCD displays. The Part 1 procedures should work for either device, but different procedures are required to get the displays on these alternative devices working. You must therefore know which device you have in your case beforehand. The little square pixels that display the characters on the VFD device are greenish in colour whereas those on the LCD device are blue. The LCD device also has a blue backlight whereas the VFD has no backlight. And the periphery of the LCD display window has small dark squares around it that can be set up to display icons - these are not present on the VFD display. The Part 1 procedure should get the volume knob and IR remote systems working on this device as well as setting up lirc to handle the LCD display or VFD display as outlined in Part 2 or Part 3. It is essential that you have the lirc_imon module created through THIS procedure working before moving on to the procedures for setting up the display outlined in Part 2 and Part 3.
ALSO NOTE: These procedures are set up for the _i386 packages. To use them for _amd64 installations simply ensure you change the package architecture flag _i386 to _amd64 in the wget and dpkg commands. The package with the _all flag is not dependent on architecture so don't change that.
Check which Model device you have installed by running lsusb in a terminal.
lsusb | egrep -i 'soundgraph|imon'
Among the lines output there should be one similar to this:
Bus 008 Device 002: ID 15c2:ffdc SoundGraph Inc. iMON PAD Remote Controller
The 15c2 identifies the manufacturer and the ffdc identifies the Model. These instructions should cover the following models:
Manufacturer |
Model |
Status |
15c2 |
ffdc |
Complete |
15c2 |
0038 |
Very incomplete |
Remove Existing LIRC
Remove any existing lirc, lirc-modules-source and lcdproc packages installed through Synaptic or apt-get:
sudo /etc/init.d/lirc stop sudo apt-get remove lirc lirc-modules-source lcdproc
Install Dependencies
Use Synaptic to ensure the dependencies required in both Part 1 and Part 2 are installed:
Version |
Command |
ffdc/Hardy |
sudo apt-get install dialog setserial linux-libc-dev libc6 libc6-dev automake autoconf gcc gcc-4.2 gcc-4.2-base libgcc1 libtool patch dkms |
ffdc/Jaunty |
sudo apt-get install automake |
0083/Jaunty |
FIXME sudo apt-get install dialog setserial linux-libc-dev libc6 libc6-dev automake autoconf gcc gcc-4.2 gcc-4.2-base libgcc1 libtool patch dkms |
Download Source
We need to install an updated lirc_imon module, so download libasound2, libasound2-dev, lirc and lirc-modules-source. I like to keep such packages in /usr/src so that I know where they are and to get the permissions correct:
I don't like this at all... If the packages existed in the repositories, we should be able to just give apt-get instructions like we need to for Jaunty, using the syntax:
sudo apt-get install libasound2 libasound2-dev lirc lirc-modules-source
You have to separate these out based on the Ubuntu version and the IMON version.
Hardy:
cd /usr/src sudo wget http://nl.archive.ubuntu.com/ubuntu/pool/main/a/alsa-lib/libasound2_1.0.17a-0ubuntu3_i386.deb sudo wget http://nl.archive.ubuntu.com/ubuntu/pool/main/a/alsa-lib/libasound2-dev_1.0.17a-0ubuntu3_i386.deb sudo wget http://nl.archive.ubuntu.com/ubuntu/pool/universe/l/lirc/lirc_0.8.3-0ubuntu1_i386.deb sudo wget http://nl.archive.ubuntu.com/ubuntu/pool/universe/l/lirc/lirc-modules-source_0.8.3-0ubuntu1_all.deb
You can download the 0ubuntu1 versions of the lirc and lirc-modules-source files by going to the following pages:
for lirc_0.8.3-0ubuntu1_i386.deb https://launchpad.net/ubuntu/intrepid/i386/lirc/0.8.3-0ubuntu1
for lirc_0.8.3-0ubuntu1_amd386.deb https://launchpad.net/ubuntu/intrepid/amd64/lirc/0.8.3-0ubuntu1
for lirc-modules-source_0.8.3-0ubuntu1_all.deb https://launchpad.net/ubuntu/intrepid/i386/lirc-modules-source/0.8.3-0ubuntu1
Do not use the more recently released 0ubuntu2 versions of these files with Hardy 8.04. The 0ubuntu2 versions do work well with Intrepid Alpha6 however.
After download, check that they are there and are owned by root:
ls -l
If all is OK go ahead and install the packages:
sudo dpkg -i lirc-modules-source_0.8.3-0ubuntu1_all.deb sudo dpkg -i libasound2_1.0.17a-0ubuntu3_i386.deb sudo dpkg -i libasound2-dev_1.0.17a-0ubuntu3_i386.deb sudo dpkg -i lirc_0.8.3-0ubuntu1_i386.deb
Intrepid:
cd /usr/src sudo wget http://nl.archive.ubuntu.com/ubuntu/pool/main/a/alsa-lib/libasound2_1.0.17a-0ubuntu3_i386.deb sudo wget http://nl.archive.ubuntu.com/ubuntu/pool/main/a/alsa-lib/libasound2-dev_1.0.17a-0ubuntu3_i386.deb sudo wget http://nl.archive.ubuntu.com/ubuntu/pool/universe/l/lirc/lirc_0.8.3-0ubuntu2_i386.deb sudo wget http://nl.archive.ubuntu.com/ubuntu/pool/universe/l/lirc/lirc-modules-source_0.8.3-0ubuntu2_all.deb
After download, check that they are there and are owned by root:
ls -l
If all is OK go ahead and install the packages:
sudo dpkg -i lirc-modules-source_0.8.3-0ubuntu1_all.deb sudo dpkg -i libasound2_1.0.17a-0ubuntu3_i386.deb sudo dpkg -i libasound2-dev_1.0.17a-0ubuntu3_i386.deb sudo dpkg -i lirc_0.8.3-0ubuntu1_i386.deb
Common
When debconf asks about configuration, select none (also none when asked about the IR transmitter)
Then load up the hardware.conf file:
sudo gedit /etc/lirc/hardware.conf
Copy the following file into gedit and then save it to /etc/lirc/hardware.conf
# /etc/lirc/hardware.conf # #Chosen Remote Control REMOTE="Soundgraph iMON IR/LCD" REMOTE_MODULES="lirc_dev lirc_imon" REMOTE_DRIVER="" REMOTE_DEVICE="/dev/lirc0" REMOTE_LIRCD_CONF="/etc/lircd.conf" REMOTE_LIRCD_ARGS="" #Chosen IR Transmitter TRANSMITTER="None" TRANSMITTER_MODULES="" TRANSMITTER_DRIVER="" TRANSMITTER_DEVICE="" TRANSMITTER_LIRCD_CONF="" TRANSMITTER_LIRCD_ARGS="" #Enable lircd START_LIRCD="true" #Don't start lircmd even if there seems to be a good config file #START_LIRCMD="false" #Try to load appropriate kernel modules LOAD_MODULES="true" # Default configuration files for your hardware if any LIRCMD_CONF="" #Forcing noninteractive reconfiguration #If lirc is to be reconfigured by an external application #that doesn't have a debconf frontend available, the noninteractive #frontend can be invoked and set to parse REMOTE and TRANSMITTER #It will then populate all other variables without any user input #If you would like to configure lirc via standard methods, be sure #to leave this set to "false" FORCE_NONINTERACTIVE_RECONFIGURATION="false" START_LIRCMD="" START_LIRCMD=""
The file containing the codes for the remote control you are using now needs to be loaded into /etc/lirc/lircd.conf. Three choices are provided below - use whichever file is most appropriate for you. Copy that file into gedit and then save it to /etc/lirc/lircd.conf
NOTE: When mapping the keys of your remote to the actions required for your application, be sure the names of the keys match those defined in whichever /etc/lirc/lircd.conf you are using. For example if you use your remote to control MythTV the keys mapped in the configuration file ~/.lirc/mythtv should match those defined in /etc/lirc/lircd.conf.
sudo gedit /etc/lirc/lircd.conf
Choice 1
If you have no remote control but just want to get the control knob on the Antec case working use the following file:
#Configuration for the Antec Fusion Black Knob: begin remote name mceusb bits 32 eps 30 aeps 100 one 0 0 zero 0 0 gap 203992 toggle_bit_mask 0x8000 begin codes knob_left 0x01000000 knob_right 0x00010000 end codes end remote
Choice 2
If you have an MCE remote control or a universal remote like the Logitech Harmony models set up to emulate an MCE remote use the following file:
# # /etc/lirc/lircd.conf for MCE Remote with IMON LCD IR: # #Configuration for MCE Remote using the Soundgraph iMON IR/LCD: begin remote name mceusb bits 32 eps 30 aeps 100 one 0 0 zero 0 0 gap 203992 toggle_bit_mask 0x8000 begin codes Power 0x800F040C TV_power 0x800F0465 Home 0x800F040D Guide 0x800F0426 LiveTV 0x800F0425 DVD 0x800F0424 Teletext 0x800F045A RecordTV 0x800F0448 Back 0x800F0423 Forward 0x800F0414 Stop 0x800F0419 Replay 0x800F041B Skip 0x800F041A Play 0x800F0416 Record 0x800F0417 Rewind 0x800F0415 Pause 0x800F0418 More 0x800F040F Left 0x800F0420 Right 0x800F0421 Up 0x800F041E Down 0x800F041F OK 0x800F0422 Chan_Down 0x800F0413 Chan_Up 0x800F0412 Vol_Down 0x800F0411 Vol_Up 0x800F0410 Mute 0x800F040E 1 0x800F0401 2 0x800F0402 3 0x800F0403 4 0x800F0404 5 0x800F0405 6 0x800F0406 7 0x800F0407 8 0x800F0408 9 0x800F0409 Zero 0x800F0400 * 0x800F041D Clear 0x800F040A # 0x800F041C Enter 0x800F040B Red 0x800F045B Green 0x800F045C Yellow 0x800F045D Blue 0x800F045E Antec_knob_left 0x01000000 Antec_knob_right 0x00010000 end codes end remote
Choice 3
If you have the IMON PAD remote that was supplied with some Silverstone and Thermaltake cases use the following file that was originally generated by Venky Raju:
# # contributed by Venky Raju # # model no. of remote control: iMON-PAD # devices being controlled by this remote: # begin remote name iMON-PAD bits 32 eps 30 aeps 100 one 0 0 zero 0 0 gap 235965 min_repeat 1 toggle_bit 0 begin codes AppExit 0x288195B7 Record 0x298115B7 Play 0x2A8115B7 SlowMotion 0x29B195B7 Rewind 0x2A8195B7 Pause 0x2A9115B7 FastForward 0x2B8115B7 PrevChapter 0x2B9115B7 Stop 0x2B9715B7 NextChapter 0x298195B7 Esc 0x2BB715B7 Eject 0x299395B7 AppLauncher 0x29B715B7 MultiMon 0x2AB195B7 TaskSwitcher 0x2A9395B7 Mute 0x2B9595B7 Vol_Up 0x28A395B7 Vol_Down 0x28A595B7 Ch_Up 0x289395B7 Ch_Down 0x288795B7 Timer 0x2B8395B7 1 0x28B595B7 2 0x2BB195B7 3 0x28B195B7 4 0x2A8595B7 5 0x299595B7 6 0x2AA595B7 7 0x2B9395B7 8 0x2A8515B7 9 0x2AA115B7 0 0x2BA595B7 ShiftTab 0x28B515B7 Tab 0x29A115B7 MyMovie 0x2B8515B7 MyMusic 0x299195B7 MyPhoto 0x2BA115B7 MyTV 0x28A515B7 Bookmark 0x288515B7 Thumbnail 0x2AB715B7 AspectRatio 0x29A595B7 FullScreen 0x2AA395B7 MyDVD 0x29A295B7 Menu 0x2BA385B7 Caption 0x298595B7 Language 0x2B8595B7 MouseKeyboard 0x299115B7 SelectSpace 0x2A9315B7 MouseMenu 0x28B715B7 MouseRightClick 0x688481B7 Enter 0x28A195B7 MouseLeftClick 0x688301B7 WindowsKey 0x2B8195B7 Backspace 0x28A115B7 Space 0x2B9B15F7 Up 0xEB53F9B7 Left 0x6ABAFFBF Down 0x6F9ECBB7 Right 0x69A281B7 end codes end remote
Common
Save to /etc/lirc/lircd.conf and check that these files are owned by root root and have permissions -rw-r--r--
cd /etc/lirc ls -l
Set up the lirc_imon is_lcd parameter that is required in Part 2. For the ffdc Model device this needs to be is_lcd=1
cd /etc/modprobe.d/ sudo gedit options.conf
Then add the following lines to the end of the options file and save:
# Set lirc_imon option to use LCD device options lirc_imon is_lcd=1
Reboot time
Shutdown and reboot
Make sure lirc is running:
sudo /etc/init.d/lirc restart
Check that the required /dev/lirc0 and /dev/lircd device files are present:
ls -l /dev/lirc*
If they are there run irw (it probably won't even start if something is wrong with the installation):
irw
Turn the knob left and right and see if that is recorded in the terminal. Those with an MCE or IMON remote control should also see output when most of the buttons are pressed if they loaded one of the alternate /etc/lirc/lircd.conf file suggested above.
Part 2: Setting Up The IMON ffdc Model LCD Diplay
It is essential that you have lirc working properly before moving to this procedure. If you have an IMON VFD device rather than an LCD device go to the Part 3 Procedures further down.
Download the lcdproc code and required patch:
cd /usr/src sudo wget http://downloads.sourceforge.net/lcdproc/lcdproc-0.5.2.tar.gz
If you have problems accessing the sourceforge download site try:
sudo wget http://internap.dl.sourceforge.net/sourceforge/lcdproc/lcdproc-0.5.2.tar.gz
sudo tar -zxvf lcdproc-0.5.2.tar.gz sudo wget http://codeka.com/blogs/imon/lcdproc-0.5.2-imonlcd-0.3.patch
Switch to the lcdproc-0.5.2 directory generated during the tar and insert the patch:
cd lcdproc-0.5.2 sudo patch -p1 < ../lcdproc-0.5.2-imonlcd-0.3.patch
Edit server/main.h file, and change RENDER_FREQ from 8 to 2:
cd server sudo gedit main.h
Change the line #define RENDER_FREQ 8 to #define RENDER_FREQ 2 and save, then:
cd ../
Configure compile and install lcdproc:
sudo aclocal sudo autoconf sudo automake
(You will probably get a message "server/drivers/Makefile.am:80: compiling IOWarrior.c' with per-target flags requires AM_PROG_CC_C_O' in `configure.in'". Don't worry about it!)
sudo ./configure --enable-drivers=imonlcd sudo make sudo make install
Edit the LCDd.conf configuration file:
cd /usr/local/etc sudo gedit LCDd.conf
In the [server] section change the line Driver=curses to Driver=imonlcd and the line DriverPath=server/drivers/ to DriverPath=/usr/local/lib/lcdproc/ [Note the trailing/ - it is essential!]
Then move down to the ### Driver sections and add the following lines and save (put your initials where the xxx is):
## IMON LCD driver added by xxx 5Sept08 ## [imonlcd] Device=/dev/lcd0 Contrast=200
If everything looks OK, make sure lirc is still working and lcd0, lirc0 and lircd devices are created in /dev:
sudo /etc/init.d/lirc restart ls -l /dev/l* irw
Turn the knob and look for output in the terminal.
Start LCDd in the foreground:
sudo LCDd -f -r 4
Start a separate terminal and enter:
lcdproc
If the software is working, information on the screens being cycled should appear in the LCDd server terminal.
If there is still nothing on the display please try this:
Stop LCDd (Ctrl C) and shut the machine down.
Remove the top of the case and boot up. Whilst the machine is running, carefully disconnect the little power connector in the three wire (red, black, purple in mine) connection that runs from the mobo power supply plug to the IMON device. The blue backlight will go out. Then plug the connector back together and run:
sudo LCDd -f -r 4
This bizarre procedure now brings my LCD to life and when lcdproc is run in a separate terminal, it cycles through the various screens in the configuration file as it should. Following the initiation in this way, the LCD operates normally following shutdown and reboot. However, if the power is shut off with the rear switch on the power supply or during a power interruption, I need to go through the initiation procedure again. It behaves similarly when power is interrupted and then booted up under WinXP so it appears to be independent of OS - perhaps a signal necessary to initiate the device following a complete loss of power is not being supplied by BIOS. Very odd!!
Once you get the display working with the LCDd server running in the foreground, the attached script will run the LCDd server in the background when you boot up your computer. Open the file LCDd for editing:
cd /etc/init.d sudo gedit
Copy the following script into gedit and save as /etc/init.d/LCDd:
#### BEGIN INIT INFO # Provides: LCDd # Required-Start: $syslog $local_fs $network $remote_fs # Required-Stop: $syslog $local_fs $network $remote_fs # Default-Start: 2 3 4 5 # Default-Stop: S 0 1 6 # Short-Description: LCDproc Server Daemon # Description: Debian init script for LCDd, the display # server daemon in the LCDproc suite ### END INIT INFO # local variables prefix=/usr/local exec_prefix=${prefix} bindir=${exec_prefix}/bin sbindir=${exec_prefix}/sbin etc=${prefix}/etc NAME=LCDd DAEMON=${sbindir}/${NAME} DESC="LCDd display server daemon" OPTIONS="" # installation check test -x ${DAEMON} || exit 0 case "$1" in start) printf "Starting ${DESC}: " start-stop-daemon --start --quiet --exec ${DAEMON} -- ${OPTIONS} sleep 1 printf "\n" ;; stop) printf "Stopping ${DESC}: " start-stop-daemon --stop --oknodo --quiet --exec ${DAEMON} sleep 1 printf "\n" ;; restart|force-reload) $0 stop sleep 1 $0 start ;; *) printf "Usage: $0 {start|stop|restart|force-reload}\n" >&2 exit 1 ;; esac exit 0
Change file permissions:
sudo chmod +x LCDd
Check that you have -rwxr-xr-x 1 root root 1111 .... LCDd:
ls -l LCDd
Update the startup scripts:
sudo update-rc.d LCDd defaults
You might get a warning here about "update-rc.d: warning: /etc/init.d/LCDd missing LSB information", but it is safe to continue.
Now do the following:
sudo /etc/init.d/LCDd start script
Shutdown and reboot, and if the LCD displays the LCDproc screen, the LCDd server is running in the background. The LCDd server can be stopped, started or restarted in the usual way by bringing up a terminal and entering either:
sudo /etc/init.d/LCDd stop sudo /etc/init.d/LCDd start sudo /etc/init.d/LCDd restart
You can run the server in the foreground by typing:
sudo LCDd -f -r 4
in a terminal at anytime if you want to check the server output, but you will need to stop LCDd with the /etc/init.d/LCDd stop command beforehand.
Part 3: Setting up the IMON VFD Display
It is essential that you have lirc working properly before moving to this procedure. These procedures should only be used for the IMON VFD Display - do NOT use them for the LCD display!!
Download the lcdproc code:
cd /usr/src sudo wget http://downloads.sourceforge.net/lcdproc/lcdproc-0.5.2.tar.gz
(If you have problems accessing the sourceforge download site try:
sudo wget http://internap.dl.sourceforge.net/sourceforge/lcdproc/lcdproc-0.5.2.tar.gz)
Then unpack:
sudo tar -zxvf lcdproc-0.5.2.tar.gz
Switch to the lcdproc-0.5.2 directory generated during the untar, and edit server/main.h file, and change RENDER_FREQ from 8 to 2:
cd lcdproc-0.5.2/server sudo gedit main.h
Change the line #define RENDER_FREQ 8 to #define RENDER_FREQ 2 and save, then:
cd ../
Configure, compile and install lcdproc:
sudo aclocal sudo autoconf sudo automake
(You will probably get a message "server/drivers/Makefile.am:80: compiling IOWarrior.c' with per-target flags requires AM_PROG_CC_C_O' in `configure.in'". Don't worry about it!)
sudo ./configure --enable-drivers=imon sudo make sudo make install
Copy the following LCDd configuration file into /usr/local/etc/LCDd.conf:
# # This file contains the configuration for the LCDd server for iMON VFD displays # Do not use for IMON LCD displays # # ## Server section with settings for the LCDd server ## [server] Driver=imon # Tells the driver to bind to the given interface Bind=127.0.0.1 # Listen on this specified port; defaults to 13666. Port=13666 # Sets the reporting level; defaults to 2 (warnings and errors only). #ReportLevel=3 # Should we report to syslog instead of stderr ? Default: no #ReportToSyslog=yes # Sets the default time in seconds to displays a screen. WaitTime=5 # User to run as. LCDd will drop its root priviledges, # if any, and run as this user instead. User=nobody DriverPath=/usr/local/lib/lcdproc/ ToggleRotateKey=Enter PrevScreenKey=Left NextScreenKey=Right ## The menu section. The menu is an internal LCDproc client. ## [menu] # You can configure what keys the menu should use. # The following works excellent with 4 keys or more. MenuKey=Escape EnterKey=Enter UpKey=Up DownKey=Down ### Driver sections are below this line ### ## Soundgraph/Ahanix/Silverstone/Uneed/Accent/Thermaltake iMON VFD driver ## [imon] # select the device to use Device=/dev/lcd0 # display dimensions Size=16x2 # EOF
Change the lirc_imon module option to that for a VFD device rather than an LCD device:
cd /etc/modprobe.d/ sudo gedit options
Change the last line to:
options lirc_imon is_lcd=0 Save (CtrlO) and Exit (CtrlX)
Shut your machine down and reboot.
If everything looks OK make sure lirc is still working and lcd0, lirc0 and lircd devices are created in /dev:
sudo /etc/init.d/lirc restart ls -l /dev/l* irw
Start LCDd in the foreground:
sudo LCDd -f -r 4
Start a separate terminal and enter:
lcdproc
If the software is working, information on the screens being cycled should appear in the LCDd server terminal, then go ahead and install the startup script as for the final section of Part 2.
I trust users will find these procedures helpful. Please edit the procedures if you find any errors.
Credits
Many many many people have contributed to this guide:
Frank (smi402) |
|
Dean |
|
Ron Frasier |
|
Cofin |
|
Odin (odinb) |
Proofreading & Jaunty updates |
Jeremy Yoder |
Original author of this page |
If I've missed your efforts please feel free to add yourself to the list above!
See Also
More links here??