• 1(current)
  • 2
  • 3
  • 4
  • 5
  • 19
[LINUX] HOW-TO configure Soundgraph iMON VFD/IR Receiver (used by many HTPC chassis)
#1
Thumbs Up 
Over the past few days, I have been configuring my new Antec MicroFusion Remote case to work with LIRC and LCDproc. Here is what I did to get it to work in XBMC on Ubuntu 8.04.1 and 8.10 (I had some issues getting my audio to work in Intrepid, so I reverted back to Hardy):

Before starting, I wanted to make sure I had everything I needed. Here is what I ran:
Code:
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:

Code:
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:

Code:
sudo /etc/modprobe.d/usbhid

Add the following line to the usbhid file:
Code:
options usbhid quirks=0x15c2:0x0038:0x0004

Now run this:
Code:
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:

Code:
cvs -d:pserver:[email protected]:/cvsroot/lirc login
cvs -z8 -d:pserver:[email protected]:/cvsroot/lirc co lirc
cd lirc
./autogen.sh
./setup.sh

After running setup.sh, you will see a setup screen. Select the following:
Driver configuration
->USB Devices
-->Soundgraph iMON IR/LCD

The select "Save configuration and run configure"

Run the following:
Code:
make
sudo make install

Modify the following command to match where you have downloaded the LIRC files.
For Ubuntu 8.0.4.1:
Code:
sudo cp .CVS/lirc/drivers/lirc_imon/lirc_imon.c /usr/src/lirc-0.8.3~pre1/drivers/lirc_imon
For Ubuntu 8.10:
Code:
sudo cp .CVS/lirc/drivers/lirc_imon/lirc_imon.c /usr/src/lirc-0.8.3/drivers/lirc_imon

Finally, run this command:
Code:
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:

Code:
sudo nano /etc/lircd.conf

Paste the following into the file, overwriting anything that was there before:

Code:
#Allows the old MCE remote to work with Antec MicroFusion
#Save at /etc/lircd.conf

begin remote

  name  lirc0.conf
  bits           64
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  post_data_bits  0
  post_data      0x0
  gap          139998


      begin codes
          Up                       0x0200005200000000
          Down                     0x0200005100000000
          Left                     0x0200005000000000
          Right                    0x0200004f00000000
          Back                     0x0200002A00000000
          Clear                    0x0200002900000000
          Enter                    0x0200002800000000
          1                        0x0200001E00000000
          2                        0x0200001F00000000
          3                        0x0200002000000000
          4                        0x0200002100000000
          5                        0x0200002200000000
          6                        0x0200002300000000
          7                        0x0200002400000000
          8                        0x0200002500000000
          9                        0x0200002600000000
          *                        0x0220002500000000
          0                        0x0200002700000000
          #                        0x0220002000000000
      end codes

end remote


begin remote

  name  lirc1.conf
  bits           16
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  pre_data_bits   16
  pre_data       0x800F
  post_data_bits  32
  post_data      0x1AE
  gap          204002
  toggle_bit_mask 0x0

      begin codes
          Start                    0x040D
          Power                    0x840C
          Stop                     0x0419
          Record                   0x8417
          Pause                    0x0418
          Play                     0x8416
          Rewind                   0x0415
          FastForward              0x8414
          SkipBack                 0x041B
          SkipForward              0x841A
          Info                     0x040F
          ChannelUp                0x8412
          ChannelDown              0x0413
          VolumeUp                 0x8410
          VolumeDown               0x0411
          Mute                     0x840E
          RecordedTV               0x0448
          Guide                    0x0426
          LiveTV                   0x8425
          Menu                     0x0424
      end codes

end remote

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.
Code:
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:

Code:
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:

Code:
sudo perl -e 'print pack "H*", "4000000000000088"' > /dev/lcd0

Download the LCDproc files and required patches:
Code:
wget http://internap.dl.sourceforge.net/sourceforge/lcdproc/lcdproc-0.5.2.tar.gz
wget http://www.ronfrazier.net/ronfrazier.net/mythtv/downloads/lcdproc-0.5.2-imonlcd-0.3-v2.patch
wget http://www.ronfrazier.net/ronfrazier.net/mythtv/downloads/lcdproc-imon_0038-v2.patch
wget http://www.ronfrazier.net/ronfrazier.net/mythtv/downloads/LCDd.conf.patch

Extract the LCDproc files:
Code:
tar -zxvf lcdproc-0.5.2.tar.gz
Use the first patch on LCDproc files:
Code:
cd lcdproc-0.5.2
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

Code:
nano server/main.h

Edit RENDER_FREQ. Change it from 8 to a lower number. I used 4

Install LCDProc now:
Code:
aclocal && autoconf && automake
patch -p1 <../lcdproc-imon_0038-v2.patch
./configure --enable-drivers=imonlcd
make
sudo make install
Patch the LCDd.conf to work with the LCD
Code:
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:
Code:
sudo nano /etc/crontab

Add the following lines at the end:
Code:
@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:

Code:
<remote device="lirc0.conf">
        <left>Left</left>
        <right>Right</right>
        <up>Up</up>
        <down>Down</down>
        <select>Enter</select>
        <back>Back</back>
        <one>1</one>
        <two>2</two>
        <three>3</three>
        <four>4</four>
        <five>5</five>
        <six>6</six>
        <seven>7</seven>
        <eight>8</eight>
        <nine>9</nine>
        <zero>0</zero>
    </remote>
    <remote device="lirc1.conf">
        <pause>Pause</pause>
        <stop>Stop</stop>
        <forward>FastForward</forward>
        <reverse>Rewind</reverse>
        <pageplus>ChannelUp</pageplus>
        <pageminus>ChannelDown</pageminus>
        <back>Back</back>
        <menu>Menu</menu>
        <title>Guide</title>
        <info>Info</info>
        <skipplus>Skip</skipplus>
        <skipminus>Replay</skipminus>
        <display>Teletext</display>
        <start>Start</start>
        <record>Record</record>
        <volumeplus>VolumeUp</volumeplus>
        <volumeminus>VolumeDown</volumeminus>
        <mute>Mute</mute>
        <power>Power</power>
        <myvideo>RecordedTV</myvideo>
        <mymusic>Music</mymusic>
        <mypictures>Pictures</mypictures>
        <mytv>LiveTV</mytv>
        <mytv>Red</mytv>
        <mymusic>Green</mymusic>
        <mypictures>Yellow</mypictures>
        <myvideo>Blue</myvideo>
    </remote>

When you restart XBMC, the remote should now work.

Good luck!
Reply
#2
I ran out of room on the original post. Here are my closing comments:

I used the following sites to help get this installed, so much thanks to their respective authors:
https://help.ubuntu.com/community/IMON_VFD_and_LCD
http://mythtvblog.blogspot.com/2008/04/g...-lirc.html
http://mythtvblog.blogspot.com/2008/04/g...-with.html
http://codeka.com/forums/viewtopic.php?f=3&t=22

I also want to thank all of the XBMC developers for making an excellent product.

Please feel free to tweak this guide.
Reply
#3
Thanks for this howto. I've altered the topic title and made a sticky of it.

Cheers
VDRfan
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not PM or e-mail Team-Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
Thumbs Up 
@cofin:
I was looking a long time for this, I will try it tommorow and i will do it on Ubuntu 8.10.
One question: the newest lirc is 0.8.4 , why not using it insted of 0.8.3? (anyway the CVS will get the 4 version , wright?) .
Another think : I have no sound issues in Ubuntu 8.10 if i kill pulseaudio. Smile
Thank you big time for this! Big Grin
Reply
#5
mdalacu Wrote:@cofin:
I was looking a long time for this, I will try it tommorow and i will do it on Ubuntu 8.10.
One question: the newest lirc is 0.8.4 , why not using it insted of 0.8.3? (anyway the CVS will get the 4 version , wright?) .
Another think : I have no sound issues in Ubuntu 8.10 if i kill pulseaudio. Smile
Thank you big time for this! Big Grin

Well, i originally wanted to just install it from CVS and just do modprobe to find the new module. However, I could never get it to work. I am not the most proficient linux user, so that probably has something to do with it. In the end, I resorted to using the method that I posted--which, while it may not be the cleanest solution, works for me.

Anyway, let me know how it goes. Perhaps we can find a better method of doing all of this.
Reply
#6
Great post! Thanks!
I found 2 typos
1. "sudo dpkg-reconfigure lirc-modules-sources" should be without the ending "s"
2. "sudo usr/local/sbin/lircd --driver=default --device=/dev/lirc1 --pidfile=/var/run/lirc1.pid --output=/dev/lircd --connect=localhost:8765" should be "sudo /usr/local/......."

Make you can change it for other copy and paste people like me! ;-)
But it's working great!
But I still have some questions:
1. is there a way to hide the "lcdproc server" when no clients are connected? also when I run XBMC it sometimes shows between XBMC screens
2. Is there a way to show the time or date when I close the system it's now saying "thanks for using lcdproc and linux" (or something like that)
3. I don't have the MCE remote yet so I'm using the mini remote of antec but I can't find all the remote keys (with your keys only "enter" and "back" are working")
with google I found some other codes but I'm still missing up/down/left/right
Reply
#7
mvdaat Wrote:Great post! Thanks!
I found 2 typos
1. "sudo dpkg-reconfigure lirc-modules-sources" should be without the ending "s"
2. "sudo usr/local/sbin/lircd --driver=default --device=/dev/lirc1 --pidfile=/var/run/lirc1.pid --output=/dev/lircd --connect=localhost:8765" should be "sudo /usr/local/......."

Make you can change it for other copy and paste people like me! ;-)
But it's working great!
But I still have some questions:
1. is there a way to hide the "lcdproc server" when no clients are connected? also when I run XBMC it sometimes shows between XBMC screens
2. Is there a way to show the time or date when I close the system it's now saying "thanks for using lcdproc and linux" (or something like that)
3. I don't have the MCE remote yet so I'm using the mini remote of antec but I can't find all the remote keys (with your keys only "enter" and "back" are working")
with google I found some other codes but I'm still missing up/down/left/right

Thanks you for the feedback. I have corrected the two typos.

Let me address your other questions individually:
1. I have not found a way to completely hide LCDProc server when no clients are connected. There is a way, however, to suppress the showing when XBMC is active. Edit /usr/local/etc/LCDd.conf and set ServerScreen=no. Make sure you uncomment if it is commented by default.
2. You can also modify the shutdown message in the LCDd.conf. Find the two lines that read "Goodbye=<text here>". Set them to whatever you like. Again, make sure to uncomment the lines if they are commented out.
3. You will have to record your own IR commands and write your own lirc.conf file to get the mini remote to work. The way to do this is to kill all running lircd processes, and run the command irrecord. You will possibly have to do this for both of the IR devices (/dev/lirc0 and /dev/lirc1) to capture all of the IR commands.

Hopefully, this will get you going in the right direction.
Reply
#8
Hello and thank you for your great help!

However, I'd like to add some comments as you solution did not work "out of the box" for me.

I am using an Antec Fusion Remote Black with a RM200 VERIS remote and add some problems getting the two lircd working together.

I ran two irrecord, the first one on /dev/lirc0 putting configuration on /etc/lirc/remote1.conf about the pad and the numbers on remote and the second one on /dev/lirc1 putting configuration on /etc/lirc/remote2.conf about the other keys.

Code:
sudo irrecord /etc/lirc/remote1.conf -d /dev/lirc0 --disable-namespace
sudo irrecord /etc/lirc/remote2.conf -d /dev/lirc1 --disable-namespace

Once this done, I ran the following commands:

Code:
sudo /usr/local/sbin/lircd --driver=default --device=/dev/lirc0 --pidfile=/var/run/lirc0.pid  --listen=8765 /etc/lirc/remote1.conf
sudo /usr/local/sbin/lircd --driver=default --device=/dev/lirc1 --pidfile=/var/run/lirc1.pid --connect localhost:8765 --output=/dev/lircd /etc/lirc/remote2.conf

This is now working and the irw mixes the two parts of the remote.

Hope it will help

Philippe
Reply
#9
philippeb06 Wrote:Hello and thank you for your great help!

I ran two irrecord, the first one on /dev/lirc0 putting configuration on /etc/lirc/remote1.conf about the pad and the numbers on remote and the second one on /dev/lirc1 putting configuration on /etc/lirc/remote2.conf about the other keys.

I have the same case and remote and was able to use a single lircd.conf. I still need to run two instances of lircd, but they both read the same .conf file.
Reply
#10
if i just want to install the LCD and not touch the remote side of things can i? and which bits do i omit, i`m quite happy with my xbox 1 remote, but just want the lcd to work.


cheers
Reply
#11
Hey,

I just managed to get the RM200 remote working (the one that comes with the big Fusion Remote cases). I need to run the two processes each with a different config file for them to work. Here's the lircd.conf (split into two parts):
Code:
begin remote

  name  rm200d1.conf
  bits           32
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  post_data_bits  32
  post_data      0x0
  gap          195988
  toggle_bit      0

      begin codes
          backspace                0x0200002A
          select                   0x0200002C
          left                     0x02800000
          right                    0x02000065
          knop                     0x01008000
          lclick                   0x01010000
          rclick                   0x01000000
          down                     0x01000000
          escape                   0x02000029
      enter                   0x02000028
          1                        0x0200001E
          2                        0x0200001F
          3                        0x02000020
          4                        0x02000021
          5                        0x02000022
          6                        0x02000023
          7                        0x02000024
          8                        0x02000025
          9                        0x02000026
          *                        0x02200025
          0                        0x02000027
          #                        0x02200020
      end codes

end remote
and
Code:
begin remote

  name  rm200d2.conf
  bits           64
  eps            30
  aeps          100

  one             0     0
  zero            0     0
  gap          195989
  min_repeat      2
  toggle_bit      0
# toggle_bit_mask 0x400000000000

      begin codes
          exit                     0x288195B700000201
          power                    0x289115B700000201
          rec                      0x298115B700000201
          play                     0x2A8115B700000201
          eject                    0x29B195B700000201
          frev                     0x2A8195B700000201
          pause                    0x2A9115B700000201
          ffwd                     0x2B8115B700000201
          skipback                 0x2B9115B700000201
          stop                     0x2B9715B700000201
          skipfw                   0x298195B700000201
          up                       0x299115B700000201
          applaunch                0x29B715B700000201
          go                       0x2AB195B700000201
          disc                     0x299395B700000201
      tasksw                   0x2A9395B700000201
          mute                     0x2B9595B700000201
          volp                     0x28A395B700000201
          volm                     0x28A595B700000201
          chp                      0x289395B700000201
          chm                      0x288795B700000201
          timer                    0x2B8395B700000201
          film                     0x2B8515B700000201
          music                    0x299195B700000201
          pics                     0x2BA115B700000201
          tv                       0x28A515B700000201
          bookmark                 0x288515B700000201
          thumb                    0x2AB715B700000201
          zoom                     0x29A595B700000201
          fs                       0x2AA395B700000201
          dvd                      0x29A395B700000201
          menu                     0x2BA395B700000201
          subs                     0x298595B700000201
          audio                    0x2B8595B700000201
          volkp                    0x00010000000002EE
          volkd                    0x01000000000002EE
      end codes

end remote

I've noticed that if you play a movie and you 'summon' the OSD, you only get a thin menu bar with a movie description. If you do the same on the keyboard you get the option to load subs and change audio languages. Any hints on how to get this done? (using MediaStream)
Reply
#12
tiburcillo can you also post your lircmap.xml for the RM200?
Reply
#13
Hi there,

Thanks for this awesome post. I just followed it and everythinh is working like a charm.
I still have few questions since i'm not really familiar with Imon and all that stuff. The first one is about the LCD screen from the Antec chassis. Mine stay lighted even when the computer is off. The only way to turn him off is to unplugg the whole system. Is this little issue sound familiar ? An another question is : Is there a way to controll the brightness of the LCD screen ?

Thanks a lot,
Ash
Reply
#14
I can't get over the first step... my "cat /proc/usb/devices" shows this information

Quote:T: Bus=04 Lev=01 Prnt=01 Port=04 Cnt=01 Dev#= 2 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=15c2 ProdID=0038 Rev= 0.02
C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=02 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=82(I) Atr=03(Int.) MxPS= 8 Ivl=10ms

so I altered my /etc/modprobe.d/usbhid to the following
Quote:options usbhid quirks=0x15c2:0x0038:0x0004

but the result is still the same (after "depmod -ae" and "update-initramfs -u"), the driver section shows Driver=usbhid. I installed the XBMC Live (Ubuntu 8.04, 2.6.24-19-generic)

Can anyone help me?
Reply
#15
Sweet guide, I finally have the LCD up and running and also the remote!

tiburcillo Wrote:Hey,
I've noticed that if you play a movie and you 'summon' the OSD, you only get a thin menu bar with a movie description. If you do the same on the keyboard you get the option to load subs and change audio languages. Any hints on how to get this done? (using MediaStream)

if you map <start>applaunch</start> to a button (in my case Applaunch) it will open up the options for subs, audio and bookmarks.

Here is my lircmap for the RM200 in xbmc (put under your home folder and .xbmc/userdata/Lircmap.xml ) I will remap the keys on my Logitech Harmony so the keys might not make sense to everyones taste, the number keys for navigation etc.

Code:
<lircmap>
<remote device="rm200d1.conf">
        <left>left</left>
        <right>right</right>
        <select>enter</select>
        <back>escape</back>
        <one>1</one>
                <left>4</left>
                <right>6</right>
                <up>2</up>
                <down>8</down>
                <select>5</select>
        <three>3</three>
        <seven>7</seven>
        <nine>9</nine>
        <zero>0</zero>
    </remote>

    <remote device="rm200d2.conf">
        <up>up</up>
        <pause>pause</pause>
        <stop>stop</stop>
        <forward>ffwd</forward>
        <reverse>frev</reverse>
        <pageplus>chp</pageplus>
        <pageminus>chm</pageminus>
        <back>back</back>
        <menu>menu</menu>
        <title>go</title>
        <info>timer</info>
        <skipplus>skipfw</skipplus>
        <skipminus>skipback</skipminus>
        <display>tasksw</display>
        <start>applaunch</start>
        <title>play</title>
        <record>rec</record>
        <volumeplus>volp</volumeplus>
        <volumeminus>volm</volumeminus>
        <mute>mute</mute>
        <power>exit</power>
        <myvideo>film</myvideo>
        <mymusic>music</mymusic>
        <mypictures>pics</mypictures>
        <mytv>tv</mytv>
    </remote>
</lircmap>

One problem i have tho is the crontab autorun, is seems like it only loads the first .conf file but starts two lircd, so after a reboot if i run irw and tries any key from the first part of the config it shows the keypress but not from the other conf. I tried both with two separate files like this:
Code:
@reboot root /usr/local/sbin/lircd --driver=default --device=/dev/lirc0 --pidfile=/var/run/lirc0.pid  --listen=8765 /etc/rm200d1.conf
@reboot root /usr/local/sbin/lircd --driver=default --device=/dev/lirc1 --pidfile=/var/run/lirc1.pid --connect localhost:8765 --output=/dev/lircd /etc/rm200d2.conf

Or with the two conf files in the same /etc/lircd.conf like this:

Code:
@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

When i check with ps -A | grep lircd i can see both running.
Only when i kill the processes and run them manually with sudo it loads both Eek

Does anyone have a clue on what i did wrong or another solution to autorun the lircd?

And i would also know if there is a way to set contrast and brightness for the display if possible (especially if there is a way to turn off the backlight during shutdown) Nod
Reply
  • 1(current)
  • 2
  • 3
  • 4
  • 5
  • 19

Logout Mark Read Team Forum Stats Members Help
[LINUX] HOW-TO configure Soundgraph iMON VFD/IR Receiver (used by many HTPC chassis)0