Posts by HiassofT

    The ir-ctl code 0x0304 looks about right, this is also the same code I'm seeing when testing with your lircd.conf file.

    lirc however sends the signal 2 times (because of min_repeat 1). With ir-ctl you have to use a gap of about 90000 to get identical timing (rc5 has a fixed signal length of about 25ms and repeats every 114ms)

    Code
    ir-ctl -g 90000 -S rc5:0x304 -S rc5:0x304

    Converting between lirc codes and ir-ctl ones is a bit tricky. Lirc uses a raw representation of the received bits and ir-ctl a "logical" one - which means bit positions are shuffled around a bit or, like with the sony protocol, also in reversed order.

    Actually, 0x304 in ir-ctl is the same as 0x10c4 in lirc, except for the toggle bit (which changes on every other button press and IIRC can't currently be changed in ir-ctl)

    so long,

    Hias

    EV_MSC / scancode events are decoded IR signals, you get these whenever an ir signal is successfully received.

    Usually you also get EV_KEY (keyup/down) events - see the wiki page for details infrared_remotes [LibreELEC]

    If you see EV_KEY and EV_MSC for working buttons but nothing at all for the non-working ones something very odd is going on.

    In that case also check with "ir-ctl -r" (or mode2) if any signals are received at all.

    BTW: what kind of remote (manufacturer, model) are you using?

    so long,

    Hias

    Here's the link to the testbuild:

    LibreELEC-RPi2.arm-8.2-devel-20171130133422-r26229-ga24418465c.tar

    ir-ctl doesn't to any automatic repeat handling, it just transmits each scancode once.

    With the new version you can specify the delay (gap) between signal transmits on the command line. It should be about 25000.

    To send out 3 repeats with 25ms inbetween do this:

    Code
    ir-ctl -g 25000 -S sony12:0x100015 -S sony12:0x100015 -S sony12:0x100015

    You can also store scancodes in a file, like this:

    Code
    LibreELEC:~ # cat sony-power.irctl
    scancode sony12:0x100015
    scancode sony12:0x100015
    scancode sony12:0x100015


    and transmit that with ir-ctl

    Code
    ir-ctl -g 25000 -s sony-power.irctl

    As an alternative you can specify the delay between scancodes in the file

    Code
    scancode sony12:0x100015
    space 25000
    scancode sony12:0x100015
    space 25000
    scancode sony12:0x100015

    In that case the -g option of ir-ctl is not needed

    One thing to keep in mind is that when sending a file all of it will be transmitted in a single call - and you can run into the limit of the lirc device. When using -s or -S multiple times each of the scancodes / files are transmitted in separate calls, so you don't run into the limits that easily.

    so long,

    Hias

    Thanks for the info, it could well be that the lirc hanging-bug causes it to somehow see and decode it's own signals.

    If that's the case you could try to disable the lircd-uinput service. This'll prevent the decoded signals to reach kodi, but it also means that controlling kodi via IR remote is no longer possible:

    Code
    systemctl mask lircd-uinput

    To re-enable lircd-uinput use "systemctl unmask lircd-uinput".

    Composing the sony scancodes for irctl is rather simple: the scancode is a 6-digit hex number, the first 2 digits are the device address (00-1f for sony12, 00-ff for sony15), next 2 digits are 00 (IIRC they'd be the 5 highest address bits in sony20) and the last 2 digits are the command (00-7f).

    So the KEY_POWER scancode I used for testing, 0x100015 means device address 0x10 (16 decimal) and command 0x15 (21 decimal).

    Just play around with the last 2 (command) digits, seems the first table on that webpage (sony 16) is the correct one for your receiver.

    BTW: Sean sent me a fix for ir-ctl and it's now also easier to send repeated commands. Which system are you using? If it's RPi2/3 I could upload you a 8.2.1 build with the fix included for testing.

    so long,

    Hias

    I could reproduce the hang, it seems to be caused by the combination of using repeats and invoking irsend quickly after each other. When I waited a bit beween irsend starts (fractions of a second were usually enough) it worked fine.

    This seems to be a lirc bug, and I could reproduce it also in the latest lirc version (0.10.1). I've opened a bug report here:

    LIRC / Tickets / #315 irsend / lircd hang when using repeats

    BTW: ir-ctl also seems to have issues (though different ones) when trying to send repeated signals. I reported that here [BUG] ir-ctl: error sending file with multiple scancodes

    so long,

    Hias

    I got this lockup, too, once during tests. IIRC it happened when I started another irsend on command line immediately after a previous irsend. Not really sure though, I'll try to look into it and see if I can reproduce.

    As for LE seeing the sent signals: have you disabled in-kernel decoding (create an empty /storage/.config/rc-maps.cfg file)? When you run ir-keytable you should see only "lirc" under enabled protocols.

    Maybe lirc is "seeing" it's own transmitted signals, in that case renaming the buttons (so they don't start with KEY_) looks like a good workaround.

    so long,

    Hias

    How exactly did you repeat sending the signal, did you run irsend multiple times? What was min_repeat set to in the lircd conf when you did that?

    Using min_repeat in lircd and -# with irsend should have the same effect. So it's a bit puzzling what's going on.

    Could you try changing the gap value? Try both lower (eg 30000, 40000) and higher (eg 50000, 60000) values and also use min_repeat 3 or higher (or -# 3 etc). This affects the time between signal repeats, maybe the signals are sent too quickly after each other or too fast.

    so long,

    Hias

    You may need to enable the "wait for network online" option in LE Settings -> Network.

    If the network configuration (DHCP etc) takes too long the LE update and addon update checks running on Kodi startup can run into network errors because the net isn't up - if this is happening it should be logged in kodi.log.

    so long,

    Hias

    Thanks for posting the lircd.conf file, it looks OK to me.

    I have it a try with lircd 0.9.0 (as used in OE 4.0) and 0.9.4d and was able to transmit IR signals. I don't have any sony receiver, but checking with another RPi using ir-keytable -t I saw that with both versions identical scancodes (0x100015) were received.

    The signal timing isn't 100% accurate (typical when irrecord is used without templates), here's a cleaned up version:

    With this file signal timing is identical to what my universal remote generates (and what's typical for the sony IR protocol) - verified with my scope hooked up to the IR receiver.

    One thing I noticed in your lircd.conf file is that the RM-U305_func remote has min_repeat set to 3 - so lirc will repeat the signal 3 times when sending. It's not uncommon that devices require the power button on the remote to be pressed for a longer time to wake up.

    So, could you try if it works when you transmit the power button 3-10 times? eg

    Code
    irsend -d /run/lirc/lircd.socket -# 5 SEND_ONCE Sony-RM-U305A KEY_POWER

    so long,

    Hias