LinHES Forums
http://forum.linhes.org/

R6: Question about lirc
http://forum.linhes.org/viewtopic.php?f=11&t=19736
Page 1 of 1

Author:  nmcaullay [ Thu Mar 26, 2009 6:09 pm ]
Post subject:  R6: Question about lirc

Hi All,

I've upgraded to R6, so far so good.

Once thing ive had to do for the last few upgrades (R5.5 and earlier) is modify/replace certain files like lircd, hardware.conf, lircd.conf, and lircrc.

For example
Code:
/etc/init.d/lircd - needed to change the start-stop-daemon line
/etc/lirc/hardware.conf - needed to change the DRIVER and DEVICE lines
/etc/lirc/lircd.conf - needed to replace with my AvermediaA777 generated file
/home/mythtv/.mythtv/lircrc - replaced with my custom button mapping


In R6, I can only determine so far the following files
Code:
/etc/lircd.conf
/etc/lircrc - symlink to /home/mythtv/.mythtv/lircrc

Does anyone know where the other files are, or if they are needed?

also, a second thing... i'm fighting to get a udev rule in place to symlink a /class/input/inputx to map to /dev/irremote, as the inputx changes on boot sometimes. I'm not having any luck getting udev to get arch to recognise it?

/etc/udev/rules.d/10-local.rules
Code:
KERNEL=="event*", ATTRS{modalias}=="input:b0001v1461p2C05e0001-e0,1,14,k71,72,73
,74,77,80,8E,A7,A8,CF,D2,D9,172,174,179,17F,184,188,189,18E,18F,190,191,192,193,
19A,ramlsfw", SYMLINK+="input/irremote"


Cheers,

Nathan

Author:  nmcaullay [ Fri Mar 27, 2009 12:54 am ]
Post subject: 

ok,

so now i can manually start the lircd daemon up, and get my remote working....

I achieved this by editing /etc/conf.d/lircd to be
Code:
#
# Parameters for lirc daemon
#

#LIRC_DEVICE="/dev/lirc0"
LIRC_DEVICE="/dev/input/by-path/pci-0000:01:08.0-event-"
#LIRC_DRIVER=""
LIRC_DRIVER="devinput"
LIRC_EXTRAOPTS=""
LIRC_CONFIGFILE=""


now, from my limited understanding... when i issue this command
Code:
lircd -H devinput -d "/dev/input/by-path/pci-0000:01:08.0-event-"


I can get the remote working.... the complicated device seems to be a symlink to a consistent pci address, as the event numbers change on every boot...

NOW... i cant for the life of me figure out how to get this to start on boot...

I've looked at the runit stuff, the rc.d stuff... and i cant figure out where to add lircd to start at boot... or atleast get it to take my parameters if it is trying to start already...

For example, i added this to my /etc/runit/1 file
Code:
lircd -H devinput -d "/dev/input/by-path/pci-0000:01:08.0-event-" 2>/dev/null


reboot, no working...

Ideas?

Nathan

Author:  mihanson [ Fri Mar 27, 2009 3:35 pm ]
Post subject: 

Try:
Code:
# add_service.sh lircd

Author:  nmcaullay [ Fri Mar 27, 2009 5:17 pm ]
Post subject: 

after a little more research the service appears to have been added on install.. its in /etc/sv, which i believe is what the add_service.sh script does?

I've managed to hack into /etc/sv/lircd/run, and change the part to make it work...


Code:
if [ "$run_lircd2" = "true" ]
then
        $lircd2_cmd 2>/dev/null 1>/dev/null
        #exec /usr/sbin/lircd -n -d $DEVICE --output /dev/lircd1 --listen 2>/dev
/null 1>/dev/null
        exec /usr/sbin/lircd -n -H devinput -d "/dev/input/by-path/pci-0000:01:0
8.0-event-" 2>/dev/null 1>/dev/null
else
        #exec /usr/sbin/lircd -n -d $DEVICE 2>/dev/null 1>/dev/null
        exec /usr/sbin/lircd -n -H devinput -d "/dev/input/by-path/pci-0000:01:0
8.0-event-" 2>/dev/null 1>/dev/null
fi


Works most of the time on boot, apart from every now and then when it doesnt seem to start... more investigation required i think

Nathan

Author:  tjc [ Fri Mar 27, 2009 11:10 pm ]
Post subject: 

nmcaullay wrote:
after a little more research the service appears to have been added on install.. its in /etc/sv, which i believe is what the add_service.sh script does?

No. While /etc/sv is where the scripts are installed, the add_service.sh script puts a symbolic link to that in /var/service which "activates" it.

This is like SysV init with the scripts in /etc/init.d and links to those in the various /etc/rc?.d directories which the update-rc.d utility creates.

Page 1 of 1 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/