Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > 3rd Party Projects > Projects > Mythbuntu
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Mythbuntu
Discussions for the Mythbuntu project.

 
Thread Tools Display Modes
Old March 22nd, 2009   #1
nicoloks
Just Give Me the Beans!
 
Join Date: Jan 2009
Beans: 78
Ubuntu 8.10 Intrepid Ibex
Installing LIRC on 8.10 for Antec Fusion 15c2:0038 with RM200 remote

Took me a few weeks to get the RM200 remote control that came with my Antec Fusion case working, as none of the guides I found where 100% what I needed for 8.10. Being new to LIRC didn't help either. Taking tips from here and there, the following is a list of instructions I've found to work with the newer version of the Antec Fusion case which I thought I might post in the hope it helps others (especially newbies like myself). As always, use at your own peril. Corrections/updates welcome;

INSTALLING & CONFIGURING LIRC

1) Uninstall LIRC 0.8.3
Code:
sudo /etc/init.d/lirc stop
sudo apt-get remove lirc lirc-modules-source lcdproc
2) Install required packages
Code:
sudo apt-get install cvs
sudo apt-get build-dep lirc
sudo apt-get install libtool automake1.9 autoconf
sudo apt-get install cvs build-essential automake
3) Download LIRC from CVS - Version 0.8.4 onwards has buiilt in support for iMon 15c2:0038 (no need for patches)
Code:
cvs -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc login
cvs -z8 -d:pserver:anonymous@lirc.cvs.sourceforge.net:/cvsroot/lirc co lirc
cd lirc
cvs update
3) Compile, configure and install LIRC
Code:
cd lirc
sudo ./autogen.sh
sudo ./setup.sh
Once setup.sh is running, select "Driver Configuration" and push enter, then "USB devices" and enter, and finally "Soundgraph iMON IR/LCD" and enter. Select "Save configuration & run configure"
Code:
sudo make
sudo make install
4) Backup existing modules (run command for each compiled module)
Code:
sudo mv /lib/modules/`uname -r`/kernel/ubuntu/lirc/lirc_imon/lirc_imon.ko{,.old}
sudo mv /lib/modules/`uname -r`/kernel/ubuntu/lirc/lirc_dev/lirc_dev.ko{,.old}
5) Create symblic link to compiled modules
Code:
sudo ln -s /lib/modules/`uname -r`/misc/lirc_imon.ko /lib/modules/`uname -r`/kernel/ubuntu/lirc/lirc_imon/
sudo ln -s /lib/modules/`uname -r`/misc/lirc_dev.ko /lib/modules/`uname -r`/kernel/ubuntu/lirc/lirc_dev/
6) Add modules to start up

Code:
sudo gedit /etc/modules
Add these;
Code:
lirc_dev
lirc_imon
7) Add correct LIRC config files
Code:
sudo gedit /etc/lirc/hardware.conf
delete everything, paste this;

Code:
# /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/lirc/lircd.conf"
REMOTE_LIRCD_ARGS="--driver=default --device=/dev/lirc0 --pidfile=/var/run/lirc0.pid --listen=8765"

#Chosen IR Transmitter
TRANSMITTER="None"
TRANSMITTER_MODULES=""
TRANSMITTER_DRIVER=""
TRANSMITTER_DEVICE=""
TRANSMITTER_LIRCD_CONF=""
TRANSMITTER_LIRCD_ARGS="--driver=default --device=/dev/lirc1 --pidfile=/var/run/lirc1.pid --output=/dev/lircd --connect=localhost:8765"

#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=""
8) Open lircd.conf, delete everything and paste this;

Code:
# this config file was hand-generated
# using lirc-0.8.4a (imon) on Fri Nov  7 13:55:44 2008
#
# contributed by Jarod Wilson <jarod@wilsonet.com>
#
# brand:                       Antec Veris
# model no. of remote control: RM200 (Rebadged iMon PAD)
# devices being controlled by this remote:
# 	-Antec Veris Multimedia Station Premiere
# 	-Antec Veris Multimedia Station Elite, possibly
#
# nb: most codes appear to come in with an initial keypress value, as well as
# a "this key is no longer being pressed" value, which is "key | 0x00004000"

begin remote

  name   Antec_Veris_RM200
  bits                  64
  eps                   30
  aeps                 100

  one              0     0
  zero             0     0
  gap               139998
  ignore_mask 0x0000000000000301
  min_repeat             1
  toggle_bit             0

      begin codes
          KEY_EXIT                 0x2881d5b700000201 # AppExit
          KEY_POWER                0x289115b700000201 # Power
          KEY_RECORD               0x298115b700000201 # Record
          KEY_PLAY                 0x2a8115b700000201 # Play
          KEY_OPEN                 0x29b195b700000201 # Tray Open
          KEY_REWIND               0x2a8195b700000201 # Rewind
          KEY_PAUSE                0x2a9115b700000201 # Pause
          KEY_FASTFORWARD          0x2b8115b700000201 # Fast Forward
          KEY_PREVIOUS             0x2b9115b700000201 # Previous Chapter
          KEY_STOP                 0x2b9715b700000201 # Stop
          KEY_NEXT                 0x298195b700000201 # Next Chapter
          KEY_ESC                  0x0200002900000201 # Esc
          KEY_EJECTCD              0x299395b700000201 # Eject
          AppLauncher              0x29b715b700000201 # App. Launcher
          Go                       0x2ab195b700000201 # Go
          TaskSwitcher             0x2a9395b700000201 # Task Switcher
          KEY_MUTE                 0x2b9595b700000201 # Mute
          KEY_VOLUMEUP             0x28a395b700000201 # VOL +
          KEY_VOLUMEDOWN           0x28a595b700000201 # VOL -
          KEY_CHANNELUP            0x289395b700000201 # CH +
          KEY_CHANNELDOWN          0x288795b700000201 # CH -
          Timer                    0x2b8395b700000201 # Timer
          KEY_1                    0x0200001e00000201 # 1
          KEY_2                    0x0200001f00000201 # 2
          KEY_3                    0x0200002000000201 # 3
          KEY_4                    0x0200002100000201 # 4
          KEY_5                    0x0200002200000201 # 5
          KEY_6                    0x0200002300000201 # 6
          KEY_7                    0x0200002400000201 # 7
          KEY_8                    0x0200002500000201 # 8
          KEY_9                    0x0200002600000201 # 9
          KEY_0                    0x0200002700000201 # 0
          Star                     0x0220002500000201 # *
          Hash                     0x0220002000000201 # #
          KEY_VIDEO                0x2b8515b700000201 # Videos
          KEY_AUDIO                0x299195b700000201 # Music
          KEY_PHOTO                0x2ba115b700000201 # Pictures
          KEY_TV                   0x28a515b700000201 # TV
          KEY_BOOKMARKS            0x288515b700000201 # Bookmark
          Thumbnail                0x2ab715b700000201 # Thumbnail
          Zoom                     0x29a595b700000201 # Zoom
          FullScreen               0x2aa395b700000201 # Full Screen
          KEY_DVD                  0x29a395b700000201 # DVD
          KEY_MENU                 0x2ba395b700000201 # Menu
          Subtitle                 0x298595b700000201 # Subtitle
          KEY_LANGUAGE             0x2b8595b700000201 # Audio
          MouseKeyboard            0x299115b700000201 # Mouse/Keyboard
# MouseKeyboard also spews 0100007f between press and release...
          KEY_BACKSPACE            0x0200002a00000201 # Backspace
          KEY_SELECT               0x0200002c00000201 # Select/Space
# SelectSpace also spews 2b9115b7 and 289115b7 between press and release...
          LeftMenu                 0x0280000000000201 # Left Menu
          RightMenu                0x0200006500000201 # Right Menu
          BTN_LEFT                 0x0101000000000201 # L. Click
# LeftClick flips to 01010001 when held
          BTN_RIGHT                0x0102000000000201 # R. Click
# Un-click for both right and left is 01000000
          KEY_ENTER                0x0200002800000201 # ENTER
# Un-click for all 0x02foo buttons is 02000000
          KEY_UP                   0x0100800000000201 # Pad Up
          KEY_DOWN                 0x01007f0000000201 # Pad Down
          KEY_LEFT                 0x0100008000000201 # Pad Left
          KEY_RIGHT                0x0100007f00000201 # Pad Right
      end codes

end remote
NOTE: I seemed to have some weirdness in that lirc daemon loads /etc/lircd.conf instead of /etc/lirc/lircd.conf as specified in hardware.conf

9) Correct paths in lirc startup script#
Code:
sudo gedit /etc/init.d/lirc
Find this;
Code:
/usr/sbin/
Replace with;
Code:
/usr/local/sbin/
10) Reboot
Code:
sudo reboot
11) Confirm and Test
Code:
ls -l /dev/lirc*
You should see these devices;
Code:
/dev/lirc0  /dev/lirc1
check loaded modules;
Code:
lsmod|grep lirc
Output should be something like;
Code:
lirc_imon              23560  0 
lirc_dev               19908  1 lirc_imon
usbcore               149360  8 lirc_imon,dvb_usb_dib0700,dvb_usb,usbhid,uhci_hcd,ehci_hcd,ohci_hcd
Check for loading errors
Code:
dmesg|grep lirc
Output should be like;
Code:
[   12.946509] lirc_dev: IR Remote Control driver registered, major 61 
[   12.953720] lirc_dev: lirc_register_driver: sample_rate: 0
[   12.953840] lirc_dev: lirc_register_driver: sample_rate: 0
[   12.953905] usbcore: registered new interface driver lirc_imon
To test, execute the following command and start pushing buttons on your remote
Code:
irw
IF YOU SEE OUTPUT FOR ALL BUTTONS YOU ARE NOW DONE
TIP: If both lirc devices are present and you are able to start lirc daemon without issues then ensure lircd.conf exists in /etc and that you have the correct remote conf file. I've also found that changes in LIRC CVS can result in issues when compiling.


INSTALL & CONFIGURE LCDproc

1) Download LCDproc and iMon patch
Code:
cd
sudo wget http://downloads.sourceforge.net/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
Apply the Patch
Code:
cd lcdproc-0.5.2
sudo patch -p1 < ../lcdproc-0.5.2-imonlcd-0.3.patch
2) Edit main.h
Code:
sudo gedit server/main.h
Find the line "#define RENDER_FREQ 8" and replace with "#define RENDER_FREQ 2"

3) Configure compile and install lcdproc
Code:
sudo autoconf
sudo automake
Will get an unimportnt error referencing`IOWarrior.c'
Code:
sudo ./configure --enable-drivers=imonlcd
sudo make
sudo make install
4) Edit LCDd conf file
Code:
sudo gedit /usr/local/etc/LCDd.conf
Find "Driver=curses" and replace with "Driver=imonlcd"

Find "DriverPath=server/drivers/" and replace with "DriverPath=/usr/local/lib/lcdproc/"

Find the "### Driver sections" and place this (preferably in alphabetical order);

Code:
## IMON LCD driver##
[imonlcd]
    Device=/dev/lcd0
    Contrast=200
OPTIONAL: Find "Goodbye", remove # from the start of the line and place text between "" on both lines with your own personal message.
NOTE: Limit of 15 characters per line!


5) Check LCD devices exist and test LCDproc
Code:
ls /dev/lcd* 
sudo LCDd -f -r 4
Open new terminal window
Code:
lcdproc
If working you should see information being cycled through on your LCD

6) Create init.d script
Code:
sudo gedit /etc/init.d/LCDd
Paste in following

Code:
#!/bin/sh

#### 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
7) Edit permissions and update run levels
Code:
cd /etc/init.d
sudo chmod +x LCDd
ls -l LCDd
Ls should display ¨-rwxr-xr-x 1 root root 1111¨
Code:
sudo update-rc.d LCDd defaults
8) Reboot
Code:
sudo reboot
9) LCD Daemon usage
Code:
sudo /etc/init.d/LCDd stop   
sudo /etc/init.d/LCDd start
sudo /etc/init.d/LCDd restart
nicoloks is offline   Reply With Quote
Old March 23rd, 2009   #2
Kalibur
Just Give Me the Beans!
 
Kalibur's Avatar
 
Join Date: Dec 2006
Location: somewhere in Bristol
Beans: 48
Ubuntu 9.10 Karmic Koala
Send a message via Yahoo to Kalibur
Talking Re: Installing LIRC on 8.10 for Antec Fusion 15c2:0038 with RM200 remote

Nicoloks

Thanks for your hard work my friend.
I will testing this in about 10hours on 8.10 and on 9.04 alpha 6 and post my results. Once again Thank you
__________________
'The biggest room in the world is the room for improvement' Arsene Wenger
Kalibur is offline   Reply With Quote
Old March 24th, 2009   #3
Kalibur
Just Give Me the Beans!
 
Kalibur's Avatar
 
Join Date: Dec 2006
Location: somewhere in Bristol
Beans: 48
Ubuntu 9.10 Karmic Koala
Send a message via Yahoo to Kalibur
Re: Installing LIRC on 8.10 for Antec Fusion 15c2:0038 with RM200 remote

Hi Nicoloks what kernal and waas it 64bit you tried this on because I have tried it on the most up to date kernel on 64 bit 810 I see the lird0 and lircd1 as well as the lcd but am yet to get it working got to go work now. Later
__________________
'The biggest room in the world is the room for improvement' Arsene Wenger
Kalibur is offline   Reply With Quote
Old March 24th, 2009   #4
alesroki
First Cup of Ubuntu
 
Join Date: Mar 2009
Beans: 4
Re: Installing LIRC on 8.10 for Antec Fusion 15c2:0038 with RM200 remote

NOTE: This will only work if you already had version 0.83 installed.

Thanks man for this great guide.
alesroki is offline   Reply With Quote
Old March 24th, 2009   #5
Kalibur
Just Give Me the Beans!
 
Kalibur's Avatar
 
Join Date: Dec 2006
Location: somewhere in Bristol
Beans: 48
Ubuntu 9.10 Karmic Koala
Send a message via Yahoo to Kalibur
Re: Installing LIRC on 8.10 for Antec Fusion 15c2:0038 with RM200 remote

Quote:
Originally Posted by alesroki View Post
NOTE: This will only work if you already had version 0.83 installed.

Thanks man for this great guide.
So I guess it worked for youn then
en this close
I will install 0.83 first then start afresh. I am thrilled cause I have never been this close
__________________
'The biggest room in the world is the room for improvement' Arsene Wenger
Kalibur is offline   Reply With Quote
Old March 24th, 2009   #6
nicoloks
Just Give Me the Beans!
 
Join Date: Jan 2009
Beans: 78
Ubuntu 8.10 Intrepid Ibex
Re: Installing LIRC on 8.10 for Antec Fusion 15c2:0038 with RM200 remote

Hi Kalibur, I'm using the 32-bit version with Kernel 2.6.27-11-generic. If you can see both /dev/lirc0 and /dev/lirc1 have you tried running irw? Do you get any output to the screen when pushing buttons on your remote?
nicoloks is offline   Reply With Quote
Old March 24th, 2009   #7
Kalibur
Just Give Me the Beans!
 
Kalibur's Avatar
 
Join Date: Dec 2006
Location: somewhere in Bristol
Beans: 48
Ubuntu 9.10 Karmic Koala
Send a message via Yahoo to Kalibur
Re: Installing LIRC on 8.10 for Antec Fusion 15c2:0038 with RM200 remote

Quote:
Originally Posted by nicoloks View Post
Hi Kalibur, I'm using the 32-bit version with Kernel 2.6.27-11-generic. If you can see both /dev/lirc0 and /dev/lirc1 have you tried running irw? Do you get any output to the screen when pushing buttons on your remote?
Great new my fellow ubuntus I got the remote running on ubuntu 8.10 64bit kernel 26.6.27-13-server. All I need now is to sort mythtv and the lcd display. Off to the laboratory oh yea am in the lab lol
__________________
'The biggest room in the world is the room for improvement' Arsene Wenger
Kalibur is offline   Reply With Quote
Old March 24th, 2009   #8
Kalibur
Just Give Me the Beans!
 
Kalibur's Avatar
 
Join Date: Dec 2006
Location: somewhere in Bristol
Beans: 48
Ubuntu 9.10 Karmic Koala
Send a message via Yahoo to Kalibur
Re: Installing LIRC on 8.10 for Antec Fusion 15c2:0038 with RM200 remote

Ok now I got lcd working as well sweet I feel great thank you very much Nicoloks. Any hints on how to configure mythtv and Elisa to use the remote and lcd anyone
__________________
'The biggest room in the world is the room for improvement' Arsene Wenger

Last edited by Kalibur; March 24th, 2009 at 11:52 PM..
Kalibur is offline   Reply With Quote
Old March 25th, 2009   #9
alesroki
First Cup of Ubuntu
 
Join Date: Mar 2009
Beans: 4
Re: Installing LIRC on 8.10 for Antec Fusion 15c2:0038 with RM200 remote

Quote:
Originally Posted by Kalibur View Post
So I guess it worked for youn then
en this close
I will install 0.83 first then start afresh. I am thrilled cause I have never been this close
Yes it worked without any problems.

Now I'm only missing the volume knob.
alesroki is offline   Reply With Quote
Old March 26th, 2009   #10
alesroki
First Cup of Ubuntu
 
Join Date: Mar 2009
Beans: 4
Re: Installing LIRC on 8.10 for Antec Fusion 15c2:0038 with RM200 remote

Quick update: I played around with the remote and volume knob and found that the remote is using /dev/lirc0 and the volume knob is using /dev/lirc1.

I used the this cmd:

sudo mode2 -r -d /dev/lirc1

and I got activity while turning the volume knob left and right.

I still haven't found a way to make this work. Any ideas?

br.
alesroki is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:23 PM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry