Hi friends! Can`t send ir command periodically. Systemd irtoy.service output:
апр 24 13:08:36 KODI lircd-0.9.3a[1317]: Info: Initial device: /dev/ttyACM1 апр 24 13:08:36 KODI lircd-0.9.3a[1317]: Warning: Running as root апр 24 13:08:36 KODI lircd-0.9.3a[1317]: Info: Using remote: irtoycd. апр 24 13:08:36 KODI lircd-0.9.3a[1330]: Notice: lircd(irtoy) ready, using /var/run/lirc/irtoy апр 24 13:08:36 KODI systemd[1]: Started LIRC Daemon for Sending IRtoy Commands. апр 24 23:57:27 KODI lircd-0.9.3a[1330]: Notice: accepted new client on /var/run/lirc/irtoy апр 24 23:57:28 KODI lircd-0.9.3a[1330]: Error: irtoy_getversion: couldn't read version апр 24 23:57:28 KODI systemd[1]: irtoy.service: Main process exited, code=killed, status=11/SEGV апр 24 23:57:28 KODI systemd[1]: irtoy.service: Unit entered failed state. апр 24 23:57:28 KODI systemd[1]: irtoy.service: Failed with result 'signal'.
irtoy.service
[Unit] Description=LIRC Daemon for Sending IRtoy Commands After=network.target [Service] Type=forking ExecStartPre=/usr/bin/ln -sf /var/run/lirc/irtoy /dev/irtoy ExecStart=/usr/sbin/lircd -H irtoy -d /dev/ttyACM1 -P /var/run/lirc/irtoy.pid -o /var/run/lirc/irtoy /etc/lirc/irtoy.conf ExecStop=/usr/sbin/rm /var/run/lirc/irtoy.pid [Install] WantedBy=multi-user.target
/etc/lircd/irtoy.conf
# Please make this file available to others # by sending it to <winlirc.configs@gmail.com> # # this config file was automatically generated # using lirc-0.9.0(IRToy) on Sun Dec 27 12:09:57 2015 # # contributed by # # brand: C:\WinLIRC\config.cf # model no. of remote control: # devices being controlled by this remote: # begin remote name irtoycd flags RAW_CODES eps 30 aeps 100 gap 73823 begin raw_codes name cdpower 3391 1749 426 426 405 1301 447 426 405 447 405 447 405 447 405 447 383 447 405 447 405 447 405 447 405 447 405 447 405 1279 426 426 405 447 426 426 405 447 447 405 405 447 405 447 405 1301 426 426 405 1279 490 383 405 447 405 1279 426 1301 426 1279 490 383 405 447 405 447 405 1279 447 426 405 1279 426 1279 490 1237 490 1237 405 426 405 447 405 1279 426 426 405 447 405 447 405 447 405 447 405 447 405 1301 447 end raw_codes end remote begin remote name irtoytv bits 12 flags SPACE_ENC eps 30 aeps 100 one 447 4567 zero 447 2055 ptrail 450 gap 31586 toggle_bit_mask 0x0 begin codes tvpower 0x31D end codes end remote
irsend command:
irsend -d /dev/irtoy SEND_ONCE irtoytv tvpower -#2
Thanks in advance!
How did you arrive at /dev/ttyACM1? It appears as if lircd does not find it there.
You can use IrScrutinizer to verify that the hardware is working, at the claimed device.
/dev/ttyACM0 is Pulse8 USB CEC Adapter in my system.
what if the IrToy grabs /dev/ttyACM0 and the other device /dev/ttyACM1?
Basically, I think Bengt is right - the kernel device number allocation scheme is by definition random. The proper fix in a situation like this would be to create some fixed device links using udev.
BTW: What's the point linking the /var/run fifo device to /dev/irtoy instead of using it as-is? It might become messy if udev creates other links in /dev.
Unless there is more input on this bug it will be closed as not-a-bug, assuming that this is about what device the irtoy allocates (and the need for udev-managed fixed links in this case)
A valuable add-on would be to implement device enumeration in the irtoy driver, Using mode2 --list-devices would then clarify issues like this. The long-term solution is still to use a udev link, though.
Last edit: Alec Leamas 2016-04-28
Filed a patch for device enumeration in [#185]
Related
Tickets:
#185Thanks all for help. Problem solved by replugging irtoy device from USB3.0 to USB2.0 port. ^_^
hm... this might just be a way to trick the kernel to make another device allocation. Anyway, nothing really indicates that this is a bug in lirc.
Really closing. Thanks for reportingn and also reporting back!
Problem still persist, but not so often ... (( On lirc 0.9.4. too...
Last edit: BytEvil 2016-05-27
[root@KODI ~]# lsusb
Last edit: BytEvil 2016-05-28
Re-opening after comment in [#195]
Related
Tickets:
#195Please wait, until the lircd daemon dies with segfault and i can make backtrace with gdb...
Hairy thing this one.
I suggest that you do the following:
get this fix for immediate invokation, and use it: https://sourceforge.net/p/lirc/git/merge-requests/19/
Use my experimental version of the irtoy driver: https://sourceforge.net/u/bengtmartensson/lirc/ci/experimental-irtoy/tree/plugins/irtoy.c?format=raw It logs the resolution of the symlinks, moreover, it leaves the device open between invocations.
If possible, use debug LEDs as I described here: http://dangerousprototypes.com/forum/viewtopic.php?f=29&t=7358p://dangerousprototypes.com/forum/viewtopic.php?f=29&t=7358
Same error...
Last edit: BytEvil 2016-06-13
Very strange... All worked fine more than 10 days after solving the problem, discribed here https://sourceforge.net/p/lirc/tickets/195/
Thanks to all for help!
Thanks for reporting back! Closing.
Hi, friends! Please reopen this ticket! :(