All of lore.kernel.org
 help / color / mirror / Atom feed
* Help with harmony remote
@ 2020-12-18  5:21 Jesus
  2020-12-18 10:07 ` Sean Young
  0 siblings, 1 reply; 8+ messages in thread
From: Jesus @ 2020-12-18  5:21 UTC (permalink / raw)
  To: linux-media

Hi
I have an ir harmony remote which I have configured to use as a mouse with a Intel nuc D54250WYK, I have tested un Windows 10 and it works as expected but in linux the mouse buttons don't work.
I'm using the keymap /lib/udev/rc_keymaps/mce_keyboard.toml, this happens when I press the left button:

688888.335099: lirc protocol(mcir2-mse): scancode = 0x3c
688888.335117: event type EV_MSC(0x04): scancode = 0x3c
688888.335117: event type EV_SYN(0x00).
688888.475123: lirc protocol(mcir2-mse): scancode = 0x3c
688888.475142: event type EV_MSC(0x04): scancode = 0x3c
688888.475142: event type EV_SYN(0x00).

So I added this to the file and reloaded:


[[protocols]]
protocol = "mce_kbd"
[protocols.scancodes]
0x3c = "BTN_LEFT"
0x5a = "BTN_RIGHT"

The output now is:


689080.444492: lirc protocol(mcir2-mse): scancode = 0x3c
689080.444510: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
689080.444510: event type EV_MSC(0x04): scancode = 0x3c
689080.444510: event type EV_SYN(0x00).
689080.542540: lirc protocol(mcir2-mse): scancode = 0x3c
689080.542564: event type EV_MSC(0x04): scancode = 0x3c
689080.542564: event type EV_SYN(0x00).
689080.682743: lirc protocol(mcir2-mse): scancode = 0x3c
689080.682760: event type EV_MSC(0x04): scancode = 0x3c
689080.682760: event type EV_SYN(0x00).
689080.945699: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
689080.945699: event type EV_SYN(0x00).
689081.073768: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
689081.073768: event type EV_SYN(0x00).
689081.201773: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
689081.201773: event type EV_SYN(0x00).
689081.329767: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
689081.329767: event type EV_SYN(0x00).
689081.457773: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
689081.457773: event type EV_SYN(0x00).

The last two lines keep repeating and the left click don't happens

Please help me with this

Thanks for your attention

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Help with harmony remote
  2020-12-18  5:21 Help with harmony remote Jesus
@ 2020-12-18 10:07 ` Sean Young
  2020-12-19  1:56   ` Jesus
  0 siblings, 1 reply; 8+ messages in thread
From: Sean Young @ 2020-12-18 10:07 UTC (permalink / raw)
  To: Jesus; +Cc: linux-media

Hi,

On Fri, Dec 18, 2020 at 05:21:36AM +0000, Jesus wrote:
> Hi
> I have an ir harmony remote which I have configured to use as a mouse with a Intel nuc D54250WYK, I have tested un Windows 10 and it works as expected but in linux the mouse buttons don't work.
> I'm using the keymap /lib/udev/rc_keymaps/mce_keyboard.toml, this happens when I press the left button:

The mce_keyboard is for a very specific keyboard:

https://www.trustedreviews.com/reviews/microsoft-media-center-2005-keyboard

I suspect this is not the right IR decoder. What model is this exactly
and what buttons does it have, etc. What buttons do already work?

Some recording of the ir using "ir-ctl -r" would be useful too.

> 688888.335099: lirc protocol(mcir2-mse): scancode = 0x3c
> 688888.335117: event type EV_MSC(0x04): scancode = 0x3c
> 688888.335117: event type EV_SYN(0x00).
> 688888.475123: lirc protocol(mcir2-mse): scancode = 0x3c
> 688888.475142: event type EV_MSC(0x04): scancode = 0x3c
> 688888.475142: event type EV_SYN(0x00).
> 
> So I added this to the file and reloaded:
> 
> 
> [[protocols]]
> protocol = "mce_kbd"
> [protocols.scancodes]
> 0x3c = "BTN_LEFT"
> 0x5a = "BTN_RIGHT"

Unfortunately this IR decoder doesn't work very well if you set keycodes
for the scancodes. It doesn't generate the necessary key-up events.
> 
> The output now is:
> 
> 
> 689080.444492: lirc protocol(mcir2-mse): scancode = 0x3c
> 689080.444510: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 689080.444510: event type EV_MSC(0x04): scancode = 0x3c
> 689080.444510: event type EV_SYN(0x00).
> 689080.542540: lirc protocol(mcir2-mse): scancode = 0x3c
> 689080.542564: event type EV_MSC(0x04): scancode = 0x3c
> 689080.542564: event type EV_SYN(0x00).
> 689080.682743: lirc protocol(mcir2-mse): scancode = 0x3c
> 689080.682760: event type EV_MSC(0x04): scancode = 0x3c
> 689080.682760: event type EV_SYN(0x00).
> 689080.945699: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 689080.945699: event type EV_SYN(0x00).
> 689081.073768: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 689081.073768: event type EV_SYN(0x00).
> 689081.201773: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 689081.201773: event type EV_SYN(0x00).
> 689081.329767: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 689081.329767: event type EV_SYN(0x00).
> 689081.457773: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 689081.457773: event type EV_SYN(0x00).
> 
> The last two lines keep repeating and the left click don't happens
> 
> Please help me with this

Thanks

Sean

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: Help with harmony remote
  2020-12-18 10:07 ` Sean Young
@ 2020-12-19  1:56   ` Jesus
  2020-12-19  9:27     ` Sean Young
  0 siblings, 1 reply; 8+ messages in thread
From: Jesus @ 2020-12-19  1:56 UTC (permalink / raw)
  To: Sean Young; +Cc: linux-media




De: Sean Young <sean@mess.org>
Enviado: viernes, 18 de diciembre de 2020 10:07
Para: Jesus <observer1@hotmail.es>
Cc: linux-media@vger.kernel.org <linux-media@vger.kernel.org>
Asunto: Re: Help with harmony remote 
 
Hi,

On Fri, Dec 18, 2020 at 05:21:36AM +0000, Jesus wrote:
> Hi
> I have an ir harmony remote which I have configured to use as a mouse with a Intel nuc D54250WYK, I have tested un Windows 10 and it works as expected but in linux the mouse buttons don't work.
> I'm using the keymap /lib/udev/rc_keymaps/mce_keyboard.toml, this happens when I press the left button:

The mce_keyboard is for a very specific keyboard:

https://www.trustedreviews.com/reviews/microsoft-media-center-2005-keyboard

I suspect this is not the right IR decoder. What model is this exactly
and what buttons does it have, etc. What buttons do already work?

It's a Universal Harmony 350

This one:
https://support.myharmony.com/en-us/350
https://assets.logitech.com/assets/54199/gallery-1.png

It's programable, the remote selected for the mouse is named Media Center PC SE i believe is the mce, and for the other functions of the pc part I use a remote named Intel Media Player I believe is mce too but diferent set of keys selectable
I've managed to make work every button I use in the intel media player remote, for the Media Center PC SE, I only use the mouse part thats what I have tested, the mouse movement works, the left and right click are the ones not working


Some recording of the ir using "ir-ctl -r" would be useful too.

this is the output for the left click:

+2800 -200 +300 -300 +300 -250 +300 -300 +600 -600 +300 -400 +200 -350 +300 -200 +350 -300 +300 -300 +600 -300 +300 -600 +300 -250 +400 -200 +400 -200 +400 -250 +350 -300 +300 -400 +200 -300 +300 -300 +300 -300 +300 -300 +300 -300 +300 -300 +350 -250 +350 -300 +600 -250 +350 -350 +250 -300 +300 -600 +350 -250 +350 -75800 +2800 -200 +350 -200 +400 -250 +350 -300 +650 -600 +300 -300 +300 -300 +300 -250 +300 -300 +300 -300 +600 -250 +400 -600 +350 -200 +350 -250 +350 -250 +350 -250 +350 -250 +400 -200 +350 -250 +350 -250 +350 -250 +350 -300 +300 -300 +300 -250 +350 -300 +300 -300 +600 -250 +350 -200 +400 -250 +350 -600 +300 -250 +400 -75800 +2800 -200 +350 -200 +400 -250 +300 -250 +700 -550 +350 -200 +350 -250 +350 -250 +350 -250 +300 -350 +550 -250 +400 -600 +300 -300 +250 -300 +300 -300 +300 -350 +300 -250 +400 -250 +350 -250 +350 -400 +200 -350 +300 -300 +300 -300 +300 -250 +350 -200 +400 -250 +650 -200 +400 -250 +350 -250 +350 -600 +300 -300 +300 # timeout 101600


> 688888.335099: lirc protocol(mcir2-mse): scancode = 0x3c
> 688888.335117: event type EV_MSC(0x04): scancode = 0x3c
> 688888.335117: event type EV_SYN(0x00).
> 688888.475123: lirc protocol(mcir2-mse): scancode = 0x3c
> 688888.475142: event type EV_MSC(0x04): scancode = 0x3c
> 688888.475142: event type EV_SYN(0x00).
> 
> So I added this to the file and reloaded:
> 
> 
> [[protocols]]
> protocol = "mce_kbd"
> [protocols.scancodes]
> 0x3c = "BTN_LEFT"
> 0x5a = "BTN_RIGHT"

Unfortunately this IR decoder doesn't work very well if you set keycodes
for the scancodes. It doesn't generate the necessary key-up events.

I suppose thats the problem I didn't know there where more than one type of value you can set, I only noticed the ones I saw where shorter than in the examples.

> 
> The output now is:
> 
> 
> 689080.444492: lirc protocol(mcir2-mse): scancode = 0x3c
> 689080.444510: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 689080.444510: event type EV_MSC(0x04): scancode = 0x3c
> 689080.444510: event type EV_SYN(0x00).
> 689080.542540: lirc protocol(mcir2-mse): scancode = 0x3c
> 689080.542564: event type EV_MSC(0x04): scancode = 0x3c
> 689080.542564: event type EV_SYN(0x00).
> 689080.682743: lirc protocol(mcir2-mse): scancode = 0x3c
> 689080.682760: event type EV_MSC(0x04): scancode = 0x3c
> 689080.682760: event type EV_SYN(0x00).
> 689080.945699: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 689080.945699: event type EV_SYN(0x00).
> 689081.073768: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 689081.073768: event type EV_SYN(0x00).
> 689081.201773: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 689081.201773: event type EV_SYN(0x00).
> 689081.329767: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 689081.329767: event type EV_SYN(0x00).
> 689081.457773: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 689081.457773: event type EV_SYN(0x00).
> 
> The last two lines keep repeating and the left click don't happens
> 
> Please help me with this

Thanks

Sean

Thanks for your help Sean

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Help with harmony remote
  2020-12-19  1:56   ` Jesus
@ 2020-12-19  9:27     ` Sean Young
       [not found]       ` <VI1P193MB0160CD42CE45DFEC2361043081C10@VI1P193MB0160.EURP193.PROD.OUTLOOK.COM>
  0 siblings, 1 reply; 8+ messages in thread
From: Sean Young @ 2020-12-19  9:27 UTC (permalink / raw)
  To: Jesus; +Cc: linux-media

Hi,

On Sat, Dec 19, 2020 at 01:56:50AM +0000, Jesus wrote:
> It's a Universal Harmony 350
> 
> This one:
> https://support.myharmony.com/en-us/350
> https://assets.logitech.com/assets/54199/gallery-1.png
> 
> It's programable, the remote selected for the mouse is named Media Center PC SE i believe is the mce, and for the other functions of the pc part I use a remote named Intel Media Player I believe is mce too but diferent set of keys selectable
> I've managed to make work every button I use in the intel media player remote, for the Media Center PC SE, I only use the mouse part thats what I have tested, the mouse movement works, the left and right click are the ones not working

That's interesting, I did not know there was any other device that generates
this IR.

> Some recording of the ir using "ir-ctl -r" would be useful too.
> 
> this is the output for the left click:
> 
> +2800 -200 +300 -300 +300 -250 +300 -300 +600 -600 +300 -400 +200 -350 +300 -200 +350 -300 +300 -300 +600 -300 +300 -600 +300 -250 +400 -200 +400 -200 +400 -250 +350 -300 +300 -400 +200 -300 +300 -300 +300 -300 +300 -300 +300 -300 +300 -300 +350 -250 +350 -300 +600 -250 +350 -350 +250 -300 +300 -600 +350 -250 +350 -75800 +2800 -200 +350 -200 +400 -250 +350 -300 +650 -600 +300 -300 +300 -300 +300 -250 +300 -300 +300 -300 +600 -250 +400 -600 +350 -200 +350 -250 +350 -250 +350 -250 +350 -250 +400 -200 +350 -250 +350 -250 +350 -250 +350 -300 +300 -300 +300 -250 +350 -300 +300 -300 +600 -250 +350 -200 +400 -250 +350 -600 +300 -250 +400 -75800 +2800 -200 +350 -200 +400 -250 +300 -250 +700 -550 +350 -200 +350 -250 +350 -250 +350 -250 +300 -350 +550 -250 +400 -600 +300 -300 +250 -300 +300 -300 +300 -350 +300 -250 +400 -250 +350 -250 +350 -400 +200 -350 +300 -300 +300 -300 +300 -250 +350 -200 +400 -250 +650 -200 +400 -250 +350 -250 +350 -600 +300 -300 +300 # timeout 101600

Actually, that is the right IR for a left mouse button.

> > 688888.335099: lirc protocol(mcir2-mse): scancode = 0x3c
> > 688888.335117: event type EV_MSC(0x04): scancode = 0x3c
> > 688888.335117: event type EV_SYN(0x00).
> > 688888.475123: lirc protocol(mcir2-mse): scancode = 0x3c
> > 688888.475142: event type EV_MSC(0x04): scancode = 0x3c
> > 688888.475142: event type EV_SYN(0x00).

This is also the right scancode.

I think something else is going on. Please can you do the following:

echo 'file ir-mce_kbd-decoder.c +p' > /sys/kernel/debug/dynamic_debug/control 

Now press the left mouse button and see what there is in dmesg.

I hope it says something like:

	rc rc0: mouse: x = 0, y = 0, btns = L

Please can you test the following patch.

Thanks,

Sean
---
From 05a8b10b9b8a6f0e9ccf42010a633e674c672f15 Mon Sep 17 00:00:00 2001
From: Sean Young <sean@mess.org>
Date: Sat, 19 Dec 2020 09:19:45 +0000
Subject: [PATCH] media: mce-kbd: ensure that keycodes set in keybit

The input layer wants to know what keys a device can generate, and will
ignore any keycodes not in this list. Ensure the keybit is set on
registration.

Signed-off-by: Sean Young <sean@mess.org>
---
 drivers/media/rc/ir-mce_kbd-decoder.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/media/rc/ir-mce_kbd-decoder.c b/drivers/media/rc/ir-mce_kbd-decoder.c
index be8f2756a444..c72704aa23a8 100644
--- a/drivers/media/rc/ir-mce_kbd-decoder.c
+++ b/drivers/media/rc/ir-mce_kbd-decoder.c
@@ -361,10 +361,19 @@ static int ir_mce_kbd_decode(struct rc_dev *dev, struct ir_raw_event ev)
 static int ir_mce_kbd_register(struct rc_dev *dev)
 {
 	struct mce_kbd_dec *mce_kbd = &dev->raw->mce_kbd;
+	int i;
 
 	timer_setup(&mce_kbd->rx_timeout, mce_kbd_rx_timeout, 0);
 	spin_lock_init(&mce_kbd->keylock);
 
+	for (i = 0; i < ARRAY_SIZE(kbd_keycodes); i++) {
+		if (kbd_keycodes[i] != KEY_RESERVED)
+			__set_bit(kbd_keycodes[i], dev->input_dev->keybit);
+	}
+
+	__set_bit(BTN_LEFT, dev->input_dev->keybit);
+	__set_bit(BTN_RIGHT, dev->input_dev->keybit);
+
 	return 0;
 }
 
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: Help with harmony remote
       [not found]       ` <VI1P193MB0160CD42CE45DFEC2361043081C10@VI1P193MB0160.EURP193.PROD.OUTLOOK.COM>
@ 2020-12-21 12:40         ` Sean Young
  2020-12-21 19:33           ` Juan
  2021-02-09  4:52           ` Jesus
  0 siblings, 2 replies; 8+ messages in thread
From: Sean Young @ 2020-12-21 12:40 UTC (permalink / raw)
  To: Jesus; +Cc: linux-media

Hi,

First of all, your email is unreadable. It is very to see what I wrote
and what you wrote. Please fix this.

On Sun, Dec 20, 2020 at 07:24:28PM +0000, Jesus wrote:
> Hi
> 
> ________________________________
> De: Sean Young <sean@mess.org>
> Enviado: sábado, 19 de diciembre de 2020 9:27
> Para: Jesus <observer1@hotmail.es>
> Cc: linux-media@vger.kernel.org <linux-media@vger.kernel.org>
> Asunto: Re: Help with harmony remote
> 
> Hi,
> 
> On Sat, Dec 19, 2020 at 01:56:50AM +0000, Jesus wrote:
> > It's a Universal Harmony 350
> >
> > This one:
> > https://support.myharmony.com/en-us/350
> > https://assets.logitech.com/assets/54199/gallery-1.png
> >
> > It's programable, the remote selected for the mouse is named Media Center PC SE i believe is the mce, and for the other functions of the pc part I use a remote named Intel Media Player I believe is mce too but diferent set of keys selectable
> > I've managed to make work every button I use in the intel media player remote, for the Media Center PC SE, I only use the mouse part thats what I have tested, the mouse movement works, the left and right click are the ones not working
> 
> That's interesting, I did not know there was any other device that generates
> this IR.
> 
> > Some recording of the ir using "ir-ctl -r" would be useful too.
> >
> > this is the output for the left click:
> >
> > +2800 -200 +300 -300 +300 -250 +300 -300 +600 -600 +300 -400 +200 -350 +300 -200 +350 -300 +300 -300 +600 -300 +300 -600 +300 -250 +400 -200 +400 -200 +400 -250 +350 -300 +300 -400 +200 -300 +300 -300 +300 -300 +300 -300 +300 -300 +300 -300 +350 -250 +350 -300 +600 -250 +350 -350 +250 -300 +300 -600 +350 -250 +350 -75800 +2800 -200 +350 -200 +400 -250 +350 -300 +650 -600 +300 -300 +300 -300 +300 -250 +300 -300 +300 -300 +600 -250 +400 -600 +350 -200 +350 -250 +350 -250 +350 -250 +350 -250 +400 -200 +350 -250 +350 -250 +350 -250 +350 -300 +300 -300 +300 -250 +350 -300 +300 -300 +600 -250 +350 -200 +400 -250 +350 -600 +300 -250 +400 -75800 +2800 -200 +350 -200 +400 -250 +300 -250 +700 -550 +350 -200 +350 -250 +350 -250 +350 -250 +300 -350 +550 -250 +400 -600 +300 -300 +250 -300 +300 -300 +300 -350 +300 -250 +400 -250 +350 -250 +350 -400 +200 -350 +300 -300 +300 -300 +300 -250 +350 -200 +400 -250 +650 -200 +400 -250 +350 -250 +350 -600 +300 -300 +300 # timeout 101600
> 
> Actually, that is the right IR for a left mouse button.
> 
> > > 688888.335099: lirc protocol(mcir2-mse): scancode = 0x3c
> > > 688888.335117: event type EV_MSC(0x04): scancode = 0x3c
> > > 688888.335117: event type EV_SYN(0x00).
> > > 688888.475123: lirc protocol(mcir2-mse): scancode = 0x3c
> > > 688888.475142: event type EV_MSC(0x04): scancode = 0x3c
> > > 688888.475142: event type EV_SYN(0x00).
> 
> This is also the right scancode.
> 
> I think something else is going on. Please can you do the following:
> 
> echo 'file ir-mce_kbd-decoder.c +p' > /sys/kernel/debug/dynamic_debug/control
> 
> Now press the left mouse button and see what there is in dmesg.
> 
> I hope it says something like:
> 
>         rc rc0: mouse: x = 0, y = 0, btns = L
> 
> This is what found in dmesg:
> 
> 
> [754581.285199] rc rc0: started at state 4 (600us space)
> [754581.285202] rc rc0: started at state 3 (267us space)
> [754581.285208] rc rc0: started at state 4 (300us pulse)
> [754581.285211] rc rc0: started at state 3 (0us pulse)
> [754581.285221] rc rc0: started at state 3 (300us space)
> [754581.285225] rc rc0: started at state 4 (350us pulse)
> [754581.285229] rc rc0: started at state 5 (17us pulse)
> [754581.390933] rc rc0: started at state 5 (101600us space)
> [754581.390938] rc rc0: mouse data 0x00003c
> [754581.390941] rc rc0: mouse: x = 0, y = 0, btns = L

I'm guessing you wrote this last thing, it all has the same quotation
level.

So the mouse press is decoded; the issue is in the delivery.

> Please can you test the following patch.
> 
> I applied the patch and this is the output, it didn't worked:
> 
> 292.578486: lirc protocol(mcir2-mse): scancode = 0x3c
> 274.264540: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 274.264540: event type EV_MSC(0x04): scancode = 0x3c
> 274.264540: event type EV_SYN(0x00).
> 292.676628: lirc protocol(mcir2-mse): scancode = 0x3c
> 292.676647: event type EV_MSC(0x04): scancode = 0x3c
> 292.676647: event type EV_SYN(0x00).
> 292.816663: lirc protocol(mcir2-mse): scancode = 0x3c
> 292.816687: event type EV_MSC(0x04): scancode = 0x3c
> 292.816687: event type EV_SYN(0x00).
> 293.080537: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 293.080537: event type EV_SYN(0x00).
> 293.208540: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 293.208540: event type EV_SYN(0x00).
> 293.336535: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 293.336535: event type EV_SYN(0x00).
> 293.464540: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> 293.464540: event type EV_SYN(0x00).

This shows that the button press has been decoded, and sent to the input
layer. Possibly it is being ignored by libinput.

> It didn't change, I'm quite sure I applied the patch correctly, is there a way to know at runtime?

You can check uname -r, it should the exact commit if you commited the patch.

So how are you loading the mce_keyboard.toml? It should be loaded by putting
an entry in /etc/rc_maps.cfg

Thanks

Sean

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Help with harmony remote
  2020-12-21 12:40         ` Sean Young
@ 2020-12-21 19:33           ` Juan
  2021-01-05 15:33             ` Sean Young
  2021-02-09  4:52           ` Jesus
  1 sibling, 1 reply; 8+ messages in thread
From: Juan @ 2020-12-21 19:33 UTC (permalink / raw)
  To: Sean Young; +Cc: linux-media

Hi
I was using the web client hope this is better

El Mon, 21 Dec 2020 12:40:09 +0000
Sean Young <sean@mess.org> escribió:
> Hi,
> 
> First of all, your email is unreadable. It is very to see what I wrote
> and what you wrote. Please fix this.
> 
> On Sun, Dec 20, 2020 at 07:24:28PM +0000, Jesus wrote:
> > Hi
> > 
> > ________________________________
> > De: Sean Young <sean@mess.org>
> > Enviado: sábado, 19 de diciembre de 2020 9:27
> > Para: Jesus <observer1@hotmail.es>
> > Cc: linux-media@vger.kernel.org <linux-media@vger.kernel.org>
> > Asunto: Re: Help with harmony remote
> > 
> > Hi,
> > 
> > On Sat, Dec 19, 2020 at 01:56:50AM +0000, Jesus wrote:
> > > It's a Universal Harmony 350
> > >
> > > This one:
> > > https://support.myharmony.com/en-us/350
> > > https://assets.logitech.com/assets/54199/gallery-1.png
> > >
> > > It's programable, the remote selected for the mouse is named
> > > Media Center PC SE i believe is the mce, and for the other
> > > functions of the pc part I use a remote named Intel Media Player
> > > I believe is mce too but diferent set of keys selectable I've
> > > managed to make work every button I use in the intel media player
> > > remote, for the Media Center PC SE, I only use the mouse part
> > > thats what I have tested, the mouse movement works, the left and
> > > right click are the ones not working
> > 
> > That's interesting, I did not know there was any other device that
> > generates this IR.
> > 
> > > Some recording of the ir using "ir-ctl -r" would be useful too.
> > >
> > > this is the output for the left click:
> > >
> > > +2800 -200 +300 -300 +300 -250 +300 -300 +600 -600 +300 -400 +200
> > > -350 +300 -200 +350 -300 +300 -300 +600 -300 +300 -600 +300 -250
> > > +400 -200 +400 -200 +400 -250 +350 -300 +300 -400 +200 -300 +300
> > > -300 +300 -300 +300 -300 +300 -300 +300 -300 +350 -250 +350 -300
> > > +600 -250 +350 -350 +250 -300 +300 -600 +350 -250 +350 -75800
> > > +2800 -200 +350 -200 +400 -250 +350 -300 +650 -600 +300 -300 +300
> > > -300 +300 -250 +300 -300 +300 -300 +600 -250 +400 -600 +350 -200
> > > +350 -250 +350 -250 +350 -250 +350 -250 +400 -200 +350 -250 +350
> > > -250 +350 -250 +350 -300 +300 -300 +300 -250 +350 -300 +300 -300
> > > +600 -250 +350 -200 +400 -250 +350 -600 +300 -250 +400 -75800
> > > +2800 -200 +350 -200 +400 -250 +300 -250 +700 -550 +350 -200 +350
> > > -250 +350 -250 +350 -250 +300 -350 +550 -250 +400 -600 +300 -300
> > > +250 -300 +300 -300 +300 -350 +300 -250 +400 -250 +350 -250 +350
> > > -400 +200 -350 +300 -300 +300 -300 +300 -250 +350 -200 +400 -250
> > > +650 -200 +400 -250 +350 -250 +350 -600 +300 -300 +300 # timeout
> > > 101600
> > 
> > Actually, that is the right IR for a left mouse button.
> > 
> > > > 688888.335099: lirc protocol(mcir2-mse): scancode = 0x3c
> > > > 688888.335117: event type EV_MSC(0x04): scancode = 0x3c
> > > > 688888.335117: event type EV_SYN(0x00).
> > > > 688888.475123: lirc protocol(mcir2-mse): scancode = 0x3c
> > > > 688888.475142: event type EV_MSC(0x04): scancode = 0x3c
> > > > 688888.475142: event type EV_SYN(0x00).
> > 
> > This is also the right scancode.
> > 
> > I think something else is going on. Please can you do the following:
> > 
> > echo 'file ir-mce_kbd-decoder.c +p' >
> > /sys/kernel/debug/dynamic_debug/control
> > 
> > Now press the left mouse button and see what there is in dmesg.
> > 
> > I hope it says something like:
> > 
> >         rc rc0: mouse: x = 0, y = 0, btns = L
> > 
> > This is what found in dmesg:
> > 
> > 
> > [754581.285199] rc rc0: started at state 4 (600us space)
> > [754581.285202] rc rc0: started at state 3 (267us space)
> > [754581.285208] rc rc0: started at state 4 (300us pulse)
> > [754581.285211] rc rc0: started at state 3 (0us pulse)
> > [754581.285221] rc rc0: started at state 3 (300us space)
> > [754581.285225] rc rc0: started at state 4 (350us pulse)
> > [754581.285229] rc rc0: started at state 5 (17us pulse)
> > [754581.390933] rc rc0: started at state 5 (101600us space)
> > [754581.390938] rc rc0: mouse data 0x00003c
> > [754581.390941] rc rc0: mouse: x = 0, y = 0, btns = L
> 
> I'm guessing you wrote this last thing, it all has the same quotation
> level.
> 
> So the mouse press is decoded; the issue is in the delivery.
> 
> > Please can you test the following patch.
> > 
> > I applied the patch and this is the output, it didn't worked:
> > 
> > 292.578486: lirc protocol(mcir2-mse): scancode = 0x3c
> > 274.264540: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> > 274.264540: event type EV_MSC(0x04): scancode = 0x3c
> > 274.264540: event type EV_SYN(0x00).
> > 292.676628: lirc protocol(mcir2-mse): scancode = 0x3c
> > 292.676647: event type EV_MSC(0x04): scancode = 0x3c
> > 292.676647: event type EV_SYN(0x00).
> > 292.816663: lirc protocol(mcir2-mse): scancode = 0x3c
> > 292.816687: event type EV_MSC(0x04): scancode = 0x3c
> > 292.816687: event type EV_SYN(0x00).
> > 293.080537: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> > 293.080537: event type EV_SYN(0x00).
> > 293.208540: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> > 293.208540: event type EV_SYN(0x00).
> > 293.336535: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> > 293.336535: event type EV_SYN(0x00).
> > 293.464540: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> > 293.464540: event type EV_SYN(0x00).
> 
> This shows that the button press has been decoded, and sent to the
> input layer. Possibly it is being ignored by libinput.

I think is getting to the ui, when i presss the button the real mouse
moves but I can't click on other thing, I suppose is waiting for the
mouse up

> 
> > It didn't change, I'm quite sure I applied the patch correctly, is
> > there a way to know at runtime?
> 
> You can check uname -r, it should the exact commit if you commited
> the patch.

I rebuild a srpm, this what uname  says
5.8.12-200.st.fc32.x86_64
st is what i use to make them diferent

> 
> So how are you loading the mce_keyboard.toml? It should be loaded by
> putting an entry in /etc/rc_maps.cfg

I'm using this command to load:

 ir-keytable -c -p rc6_mce,mce_kbd -w
 /etc/rc_keymaps/mce_keyboard-mouse.toml ; ir-keytable -v -t -p
 rc-5,rc-5-sz,jvc,sony,nec,sanyo,mce_kbd,rc-6,sharp,xmp,mcir2-mse

The real mouse don't click until I load the original file:

ir-keytable -c -p rc6_mce -w /lib/udev/rc_keymaps/mce_keyboard.toml

> 
> Thanks
> 
> Sean

Thanks again


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Help with harmony remote
  2020-12-21 19:33           ` Juan
@ 2021-01-05 15:33             ` Sean Young
  0 siblings, 0 replies; 8+ messages in thread
From: Sean Young @ 2021-01-05 15:33 UTC (permalink / raw)
  To: Juan; +Cc: linux-media

Hi Juan,

Sorry I lost track over christmas/new years.

On Mon, Dec 21, 2020 at 01:33:21PM -0600, Juan wrote:
> Hi
> I was using the web client hope this is better

Thanks much better.

> El Mon, 21 Dec 2020 12:40:09 +0000
> Sean Young <sean@mess.org> escribió:
> > Hi,
> > 
> > First of all, your email is unreadable. It is very to see what I wrote
> > and what you wrote. Please fix this.
> > 
> > On Sun, Dec 20, 2020 at 07:24:28PM +0000, Jesus wrote:
> > > Hi
> > > 
> > > ________________________________
> > > De: Sean Young <sean@mess.org>
> > > Enviado: sábado, 19 de diciembre de 2020 9:27
> > > Para: Jesus <observer1@hotmail.es>
> > > Cc: linux-media@vger.kernel.org <linux-media@vger.kernel.org>
> > > Asunto: Re: Help with harmony remote
> > > 
> > > Hi,
> > > 
> > > On Sat, Dec 19, 2020 at 01:56:50AM +0000, Jesus wrote:
> > > > It's a Universal Harmony 350
> > > >
> > > > This one:
> > > > https://support.myharmony.com/en-us/350
> > > > https://assets.logitech.com/assets/54199/gallery-1.png
> > > >
> > > > It's programable, the remote selected for the mouse is named
> > > > Media Center PC SE i believe is the mce, and for the other
> > > > functions of the pc part I use a remote named Intel Media Player
> > > > I believe is mce too but diferent set of keys selectable I've
> > > > managed to make work every button I use in the intel media player
> > > > remote, for the Media Center PC SE, I only use the mouse part
> > > > thats what I have tested, the mouse movement works, the left and
> > > > right click are the ones not working
> > > 
> > > That's interesting, I did not know there was any other device that
> > > generates this IR.
> > > 
> > > > Some recording of the ir using "ir-ctl -r" would be useful too.
> > > >
> > > > this is the output for the left click:
> > > >
> > > > +2800 -200 +300 -300 +300 -250 +300 -300 +600 -600 +300 -400 +200
> > > > -350 +300 -200 +350 -300 +300 -300 +600 -300 +300 -600 +300 -250
> > > > +400 -200 +400 -200 +400 -250 +350 -300 +300 -400 +200 -300 +300
> > > > -300 +300 -300 +300 -300 +300 -300 +300 -300 +350 -250 +350 -300
> > > > +600 -250 +350 -350 +250 -300 +300 -600 +350 -250 +350 -75800
> > > > +2800 -200 +350 -200 +400 -250 +350 -300 +650 -600 +300 -300 +300
> > > > -300 +300 -250 +300 -300 +300 -300 +600 -250 +400 -600 +350 -200
> > > > +350 -250 +350 -250 +350 -250 +350 -250 +400 -200 +350 -250 +350
> > > > -250 +350 -250 +350 -300 +300 -300 +300 -250 +350 -300 +300 -300
> > > > +600 -250 +350 -200 +400 -250 +350 -600 +300 -250 +400 -75800
> > > > +2800 -200 +350 -200 +400 -250 +300 -250 +700 -550 +350 -200 +350
> > > > -250 +350 -250 +350 -250 +300 -350 +550 -250 +400 -600 +300 -300
> > > > +250 -300 +300 -300 +300 -350 +300 -250 +400 -250 +350 -250 +350
> > > > -400 +200 -350 +300 -300 +300 -300 +300 -250 +350 -200 +400 -250
> > > > +650 -200 +400 -250 +350 -250 +350 -600 +300 -300 +300 # timeout
> > > > 101600
> > > 
> > > Actually, that is the right IR for a left mouse button.
> > > 
> > > > > 688888.335099: lirc protocol(mcir2-mse): scancode = 0x3c
> > > > > 688888.335117: event type EV_MSC(0x04): scancode = 0x3c
> > > > > 688888.335117: event type EV_SYN(0x00).
> > > > > 688888.475123: lirc protocol(mcir2-mse): scancode = 0x3c
> > > > > 688888.475142: event type EV_MSC(0x04): scancode = 0x3c
> > > > > 688888.475142: event type EV_SYN(0x00).
> > > 
> > > This is also the right scancode.
> > > 
> > > I think something else is going on. Please can you do the following:
> > > 
> > > echo 'file ir-mce_kbd-decoder.c +p' >
> > > /sys/kernel/debug/dynamic_debug/control
> > > 
> > > Now press the left mouse button and see what there is in dmesg.
> > > 
> > > I hope it says something like:
> > > 
> > >         rc rc0: mouse: x = 0, y = 0, btns = L
> > > 
> > > This is what found in dmesg:
> > > 
> > > 
> > > [754581.285199] rc rc0: started at state 4 (600us space)
> > > [754581.285202] rc rc0: started at state 3 (267us space)
> > > [754581.285208] rc rc0: started at state 4 (300us pulse)
> > > [754581.285211] rc rc0: started at state 3 (0us pulse)
> > > [754581.285221] rc rc0: started at state 3 (300us space)
> > > [754581.285225] rc rc0: started at state 4 (350us pulse)
> > > [754581.285229] rc rc0: started at state 5 (17us pulse)
> > > [754581.390933] rc rc0: started at state 5 (101600us space)
> > > [754581.390938] rc rc0: mouse data 0x00003c
> > > [754581.390941] rc rc0: mouse: x = 0, y = 0, btns = L
> > 
> > I'm guessing you wrote this last thing, it all has the same quotation
> > level.
> > 
> > So the mouse press is decoded; the issue is in the delivery.
> > 
> > > Please can you test the following patch.
> > > 
> > > I applied the patch and this is the output, it didn't worked:
> > > 
> > > 292.578486: lirc protocol(mcir2-mse): scancode = 0x3c
> > > 274.264540: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> > > 274.264540: event type EV_MSC(0x04): scancode = 0x3c
> > > 274.264540: event type EV_SYN(0x00).
> > > 292.676628: lirc protocol(mcir2-mse): scancode = 0x3c
> > > 292.676647: event type EV_MSC(0x04): scancode = 0x3c
> > > 292.676647: event type EV_SYN(0x00).
> > > 292.816663: lirc protocol(mcir2-mse): scancode = 0x3c
> > > 292.816687: event type EV_MSC(0x04): scancode = 0x3c
> > > 292.816687: event type EV_SYN(0x00).
> > > 293.080537: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> > > 293.080537: event type EV_SYN(0x00).
> > > 293.208540: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> > > 293.208540: event type EV_SYN(0x00).
> > > 293.336535: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> > > 293.336535: event type EV_SYN(0x00).
> > > 293.464540: event type EV_KEY(0x01) key_down: BTN_MOUSE(0x0110)
> > > 293.464540: event type EV_SYN(0x00).
> > 
> > This shows that the button press has been decoded, and sent to the
> > input layer. Possibly it is being ignored by libinput.
> 
> I think is getting to the ui, when i presss the button the real mouse
> moves but I can't click on other thing, I suppose is waiting for the
> mouse up
>
> > > It didn't change, I'm quite sure I applied the patch correctly, is
> > > there a way to know at runtime?
> > 
> > You can check uname -r, it should the exact commit if you commited
> > the patch.
> 
> I rebuild a srpm, this what uname  says
> 5.8.12-200.st.fc32.x86_64
> st is what i use to make them diferent
> 
> > 
> > So how are you loading the mce_keyboard.toml? It should be loaded by
> > putting an entry in /etc/rc_maps.cfg
> 
> I'm using this command to load:
> 
>  ir-keytable -c -p rc6_mce,mce_kbd -w
>  /etc/rc_keymaps/mce_keyboard-mouse.toml ; ir-keytable -v -t -p
>  rc-5,rc-5-sz,jvc,sony,nec,sanyo,mce_kbd,rc-6,sharp,xmp,mcir2-mse
> 
> The real mouse don't click until I load the original file:
> 
> ir-keytable -c -p rc6_mce -w /lib/udev/rc_keymaps/mce_keyboard.toml

You should really load the keymap by putting an entry in /etc/maps.cfg,
something like:

* 	* 	/etc/rc_keymaps/mce_keyboard-mouse.toml


(and remove the other entries)

Thanks

Sean

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: Help with harmony remote
  2020-12-21 12:40         ` Sean Young
  2020-12-21 19:33           ` Juan
@ 2021-02-09  4:52           ` Jesus
  1 sibling, 0 replies; 8+ messages in thread
From: Jesus @ 2021-02-09  4:52 UTC (permalink / raw)
  To: Sean Young; +Cc: linux-media

[-- Attachment #1: Type: text/plain, Size: 554 bytes --]

Hi

I thought it would be easier to fix this issue if I provided a way to
reproduce the issue, so I created a rcoid file, you can use it with the
free android rcoid app in any phone that has an ir emitter, I tested it
with the kernel without the patch applied and it worked the same as the
harmoy remote with bug included.
You just have to put in the /sdcard/RCoid folder on android and select
it on the app.
This the link to the rcoid app

https://play.google.com/store/apps/details?id=de.harrygr.rcoid

Please take a look at it.

Thanks for your help


[-- Attachment #2: HarmonyMouse.rcf --]
[-- Type: application/octet-stream, Size: 10561 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-02-09  4:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-18  5:21 Help with harmony remote Jesus
2020-12-18 10:07 ` Sean Young
2020-12-19  1:56   ` Jesus
2020-12-19  9:27     ` Sean Young
     [not found]       ` <VI1P193MB0160CD42CE45DFEC2361043081C10@VI1P193MB0160.EURP193.PROD.OUTLOOK.COM>
2020-12-21 12:40         ` Sean Young
2020-12-21 19:33           ` Juan
2021-01-05 15:33             ` Sean Young
2021-02-09  4:52           ` Jesus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.