UbuntuHelp:IMON VFD and LCD Karmic 9.10
Ubuntu 9.10 now 'supports' the iMon VFD and LCD devices and remote controls 'out of the box.'
Thanks to the efforts of many hard working developers and testers Ubuntu 9.10 "Karmic Koala" does not require any manual patches or changes to your package repositories to get the iMon devices working. That means the LCD or VFD and the Remotes are all supported without the need to install patches or manually capture your IR codes. This is indeed great news and much thanks is due to the lirc developers - specifically Jarod, who I was told at the mailing list handles all things iMon for lirc. But wait - Just because you no longer have to patch anything doesn't mean that you don't still need to determine which display you have and enable the correct settings in /etc/LCDd.conf and also add the correct kernel options for lirc_imon at /etc/modrobe.d/lirc.conf.
Start with lirc
So if you're using MythBuntu there's a control centre application that makes enabling Infrared support and choosing the SoundGraph iMon PAD (in my case) device pretty simple. If your using another type of Ubuntu you will most likely need use aptitude or apt-get. To make things simpler in this wiki document I'll stick to apt-get statements.
sudo apt-get install lirc
You will prompted to Choose a remote if you would like to preload a configuration: The iMon devices will be listed alphabetically under Soundgraph:
Soundgraph iMON Antec Veris (for device ID 15c2:0038) Soundgraph iMON Knob Soundgraph iMON MultiMedian IR/VFD Soundgraph iMON PAD IR/VFD
These seem to be big four - there are several other Soundgraph remotes listed. Pick yours and select OK. Unless you've added a transmitter you should select None and Ok on the transmitter page. You should see
* Loading LIRC modules [ OK ] * Starting remote control daemon(s) : LIRC [ OK ]
If you accidentially picked a wrong option you can go back via
sudo dpkg-reconfigure lirc
You will need to setup ~/.lirrc files for lirc to understand what to do when you press keys on your remote. Much of that is outside the scope of this document and well documented elsewhere. Using the correct module parameters There are many legacy documents and walk-throughs on setting up the iMON PAD remote available on the internet. Many of them are less than one year old and they are already out of date. If you are trying to add the following file:
/etc/modprobe.d/lirc or /etc/modprobe.d/options
You are probably reading an older walk-through. For one thing if you don't use the .conf file extension you will see a friendly message regarding it when you try to load the module. The Jaunty version of the lirc_imon module had the following 3 arguments available:
debug: Debug messages: 0=no, 1=yes(default: no) (int) is_lcd:The device is an LCD: 0=no (it's a VFD), 1=yes (default:no) (int) pad2keys_active:pad2keys patch active: 0=no, 1=yes (default: no) (int)
If try to use these on the 9.10 Karmic version of the lirc_imon module the module will fail to load and lirc will fail to start. The 9.10 Karmic version of the lirc_imon module has the following parameters:
debug:Debug messages: 0=no, 1=yes(default: no) (int) display_type:Type of attached display. 0=autodetect, 1=vfd, 2=lcd, 3=vga, 4=none (default: autodetect) (int) ir_protocol:Which IR protocol to use. 0=native iMON, 1=Windows Media Center Ed. (RC-6), 2=iMON w/o PAD stabilize (default: native iMON) (int) nomouse:Disable mouse input device mode when IR device is open. 0=don't disable, 1=disable. (default: don't disable) (int) pad_thresh:Threshold at which a pad push registers as an arrow key in kbd mode (default: 28) (int)
So create a file at the following location:
and put your choice of those options in it similar to this:
options lirc_imon debug=1 nomouse=1 display_type=1 pad_thresh=5
I've got mine in debug mode because I'm helping test a patch to this module. If you're not doing that there's little reason to have the debug turned on. I've got nomouse enabled because I have no use for it. I have the VFD with a 2x16 display. That's display_type=1. The pad_thresh is fantastic for using the pad as arrow keys to control things like MythTv and HuluDesktop. The threshold setting at 5 means I don't have to mash the heck out of the pad to get arrow events to register in lirc. This was a very nice find using modinfo against the lirc_imon module. After reloading the module or rebooting you should be able to use irw to see events when you press keys. The lirc daemon must be running. If you used apt-get to install it then you can use the init script to make sure it's started. That looks like this:
sudo /etc/init.d/lirc restart sudo irw
When you press keys a line for each will appear in the terminal. Remember that without the ~/.lircrc file (in your home) nothing will actually happen. keypress events are mapped to keyboard actions on a per application basis. Consult the lirc documentation to learn more about all that.
Setting up the LCD / VFD
Installing the LCDproc package is just about as easy as lirc was.
sudo apt-get install lcdproc
Unlike lirc you will not be prompted to select your device. You must edit the conf file manually. Pick your editor and open the following file:
On line 44 we see the following:
This is the default. You should change it as follows:
This is the only change if you, like me, have the VFD device. It only has 2 rows of 16 characters and it appears in the output of 'lsusb' as the following:
Bus 003 Device 002: ID 15c2:ffdc SoundGraph Inc. iMON PAD Remote Controller
If you're confused over which device you have you can read this page at the MythTv wiki regarding the iMON devices. It has good example ~/.lircrc files but remember that it's lirc_imon module arguments such as 'is_lcd=1' are out of date for your 9.10 Karmic distro. If you have the LCD device you would want to change the Driver= to be as follows:
There are other options in /etc/LCDd.conf around line # 555 for this type of LCD display. The important one is the Protocol=1 setting. The comments in the file indicate how to set it based on your device id. The device id is found using 'lsusb' and looking for SoundGraph or iMON. Restart LCDd (lcdproc) and see if your LCD / VFD starts working.
sudo /etc/init.d/LCDd restart