Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Basic IR setup on OPi3-lts

Featured Replies

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

Solved by usual user

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.

  • Author

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

  • Author

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 by tizianomattei
wrong outputs

  • Author

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.

  • Author
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...

  • Solution

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.

 

  • Author

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...)

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.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.