kodi+lirc+remote+Lircmap.xml broken only after kodi starts

This forum is for discussion about general software issues.

kodi+lirc+remote+Lircmap.xml broken only after kodi starts

Postby qaron » Wed Jul 15, 2020 9:48 am

I use Arch on my Raspberry Pi 4 with Mate Desktop and everything works.
when I install kodi-rbp4 it installs the lirc package which it never worked for me on any platform.
I use trizen to install the aur package lirc-git and edit the build to enable it for any architecture in order to install on the rpi.
$this->bbcode_second_pass_code('', '
[pi@pi ~]$ systemctl status lircd
* lircd.service - Flexible IR remote input/output application support
Loaded: loaded (/usr/lib/systemd/system/lircd.service; disabled; vendor preset: disabled)
Active: active (running) since Wed 2020-07-15 12:05:27 EEST; 6min ago
Docs: man:lircd(8)
http://lirc.org/html/configure.html
Main PID: 28824 (lircd)
Tasks: 2 (limit: 4915)
CGroup: /system.slice/lircd.service
`-28824 /usr/sbin/lircd --nodaemon

Jul 15 12:05:34 pi lircd[28824]: lircd-0.11.0-devel[28824]: Warning: Obsolete devinput config file used
Jul 15 12:05:34 pi lircd[28824]: lircd-0.11.0-devel[28824]: Notice: Use the distributed devinput.lircd.dist by renaming it.
Jul 15 12:05:34 pi lircd[28824]: lircd-0.11.0-devel[28824]: Notice: Or use irdb-get to search for "devinput" and download it.
Jul 15 12:05:34 pi lircd-0.11.0-devel[28824]: Warning: Obsolete devinput config file used
Jul 15 12:05:34 pi lircd-0.11.0-devel[28824]: Notice: Use the distributed devinput.lircd.dist by renaming it.
Jul 15 12:05:34 pi lircd-0.11.0-devel[28824]: Notice: Or use irdb-get to search for "devinput" and download it.
Jul 15 12:05:56 pi lircd[28824]: lircd-0.11.0-devel[28824]: Info: removed client
Jul 15 12:05:56 pi lircd[28824]: lircd-0.11.0-devel[28824]: Info: closing '/dev/input/event0'
Jul 15 12:05:56 pi lircd-0.11.0-devel[28824]: Info: removed client
Jul 15 12:05:56 pi lircd-0.11.0-devel[28824]: Info: closing '/dev/input/event0'
')
$this->bbcode_second_pass_code('', '
[pi@pi ~]$ irw
0000000080010069 00 KEY_LEFT devinput-32
0000000080010160 00 KEY_OK devinput-32
000000008001006a 00 KEY_RIGHT devinput-32
0000000080010072 00 KEY_VOLUMEDOWN devinput-32
00000000800100a7 00 KEY_RECORD devinput-32
0000000080010080 00 KEY_STOP devinput-32
00000000800100d0 00 KEY_FASTFORWARD devinput-32
00000000800100cf 00 KEY_PLAY devinput-32
00000000800100a8 00 KEY_REWIND devinput-32
000000008001019c 00 KEY_PREVIOUS devinput-32
0000000080010160 00 KEY_OK devinput-32
')

But after the kodi starts.... the cursor flickers but no input from irw
$this->bbcode_second_pass_code('', '
[pi@pi ~]$ irw

')
running the ir-keytable wirh root and testing the output of lirc. it seems that something is working but not quite!!
$this->bbcode_second_pass_code('', '
[pi@pi ~]$ sudo ir-keytable -t
[sudo] password for pi:
Testing events. Please, press CTRL-C to abort.
2274.650021: lirc protocol(rc6_mce): scancode = 0x800f0422
2274.760025: lirc protocol(rc6_mce): scancode = 0x800f0422
2274.860023: lirc protocol(rc6_mce): scancode = 0x800f0422
2275.250016: lirc protocol(rc6_mce): scancode = 0x800f0420 toggle=1
2275.360026: lirc protocol(rc6_mce): scancode = 0x800f0420 toggle=1
2275.800017: lirc protocol(rc6_mce): scancode = 0x800f0421
2275.910034: lirc protocol(rc6_mce): scancode = 0x800f0421
2276.500016: lirc protocol(rc6_mce): scancode = 0x800f0417 toggle=1
2276.610014: lirc protocol(rc6_mce): scancode = 0x800f0417 toggle=1
2277.100019: lirc protocol(rc6_mce): scancode = 0x800f0423
2277.210017: lirc protocol(rc6_mce): scancode = 0x800f0423
2277.740019: lirc protocol(rc6_mce): scancode = 0x800f0419 toggle=1
2277.850022: lirc protocol(rc6_mce): scancode = 0x800f0419 toggle=1
2277.950019: lirc protocol(rc6_mce): scancode = 0x800f0419 toggle=1
')
and before kodi starts or after rebooting pi and before kodi starts...
$this->bbcode_second_pass_code('', '
[pi@pi ~]$ sudo ir-keytable -t
[sudo] password for pi:
Testing events. Please, press CTRL-C to abort.
51.240037: lirc protocol(rc6_mce): scancode = 0x800f0422
51.240078: event type EV_MSC(0x04): scancode = 0x800f0422
51.240078: event type EV_KEY(0x01) key_down: KEY_OK(0x0160)
51.240078: event type EV_SYN(0x00).
51.380032: event type EV_KEY(0x01) key_up: KEY_OK(0x0160)
51.380032: event type EV_SYN(0x00).
51.850027: lirc protocol(rc6_mce): scancode = 0x800f0420 toggle=1
51.850064: event type EV_MSC(0x04): scancode = 0x800f0420
51.850064: event type EV_KEY(0x01) key_down: KEY_LEFT(0x0069)
51.850064: event type EV_SYN(0x00).
51.960027: lirc protocol(rc6_mce): scancode = 0x800f0420 toggle=1
51.960058: event type EV_MSC(0x04): scancode = 0x800f0420
51.960058: event type EV_SYN(0x00).
52.100037: event type EV_KEY(0x01) key_up: KEY_LEFT(0x0069)
52.100037: event type EV_SYN(0x00).
52.360029: lirc protocol(rc6_mce): scancode = 0x800f0421
52.360064: event type EV_MSC(0x04): scancode = 0x800f0421
52.360064: event type EV_KEY(0x01) key_down: KEY_RIGHT(0x006a)
52.360064: event type EV_SYN(0x00).
52.470026: lirc protocol(rc6_mce): scancode = 0x800f0421
52.470055: event type EV_MSC(0x04): scancode = 0x800f0421
52.470055: event type EV_SYN(0x00).
52.610031: event type EV_KEY(0x01) key_up: KEY_RIGHT(0x006a)
52.610031: event type EV_SYN(0x00).
52.990028: lirc protocol(rc6_mce): scancode = 0x800f0417 toggle=1
52.990071: event type EV_MSC(0x04): scancode = 0x800f0417
52.990071: event type EV_KEY(0x01) key_down: KEY_RECORD(0x00a7)
52.990071: event type EV_SYN(0x00).
53.090028: lirc protocol(rc6_mce): scancode = 0x800f0417 toggle=1
53.090057: event type EV_MSC(0x04): scancode = 0x800f0417
53.090057: event type EV_SYN(0x00).
53.230035: event type EV_KEY(0x01) key_up: KEY_RECORD(0x00a7)
53.230035: event type EV_SYN(0x00).
')
using lsmod to show the modules
$this->bbcode_second_pass_code('', '
[pi@pi ~]$ lsmod |grep ir
ir_rc6_decoder 16384 0
uio_pdrv_genirq 16384 0
gpio_ir_recv 16384 0
uio 20480 1 uio_pdrv_genirq
rc_core 40960 4 ir_rc6_decoder,rc_rc6_mce,gpio_ir_recv
drm_panel_orientation_quirks 16384 1 drm
')
lirc_options.config file
$this->bbcode_second_pass_code('', '[pi@pi ~]$ cat /etc/lirc/lirc_options.conf
# These are the default options to lircd, if installed as
# /etc/lirc/lirc_options.conf. See the lircd(8) and lircmd(8)
# manpages for info on the different options.
#
# Some tools including mode2 and irw uses values such as
# driver, device, plugindir and loglevel as fallback values
# in not defined elsewhere.

[lircd]
nodaemon = False
driver = devinput
device = auto
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 =
#listen = [address:]port
#connect = host[:port]
#loglevel = 6
#release = true
#release_suffix = _EVUP
#logfile = ...
#driver-options = ...

[lircmd]
uinput = False
nodaemon = False

# [modinit]
# code = /usr/sbin/modprobe lirc_serial
# code1 = /usr/bin/setfacl -m g:lirc:rw /dev/uinput
# code2 = ...


# [lircd-uinput]
# add-release-events = False
# release-timeout = 200
# release-suffix = _EVUP
')
config.txt file
$this->bbcode_second_pass_code('', '[pi@pi ~]$ cat /boot/config.txt
# See /boot/overlays/README for all available options

initramfs initramfs-linux.img followkernel
hdmi_drive=2
dtparam=audio=on
disable_overscan=1
#custom ir sensor pin location
dtoverlay=gpio-ir,gpio_pin=24
dtparam=i2c_arm=on

#enable vc4
gpu_mem=320
dtoverlay=vc4-fkms-v3d
max_framebuffers=2
dtparam=i2c_arm=on
')
$HOME/.kodi/userdata/keymaps/remote.xml
$this->bbcode_second_pass_code('', '[pi@pi keymaps]$ cat remote.xml
<keymap>
<Global>
<mouse>
<rightclick>Back</rightclick>
<middleclick>ContextMenu</middleclick>
</mouse>
<remote>
<play>PlayPause</play>
<pause>Pause</pause>
<stop>Stop</stop>
<forward>FastForward</forward>
<reverse>Rewind</reverse>
<left>Left</left>
<right>Right</right>
<up>Up</up>
<down>Down</down>
<select>Select</select>
<enter>FullScreen</enter>
<pageplus>PageUp</pageplus>
<pageminus>PageDown</pageminus>
<back>Back</back>
<menu>ContextMenu</menu>
<contentsmenu>PreviousMenu</contentsmenu>
<rootmenu>PreviousMenu</rootmenu>
<title>ContextMenu</title>
<info>Info</info>
<skipplus>SkipNext</skipplus>
<skipminus>SkipPrevious</skipminus>
<display>FullScreen</display>
<start>PreviousMenu</start>
<record>ContextMenu</record>
<eject>EjectTray()</eject>
<volumeplus>VolumeUp</volumeplus>
<volumeminus>VolumeDown</volumeminus>
<mute>ActivateWindow(Favourites)</mute>
<power>Exit()</power>
<myvideo>ActivateWindow(Videos)</myvideo>
<mymusic>ActivateWindow(Music)</mymusic>
<mypictures>ActivateWindow(Pictures)</mypictures>
<mytv>ActivateWindow(Videos,TvShows)</mytv>
<guide>ActivateWindow(TVGuide)</guide>
<livetv>ActivateWindow(TVChannels)</livetv>
<liveradio>ActivateWindow(RadioChannels)</liveradio>
<recordedtv>ActivateWindow(TVRecordings)</recordedtv>
<epgsearch>ActivateWindow(TVSearch)</epgsearch>
<red>ActivateWindow(TVChannels)</red>
<green>ActivateWindow(Videos)</green>
<yellow>ActivateWindow(Music)</yellow>
<blue>ActivateWindow(Pictures)</blue>
<zero>Number0</zero>
<one>Number1</one>
<two>JumpSMS2</two>
<three>JumpSMS3</three>
<four>JumpSMS4</four>
<five>JumpSMS5</five>
<six>JumpSMS6</six>
<seven>JumpSMS7</seven>
<eight>JumpSMS8</eight>
<nine>JumpSMS9</nine>
<print>Screenshot</print>
</remote>
<keyboard>
<r>ReloadSkin()</r>
</keyboard>
</Global>
<FullScreenVideo>
<touch>
<longpress>Back</longpress>
<swipe direction="left">StepBack</swipe>
<swipe direction="right">StepForward</swipe>
<swipe direction="up">VolumeUp</swipe>
<swipe direction="down">VolumeDown</swipe>
</touch>
<mouse>
<mousedrag>mousedrag</mousedrag>
<mousemove>mousemove</mousemove>
<wheeldown>VolumeDown</wheeldown>
<wheelup>VolumeUp</wheelup>
<rightclick>Back</rightclick>
<middleclick>Playlist</middleclick>
</mouse>
<keyboard>
<left>StepBack</left>
<right>StepForward</right>
<up mod="longpress">VolumeUp</up>
<up>VolumeUp</up>
<down mod="longpress">VolumeDown</down>
<down>VolumeDown</down>
<m>OSD</m>
</keyboard>
<remote>
<zero>Number0</zero>
<one>Number1</one>
<two>Number2</two>
<three>Number3</three>
<four>Number4</four>
<five>Number5</five>
<six>Number6</six>
<seven>Number7</seven>
<eight>Number8</eight>
<nine>Number9</nine>
<left>StepBack</left>
<right>StepForward</right><!--
<up>ChapterOrBigStepForward</up>
<down>ChapterOrBigStepBack</down>-->
<up>VolumeUp</up>
<down>VolumeDown</down>
<back>Back</back>
<menu>OSD</menu>
<contentsmenu>OSD</contentsmenu>
<rootmenu>OSD</rootmenu>
<start>OSD</start>
<select>OSD</select>
<title>PlayerProcessInfo</title>
<info>Info</info>
<guide>ActivateWindow(TVGuide)</guide>
<teletext>ActivateWindow(Teletext)</teletext>
<subtitle>NextSubtitle</subtitle>
<star>NextSubtitle</star>
<language>AudioNextLanguage</language>
<playlist>Playlist</playlist>
<hash>AudioNextLanguage</hash>
<pageplus>SkipNext</pageplus>
<pageminus>SkipPrevious</pageminus>
<record>Playlist</record>
</remote>
</FullScreenVideo>
<VideoMenu>
<touch>
<longpress>Back</longpress>
<swipe direction="left">StepBack</swipe>
<swipe direction="right">StepForward</swipe>
<swipe direction="up">VolumeUp</swipe>
<swipe direction="down">VolumeDown</swipe>
</touch>
<mouse>
<mousedrag>mousedrag</mousedrag>
<mousemove>mousemove</mousemove>
<wheeldown>VolumeDown</wheeldown>
<wheelup>VolumeUp</wheelup>
<rightclick>Back</rightclick>
</mouse>
<keyboard>
<left>Left</left>
<right>Right</right>
<up mod="longpress">VolumeUp</up>
<up>Up</up>
<down mod="longpress">VolumeDown</down>
<down>Down</down>
<m>OSD</m>
</keyboard>
<remote>
<menu>OSD</menu>
<contentsmenu>OSD</contentsmenu>
<rootmenu>OSD</rootmenu>
<info>Info</info>
<title>PlayerProcessInfo</title>
<zero>Number0</zero>
<one>Number1</one>
<two>Number2</two>
<three>Number3</three>
<four>Number4</four>
<five>Number5</five>
<six>Number6</six>
<seven>Number7</seven>
<eight>Number8</eight>
<nine>Number9</nine>
<play>Select</play>
<pageplus>SkipNext</pageplus>
<pageminus>SkipPrevious</pageminus>
<record>OSD</record>
</remote>
</VideoMenu>
<VideoOSD>
<touch>
<longpress>Back</longpress>
<swipe direction="left">StepBack</swipe>
<swipe direction="right">StepForward</swipe>
<swipe direction="up">VolumeUp</swipe>
<swipe direction="down">VolumeDown</swipe>
</touch>
<mouse>
<mousedrag>mousedrag</mousedrag>
<mousemove>mousemove</mousemove>
<wheeldown>VolumeDown</wheeldown>
<wheelup>VolumeUp</wheelup>
<middleclick>OSD</middleclick>
<rightclick>Back</rightclick>
</mouse>
<keyboard>
<left>Left</left>
<right>Right</right>
<up mod="longpress">VolumeUp</up>
<up>Up</up>
<down mod="longpress">VolumeDown</down>
<down>Down</down>
<m>OSD</m>
</keyboard>
<remote>
<menu>Back</menu>
<contentsmenu>Back</contentsmenu>
<rootmenu>Back</rootmenu>
<start>Back</start>
<record>Back</record>
</remote>
</VideoOSD>
<Visualisation>
<touch>
<longpress>Back</longpress>
<swipe direction="left">StepBack</swipe>
<swipe direction="right">StepForward</swipe>
<swipe direction="up">VolumeUp</swipe>
<swipe direction="down">VolumeDown</swipe>
</touch>
<mouse>
<mousedrag>mousedrag</mousedrag>
<mousemove>mousemove</mousemove>
<wheeldown>VolumeDown</wheeldown>
<wheelup>VolumeUp</wheelup>
<rightclick>Back</rightclick>
</mouse>
<remote>
<left>StepBack</left>
<right>StepForward</right>
<up>SkipNext</up>
<down>SkipPrevious</down>
<pageplus>IncreaseRating</pageplus>
<pageminus>DecreaseRating</pageminus>
<back>Back</back>
<title>PlayerProcessInfo</title>
<select>OSD</select>
<menu>OSD</menu>
<contentsmenu>OSD</contentsmenu>
<rootmenu>OSD</rootmenu>
<start>OSD</start>
<info>Info</info>
<guide>ActivateWindow(TVGuide)</guide>
<playlist>ActivateWindow(PVROSDChannels)</playlist>
<zero>Number0</zero>
<one>Number1</one>
<two>Number2</two>
<three>Number3</three>
<four>Number4</four>
<five>Number5</five>
<six>Number6</six>
<seven>Number7</seven>
<eight>Number8</eight>
<nine>Number9</nine>
<record>OSD</record>
</remote>
</Visualisation>
<MusicOSD>
<mouse>
<mousedrag>mousedrag</mousedrag>
<mousemove>mousemove</mousemove>
<wheeldown>VolumeDown</wheeldown>
<wheelup>VolumeUp</wheelup>
<rightclick>Back</rightclick>
</mouse>
</MusicOSD>
</keymap>
')
$HOME/.kodi/userdata/Lircmap.xml
$this->bbcode_second_pass_code('', '[pi@pi userdata]$ cat Lircmap.xml
<?xml version="1.0" encoding="UTF-8"?>
<lircmap>
<remote device="devinput-32">
<left>KEY_LEFT</left>
<right>KEY_RIGHT</right>
<up>KEY_UP</up>
<down>KEY_DOWN</down>
<select>KEY_OK</select>
<enter>KEY_ENTER</enter>
<clear>KEY_DELETE</clear>
<start>KEY_MEDIA</start>
<back>KEY_EXIT</back>
<record>KEY_RECORD</record>
<play>KEY_PLAY</play>
<pause>KEY_PAUSE</pause>
<stop>KEY_STOP</stop>
<forward>KEY_FASTFORWARD</forward>
<reverse>KEY_REWIND</reverse>
<volumeplus>KEY_VOLUMEUP</volumeplus>
<volumeminus>KEY_VOLUMEDOWN</volumeminus>
<pageplus>KEY_CHANNELUP</pageplus>
<pageminus>KEY_CHANNELDOWN</pageminus>
<skipplus>KEY_NEXT</skipplus>
<skipminus>KEY_PREVIOUS</skipminus>
<title>KEY_EPG</title>
<mute>KEY_MUTE</mute>
<power>KEY_POWER</power>
<power>KEY_SLEEP</power>
<menu>KEY_DVD</menu>
<menu>KEY_MENU</menu>
<one>KEY_NUMERIC_1</one>
<two>KEY_NUMERIC_2</two>
<three>KEY_NUMERIC_3</three>
<four>KEY_NUMERIC_4</four>
<five>KEY_NUMERIC_5</five>
<six>KEY_NUMERIC_6</six>
<seven>KEY_NUMERIC_7</seven>
<eight>KEY_NUMERIC_8</eight>
<nine>KEY_NUMERIC_9</nine>
<zero>KEY_NUMERIC_0</zero>
<star>KEY_NUMERIC_STAR</star>
<hash>KEY_NUMERIC_POUND</hash>
</remote>
</lircmap>
')
plz any other information to provide in order to sort this out... thank you in advance!!
Last edited by qaron on Thu Jul 23, 2020 7:32 am, edited 1 time in total.
qaron
 
Posts: 13
Joined: Mon Dec 23, 2019 8:04 am

Re: kodi+lirc+remote broken only after kodi starts

Postby qaron » Thu Jul 16, 2020 2:45 pm

to be clear remote is working but some buttons like KEY_OK is NOT WORKING...
it seems that kodi is not reading lirc/remote configuration either from rc_maps.cfg either Lircmap.xml located inside ${HOME}/.kodi/userdata/Lircmap.xml
qaron
 
Posts: 13
Joined: Mon Dec 23, 2019 8:04 am


Return to General

Who is online

Users browsing this forum: No registered users and 11 guests