Posts by atom_bomb

    hello, maybe this is slightly off topic but i notice that some people have had a problem getting their remote control to work with the various images in this thread.

    the rockchip IR input drivers emit linux input events directly to the /dev/input/eventX devices, without using lircd or eventlircd so most of the step-by-step directions for setting up a remote control won't work on rk322x systems.

    here is a link describing how to setup a remote control for rockchip:

    TB-RK3399ProD wiki

    basically, you need to connect to the system and get a shell prompt from the console or over ssh

    enable IR debug output

    echo 1 > /sys/module/rockchip_pwm_remotectl/parameters/code_print

    then press all of the buttons on your remote

    use 'dmesg' to see all of the debug output and make a note of the user code and data code for each key press

    then, you need to edit the flattened device tree for your system to add the remote control mappings..

    shutdown your tv box and put the SD card back in a regular computer

    use the linux device tree compiler to decompile the *.dtb file on the root of the SD card to a more readable dts file

    edit the mappings in the dts file--

    each remote type seems to have a user code, so find the ir_key section corresponding to your remote's user code or create a new one.

    the values in rockchip,key_table are pairs of remote data code followed by linux input event code..

    so make a new table using the data codes that you wrote down from pressing your remote buttons and the corresponding linux input event codes from here:

    linux/input-event-codes.h at master · torvalds/linux · GitHub

    then use the device tree compiler to compiler your work back into a .dtb file, copy it over the old dtb file on the SD card.

    hope that helps you or someone you love.