Kodi Community Forum

Full Version: [HOW TO] KODI Linux on Amlogic TV Boxes
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2014-03-01, 03:52)superfreak79 Wrote: [ -> ]Can someone help me with a remote control problem?

I bought a generic ATV1200-like box and flashed XDA version of Linux XBMC. The remote that came with the box only works with the stock firmware though Sad. I connected via SSH to the box and copied Biatsch's remote.conf file into /etc/xbmc - but that didn't work either Sad Sad.

i logged the keystrokes of the new box using USB to RS232. I coped the "ircode" and "scancode" for each button (there are a lot of them!). See file here.

I also some information from the box: RM1200 KEY_A; VER1.4 13/C7/15; HX E339169 RoHS; 94-V0 1343.

How would I go about changing Biatsch's file to work with my new remote? Is it that simple?


At the top of remote.conf, there is a serial number that identifies the remote that has to be correct for it to work. Since we all mostly have stock My Gicas, we've only had to deal with the one remote.

Try using the remote from your stock My Gica and see if it works.

(2014-01-21, 18:09)sonicov Wrote: [ -> ]Actually there is one thing I would like to change for ATV520E remote. The button with two "windows". Check picture below, the button next right to "home" button.

At first it didn't do anything, but I checked the code from dmesg, and mapped it now to work as the "info" button just to check how to get it mapped to something. So I added line:

    0x51 23        ;NOTIFICATION (like to change this to EPG)

Now it works as configured, but what would be correct code for letter "E", so I would get EPG? Any ideas?

ATV520E Remote




Guess what! I figured out the scancode for EPG!

Remote.conf uses standard keyboard keycodes. I found a table of them here:


Using the table on this page, the keycode for 'e' is 0x12 in hex and 18 in decimal. Since the codes in the table are in hex, use the '0x' prefix so you don't have to convert.

So, the scancode for EPG in remote.conf looks like this:

    0x51 0x12    ;EPG

BTW: Could you tell me what remote's key code is for the 'Mouse' button? Since the mouse doesn't seen to work, I'd like to re-assign it.


Using the scancode table in the link above, you can change the double window (or Mouse) button to anything a single XBMC keystroke can deliver, EPG is just one choice. Use the XBMC keyboard shortcuts table to find the command you want, match it up with the value in the scancode table, then insert that value into the remote.conf file.

I figured out another use for that double window button to the right of the home button. I changed it to:

    0x51 166        ;MEDIA_STOP

This is the 'Stop' command, so it'll stop any media playing. It saves two steps and adds a new function to the remote that is used a lot.

    0x51  164 MEDIA_PLAY_PAUSE

This command will toggle Play/Pause like the spacebar on a keyboard, another handy button to have.

Here's a table with many keycodes that match up with XBMC in decimal:


Not all of them line up, but the letters, numbers and symbols seem OK, but it should be enough to map most XBMC commands to the remote:

That is awesome. Anyone want to make a new remote.conf with instant power off?

(2014-02-28, 23:06)tinker Wrote: [ -> ]Folks:

I finally figured out why the power button on the remote would switch the power off when I reinstalled and then 'mysteriously' switch to the power off menu later.

It was because of my remote.conf file!

The JynxBox remote.conf looks like this:

    0x45 31    ;POWER

The remote.conf file posted by Biatsch [https://www.dropbox.com/s/b3po4acd0c24tjj/remote.conf] looks like this:

    0x45 116    ;POWER

So, if you want the box to shut right down, use the value '31' for the power setting. If you want the power off menu, use the value '116'.

The power button on the XBMC home screen shuts the box right off regardless of remote.conf power setting value, so if you want both the menu & a way to quickly power down, use the value '116'.

This probably applies to any version of XBMC that uses a remote.


You could do it yourself. Use XBMC File Manager to copy the remote.conf file from etc/xbmc/ to somewhere you can edit it, a USB stick or network share. Then open it up in a word processor (notepad for Windows doesn't work, so use wordpad instead). Modify the line that defines Power to the value you want. Save the file and use XBMC File Manager to replace the remote.conf file where you found it. Reboot to see the results.

Google how to use the XBMC File Manager if you need to but it's pretty counter-intuitive. just remember, 'c' brings up the context menu for highlighted files.

You know right after I posted I realized its a really simple edit. Thanks I'll edit it. Instant power off is exactly what I need.

It's better if folks edit there own remote.conf anyway. Some might have different remotes besides the one in the picture and this mod should work for all of them, even if it doesn't have a power button.


Don't worry, I found the scancode for the 'Mouse' button right in the remote.conf file!

fn_key_scancode    = 0x50

I haven't tried to get the mouse working but this key can be assigned to any function like I did above.

I assigned the Play/Pause function to test it by adding this line to my remote.conf:

    0x50 164        ;MEDIA_PLAY_PAUSE


try out some remote configs....... u have to rename in remote.conf .... maybe mouse cauld work ..... mine hasnt got a mouse button and doublewindow isnt there, too
(2014-03-02, 11:44)Biatsch Wrote: [ -> ]https://www.dropbox.com/sh/1r3anv4hfubi5wr/Ss2bD31f9Q

try out some remote configs....... u have to rename in remote.conf .... maybe mouse cauld work ..... mine hasnt got a mouse button and doublewindow isnt there, too


Thanks for the remote.conf file collection. I've had a look at them and there is some number juggling I can try with them but there's always the chance that the mouse cursor function the My Gica had in Android simply doesn't exist in Linux/XBMC.

Still, it was worth the time finding out what the scancodes were so that every button on the remote can work. Also, thanks for your earlier work helping get the other buttons to work. I'll write up a remote.conf that uses all the buttons and pass it on (once I figure what works best).

Can you post a picture of your remote?

(2014-03-01, 05:12)tinker Wrote: [ -> ]At the top of remote.conf, there is a serial number that identifies the remote that has to be correct for it to work. Since we all mostly have stock My Gicas, we've only had to deal with the one remote.

Try using the remote from your stock My Gica and see if it works.


Yes, the ATV520E remote works with the generic ATV1200. I logged the scan codes used with the ATV520E remote and it matches with the Biatsch remote.conf .

So, here's my remote.conf file that I'm using with all buttons functioning (but no 'mouse'). It's based on the original Android remote.conf, Biatsch's version and stuff I learned here.

This is the remote I'm using:


I've mapped the double window button beside 'Home' to MEDIA_PLAY_PAUSE and the 'Mouse' button beside 'Power' to MEDIA_STOP. I've also commented the remote.conf file to make it easier to modify.

Select all the text in the code window below and then right click 'Copy'. Paste it into a word processor and save it as 'remote.conf'. You can then use XBMC's File Manager under 'System' to move the file to etc/xbmc/remote.conf.

# This file is configuration for each factory remote device
#     work_mode      0 :software mode  1 :hardware mode
#    repeat_enable      0 :disable repeat 1 :enable repeat    
#    factory_code      each device has it's unique factory code.
#              pattern:custom_code(16bit)+index_code(16bit)
#              examble: 0xff000001 = 0xff00(custom cod)  0001 (index)
#    release_delay      unit:ms.release will report from kernel to user layer after this period of time
#              from press or repeat triggered.
#    debug_enable      0 :debug disable  1 :debug disable
#    bit_count      how many bits in each frame      
#    tw_leader_act      time window for leader active
#    tw_bit0          time window for bit0 time.
#    tw_bit1          time window for bit1 time
#    tw_repeat_leader  time window for repeat leader
#    reg_base_gen      set value for PREG_IR_DEC_BASE_GEN    
#    reg_control      set value for PREG_IR_DEC_CONTROL
#    reg_leader_act      set value for PREG_IR_DEC_LEADER_ACTIVE
#    reg_leader_idle      set value for PREG_IR_DEC_LEADER_IDLE
#    reg_repeat_leader set value for PREG_IR_DEC_REPEAT_IDLE
#    reg_bit0_time      set value for PREG_IR_DEC_BIT0_TIME
# MYGICA NEC remote
factory_code    = 0xBD020001
work_mode      = 1
repeat_enable   = 1
release_delay    = 150
debug_enable     = 1
reg_control    = 0xfbe40
fn_key_scancode    = 0x50
left_key_scancode  = 0x99
right_key_scancode = 0xc1
up_key_scancode    = 0xca
down_key_scancode  = 0xd2
ok_key_scancode    = 0xce
pageup_key_scancode = 0x04
pagedown_key_scancode = 0x1b

    0x80 66        ;MUTE
    0xdd 78        ;VOL+
    0x8c 74        ;VOL-
    0x9a 177        ;PAGE_UP
    0xcd 178        ;PAGE_DOWN
    0x95 1        ;HOME
    0xc5 23        ;NOTIFICATION (the 'i' button, or 'info' in XBMC)
    0x99 105        ;LEFT
    0xca 103        ;UP
    0xc1 106        ;RIGHT
    0xd2 108        ;DOWN
    0xce 28        ;OK
    0xd6 46        ;MENU
    0xd0 14        ;EXIT (the 'Back' button)
    0x45 31        ;POWER ('31' is instant power off, '116' calls up the power off menu)
    0x9c 0xa3    ;ZOOMIN (next track)
    0x89 0xa5    ;ZOOMOUT (previous track)
    0x51 164        ;MEDIA_PLAY_PAUSE (0x51 is the double window button beside 'Home')
#    0x51 0x12    ;EPG (or any other keycode. 0x12 is hexidecimal for 18, either will work)
    0x50 166        ;MEDIA_STOP (0x50 is the 'Mouse' button beside 'Power')

        0x00 0xc6     ; mouse move up
        0x01 0xd1     ; mouse move down
        0x02 0xd5    ; mouse move left
        0x03 0x90    ; mouse move right


Mine is looking like this Wink
Quote: #*********************************************************************************************************
#this file is configuration for each factory remote device
# work_mode 0 Confusedoftware mode 1 :hardware mode
# repeat_enable 0 :disable repeat 1 :enable repeat
# factory_code each device has it's unique factory code.
# pattern:custom_code(16bit)+index_code(16bit)
# examble: 0xff000001 = 0xff00(custom cod) 0001 (index)
# release_delay unit:ms.release will report from kernel to user layer after this period of time
# from press or repeat triggered.
# debug_enable 0 :debug disable 1 :debug disable
# bit_count how many bits in each frame
# tw_leader_act time window for leader active
# tw_bit0 time window for bit0 time.
# tw_bit1 time window for bit1 time
# tw_repeat_leader time window for repeat leader
# reg_base_gen set value for PREG_IR_DEC_BASE_GEN
# reg_control set value for PREG_IR_DEC_CONTROL
# reg_leader_act set value for PREG_IR_DEC_LEADER_ACTIVE
# reg_leader_idle set value for PREG_IR_DEC_LEADER_IDLE
# reg_repeat_leader set value for PREG_IR_DEC_REPEAT_IDLE
# reg_bit0_time set value for PREG_IR_DEC_BIT0_TIME
# MYGICA NEC remote
factory_code = 0xBD020001
work_mode = 1
repeat_enable = 1
release_delay = 150
debug_enable = 1
reg_control = 0xfbe40
fn_key_scancode = 0x15
left_key_scancode = 0x1c
right_key_scancode = 0x48
up_key_scancode = 0x44
down_key_scancode = 0x1d
ok_key_scancode = 0x5c
pageup_key_scancode = 0x04
pagedown_key_scancode = 0x1b

0x80 66 ;MUTE
0xdd 78 ;VOL+
0x8c 74 ;VOL-
0x9a 177 ;PAGE_UP
0xcd 178 ;PAGE_DOWN
0x95 1 ;HOME
0x99 105 ;LEFT
0xca 103 ;UP
0xc1 106 ;RIGHT
0xd2 108 ;DOWN
0xce 28 ;OK
0xd6 46 ;MENU
0xd0 14 ;EXIT
0x45 116 ;POWER
0x9c 0xa3 ;ZOOMIN (next track)
0x89 0xa5 ;ZOOMOUT (previous track)

0x00 0xc6 ; mouse move up
0x01 0xd1 ; mouse move down
0x02 0xd5 ; mouse move left
0x03 0x90 ; mouse move right

So, same number of buttons, different assignment. The zoom buttons replace the two I modified. Is next/previous track really useful?

For playing music ..... Yes
For all users using the Mele f10 pro with the geniatec v2 inux build I have found that on reboot sound tries to come through the built in speaker on the remote.

This is due to the asound.conf being installed with the card # instead of the named device.

To fix this change the asound.conf file in /etc to have the following:
pcm.!default { type hw card AMLDUMMYCODEC }
pcm.default.card AMLDUMMYCODEC

You may want to verify the card0 default name, but this is what worked for me.

I hope this helps.