Menu

#181 Error: irtoy_getversion: couldn't read version

Future
closed
nobody
None
notabug
2017-01-03
2016-04-25
BytEvil
No

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!

Related

Tickets: #195

Discussion

1 2 > >> (Page 1 of 2)
  • Bengt Martensson

    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.

     
  • BytEvil

    BytEvil - 2016-04-25

    /dev/ttyACM0 is Pulse8 USB CEC Adapter in my system.

     
  • Bengt Martensson

    what if the IrToy grabs /dev/ttyACM0 and the other device /dev/ttyACM1?

     
  • Alec Leamas

    Alec Leamas - 2016-04-25

    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.

     
  • Alec Leamas

    Alec Leamas - 2016-04-26
    • Milestone: 0.9.3 --> Future
     
  • Alec Leamas

    Alec Leamas - 2016-04-28

    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
  • Alec Leamas

    Alec Leamas - 2016-04-29

    Filed a patch for device enumeration in [#185]

     

    Related

    Tickets: #185

  • BytEvil

    BytEvil - 2016-05-04

    Thanks all for help. Problem solved by replugging irtoy device from USB3.0 to USB2.0 port. ^_^

     
  • Alec Leamas

    Alec Leamas - 2016-05-04
    • status: open --> need-info
    • Resolution: na --> notabug
    • Milestone: Future --> 0.9.4
     
  • Alec Leamas

    Alec Leamas - 2016-05-04

    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.

     
  • Alec Leamas

    Alec Leamas - 2016-05-04
    • status: need-info --> closed
     
  • Alec Leamas

    Alec Leamas - 2016-05-04

    Really closing. Thanks for reportingn and also reporting back!

     
  • BytEvil

    BytEvil - 2016-05-27

    Problem still persist, but not so often ... (( On lirc 0.9.4. too...

     

    Last edit: BytEvil 2016-05-27
  • BytEvil

    BytEvil - 2016-05-28
    май 27 21:00:28 KODI lircd-0.9.4[1339]: Notice: lircd(irtoy) ready, using /dev/irtoy
    май 27 21:00:28 KODI systemd[1]: Started LIRC Daemon for Sending IRtoy Commands.
    май 28 00:26:57 KODI lircd-0.9.4[1339]: Notice: accepted new client on /dev/irtoy
    май 28 00:26:58 KODI lircd-0.9.4[1339]: Error: irtoy_getversion: couldn't read version
    май 28 00:26:58 KODI lircd-0.9.4[1339]: Error: please make sure you are using firmware v20 or higher
    май 28 00:26:58 KODI lircd-0.9.4[1339]: Error: irtoy: No USB Irtoy device found at /dev/ttyACM1
    май 28 00:26:58 KODI lircd-0.9.4[1339]: Warning: Failed to initialize hardware
    май 28 00:26:58 KODI systemd[1]: irtoy.service: Main process exited, code=dumped, status=11/SEGV
    май 28 00:26:58 KODI systemd[1]: irtoy.service: Unit entered failed state.
    май 28 00:26:58 KODI systemd[1]: irtoy.service: Failed with result 'core-dump'.
    

    [root@KODI ~]# lsusb

    Bus 001 Device 006: ID 2548:1002 Pulse-Eight USB-CEC Adapter  /dev/ttyACM0
    Bus 001 Device 005: ID 04d8:fd08 Microchip Technology, Inc. /dev/ttyACM1
    
     

    Last edit: BytEvil 2016-05-28
  • Alec Leamas

    Alec Leamas - 2016-05-28
    • status: closed --> open
     
  • Alec Leamas

    Alec Leamas - 2016-05-28

    Re-opening after comment in [#195]

     

    Related

    Tickets: #195

  • BytEvil

    BytEvil - 2016-05-29

    Please wait, until the lircd daemon dies with segfault and i can make backtrace with gdb...

     
  • Alec Leamas

    Alec Leamas - 2016-06-02
    • Milestone: 0.9.4 --> Future
     
  • BytEvil

    BytEvil - 2016-06-08

    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!

     
  • Alec Leamas

    Alec Leamas - 2016-06-08
    • status: open --> closed
     
  • Alec Leamas

    Alec Leamas - 2016-06-08

    Thanks for reporting back! Closing.

     
  • BytEvil

    BytEvil - 2016-06-10

    Hi, friends! Please reopen this ticket! :(

    [Thread debugging using libthread_db enabled]
    Using host libthread_db library "/usr/lib/libthread_db.so.1".
    Core was generated by `/usr/sbin/lircd -H irtoy -d /dev/ttyACM1 -P /var/run/lirc/irtoy.pid -o /dev/irt'.
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0x00007f9a51f1a36d in send3 () from /usr/lib/lirc/plugins/irtoy.so
    (gdb) bt
    #0  0x00007f9a51f1a36d in send3 () from /usr/lib/lirc/plugins/irtoy.so
    #1  0x00007f9a51f1a3eb in ?? () from /usr/lib/lirc/plugins/irtoy.so
    #2  0x00007f9a51f1a47d in ?? () from /usr/lib/lirc/plugins/irtoy.so
    #3  0x00007f9a51f1badf in ?? () from /usr/lib/lirc/plugins/irtoy.so
    #4  0x00007f9a526d5c6a in send_ir_ncode () from /usr/lib/liblirc.so.0
    #5  0x0000000000406ce8 in send_core (fd=6, message=0x7fffcc1baca0 "SEND_ONCE irtoytv tvpower 2\n", arguments=0x7fffcc1badba "irtoytv", once=1)
        at lircd.cpp:1583
    #6  0x0000000000406ae5 in simulate (fd=0, message=0x7fffcc1bac80 "\360\256\033\314\377\177",
        arguments=0x406abb <simulate(int, char*, char*)+555> "\211\307\350\372\352\377\377\353%\220\353\a\220\353\004\220\353\001\220H\213MЋEܺf\253@")
        at lircd.cpp:1542
    #7  0x0000000000407618 in get_command (fd=6) at lircd.cpp:1764
    #8  0x00000000004085b0 in mywaitfordata (maxusec=0) at lircd.cpp:2096
    #9  0x00000000004088ad in loop () at lircd.cpp:2147
    #10 0x0000000000409786 in main (argc=9, argv=0x7fffcc1bb208) at lircd.cpp:2474
    
     
  • Alec Leamas

    Alec Leamas - 2016-06-10
    • status: closed --> open
    • Resolution: notabug --> na
     
1 2 > >> (Page 1 of 2)

Log in to post a comment.