[Solved] Ubuntu 18.04 with HK's remote lircd issue

Moderators: odroid, mdrjr

[Solved] Ubuntu 18.04 with HK's remote lircd issue

Unread postby chombier » Tue Oct 09, 2018 3:51 am

Hello,

I'm trying to use the Hardkernel's remote control with my C2 upgraded with Ubuntu 18.04, and have some issues.

I followed the steps explained at https://wiki.odroid.com/odroid-c2/appli ... ntu18.04?s[]=lircd

First, it seems that the lines in the wiki that contains:
Code: Select all
[modinit]
code = /sbin/modprobe meson-ir

Doesn't work.

I had to add meson-ir to /etc/modules, not sure why ?

After doing this, using irw, I could see some remote control events:
Code: Select all
000000004db253ac 00 KEY_UP odroid
000000004db24bb4 00 KEY_DOWN odroid
000000004db29966 00 KEY_LEFT odroid
000000004db2837c 00 KEY_RIGHT odroid


But when these events match some system events such as volume up/down or power down, they are repeated in an endless loop.
I had to kill the lircd service to stop this.

Googling about this gave no clue but 18.04 infrared is bad, whatever the platform. :(

Has anyone used the remote control on Ubuntu 18.04 yet ?
Last edited by chombier on Thu Oct 11, 2018 1:49 am, edited 1 time in total.
chombier
 
Posts: 15
Joined: Sun Feb 18, 2018 10:13 pm
languages_spoken: english, french
ODROIDs: C2,HC1,HC2

Re: Ubuntu 18.04 with HK's remote lircd issue

Unread postby joy » Wed Oct 10, 2018 1:46 pm

Hi. chombier,

Could you share the following files under /etc/lirc/ of your C2?

1. /etc/lirc/lirc_options.conf
2. /etc/lirc/lircd.conf.d/hk.lircd.conf

And after system reboot, please check if lirc0 node exists under /dev/. (/dev/lirc0)
joy
 
Posts: 590
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Ubuntu 18.04 with HK's remote lircd issue

Unread postby chombier » Wed Oct 10, 2018 3:47 pm

Here's the files:

/etc/lirc/lirc_options.conf:
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
# 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


/etc/lirc/lircd.conf.d/hk.lircd.conf :
Code: Select all
begin remote
 
name odroid
bits 16
flags SPACE_ENC|CONST_LENGTH
eps  30
aeps 100
 
header 9000 4500
one 563 1688
zero 563 564
ptrail 563
pre_data_bits 16
pre_data 0x4DB2
repeat 9000 2250
gap 100000
toggle_bit_mask 0x0
    begin codes
        KEY_LEFT  0x9966
        KEY_RIGHT  0x837C
        KEY_UP  0x53AC
        KEY_DOWN  0x4BB4
        KEY_ENTER  0x738C
        KEY_HOME  0x41BE
        KEY_MUTE  0x11EE
        KEY_MENU  0xA35C
        KEY_BACK  0x59A6
        KEY_VOLUMEDOWN  0x817E
        KEY_VOLUMEUP  0x01FE
        KEY_POWER  0x3BC4
    end codes
end remote


And after system reboot, the device /dev/lird0 was missing, I had to add the meson-ir module into /etc/modules to have it loaded.
Now, it's always there.
Code: Select all
$ ls -l /dev/lirc0
crw-rw---- 1 root video 231, 0 Jan 28  2018 /dev/lirc0
chombier
 
Posts: 15
Joined: Sun Feb 18, 2018 10:13 pm
languages_spoken: english, french
ODROIDs: C2,HC1,HC2

Re: Ubuntu 18.04 with HK's remote lircd issue

Unread postby joy » Wed Oct 10, 2018 6:38 pm

chombier wrote:And after system reboot, the device /dev/lird0 was missing, I had to add the meson-ir module into /etc/modules to have it loaded.
Now, it's always there.
Code: Select all
$ ls -l /dev/lirc0
crw-rw---- 1 root video 231, 0 Jan 28  2018 /dev/lirc0


If all configurations are set normally, you don't need to add "meson-ir" on module list manually.
It's loaded automatically during lirc-related services running.

And I found what was wrong. :)
Please remove "#" characters
(1) in front of the line [modinit] in /etc/lirc/lirc_options.conf
(2) in front of the line [lircd-uinput] in /etc/lirc/lirc_options.conf.

[modinit] and [lircd-uinput] lines are not annotations to define the block.
lirc service refers to the line to judge if related component should be execute.

** Wrong one
Code: Select all
# [modinit]  <<<<<<------------- here
code = /sbin/modprobe meson-ir

Code: Select all
# [lircd-uinput] <<<<<<<------------ here
add-release-events = False
release-timeout    = 200
release-suffix     = _EVUP


** Correct one
Code: Select all
[modinit]
code = /sbin/modprobe meson-ir

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


Here is a correct full example.
Code: Select all
[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
 
[lircd-uinput]
add-release-events = True
release-timeout    = 50
release-suffix     = _EVUP


Then it will work normally without manual module load for meson-ir
and you will have /dev/lirc0 node automatically.

Please try it and share the result.
joy
 
Posts: 590
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X

Re: Ubuntu 18.04 with HK's remote lircd issue

Unread postby chombier » Wed Oct 10, 2018 7:22 pm

Oops. My bad. Will try this fix when I'm back home tonight. Thanks !
chombier
 
Posts: 15
Joined: Sun Feb 18, 2018 10:13 pm
languages_spoken: english, french
ODROIDs: C2,HC1,HC2

Re: Ubuntu 18.04 with HK's remote lircd issue

Unread postby chombier » Thu Oct 11, 2018 1:47 am

Hi Joy,

It's much better with a correct configuration file.
Since the entry [lircd-uinput] was not correct, there was no "add-release-events = True", which explains why the event was repeatedly processed.
Everything works fine now.

Thanks again.
chombier
 
Posts: 15
Joined: Sun Feb 18, 2018 10:13 pm
languages_spoken: english, french
ODROIDs: C2,HC1,HC2

Re: [Solved] Ubuntu 18.04 with HK's remote lircd issue

Unread postby joy » Thu Oct 11, 2018 10:12 am

Hi chombier,
Thank you for sharing the result.
Glad to hear that it works now. :D
joy
 
Posts: 590
Joined: Fri Oct 02, 2015 1:44 pm
languages_spoken: english
ODROIDs: ODROID-C1+, XU4, X


Return to Issues

Who is online

Users browsing this forum: No registered users and 2 guests