Gentoo Archives: gentoo-user

From: Daniel Frey <djqfrey@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] ir receiver - mceusb
Date: Thu, 23 Mar 2017 03:56:07
Message-Id: de8ed9dd-230e-e7c5-0b44-cbe27699c833@gmail.com
In Reply to: Re: [gentoo-user] ir receiver - mceusb by Petric Frank
1 On 03/22/2017 04:13 PM, Petric Frank wrote:
2 > Hello Dan,
3 >
4 >
5 >
6 > Am Mittwoch, 22. März 2017, 13:37:43 schrieb Daniel Frey:
7 >
8 >> On 03/22/2017 08:12 AM, Petric Frank wrote:
9 >
10 >> > maybe this is not exactly a gentoo problem. Please point me to correct
11 >
12 >> > location if i am wrong here.
13 >
14 >> >
15 >
16 >> > I've got a MCE-like ir remote together with a USB receiver.
17 >
18 >> >
19 >
20 >> > Looks like it is detected by the kernel and a input device was created.
21 >
22 >> >
23 >
24 >> > Most of the keys are working. But - for example - the color buttons
25 > do not
26 >
27 >> >
28 >
29 >> > generate any output.
30 >
31 >> >
32 >
33 >> > "ir-keytable" (version 1.10.1) returns:
34 >
35 >> >
36 >
37 >> > Couldn't find any node at /sys/class/rc/rc*.
38 >
39 >> >
40 >
41 >> > "ir-keytable -d /dev/input/eventxx" gives as output:
42 >
43 >> >
44 >
45 >> > Name: PHILIPS MCE USB IR Receiver- Spi
46 >
47 >> > bus: 3, vendor/product: 0471:0613, version: 0x0100
48 >
49 >> >
50 >
51 >> > Using for test
52 >
53 >> >
54 >
55 >> > ir-keytable -d /dev/input/eventxx -r
56 >
57 >> >
58 >
59 >> > i got:
60 >
61 >> >
62 >
63 >> > ------------------- cut --------------------
64 >
65 >> >
66 >
67 >> > scancode 0x700e0 = KEY_LEFTCTRL (0x1d)
68 >
69 >> > ...
70 >
71 >> >
72 >
73 >> > Enabled protocols: other lirc rc-5 jvc sony nec sanyo mce-kbd rc-6 sharp
74 >
75 >> > xmp
76 >
77 >> > ------------------- cut --------------------
78 >
79 >> >
80 >
81 >> > But there is no definition of the color buttons in the list above.
82 >
83 >> >
84 >
85 >> > Tests were done using this command:
86 >
87 >> >
88 >
89 >> > ir-keytable -d /dev/input/eventxx -t
90 >
91 >> >
92 >
93 >> > Any hints ?
94 >
95 >> >
96 >
97 >> >
98 >
99 >> > Is it possibe to see the scancodes received by the USB-receiver to
100 >
101 >> > validate
102 >
103 >> >
104 >
105 >> > that the remote really sends data for the color buttons. What kernel
106 >
107 >> > options i have to enable ?
108 >
109 >> >
110 >
111 >> > (Also for checking and not barking at the wrong tree due to hardware
112 >
113 >> > problems)
114 >
115 >> >
116 >
117 >> > Some info about my system:
118 >
119 >> >
120 >
121 >> > Kernel 4.9.6 (amd64) custom configured
122 >
123 >> >
124 >
125 >> > Distribution: Gentoo
126 >
127 >> >
128 >
129 >> > lsmod output:
130 >
131 >> >
132 >
133 >> > ----------------------- cut --------------------------
134 >
135 >> >
136 >
137 >> > Module Size Used by
138 >
139 >> >
140 >
141 >> > rc_rc6_mce 1580 0
142 >
143 >> > mceusb 10365 0
144 >
145 >> > rc_core 16719 2 mceusb,rc_rc6_mce
146 >
147 >> > usb_storage 48619 0
148 >
149 >> > hid_generic 1385 0
150 >
151 >> > usbhid 35380 0
152 >
153 >> > input_leds 3022 0
154 >
155 >> > led_class 3975 1 input_leds
156 >
157 >> >
158 >
159 >> > ohci_pci 3272 0
160 >
161 >> >
162 >
163 >> > snd_hda_codec_generic 52071 2
164 >
165 >> > r8169 67900 0
166 >
167 >> > xhci_pci 4958 0
168 >
169 >> > xhci_hcd 101734 1 xhci_pci
170 >
171 >> > mii 4099 1 r8169
172 >
173 >> > ohci_hcd 27022 1 ohci_pci
174 >
175 >> > ehci_pci 4103 0
176 >
177 >> > ehci_hcd 41036 1 ehci_pci
178 >
179 >> > usbcore 165285 9
180 >
181 >> >
182 > mceusb,usbhid,usb_storage,ehci_hcd,ohci_pci,xhci_pci,ohci_hcd,xhci_hcd,ehc
183 >
184 >> > i_pci usb_common 2222 1 usbcore
185 >
186 >> > snd_hda_intel 18065 0
187 >
188 >> > snd_hda_codec 73835 2 snd_hda_intel,snd_hda_codec_generic
189 >
190 >> > snd_hwdep 5866 1 snd_hda_codec
191 >
192 >> > snd_hda_core 40055 3
193 >
194 >> > snd_hda_intel,snd_hda_codec,snd_hda_codec_generic
195 >
196 >> > snd_pcm 78737 3 snd_hda_intel,snd_hda_codec,snd_hda_core
197 >
198 >> > snd_timer 19336 1 snd_pcm
199 >
200 >> > snd 55051 6
201 >
202 >> >
203 > snd_hda_intel,snd_hwdep,snd_hda_codec,snd_timer,snd_hda_codec_generic,snd_
204 >
205 >> > pcm soundcore 5231 1 snd
206 >
207 >> > ----------------------- cut --------------------------
208 >
209 >> >
210 >
211 >> > The remote looks like this one:
212 >
213 >> >
214 >
215 >> > https://www.mythtv.org/wiki/File:Philips-remote.jpg
216 >
217 >> >
218 >
219 >> > but its branded as olidata.
220 >
221 >> >
222 >
223 >> > The receiver is detected as (syslog):
224 >
225 >> > ----------------------- cut --------------------------
226 >
227 >> >
228 >
229 >> > [ 6.937470] usb 4-2: new low-speed USB device number 3 using xhci_hcd
230 >
231 >> >
232 >
233 >> > [ 7.117723] usb 4-2: New USB device found, idVendor=0471, idProduct=0613
234 >
235 >> >
236 >
237 >> > [ 7.117730] usb 4-2: New USB device strings: Mfr=1, Product=2,
238 >
239 >> > SerialNumber=0
240 >
241 >> >
242 >
243 >> > [ 7.117735] usb 4-2: Product: MCE USB IR Receiver- Spinel plus
244 >
245 >> >
246 >
247 >> > [ 7.117740] usb 4-2: Manufacturer: PHILIPS
248 >
249 >> >
250 >
251 >> > [ 7.132840] input: PHILIPS MCE USB IR Receiver- Spinel plus as
252 >
253 >> >
254 >
255 >> >
256 > /devices/pci0000:00/0000:00:15.2/0000:04:00.0/usb4/4-2/4-2:1.0/0003:0471:0
257 >
258 >> > 613.0003/input/input19
259 >
260 >> >
261 >
262 >> >
263 >
264 >> > [ 7.185141] hid-generic 0003:0471:0613.0003: input,hiddev0,hidraw2: USB
265 >
266 >> > HID v1.00 Keyboard [PHILIPS MCE USB IR Receiver- Spinel plus] on
267 >
268 >> > usb-0000:04:00.0-2/input0
269 >
270 >> >
271 >
272 >> > [ 7.191372] usbcore: registered new interface driver mceusb
273 >
274 >> >
275 >
276 >> > ---------------------- cut --------------------------
277 >
278 >>
279 >
280 >> Exactly what have you enabled in the kernel? You've probably missed
281 >
282 >> something if nothing is created under /sys/class/rc/.
283 >
284 >
285 >
286 > Which modules create the entries under /sys/class/rc/.
287 >
288 > This is the media drivers part of the kernel config:
289 >
290 > -------------------- cut --------------------------
291 >
292 > #
293 > # Media drivers
294 > #
295 > CONFIG_RC_CORE=m
296 > CONFIG_RC_MAP=m
297 > CONFIG_RC_DECODERS=y
298 > CONFIG_LIRC=m
299 > CONFIG_IR_LIRC_CODEC=m
300 > CONFIG_IR_NEC_DECODER=m
301 > CONFIG_IR_RC5_DECODER=m
302 > CONFIG_IR_RC6_DECODER=m
303 > CONFIG_IR_JVC_DECODER=m
304 > CONFIG_IR_SONY_DECODER=m
305 > CONFIG_IR_SANYO_DECODER=m
306 > CONFIG_IR_SHARP_DECODER=m
307 > CONFIG_IR_MCE_KBD_DECODER=m
308 > CONFIG_IR_XMP_DECODER=m
309 > CONFIG_RC_DEVICES=y
310 > CONFIG_RC_ATI_REMOTE=m
311 > # CONFIG_IR_ENE is not set
312 > # CONFIG_IR_HIX5HD2 is not set
313 > # CONFIG_IR_IMON is not set
314 > CONFIG_IR_MCEUSB=m
315 > # CONFIG_IR_ITE_CIR is not set
316 > # CONFIG_IR_FINTEK is not set
317 > # CONFIG_IR_NUVOTON is not set
318 > # CONFIG_IR_REDRAT3 is not set
319 > # CONFIG_IR_STREAMZAP is not set
320 > # CONFIG_IR_WINBOND_CIR is not set
321 > # CONFIG_IR_IGORPLUGUSB is not set
322 > # CONFIG_IR_IGUANA is not set
323 > # CONFIG_IR_TTUSBIR is not set
324 > # CONFIG_RC_LOOPBACK is not set
325 > # CONFIG_IR_GPIO_CIR is not set
326 > CONFIG_MEDIA_USB_SUPPORT=y
327 > # CONFIG_MEDIA_PCI_SUPPORT is not set
328 > -------------------- cut --------------------------
329 >
330 >
331 >
332 > Do i miss something ?
333 >
334 > Or do i need to load other kernel modules by hand ?
335 >
336 >
337 > regards
338 >
339 > Petric
340 >
341 >
342 >
343
344 I am running a much older kernel (4.1 LTS) but it seems you have
345 everything. I did find your problem though, although I have no idea how
346 to fix it:
347
348 [ 7.185141] hid-generic 0003:0471:0613.0003: input,hiddev0,hidraw2: USB
349 HID v1.00 Keyboard [PHILIPS MCE USB IR Receiver- Spinel plus] on
350 usb-0000:04:00.0-2/input0
351
352 The kernel is registering your device as a keyboard (incorrectly,
353 obviously.) Presumably this is why it is not creating /sys/class/rc/rc0.
354 I would assume you'd have to block Xorg from seeing it as a keyboard and
355 maybe write a udev rule to register the device correctly?
356
357 On my mythtv frontend my device (an iMon device) registers correctly as
358 an IR device:
359
360 [ 7.000121] input: iMON Remote (15c2:0038) as
361 /devices/pci0000:00/0000:00:1a.2/usb5/5-1/5-1:1.0/rc/rc0/input6
362
363
364 I did a quick Google for your device and "keyboard" and this thread
365 looks promising:
366
367 http://forum.kodi.tv/showthread.php?tid=133071&pid=1118999#pid1118999
368
369 You might be able to get some information there to stop it from
370 registering itself as a keyboard. This is for Ubuntu or one of its
371 forks, so you may have to adjust things accordingly.
372
373 Sorry I wasn't much help.
374
375 Dan