You are not logged in.

#1 2016-11-28 16:03:30

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

[RESOLVED] lircd with serial ir-einschalter does not work

I am having trouble to get the following setup working:
Fujitsu D3222-B (external serial port -  BIOS: Super IO Chip: SCH5636 -> Serial Port: Enabled; Device Settings: IO=3F8h; IRQ=4;)
ir-einschalter (IR module with power on function ) connected to that external serial port by using provided serial cable
XBOX360 Remote (learned with that ir-einschalter) is an RC6 and rc6-mce-lircd key definition should work
VDR (DVB Software) user and group vdr:vdr

lircd installed and configured (best I know) but I am not able to use “irw” for example, just mode2 is giving me some details.

So I have two problems:
1) [modinit] isn’t executed after starting lircd.services
Here is how lirc_options.conf looks like, but after lircd.service start the [modinit] part would not be executed (I don’t see with 'lsmod | grep lirc' or 'dmesg | grep lirc' nothing new, like below when manually start) . I checked the lircd.services and there is an part with “Wants=lircd-setup.service” but I can’t find this service here on clean archlinux installation. Manually executing the ‘/usr/bin/lircd-setup’ command will execute the [modinit] part from lirc_optins.conf. However this does not fix the problem.
# systemctl status lircd-setup.services
Unit lircd-setup.service could not be found.

# cat /etc/lirc/lirc_options.conf
[lircd]
nodaemon        = False
driver          = default
device          = /dev/lirc0
output          = /var/run/lirc/lircd
pidfile         = /var/run/lirc/lircd.pid
plugindir       = /usr/lib/lirc/plugins
permission      = 666
allow-simulate  = No
repeat-max      = 600
effective-user  = vdr
#listen         = [address:]port
#connect        = host[:port]
#loglevel       = 6
#uinput         = ...
#release        = ...
#logfile        = ...

[lircmd]
uinput          = False
nodaemon        = False

[modinit]
code = /usr/bin/setserial /dev/ttyS0 uart none; /usr/sbin/modprobe lirc_serial
code1 = /usr/bin/setfacl -m g:vdr:rw /dev/lirc0
# code2 = ...

1)    The ‘irw’ does not work even after manually executing [modinit] part and starting lircd without systemd (or with system services).

# /usr/bin/setserial /dev/ttyS0 uart none; /usr/sbin/modprobe lirc_serial
# /usr/bin/setserial /dev/ttyS0
/dev/ttyS0, UART: unknown, Port: 0x03f8, IRQ: 4
#
# lsmod | grep lirc
lirc_serial            20480  0
lirc_dev               20480  1 lirc_serial
rc_core                24576  1 lirc_dev
# dmesg | grep lirc
[ 4481.375317] lirc_dev: IR Remote Control driver registered, major 241
[ 4481.411562] lirc_serial: module is from the staging directory, the quality is unknown, you have been warned.
[ 4482.337954] lirc_serial lirc_serial.0: auto-detected active low receiver
[ 4482.338096] lirc_serial lirc_serial.0: lirc_dev: driver lirc_serial
registered at minor = 0
# ls -lah /dev/lirc0
crw------- 1 root root 241, 0 Nov 27 11:33 /dev/lirc0
# /usr/bin/getfacl /dev/lirc0
getfacl: Removing leading '/' from absolute path names
# file: dev/lirc0
# owner: root
# group: root
user::rw-
group::---
other::---
# /usr/bin/setfacl -m g:vdr:rw /dev/lirc0
# /usr/bin/setfacl -m g:users:rw /dev/lirc0
## /usr/bin/getfacl /dev/lirc0
getfacl: Removing leading '/' from absolute path names
# file: dev/lirc0
# owner: root
# group: root
user::rw-
group::---
group:users:rw-
group:vdr:rw-
mask::rw-
other::---
#

lircd start:

# /usr/sbin/lircd --nodaemon --driver=default --device=/dev/lirc0
lircd-0.9.4c[2556]: Info: lircd:  Opening log, level: Info
lircd-0.9.4c[2556]: Warning: Running as root
lircd-0.9.4c[2556]: Info: Using remote: devinput-64.
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: KEY_FASTREVERSE
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_MISC
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_MOUSE
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_SOUTH
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_TOOL_PEN
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_TRIGGER
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_TRIGGER_HAPPY1
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-64: Multiple values for same code: BTN_WHEEL
lircd-0.9.4c[2556]: Info: Using remote: devinput-32.
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: KEY_FASTREVERSE
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_MISC
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_MOUSE
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_SOUTH
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_TOOL_PEN
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_TRIGGER
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_TRIGGER_HAPPY1
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/devinput.lircd.conf: devinput-32: Multiple values for same code: BTN_WHEEL
lircd-0.9.4c[2556]: Info: Using remote: mceusb.
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/rc6-mce-lircd.conf: mceusb: Multiple definitions of: KEY_SCREEN
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/rc6-mce-lircd.conf: mceusb: Multiple definitions of: KEY_MENU
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/rc6-mce-lircd.conf: mceusb: Multiple definitions of: KEY_PAUSE
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/rc6-mce-lircd.conf: mceusb: Multiple definitions of: KEY_MENU
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/rc6-mce-lircd.conf: mceusb: Multiple definitions of: KEY_SCREEN
lircd-0.9.4c[2556]: Info: Using remote: mceusb_hauppauge.
lircd-0.9.4c[2556]: Notice: /etc/lirc/lircd.conf.d/rc6-mce-lircd.conf: mceusb_hauppauge: Multiple definitions of: KEY_TV
lircd-0.9.4c[2556]: Info: Using remote: vista_mce.
lircd-0.9.4c[2556]: Notice: lircd(default) ready, using /var/run/lirc/lircd
lircd-0.9.4c[2556]: Notice: accepted new client on /var/run/lirc/lircd
lircd-0.9.4c[2556]: Info: Cannot configure the rc device for /dev/lirc0
^C
lircd-0.9.4c[2556]: Notice: caught signal

#

Please note as soon as i start "irw" i see this line in lircd log
"Info: Cannot configure the rc device for /dev/lirc0"

Last edited by vr4b4c (2016-12-05 12:12:32)

Offline

#2 2016-12-01 10:31:30

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Re: [RESOLVED] lircd with serial ir-einschalter does not work

Does anyone use lircd with serial devices? I would need some help, but i am not sure what else to do.

Offline

#3 2016-12-05 09:47:59

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Re: [RESOLVED] lircd with serial ir-einschalter does not work

Both issue solved! Here how I fix them.
1) there is missing lircd-setup.service
solved in upstream:

https://sourceforge.net/p/lirc/tickets/243/
https://sourceforge.net/p/lirc/git/ci/e0eecc014e07261249d08e6c6145a5807e41dbda/tree/systemd/lircd-setup.service

current fix before new upstream release is done

curl -O https://sourceforge.net/p/lirc/git/ci/e0eecc014e07261249d08e6c6145a5807e41dbda/tree/systemd/lircd-setup.service?format=raw
mv lircd-setup.service\?format\=raw  /usr/lib/systemd/system/lircd-setup.service

Reload systemd, scanning for new or changed units:
# systemctl daemon-reload

# systemctl status lircd-setup.service
● lircd-setup.service - LIRC Infrared Signal Decoder - setup as root
   Loaded: loaded (/usr/lib/systemd/system/lircd-setup.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
#
# systemctl enable lircd-setup.service

2) used wrong code, after learning my own ‘irw’ was working fine

irrecord --disable-namespace -d /dev/lirc0 /etc/lirc/lircd.conf.d/XBOX360RemoteWhite.lircd.conf

whole file:

# Please take the time to finish this file as described in
# https://sourceforge.net/p/lirc-remotes/wiki/Checklist/
# and make it available to others by sending it to
# <lirc@bartelmus.de>
#
# This config file was automatically generated
# using lirc-0.9.4c(default) on Sat Dec  3 10:32:24 2016
# Command line used: -d /dev/lirc0 /etc/lirc/lircd.conf.d/XBOX360RemoteWhite.lircd.conf
# Kernel version (uname -r): 4.4.36-1-ARCH
#
# Remote name (as of config file): XBOX360RemoteWhite
# Brand of remote device, the thing you hold in your hand:
# Remote device model nr:
# Remote device info url:
# Does remote device has a bundled capture device e. g., a
#     usb dongle? :
# For bundled USB devices: usb vendor id, product id
#     and device string (use dmesg or lsusb):
# Type of device controlled
#     (TV, VCR, Audio, DVD, Satellite, Cable, HTPC, ...) :
# Device(s) controlled by this remote:

begin remote

  name  XBOX360RemoteWhite
  bits           16
  flags RC6|CONST_LENGTH
  eps            30
  aeps          100

  header       2707   856
  one           473   415
  zero          473   415
  pre_data_bits   21
  pre_data       0x37FF0
  gap          106922
  toggle_bit_mask 0x8000
  rc6_mask    0x100000000
  frequency    38000

      begin codes
          KEY_XBOX                 0x0B9B
          KEY_OPENCLOSE            0x0BD7
          KEY_UP                   0x0BE1
          KEY_DOWN                 0x0BE0
          KEY_CHANNEL              0x0BF2
          KEY_DISPLAY              0x0BB0
          KEY_OK                   0x0BDD
          KEY_RELOAD               0x0BE3
          KEY_LEFT                 0x0BDF
          KEY_RIGHT                0x0BDE
          KEY_RED                  0x0BDA
          KEY_GREEN                0x0B99
          KEY_YELLOW               0x0BD9
          KEY_BLUE                 0x0B97
          KEY_0                    0x0BFF
          KEY_1                    0x0BFE
          KEY_2                    0x0BFD
          KEY_3                    0x0BFC
          KEY_4                    0x0BFB
          KEY_5                    0x0BFA
          KEY_6                    0x0BF9
          KEY_7                    0x0BF8
          KEY_8                    0x0BF7
          KEY_9                    0x0BF6
          KEY_100                  0x0BE2
          KEY_INFO                 0x0BF0
          KEY_PLAY                 0x0BE9
          KEY_PAUSE                0x0BE7
          KEY_PLAYPAUSE            0x0BE9
          KEY_STOP                 0x0BE6
          KEY_RECORD               0x0BE8
          KEY_FASTFORWARD          0x0BEB
          KEY_REWIND               0x0BEA
          KEY_NEXT                 0x0BE5
          KEY_BACK                 0x0BE4
          KEY_ESC                  0x0BDC
          KEY_POWER2               0x0BF3
          KEY_CHANNELUP            0x0B93
          KEY_CHANNELDOWN          0x0B92
          KEY_VOLUMEUP             0x0BEF
          KEY_VOLUMEDOWN           0x0BEE
          KEY_MUTE                 0x0BF1
          KEY_SUBTITLE             0x0BAE
          KEY_MENU                 0x0BDB
          KEY_ENTER                0x0BF4
          KEY_CLEAR                0x0BF5
      end codes

end remote

Offline

Board footer

Powered by FluxBB