tizianomattei Posted September 17, 2023 Posted September 17, 2023 Hi all, I've just installed Armbian on my OPi3-lts and I'm trying to get the IR remote working (the iDroid included in the kit from aliexpress). I've followed this guide (from "Second attempt" on), using only the kernel driver without intalling lirc. Found out the protocol (nec), wrote the rc_keymap file mapping the key codes to the button names and everything seems to work fine, down to the last command (sudo ir-keytable -v -t -p nec), which correctly gives me the codes and the button names associated with them. Now, the guide says it's all and I should be able to use the remote as I use my keyboard, but... the desktop and the apps seem not to be aware of it, since nothing happens when I press the buttons... What am I missing? Thank you in advance 0 Quote
usual user Posted September 17, 2023 Posted September 17, 2023 3 hours ago, tizianomattei said: nothing happens when I press the buttons Since you haven't provided any details about what keycodes you've mapped and what desktop features are assigned to them, no one can tell if what you're seeing is what to expect. 0 Quote
tizianomattei Posted September 17, 2023 Author Posted September 17, 2023 For now, I've only mapped the four arrow buttons in the remote to the four arrow keys: KEY_UP, KEY_LEFT, KEY_RIGHT and KEY_DOWN. I'm in xfce. If I press the down arrow on my keyboard, the first icon in the desktop gets selected, and then I can move around using the arrow keys on the keyboard; however, pressing the arrow buttons on the remote has no effect. Similarly, if I open the applications menu, I can navigate using the arrow keys on my keyboard, while pressing the arrow buttons on the remote has no effect. This is what I mean. I suspect the applications aren't getting the events? Please tell me if you need more information, and which. Thank you 0 Quote
usual user Posted September 17, 2023 Posted September 17, 2023 25 minutes ago, tizianomattei said: if you need more information Provide output of ir-keytable and ir-keytable -t while pressing your mapped ir buttons. 0 Quote
tizianomattei Posted September 17, 2023 Author Posted September 17, 2023 (edited) WRONG OUTPUTS SORRY... please refer to next post Ok, here they are. ir-keytable: Found /sys/class/rc/rc0/ with: Name: sunxi-ir Driver: sunxi-ir Default keymap: rc-empty Input device: /dev/input/event3 LIRC device: /dev/lirc0 Attached BPF protocols: Operazione non permessa Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm Enabled kernel protocols: lirc bus: 25, vendor/product: 0001:0001, version: 0x0100 Repeat delay = 500 ms, repeat period = 125 ms ir-keytable -t doesn't print anything on button pressed neither does ir-keytable -t -p nec, and it complains that it has no access to /sys/class/rc/rc0//protocols however, sudo ir-keytable -t -p nec finally gives this output while pressing the buttons: Protocols changed to nec Testing events. Please, press CTRL-C to abort. 17366.585270: lirc protocol(nec): scancode = 0x444 17366.585303: event type EV_MSC(0x04): scancode = 0x444 17366.585303: event type EV_SYN(0x00). 17368.295701: lirc protocol(nec): scancode = 0x41c 17368.295735: event type EV_MSC(0x04): scancode = 0x41c 17368.295735: event type EV_SYN(0x00). 17369.768642: lirc protocol(nec): scancode = 0x448 17369.768688: event type EV_MSC(0x04): scancode = 0x448 17369.768688: event type EV_SYN(0x00). 17371.271205: lirc protocol(nec): scancode = 0x41d 17371.271237: event type EV_MSC(0x04): scancode = 0x41d 17371.271237: event type EV_SYN(0x00). Thank you so much for helping! Edited September 17, 2023 by tizianomattei wrong outputs 0 Quote
tizianomattei Posted September 17, 2023 Author Posted September 17, 2023 SORRY, I forgot I had rebooted and lost my config. Now I've redone the last steps and ir-keytable -t gives the following: Testing events. Please, press CTRL-C to abort. 18634.316865: lirc protocol(nec): scancode = 0x41c 18634.316925: event type EV_MSC(0x04): scancode = 0x41c 18634.316925: event type EV_KEY(0x01) key_down: KEY_LEFT(0x0069) 18634.316925: event type EV_SYN(0x00). 18634.452052: event type EV_KEY(0x01) key_up: KEY_LEFT(0x0069) 18634.452052: event type EV_SYN(0x00). 18635.535743: lirc protocol(nec): scancode = 0x444 18635.535795: event type EV_MSC(0x04): scancode = 0x444 18635.535795: event type EV_KEY(0x01) key_down: KEY_UP(0x0067) 18635.535795: event type EV_SYN(0x00). 18635.668038: event type EV_KEY(0x01) key_up: KEY_UP(0x0067) 18635.668038: event type EV_SYN(0x00). 18636.345104: lirc protocol(nec): scancode = 0x448 18636.345149: event type EV_MSC(0x04): scancode = 0x448 18636.345149: event type EV_KEY(0x01) key_down: KEY_RIGHT(0x006a) 18636.345149: event type EV_SYN(0x00). 18636.480079: event type EV_KEY(0x01) key_up: KEY_RIGHT(0x006a) 18636.480079: event type EV_SYN(0x00). 18637.155758: lirc protocol(nec): scancode = 0x41d 18637.155803: event type EV_MSC(0x04): scancode = 0x41d 18637.155803: event type EV_KEY(0x01) key_down: KEY_DOWN(0x006c) 18637.155803: event type EV_SYN(0x00). 18637.288043: event type EV_KEY(0x01) key_up: KEY_DOWN(0x006c) 18637.288043: event type EV_SYN(0x00). Anyway, the buttons still don't work in the desktop environment or the apps. 0 Quote
tizianomattei Posted September 17, 2023 Author Posted September 17, 2023 Found /sys/class/rc/rc0/ with: Name: sunxi-ir Driver: sunxi-ir Default keymap: rc-empty Input device: /dev/input/event3 LIRC device: /dev/lirc0 Attached BPF protocols: Operazione non permessa Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon rc-mm Enabled kernel protocols: lirc nec bus: 25, vendor/product: 0001:0001, version: 0x0100 Repeat delay = 500 ms, repeat period = 125 ms This is ir-keytable without arguments... 0 Quote
Solution usual user Posted September 17, 2023 Solution Posted September 17, 2023 I'm guessing you're configuring the rc only after XWindow is already started, that way the input event device can't be added as an XWindow input device at times. Load the rc keymap during the boot process by adding it to /etc/rc_maps.cfg. E.g.: * rc-empty your-config-name.toml as last line added. 0 Quote
tizianomattei Posted September 17, 2023 Author Posted September 17, 2023 It worked! Thank you so much! I'll mark this as solved 😃 Now, for the broken wifi... (just kidding... there are plenty of threads already about that and as of now there seem to be no solution...) 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.