Jump to content

Armbian-Stretch and IR-Remote?


Clash

Recommended Posts

Hello,

after a short break, wants to continue with the Tinkerboard. :) I use Armbian-Stretch with the kernel-4.4.126. 
I want to connect an IR receiver to a GPIO port and use it with the lircd tool. 
What possibilities does Armbian-Stretch offer me here? 
Thank you very much. 

 

Clash

Link to comment
Share on other sites

8 hours ago, Clash said:

What possibilities does Armbian-Stretch offer me here? 

Armbian offers you a buildscript to figure out on your own whats needed to get it working. ;) :lol:

 

From what I know IR related drivers are not enabled per default in the kernel. So you might look what's needed, activate it and test it. The current bsp kernel (and by activate IR it's most likely that you need HW acceleration, so bsp 4.4 kernel is a must) has some issues so you might consider waiting a bit until it's stabilized again or you help get it stabilized. It's currently working but it has still some issues. 

Link to comment
Share on other sites

9 minutes ago, chwe said:

and by activate IR it's most likely that you need HW acceleration, so bsp 4.4 kernel is a must

 

I think this is thankfully not the case, the IR drivers are inherently just serial input.  From there, however, I don't use them so I know nothing more.

Link to comment
Share on other sites

others (e.g. Mediatek) have dedicated IR-drivers.. :P It might be worth to look through some RK3288 based TV boxes to see how they solved it.. I never spend much attention to IR-stuff.  You might look through ArmbianIO, I've in mind that @Larry Bank has done some IR-Stuff for boards witch have a IR receiver populated, so maybe this is also possible for the tinker, no clue cause never tested.

https://github.com/bitbank2/ArmbianIO/tree/master/

Link to comment
Share on other sites

2 minutes ago, chwe said:

others (e.g. Mediatek) have dedicated IR-drivers.. :P It might be worth to look through some RK3288 based TV boxes to see how they solved it.. I never spend much attention to IR-stuff.  You might look through ArmbianIO, I've in mind that @Larry Bank has done some IR-Stuff for boards witch have a IR receiver populated, so maybe this is also possible for the tinker, no clue cause never tested.

https://github.com/bitbank2/ArmbianIO/tree/master/

I created a NEC IR code receiver. It's really pretty simple. The IR receiver on These ARM SBCs is just a digital signal connected to a GPIO pin. I shared a demo program on GitHub here:

 

https://github.com/bitbank2/ir_receiver

 

Link to comment
Share on other sites

Hello,

 

thank you very much for the many answers. I have a patch for a device tree module.
How can I implement a patch for rk3288-miniarm.dts in the build process?

Do I need a modified patch? Does this work with the device tree module? Is that used at Armbian?

 

Greetings Clash

 

PS: The Patch is from here: rk3288-miniarm-ir.diff

This patch provides that all IR signals are received via the lircd tool.

Patch: rk3288-miniarm-ir.diff

Link to comment
Share on other sites

This is what I did to enable remote control on my tv box, which has its own remote controller. I don't know if the same apply for the tinkerboard, at best the key mappings defined below are wrong, at worst the tinkerboard uses a totally differente approach, but anyway this could be a hint if the suggestions you already received did not work.

If you're using the default legacy kernel (4.4.x) you have to modify these two configuration options in the kernel .config file to enable the proprietary rockchip driver:

CONFIG_ROCKCHIP_REMOTECTL=y
CONFIG_ROCKCHIP_REMOTECTL_PWM=y

And then add this section to the device tree which configures the remote controller driver to use pwm0 as an input and also configures the key mappings:

&pwm0 {

        compatible = "rockchip,remotectl-pwm";
        reg = <0x0 0xff680000 0x0 0x10>;
        #pwm-cells = <0x3>;
        pinctrl-names = "default";
        pinctrl-0 = <&pwm0_pin>;
        status = "okay";
        interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_HIGH>;
        remote_pwm_id = <0x0>;
        handle_cpu_id = <0x1>;
        remote_support_psci = <0x0>;

        ir_key1 {
                rockchip,usercode = <0x1dcc>;
                rockchip,key_table =
                        <0xff KEY_POWER>,
                        <0xea KEY_PLAYPAUSE>,
                        <0xe9 KEY_STOP>,
                        <0xf9 KEY_PREVIOUSSONG>,
                        <0xf5 KEY_NEXTSONG>,
                        <0xbe KEY_1>,
                        <0xba KEY_2>,
                        <0xb2 KEY_3>,
                        <0xbd KEY_4>,
                        <0xb9 KEY_5>,
                        <0xb1 KEY_6>,
                        <0xbc KEY_7>,
                        <0xb8 KEY_8>,
                        <0xb0 KEY_9>,
                        <0xb6 KEY_0>,
                        <0xb5 KEY_BACKSPACE>,
                        <0xb7 KEY_F6>,
                        <0xfc KEY_HOME>,
                        <0xf0 KEY_BACK>,
                        <0xbf KEY_MENU>,
                        <0xb3 KEY_TEXT>,
                        <0xef KEY_LEFT>,
                        <0xed KEY_RIGHT>,
                        <0xbb KEY_DOWN>,
                        <0xf8 KEY_UP>,
                        <0xee KEY_ENTER>,
                        <0xfd KEY_VOLUMEDOWN>,
                        <0xf3 KEY_MUTE>,
                        <0xf1 KEY_VOLUMEUP>,
                        <0xfe KEY_F1>,
                        <0xfa KEY_F2>,
                        <0xf6 KEY_F3>,
                        <0xf2 KEY_F4>;
        };

};

then you should be able to find some more devices in /dev/input/event*, one of which is your remote controller.

As I said, the key mappings may be wrong for your remote, or maybe the tinkerboard uses another PWM

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines