You are not logged in.

#1 2012-05-10 19:27:16

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,336
Website

lirc and systemd [solved]

Anyone aware of a functional lircd.service for systemd and lircd?

Last edited by graysky (2012-05-11 01:45:15)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#2 2012-05-10 20:12:27

MOPSTER
Member
From: Aruba
Registered: 2012-03-26
Posts: 15

Re: lirc and systemd [solved]

I could make one for you if you want, but first I'd need to read up on lircd. And no, sadly I didn't find anything regarding that

Offline

#3 2012-05-10 22:09:25

electrified
Member
Registered: 2012-04-01
Posts: 3

Re: lirc and systemd [solved]

The following works for me:

[Unit]
Description=LIRC Daemon
After=network.target

[Service]
Type=forking
PIDFile=/var/run/lirc/lircd.pid
ExecStartPre=/bin/mkdir -p /var/run/lirc
ExecStartPre=/bin/rm -f /dev/lircd
ExecStartPre=/bin/rm -f /var/run/lirc/lircd
ExecStartPre=/bin/ln -s /var/run/lirc/lircd /dev/lircd
ExecStartPre=/usr/bin/ir-keytable -p lirc
ExecStart=/usr/sbin/lircd -d /dev/lirc0 -P /var/run/lirc/lircd.pid
ExecStopPost=/bin/rm -f /dev/lircd
ExecStopPost=/bin/rm -fR /var/run/lirc

[Install]
WantedBy=multi-user.target

You probably don't want the ir-keytable bit, and the hard coded /dev/lirc0 is quite bodgy.

I took the one here: http://lists.freedesktop.org/archives/s … 01182.html and modified it a bit.

Offline

#4 2012-05-10 23:12:20

graysky
Member
From: /run/user/1000
Registered: 2008-12-01
Posts: 8,336
Website

Re: lirc and systemd [solved]

thanks electric, I'll try it out

EDIT: works!

https://wiki.archlinux.org/index.php/Sy … ices#lircd

Last edited by graysky (2012-05-11 01:45:05)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#5 2012-11-25 13:12:07

boomshalek
Member
Registered: 2007-10-12
Posts: 96

Re: lirc and systemd [solved]

Offline

#6 2012-11-25 15:34:55

boomshalek
Member
Registered: 2007-10-12
Posts: 96

Re: lirc and systemd [solved]

Can someone tell me why this tmpfile using systemd does not work ?

# LIRC Workaround (2.6.38 Upgrade)
# echo lirc > /sys/class/rc/rc0/protocols
# echo lirc > /sys/class/rc/rc1/protocols
# echo lirc > /sys/class/rc/rc2/protocols
w /sys/class/rc/rc0/protocols - - - - lirc
w /sys/class/rc/rc1/protocols - - - - lirc
w /sys/class/rc/rc2/protocols - - - - lirc
cat /sys/class/rc/rc0/protocols
rc-5 nec [rc-6] jvc sony sanyo mce_kbd lirc

Offline

#7 2012-11-25 22:24:38

boomshalek
Member
Registered: 2007-10-12
Posts: 96

Re: lirc and systemd [solved]

/etc/systemd/system/lirc.service

see ExecStartPost's

[Unit]
Description=Linux Infrared Remote Control

[Service]
EnvironmentFile=/etc/conf.d/lircd.conf
ExecStartPre=/usr/bin/ln -sf /dev/lirc0 /dev/lirc
ExecStartPre=/usr/bin/ln -sf /run/lirc/lircd /dev/lircd
ExecStart=/usr/sbin/lircd --pidfile=/run/lirc/lircd.pid
ExecStartPost=/bin/sh -c "echo 'lirc' > /sys/class/rc/rc0/protocols"
ExecStartPost=/bin/sh -c "echo 'lirc' > /sys/class/rc/rc1/protocols"
ExecStartPost=/bin/sh -c "echo 'lirc' > /sys/class/rc/rc2/protocols"
Type=forking
PIDFile=/run/lirc/lircd.pid

[Install]
WantedBy=multi-user.target

Offline

#8 2013-01-06 21:10:37

schef
Member
Registered: 2009-04-16
Posts: 59

Re: lirc and systemd [solved]

Hey guys..how did you manage to solve problem concerning the release of serial port?!
i had this two lines in rc.local:

setserial /dev/ttyS0 uart none
modprobe lirc_serial

Offline

Board footer

Powered by FluxBB