Hi Darren,
In did you spoted right, i had to add the serial device in the remote control template recompile lirc sources
and such of a sudden LIRC_DCE started behaving so i could attach to it with irw.
Thank a lot for your input, i would never have tought the lirc input device would be there.
As i promised in my first post a wrote a quick howto(ish) install a serial device in lmce.
Dear All,
I spent some time figuring out how infrared serial remote work with linuxmce (pluto),
So i told my self this might help somebody else to get his remote working.
Please let me know if it is not clear enough so i might add some details
##################################
# Install a serial infrared remote control in linuxmce
#
##################################
( Tested with a Technissat serial infrared remote TTS35AI )
In order to setup a serial infrared remote control you will need to do the following:
1) Linuxmce configuration.
Go to linuxmce admin website (
http://dcerouter )
Go to Advanced -> Configuration -> Device Templates.
Choose Manufacturer Pluto, "Device Category Lirc Remote Controls < Remote Controls < Peripherals"
Check if your manufacturer is listed, Otherwise just press "Add a manufacturer" and put the name of
your remote.
Press the reload button of your browser, select the new manufacturer you just created,
select Device Category "Lirc Remote Controls < Remote Controls < Peripherals" press Add Device Template.
Add the name of the needed configuration ( i called it lircd.conf.twinhan ).
Now go to the "Device Data" section and add a Device of type string.
In the the Comments field put remote device, in Default value put /dev/ttyS0 (! ttyS0 is the first serial port found on
your mother board however in your case you it might be different /dev/ttyS1 ttyS2 or else (can't cover it all !).
Know go to lirc website in order to get the keys configuration for your remote most of them are available at
http://lirc.sourceforge.net/remotes/ (choose your manufacturer or model)
Still in "Device Data" add a new parameter Configuration pout any comment in "Comments" know Insert the content of the
lircd.conf file in Default Value.
Press Save !
Go to Wizard -> Devices -> Media Directors, scroll to the md you want to a the remote to,
In infrared receivers select "default" then press "Add Remote" and select the remote control we previously created.
We are know done with linuxmce configuration, Linuxmce will install the sofware on the MD and will ask you to reload the
router.
2) Lirc config
create a file /etc/lircd/hardware.conf and insert:
############################################################################
# /etc/lirc/hardware.conf
#
# Arguments which will be used when launching lircd
LIRCD_ARGS=""
#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
# Run "lircd --driver=help" for a list of supported drivers.
DRIVER="default"
# If DEVICE is set to /dev/lirc and devfs is in use /dev/lirc/0 will be
# automatically used instead
DEVICE="/dev/ttyS0"
MODULES="lirc_serial"
# Default configuration files for your hardware if any
LIRCD_CONF="/etc/lirc/lircd.conf"
LIRCMD_CONF=""
#
# END/etc/lirc/hardware.conf
#############################################################################
Copy the previously downloaded lircd.conf to /etc/lirc/
sudo chmod 755 /etc/lirc/lircd.conf
sudo apt-get install setserial
sudo echo "/dev/ttyS0 uart none" > /etc/serial.conf
sudo /etc/init.d/setserial restart
sudo rmmod lirc_serial
sudo rmmod lirc_dev
sudo modprobe lirc_serial
sudo /etc/init.d/lirc start
At this point we can determine if something is happening using irw
sudo irw
Press your remote butons,
If nothing happens and irw quits, check you have the right serial /dev/ttySX and
If this does not work then we need to build lirc from source (which is my case).
3) Lirc install from source
sudo dpkg build-dep lirc
cd /usr/src
sudo wget
http://prdownloads.sourceforge.net/lirc/lirc-0.8.2.tar.bz2 sudo tar -jxvf lirc-0.8.2.tar.bz2
cd lirc-0.8.2
./configure
In 1 Driver Configuration Choose 1 Home-brew (16x50 UART compatible serial Port) -> choose your comport ->
uncheck all "Driver specific Options" then choose 3 save configuration and exit.
sudo make
sudo make install
sudo rmmod lirc_serial
sudo rmmod lirc_dev
sudo depmod -a
sudo setserial /dev/ttyS0 uart none ( in your case /dev/ttySX )
modprobe lirc_serial
know
sudo /usr/local/sbin/lircd -H default -d /dev/ttyS0 /etc/lirc/lircd.conf
sudo /usr/local/bin/irw
Know you should be able to see the keys you press on your remote.
Until this work linuxmce will not be able to use your remote
I tried to cover most of the installation steps however lirc has many configurations
and many devices have been used with it so.
if irw works then your remote sould know be working in linux mce,
if not check the device number of the infrared receiver and use the command
/usr/pluto/bin/LIRC_DCE -d ENTER_YOUR_DEVICE_NUMBER
( In order to troubleshoot
)
I Hope This Help,
Rafik Boulellou