[SOLVED] Problems with HK remote and Kodi

Moderators: mdrjr, odroid

[SOLVED] Problems with HK remote and Kodi

Unread postby jason_a69 » Wed Aug 08, 2018 5:55 pm

Hi all

I have set my remote up as per this wiki
https://wiki.odroid.com/odroid-c2/appli ... ntu18.04?s[]=ir&s[]=remote

I had to add this line into /etc/modules/ so that the on-board infrared device is detected at startup.
meson-ir

Now I am having problems with Kodi, every time I press a button it detects it but it repeats it and goes into a bit of a loop.

I am using Ubuntu 18.04.1 LTS

Any advice is appreciated.

Thanks

Jason
jason_a69
 
Posts: 17
Joined: Tue Jul 31, 2018 1:22 pm
languages_spoken: english

Re: Problems with HK remote and Kodi

Unread postby jason_a69 » Wed Aug 08, 2018 9:47 pm

From this command

Code: Select all
for i in /sys/class/input/input* ; do echo -n "$(basename "$i"): "; cat "$i/name"; done


I get
Code: Select all
input0: cec_input
input1: vt-input
input2: meson-ir
input3: MCE IR Keyboard/Mouse (meson-ir)
input4: lircd-uinput


So meson-ir is detected twice which I think may have something to do with the problem.
jason_a69
 
Posts: 17
Joined: Tue Jul 31, 2018 1:22 pm
languages_spoken: english

Re: Problems with HK remote and Kodi

Unread postby odroid » Wed Aug 08, 2018 10:15 pm

Can you show me your /etc/lirc/lirc_options.conf file?
User avatar
odroid
Site Admin
 
Posts: 28510
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Problems with HK remote and Kodi

Unread postby jason_a69 » Wed Aug 08, 2018 10:48 pm

odroid wrote:Can you show me your /etc/lirc/lirc_options.conf file?


Sure

Code: Select all
# 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          = default
device          = /dev/lirc0
output          = /var/run/lirc/lircd
pidfile         = /var/run/lirc/lircd.pid
plugindir       = /usr/lib/aarch64-linux-gnu/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 = /sbin/modprobe meson-ir
# code1 = /usr/bin/setfacl -m g:lirc:rw /dev/uinput
# code2 = ...


# [lircd-uinput]
add-release-events = True
release-timeout    = 50
release-suffix     = _EVUP
jason_a69
 
Posts: 17
Joined: Tue Jul 31, 2018 1:22 pm
languages_spoken: english

Re: Problems with HK remote and Kodi

Unread postby odroid » Thu Aug 09, 2018 9:59 am

It looks ok.
But the meson-ir driver should be loaded automatically if the lircd service started properly.

Can you check the lirc daemon status?
https://wiki.odroid.com/odroid-c2/application_note/lirc/lirc_ubuntu18.04#how_to_test
User avatar
odroid
Site Admin
 
Posts: 28510
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID

Re: Problems with HK remote and Kodi

Unread postby jason_a69 » Thu Aug 09, 2018 12:16 pm

odroid wrote:It looks ok.
But the meson-ir driver should be loaded automatically if the lircd service started properly.

Can you check the lirc daemon status?
https://wiki.odroid.com/odroid-c2/application_note/lirc/lirc_ubuntu18.04#how_to_test


When mason-ir loaded manually

Code: Select all
root@odroid:~# more /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
meson-ir

root@odroid:~# ps -ax | grep lirc
  556 ?        Ss     0:00 /usr/sbin/lircmd --nodaemon
  576 ?        Ss     0:00 /usr/bin/irexec /etc/lirc/irexec.lircrc
  696 ?        Ss     0:00 /usr/sbin/lircd --nodaemon
  702 ?        Ss     0:00 /usr/sbin/lircd-uinput
 1812 pts/0    S+     0:00 grep --color=auto lirc
root@odroid:~# lsmod
Module                  Size  Used by
fuse                   91055  3
squashfs               32371  0
joydev                 11035  0
w1_gpio                 3801  0
wire                   28606  1 w1_gpio
meson_gpiomem           4048  0
gxbb_wdt                3395  0
sch_fq_codel            7827  2
ir_lirc_codec           4934  3
lirc_dev               10879  1 ir_lirc_codec
ir_mce_kbd_decoder      3402  0
ir_sanyo_decoder        1657  0
ir_sony_decoder         1663  0
ir_rc5_decoder          1586  0
ir_rc6_decoder          2010  0
ir_jvc_decoder          1725  0
ir_nec_decoder          1789  0
meson_ir                3356  0
ip_tables              17220  0
ipv6                  387345  40
autofs4                27592  2


When taken out
Code: Select all
root@odroid:~# more /etc/modules
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.
#meson-ir

root@odroid:~# ps -ax | grep lirc
  560 ?        Ss     0:00 /usr/bin/irexec /etc/lirc/irexec.lircrc
  568 ?        Ss     0:00 /usr/sbin/lircmd --nodaemon
  679 ?        Ss     0:00 /usr/sbin/lircd --nodaemon
  680 ?        Ss     0:00 /usr/sbin/lircd-uinput
 1777 pts/0    S+     0:00 grep --color=auto lirc
root@odroid:~# lsmod
Module                  Size  Used by
fuse                   91055  3
squashfs               32371  0
joydev                 11035  0
w1_gpio                 3801  0
wire                   28606  1 w1_gpio
meson_gpiomem           4048  0
gxbb_wdt                3395  0
sch_fq_codel            7827  2
ip_tables              17220  0
ipv6                  387345  40
autofs4                27592  2


When it's taken out, the remote does not work at all
Code: Select all
root@odroid:~# service lircd status
● lircd.service - Flexible IR remote input/output application support
   Loaded: loaded (/lib/systemd/system/lircd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-01-28 23:58:22 CST; 6 months 9 days ago
     Docs: man:lircd(8)
           http://lirc.org/html/configure.html
 Main PID: 679 (lircd)
   CGroup: /system.slice/lircd.service
           └─679 /usr/sbin/lircd --nodaemon

Aug 09 11:14:43 odroid lircd-0.10.0[679]: Error: could not get file information for /dev/lirc0
Aug 09 11:14:43 odroid lircd-0.10.0[679]: default_init(): No such file or directory
Aug 09 11:14:44 odroid lircd[679]: lircd-0.10.0[679]: Error: could not get file information for /dev/lirc0
Aug 09 11:14:44 odroid lircd[679]: lircd-0.10.0[679]: default_init(): No such file or directory
Aug 09 11:14:44 odroid lircd-0.10.0[679]: Error: could not get file information for /dev/lirc0
Aug 09 11:14:44 odroid lircd-0.10.0[679]: default_init(): No such file or directory
Aug 09 11:14:45 odroid lircd[679]: lircd-0.10.0[679]: Error: could not get file information for /dev/lirc0
Aug 09 11:14:45 odroid lircd[679]: lircd-0.10.0[679]: default_init(): No such file or directory
Aug 09 11:14:45 odroid lircd-0.10.0[679]: Error: could not get file information for /dev/lirc0
Aug 09 11:14:45 odroid lircd-0.10.0[679]: default_init(): No such file or directory
root@odroid:~# service lircd-uinput status
● lircd-uinput.service - Forward LIRC button presses as uinput events
   Loaded: loaded (/lib/systemd/system/lircd-uinput.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-01-28 23:58:22 CST; 6 months 9 days ago
     Docs: man:lircd-uinput(8)
           http://lirc.org/html/configure.html
 Main PID: 680 (lircd-uinput)
   CGroup: /system.slice/lircd-uinput.service
           └─680 /usr/sbin/lircd-uinput

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
root@odroid:~# service lircmd status
● lircmd.service - Convert IR remotes button presses to mouse movements and clicks
   Loaded: loaded (/lib/systemd/system/lircmd.service; enabled; vendor preset: enabled)
   Active: active (running) since Sun 2018-01-28 23:58:21 CST; 6 months 9 days ago
     Docs: man:lircmd(8)
           http://lirc.org/html/configure.html
 Main PID: 568 (lircmd)
   CGroup: /system.slice/lircmd.service
           └─568 /usr/sbin/lircmd --nodaemon

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
jason_a69
 
Posts: 17
Joined: Tue Jul 31, 2018 1:22 pm
languages_spoken: english

Re: Problems with HK remote and Kodi

Unread postby joy » Thu Aug 09, 2018 4:17 pm

Hi jason_a69,

About the issue that you should load meson-ir manually,
you need to remove "#" in the following lines of /etc/lirc/lirc_options.conf.
Please uncomment the lines and then restart lircd and lircd-uinput services.

1. [modinit]
Code: Select all
[modinit]
code = /sbin/modprobe meson-ir

2. [lircd-uinput]
Code: Select all
[lircd-uinput]
add-release-events = True
release-timeout    = 50
release-suffix     = _EVUP

- /etc/lirc/lirc_options.conf
https://wiki.odroid.com/odroid-c2/appli ... _odroid-c2

Code: Select all
$ sudo service lircd restart
$ sudo service lircd-uinput restart

Could you check if lirc works normally without additional operations?

And about the repeat issue with Kodi, also please check with the correct lirc_options.conf.
Then let me know the result.
As I checked it with Kodi, it looks OK.
joy
 
Posts: 494
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Problems with HK remote and Kodi

Unread postby joy » Thu Aug 09, 2018 4:33 pm

And if you want to adjust a button release time, please change the value of this line in /etc/lirc/lirc_options.conf.
Code: Select all
release-timeout    = 50

As I test, the value 50 is suitable with hardkernel IR remote controller. :)
joy
 
Posts: 494
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Problems with HK remote and Kodi

Unread postby jason_a69 » Thu Aug 09, 2018 4:43 pm

joy wrote:Hi jason_a69,

About the issue that you should load meson-ir manually,
you need to remove "#" in the following lines of /etc/lirc/lirc_options.conf.
Please uncomment the lines and then restart lircd and lircd-uinput services.

1. [modinit]
Code: Select all
[modinit]
code = /sbin/modprobe meson-ir

2. [lircd-uinput]
Code: Select all
[lircd-uinput]
add-release-events = True
release-timeout    = 50
release-suffix     = _EVUP

- /etc/lirc/lirc_options.conf
https://wiki.odroid.com/odroid-c2/appli ... _odroid-c2

Code: Select all
$ sudo service lircd restart
$ sudo service lircd-uinput restart

Could you check if lirc works normally without additional operations?

And about the repeat issue with Kodi, also please check with the correct lirc_options.conf.
Then let me know the result.
As I checked it with Kodi, it looks OK.


Hi,

Thanks for your suggestions but those lines in the configuration files are not commented out, they do not have a "#" in front of them.

If I do not add meson-ir in /etc/modules then /dev/lirc0 is not created at boot time so the lircd & lircd-uinput services fail to start. The /sbin/modprobe line in /etc/lirc/lirc_options.conf is not working.
jason_a69
 
Posts: 17
Joined: Tue Jul 31, 2018 1:22 pm
languages_spoken: english

Re: Problems with HK remote and Kodi

Unread postby jason_a69 » Thu Aug 09, 2018 4:50 pm

joy wrote:And if you want to adjust a button release time, please change the value of this line in /etc/lirc/lirc_options.conf.
Code: Select all
release-timeout    = 50

As I test, the value 50 is suitable with hardkernel IR remote controller. :)


I tried to set that to 150 and Kodi is still acting crazy! :lol:
jason_a69
 
Posts: 17
Joined: Tue Jul 31, 2018 1:22 pm
languages_spoken: english

Re: Problems with HK remote and Kodi

Unread postby joy » Thu Aug 09, 2018 4:51 pm

As I checked your lirc_options.conf, two lines in your conf file has "#".
-> [modinit]
-> [lircd-uinput]

Code: Select all
# [modinit]
code = /sbin/modprobe meson-ir

# [lircd-uinput]
add-release-events = True
release-timeout    = 50
release-suffix     = _EVUP

You mean you already modified it, right?
joy
 
Posts: 494
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Problems with HK remote and Kodi

Unread postby jason_a69 » Thu Aug 09, 2018 4:57 pm

jason_a69 wrote:
odroid wrote:Can you show me your /etc/lirc/lirc_options.conf file?


Sure

Code: Select all
# 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          = default
device          = /dev/lirc0
output          = /var/run/lirc/lircd
pidfile         = /var/run/lirc/lircd.pid
plugindir       = /usr/lib/aarch64-linux-gnu/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 = /sbin/modprobe meson-ir
# code1 = /usr/bin/setfacl -m g:lirc:rw /dev/uinput
# code2 = ...


# [lircd-uinput]
add-release-events = True
release-timeout    = 50
release-suffix     = _EVUP


They did not have # in them but thanks for looking.
jason_a69
 
Posts: 17
Joined: Tue Jul 31, 2018 1:22 pm
languages_spoken: english

Re: Problems with HK remote and Kodi

Unread postby joy » Thu Aug 09, 2018 5:01 pm

jason_a69 wrote:
jason_a69 wrote:
odroid wrote:Can you show me your /etc/lirc/lirc_options.conf file?


Sure

Code: Select all
# 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          = default
device          = /dev/lirc0
output          = /var/run/lirc/lircd
pidfile         = /var/run/lirc/lircd.pid
plugindir       = /usr/lib/aarch64-linux-gnu/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 = /sbin/modprobe meson-ir
# code1 = /usr/bin/setfacl -m g:lirc:rw /dev/uinput
# code2 = ...


# [lircd-uinput]
add-release-events = True
release-timeout    = 50
release-suffix     = _EVUP


They did not have # in them but thanks for looking.


??? They have....
Code: Select all
# [modinit]

Code: Select all
# [lircd-uinput]


To confirm it, I've tried your conf file
and I got the same result as yours that meson-ir module doesn't load and /dev/lirc0 is not generated.
joy
 
Posts: 494
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Problems with HK remote and Kodi

Unread postby jason_a69 » Thu Aug 09, 2018 5:09 pm

joy wrote:
jason_a69 wrote:
jason_a69 wrote:
odroid wrote:Can you show me your /etc/lirc/lirc_options.conf file?


Sure

Code: Select all
# 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          = default
device          = /dev/lirc0
output          = /var/run/lirc/lircd
pidfile         = /var/run/lirc/lircd.pid
plugindir       = /usr/lib/aarch64-linux-gnu/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 = /sbin/modprobe meson-ir
# code1 = /usr/bin/setfacl -m g:lirc:rw /dev/uinput
# code2 = ...


# [lircd-uinput]
add-release-events = True
release-timeout    = 50
release-suffix     = _EVUP


They did not have # in them but thanks for looking.


??? They have....
Code: Select all
# [modinit]

Code: Select all
# [lircd-uinput]


Aaaaaaghhh! The [modinit] & [lircd-uinput] lines :o ! Got you ... just did a test and that seems to be ok now. Thanks again.
jason_a69
 
Posts: 17
Joined: Tue Jul 31, 2018 1:22 pm
languages_spoken: english

Re: Problems with HK remote and Kodi

Unread postby joy » Thu Aug 09, 2018 5:12 pm

Right~
Thanks for confirming it. :)
Is it OK with Kodi now?
joy
 
Posts: 494
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Problems with HK remote and Kodi

Unread postby jason_a69 » Thu Aug 09, 2018 5:16 pm

joy wrote:Right~
Thanks for confirming it. :)
Is it OK with Kodi now?


Kodi is good, a slight adjustment with this for me
Code: Select all
release-timeout    = 200
jason_a69
 
Posts: 17
Joined: Tue Jul 31, 2018 1:22 pm
languages_spoken: english

Re: Problems with HK remote and Kodi

Unread postby joy » Thu Aug 09, 2018 5:21 pm

Thank you for sharing it.
Glad to hear that~ :D
I will reinforce related wiki page so that users won't be confused.
joy
 
Posts: 494
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Problems with HK remote and Kodi

Unread postby jason_a69 » Thu Aug 09, 2018 5:22 pm

joy wrote:Thank you for sharing it.
Glad to hear that~ :D
I will reinforce related wiki page so that users won't be confused.


I don't think you need to change Wiki page, it was my mistake :?
jason_a69
 
Posts: 17
Joined: Tue Jul 31, 2018 1:22 pm
languages_spoken: english

Re: [SOLVED] Problems with HK remote and Kodi

Unread postby joy » Thu Aug 09, 2018 5:59 pm

It's totally understandable that you edited the conf file as it was.
Actually, I was confused it. too. ;)
Just a tiny part about "release-timeout" adjustment has been added.
joy
 
Posts: 494
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X


Return to Ubuntu

Who is online

Users browsing this forum: No registered users and 3 guests