Before starting, I wanted to make sure I had everything I needed. Here is what I ran:
sudo apt-get install lirc-modules-source cvs build-essential dialog libtool automake1.9 autoconf
sudo apt-get build-dep lirc lcdproc
sudo apt-get remove lirc lcdproc
Next, you need to make sure you don't load the usbhid driver for the iMON device:
sudo mount -t usbfs none /proc/bus/usb
sudo cat /proc/bus/usb/devices
You will want to look for the device that has Vendor=152c and ProdID=0038. In that device's block, you will see a section labeled "Driver". If it says "none", you can skip the next step and continue with the install. If it reads "usbhid", enter the following:
Add the following line to the usbhid file:
options usbhid quirks=0x15c2:0x0038:0x0004
Now run this:
sudo depmod -ae
sudo update-initramfs -u
You will now need to reboot. The device should now no longer read usbhid in the driver section. You can check this be running the "cat cat /proc/bus/usb/devices" line again. Once you have ensured that the Driver section reads "None" continue with the next step.
We need to check out the latest version of LIRC from CVS. Find a suitable directory to store the files, and run these commands:
After running setup.sh, you will see a setup screen. Select the following:
-->Soundgraph iMON IR/LCD
The select "Save configuration and run configure"
Run the following:
sudo make install
Modify the following command to match where you have downloaded the LIRC files.
For Ubuntu 18.104.22.168:
sudo cp .CVS/lirc/drivers/lirc_imon/lirc_imon.c /usr/src/lirc-0.8.3~pre1/drivers/lirc_imon
sudo cp .CVS/lirc/drivers/lirc_imon/lirc_imon.c /usr/src/lirc-0.8.3/drivers/lirc_imon
Finally, run this command:
sudo dpkg-reconfigure lirc-modules-source
If all goes well, you should be able to reboot and have your device recognized. You can check this by running the same cat /proc/bus/usb/device command and look in the driver section. It should now read "imon_lcd".
Now, you are ready to setup the lirc.conf file. The case that I have comes with a crappy remote that only has a few buttons on it. I wanted to use the old MCE remote I've had for ages to control XBMC. If you have one of these remotes, you can use the following commands to get it set up:
sudo nano /etc/lircd.conf
Paste the following into the file, overwriting anything that was there before:
#Allows the old MCE remote to work with Antec MicroFusion
#Save at /etc/lircd.conf
one 0 0
zero 0 0
one 0 0
zero 0 0
The new Antec IR/LCD devices actually create two lirc devices. This caused much frustration until I figured out that I needed to launch 2 lirc instances.
You can now start the two instances of LIRCD.
sudo /usr/local/sbin/lircd --driver=default --device=/dev/lirc0 --pidfile=/var/run/lirc0.pid --listen=8765
sudo /usr/local/sbin/lircd --driver=default --device=/dev/lirc1 --pidfile=/var/run/lirc1.pid --output=/dev/lircd --connect=localhost:8765
If all is well, you should now be able to run the the command "irw". After executing, press buttons on your remote and you should see them appear in your console. You can also check your LIRC installations by running the following commands:
sudo chmod 777 /dev/lcd0
perl -e 'print pack "H*", "80000000091e0088"' > /dev/lcd0
The LCD should now display the clock (it is not the correct time, though). If you see the display change, you are ready to install LCDproc. Clear your LCD screen by running this:
sudo perl -e 'print pack "H*", "4000000000000088"' > /dev/lcd0
Download the LCDproc files and required patches:
Extract the LCDproc files:
tar -zxvf lcdproc-0.5.2.tar.gz
patch -p1 < ../lcdproc-0.5.2-imonlcd-0.3-v2.patch
Next you will want to make some changes to the LCD refresh rate. From what I've read, this increases the stability of the device
Edit RENDER_FREQ. Change it from 8 to a lower number. I used 4
Install LCDProc now:
aclocal && autoconf && automake
patch -p1 <../lcdproc-imon_0038-v2.patch
sudo make install
patch /usr/local/etc/LCDd.conf ../LCDd.conf.patch
You should now have a working LIRC and LCDproc. I ensured that everything restarted at reboot my modifying the crontab file:
sudo nano /etc/crontab
Add the following lines at the end:
@reboot root /usr/local/sbin/lircd --driver=default --device=/dev/lirc0 --pidfile=/var/run/lirc0.pid --listen=8765
@reboot root /usr/local/sbin/lircd --driver=default --device=/dev/lirc1 --pidfile=/var/run/lirc1.pid --output=/dev/lircd --connect=localhost:8765
@reboot root chmod 777 /dev/lcd0
@reboot root LCDd
I'm sure there is a better method to do this, so perhaps someone will reply and let me know what to do.
Last, but definitely not least, you have to configure XBMC to look for your new remote. I added this to my Lircmap.xml file:
When you restart XBMC, the remote should now work.