You are not logged in.

#1 2016-12-14 03:59:04

thenextdon13
Member
Registered: 2013-01-18
Posts: 58

CIR issues with NUC6i3SYB / ITE8713

Hello, I'm trying to get lirc working with the built in IR sensor on a NUC6i3SYB

From what I've read, with the correct kernel driver for the hardware loaded,I should be able to see input via the /dev/input/event* or /dev/lirc0 devices using one of a number of tools including cat, ir-keytable, mode2, od, and irrecord.

It seems like the /dev/input/event* interfaces don't require lircd running even, as they are a hook into the kernel, is this correct?

First, some information about  the machine and showing dmesg load of modules...

[dylan@kodiarch ~]$ uname -a
Linux kodiarch 4.8.13-1-ARCH #1 SMP PREEMPT Fri Dec 9 07:24:34 CET 2016 x86_64 GNU/Linux
[dylan@kodiarch ~]$ dmesg | grep -i -e lirc -e cir -e 8713
[    0.591655] pnp 00:01: Plug and Play ACPI device, IDs ITE8713 (active)
[    1.487546] ite_cir: Auto-detected model: ITE8713 CIR transceiver
[    1.487547] ite_cir: Using model: ITE8713 CIR transceiver
[    1.487548] ite_cir: TX-capable: 1
[    1.487549] ite_cir: Sample period (ns): 8680
[    1.487550] ite_cir: TX carrier frequency (Hz): 38000
[    1.487551] ite_cir: TX duty cycle (%): 33
[    1.487551] ite_cir: RX low carrier frequency (Hz): 0
[    1.487552] ite_cir: RX high carrier frequency (Hz): 0
[    1.516050] input: ITE8713 CIR transceiver as /devices/virtual/rc/rc0/input3
[    1.516078] rc rc0: ITE8713 CIR transceiver as /devices/virtual/rc/rc0
[    1.516301] ite_cir: driver has been successfully loaded
[    1.645949] lirc_dev: IR Remote Control driver registered, major 243
[    1.646498] rc rc0: lirc_dev: driver ir-lirc-codec (ite-cir) registered at minor = 0
[    1.646500] IR LIRC bridge handler initialized
[    1.718713] Bluetooth: L2CAP socket layer initialized
[dylan@kodiarch ~]$

And the loaded modules related to lir and cir:

[dylan@kodiarch ~]$ sudo lsmod | grep -i -e lir -e cir
ir_lirc_codec          16384  0
lirc_dev               20480  1 ir_lirc_codec
ite_cir                24576  0
rc_core                24576  10 ir_rc6_decoder,ir_nec_decoder,ir_sony_decoder,rc_rc6_mce,ir_lirc_codec,ite_cir,lirc_dev,ir_jvc_decoder,ir_rc5_decoder
[dylan@kodiarch ~]$

And a look at the associations that ir-keytable handily shows wrt driver usage and input device:

[dylan@kodiarch ~]$ sudo ir-keytable
Found /sys/class/rc/rc0/ (/dev/input/event3) with:
        Driver ite-cir, table rc-rc6-mce
        Supported protocols: unknown other lirc rc-5 jvc sony nec sanyo mce-kbd rc-6 sharp xmp
        Enabled protocols: other lirc rc-5 jvc sony nec rc-6
        Name: ITE8713 CIR transceiver
        bus: 25, vendor/product: 1283:0000, version: 0x0000
        Repeat delay = 500 ms, repeat period = 125 ms
[dylan@kodiarch ~]$

I'm trying to use the stock remote for my Harmon Kardon AVR354. I've verified the remote works directly with other devices.

However, using multiple different methods, I never see output at console when attempting to see data from the remote:

[dylan@kodiarch ~]$ mode2 --driver devinput --device /dev/input/event3
Using driver devinput on device /dev/input/event3
Trying device: /dev/input/event3
Using device: /dev/input/event3
^C
[dylan@kodiarch ~]$ sudo mode2 --driver devinput --device /dev/input/event3
Using driver devinput on device /dev/input/event3
Trying device: /dev/input/event3
Using device: /dev/input/event3
Running as regular user dylan
^C
[dylan@kodiarch ~]$sudo ir-keytable -t -d /dev/input/event3
Testing events. Please, press CTRL-C to abort.
^C
[dylan@kodiarch ~]$ sudo od -x /dev/input/event3
^C
[dylan@kodiarch ~]$ sudo cat /dev/input/event3
^C
[dylan@kodiarch ~]$sudo od -x /dev/lirc0
^C
[dylan@kodiarch ~]$sudo cat /dev/lirc0
^C
[dylan@kodiarch ~]$sudo mode2 --driver default --device /dev/lirc0
Using driver default on device /dev/lirc0
Trying device: /dev/lirc0
Using device: /dev/lirc0
Running as regular user dylan
^C
[dylan@kodiarch ~]$

Anyone have suggestions about how to proceed?

Offline

#2 2016-12-29 17:34:06

thenextdon13
Member
Registered: 2013-01-18
Posts: 58

Re: CIR issues with NUC6i3SYB / ITE8713

So, firstly- i have learned a lot about IR stuff with Linux and Windows in troubleshooting this.

I found what appeared to be too much solder globbed from the sensor's signal pin to the case, but after removing the board a couple of times i tested with an oscilloscope, and the signals looked fine.

I had loaded windows to do troubleshooting with Intel, since they don't support linux.  I ordered a 'known supported' remote to test with (xbox one media remote).

To anyone having issues getting remotes working, i'll post some additional troubleshooting steps in the near future, but here was by closing discussion with Intel:

Hello,
Last night i did more research and got IR key presses being recognized (in Event Ghost) by making windows registry changes listed on the internet for allowing all IR remotes, and allowing universal remotes (source: https://blogs.msdn.microsoft.com/astebn … -options/)

After that, booting to a live distribution of linux, I could see key presses (ir-keytables -t or cat /dev/input/event5  in my case) after setting the protocol to include everything, although the remote i was using was 'nec' so could set only nec and have it work as well (ir-keytables -p nec)

To check and see if this was something I was doing wrong previously, i re-copied my initial linux image back to the device, and re-ran the same commands I had before from command history.  The IR receiver now works.

I didn't change any software settings or commands; i just ran commands already in history.

My conclusion is that the solder _was_ the problem, but in my inserting/removing of the board from the case and probing at the IR receiver broke the conductivity at the glob.

Either that, or some loading of the windows driver for some reason changed the state of something in bios, but i find that unlikely/hard to believe...

As everything is now working as intended, these tickets should be closed/resolved- but i really think that the manufacturing process for soldering of the IR receiver should be inspected.

Many thanks for the support/help

Offline

#3 2016-12-29 17:54:20

thenextdon13
Member
Registered: 2013-01-18
Posts: 58

Re: CIR issues with NUC6i3SYB / ITE8713

First, learning points for Windows 10 to test CIR functionality
- Be sure driver is loaded for CIR device.  Look in HID area of hardware manager for infrared device, and look also for ehome remote control (or something of that sort).  If these are loaded, the IR receiver should work to pick up remote signals

Next, you make some registry tweaks [1]:
set HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da/EnableDebounce = 1 (if it is not already set there.  Mine was.  this 'allows universal remote control)
set HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da/CodeSetNum0 = 0 (enables ALL remote types.  Mine was set to '1' by default)
Remove the following entries from the same key (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da)
-CodeSetNum1
-CodeSetNum2
-CodeSetNum3

Grab EventGhost from the internet [2].
Install, run as administrator
create new 'file', which empties out everything in the right pane except autostart
Add Windows MCE (vista/win7) plugin to the autostart section in the right pane
restart the computer
enter the eventghost console (most likely autostarted, check system tray- right click and 'open' or whatever)
Remote button clicks should now appear in the left pane each time you press a button.

This is how i verified functionality of remote in Windows in case needed by Intel.  Additionally, someone on kernel-newbies IRC also asked 'does it work in windows' when i said it appeared to maybe be a linux driver problem, which gave another reason to test in windows. 


Once I verified remote functionality in windows, I went back to a linux box.  First, installed v4l-utils (which includes ir-keytable, allowing you to change remote keytable filters and such and command line)
To see what protocols are supported and device information, run sudo ir-keytables with no additional flags.  It provides a list of protocols that are enabled, and a list of possible protocols.

The protocol setting are critical.  Without the protocol set correctly you WILL NOT get output with 'cat /dev/input/eventX', using ir-keytable -t, or i believe any other methods.  'Correctly' just means to have the protocol that your test remote uses included on the 'protocols enabled' list.  Easiest way to do that is to enable all supported protocols.

Enable all protocols possible.  This can be done either by repeatedly passing the -p flag at a single command line (i.e. ir-keytable -p nec -p lirc), or by using a comma separated list (such as ir-keytable -p nec,lirc).  My box indicated that mce-remote was supported, but when trying to enable it, it errored out... so i skipped it.

Once you have all protocols enabled,   you can test for IR events by using sudo ir-keytable -t and pressing remote keys. 

No reboot or system restarts are required for this to work.

I'll try to update/edit this post at a later date to include some more direct code snippets/etc.

Once you get ir-keytables -t working, you can load/modify what each keypress does- there is a lot of information on that floating around the internet.

Hope this helps someone with troubleshooting and remote setup.

[1]https://blogs.msdn.microsoft.com/astebn … r-options/
[2]http://www.eventghost.org/

Offline

#4 2017-02-16 12:15:38

abauomy
Member
Registered: 2009-06-14
Posts: 22

Re: CIR issues with NUC6i3SYB / ITE8713

thank you this is very helpful

My HTPC setup on windows 10 now and xbox 360 remote working fine
remote working in windows as a keyboard keys so need need to additional conflagration required

I set xbox key to send Win+tab key so i can switch between kodi and youtube.com/leanback rning in background (chrome)

now in need to make same setup on arch

i flow this http://forum.kodi.tv/showthread.php?tid=104541
and remote working on kodi only

any way to make the remote working as keyboard for all applications ?

Offline

#5 2017-05-02 14:06:09

thenextdon13
Member
Registered: 2013-01-18
Posts: 58

Re: CIR issues with NUC6i3SYB / ITE8713

Hello, abauomy-

I'm not sure about Windows and making remote work as keyboard in all applications.  sad  Sorry!  I only used Windows as a diagnosing/testing tool, and most of my work is in LInux.

Offline

Board footer

Powered by FluxBB