Announcement

Collapse
No announcement yet.

Announcement

Collapse
No announcement yet.

Prometheus Universal Remote Setup (For any Amlogic board with IR)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    #16
    This is confirmed working in Tronsmart Vega Standard s89. Very, very nice indeed. Another +1 for AMLogic, I tried to get this to work on Rockchip but they had to go and make things difficult.


    Only after you've donated to Finless and Neomode are you allowed to donate here.

    Comment


      #17
      Originally posted by noderat View Post
      This is confirmed working in Tronsmart Vega Standard s89. Very, very nice indeed. Another +1 for AMLogic, I tried to get this to work on Rockchip but they had to go and make things difficult.
      Actually I did not get this to work with my Vega S89 and my Logitech Harmony. I tried following the guide here and set my Harmony to the Pivos XIOS device, which I understood to be sending NEC compatible IR signals.



      But no matter what buttons I press, I do not see any new remote related log entries in dmesg/logcat. And yes, debug is enabled in remote.conf.

      With the original remote.conf I do not get the "Wrong custom code" messages from my Harmony.

      With the modified remote.conf the default remote stops working (as expected), but I still do not get the "Wrong custom code" messages from either remote.

      Comment


        #18
        Re: Prometheus Universal Remote Setup (For any Amlogic board with IR)

        Originally posted by Loibisch View Post
        Actually I did not get this to work with my Vega S89 and my Logitech Harmony. I tried following the guide here and set my Harmony to the Pivos XIOS device, which I understood to be sending NEC compatible IR signals.



        But no matter what buttons I press, I do not see any new remote related log entries in dmesg/logcat. And yes, debug is enabled in remote.conf.

        With the original remote.conf I do not get the "Wrong custom code" messages from my Harmony.

        With the modified remote.conf the default remote stops working (as expected), but I still do not get the "Wrong custom code" messages from either remote.
        What firmware are you running?

        Sent from my mobile device. Please excuse any typos.


        Only after you've donated to Finless and Neomode are you allowed to donate here.

        Comment


          #19
          Stock 101k4. But I have made great progress since posting here, which might help others.

          I managed to get the "Wrong custom code" messages by disabling the hardware mode (setting work_mode = 0). After disabling this flag I get the appropriate messages in the dmesg output, and the device finally starts interpreting whatever I put into the remote.conf. Also important is that the "Wrong custom code" messages show up ONLY in dmesg, and not in logcat even when set to verbose.

          Another issue I resolved is, that the device only listens to the default factory_code when in standby, possibly because it uses some default hardware decoding in this state. This means that after changing the factory code, sending "POWER WAKE" with the new remote will only put the device to sleep, but not wake it up.

          I have solved this in my Harmony remote by using the new remote's "POWER WAKE" signal only for "power off", and I recorded the original remote's "power toggle" button for use solely as the "power on" signal.
          So in standby the device will see the original remote's signal (and factory_code) for power on, and when running it will receive the new "POWER WAKE" with the modified factory_code, which gets interpreted in software and powers the unit down. Neither button works in the respective other state, so this solution works quite well.

          I used the remote.conf for the Pivos XIOS, but had to change a couple of keycodes. Attached is my new remote.conf, which is far from perfect but should serve as a good starting point for people trying to set this up. One thing I didn't get to work yet is the function key for mouse toggle, but it's not as important to me at the moment. Maybe I'll try again later this week.

          If anyone has any more questions getting this to work, feel free to ask.
          Attached Files

          Comment


            #20
            Just a warning note: be careful changing /system/etc/remote.conf. For example when trying to get RC5 to work. When applying the remote.conf with remotecfg the TV Box may hang immediately. Rebooting may fail and cause the Box to hang forever. I was lucky that the sync to disk/flash had not taken place, so my /system/etc/remote.conf was almost empty.

            I'd advice to create a remote.conf somewhere in /storage. Test it with remotecfg and once working, mount /system read-write and copy the remote.conf from /storage to /system/etc/remote.conf. Optionally followed by the sync command.

            Excellent thread BTW!! Thanks for taking the time to write all this down.

            Comment


              #21
              Posted a full configuration / howto, for configuring a Logitech Harmony remote for the ENY M8, Amlogic based, Android TV Box. This may be of interest for readers of this thread. See the following thread for more information: Logitech Harmony remote setup for ENY M8 Android TV Box.

              Comment


                #22
                Able remote on play store works great on S89H

                Comment


                  #23
                  Was anyone able to make it work with multiple remotes? If I simply add the second remote setup as was suggested - works only last remote in config. ((

                  Comment


                    #24
                    Originally posted by bahus View Post
                    Was anyone able to make it work with multiple remotes? If I simply add the second remote setup as was suggested - works only last remote in config. ((
                    Tried it too on M8 and did not get it to work either. I doubt it is supported.

                    Comment


                      #25
                      To the Guy who posted this howto on his Blog. I think that Op went by Amin.

                      In his howto he laments the fact that he can't get the pre-programed I/O (Power Button) to work, and had to use a "Dirty Hack" to get 'round it.

                      I have just One question to him... Why can't you use the Harmony Software to re-learn that perticular IR Code from the original Remote. As the Pivos XIOS DS. Also seems to lack the correct code(s), for the Keypad / Mouse. I was also... (That is I WILL be able to scan that Signal into my Harmony One as well).

                      Though I'm still in the "testing phase" I can confirm that I at least have I/O working on my Harmony One at this time.

                      The only Buttons that don't seem to have any function at the moment are the: (i.e. Harmony One)

                      Guide
                      Ch. Up
                      Ch. Down
                      Back (Previous Ch.)
                      Record <- I'd like to have this before moving on to OpenElec / AMLinux.
                      +
                      E

                      I haven't had a go as to what all the Softbutton's did save "CodecInfo" which was changed to become the new I/O Button. Sure it works, but I find it sloppy and irrational. When you can just edit the singe IR Code to your exact standard. In these instances the Power & Mouse Buttons.

                      *EDIT*
                      The most amusing thing I have found thus far on my 1G/8G MXIII (M82), Box was a profile for the Logitech G25 Racing Wheel. Now I only have the G27 (i.e. The updated version of the G25). But I'm gonna have to see how I can test this out in some Games now. I wonder if the H-Gate Shifter, and Clutch are mapped? I think they were. But, I'd have to check the Profile once more...
                      Last edited by Ichijoe; 11-14-2014, 03:37.

                      Comment


                        #26
                        Originally posted by Loibisch View Post
                        I have solved this in my Harmony remote by using the new remote's "POWER WAKE" signal only for "power off", and I recorded the original remote's "power toggle" button for use solely as the "power on" signal.
                        So in standby the device will see the original remote's signal (and factory_code) for power on, and when running it will receive the new "POWER WAKE" with the modified factory_code, which gets interpreted in software and powers the unit down. Neither button works in the respective other state, so this solution works quite well.

                        I used the remote.conf for the Pivos XIOS, but had to change a couple of keycodes. Attached is my new remote.conf, which is far from perfect but should serve as a good starting point for people trying to set this up. One thing I didn't get to work yet is the function key for mouse toggle, but it's not as important to me at the moment. Maybe I'll try again later this week.

                        If anyone has any more questions getting this to work, feel free to ask.
                        Having a play with this similar setup and a Harmony One Remote... And realizing that my immediately hasty thoughts weren't gonna cut it. I realized that copying the Original Power Signal, and setting that as the "Power On" Key, was in fact the closest thing to the correct answer.
                        (Yeah One free Bonus Key!! e.g. There wasn't a need to sacrifice any specific Key for this Task),
                        While assigning the "POWER OFF" -> 704 Key as the Power off Key. Essentially having Two distinct Power Keys One for powering up the Device, and to shut it off again afterwords.

                        One thing I could advise anyone in this Thread to do is to grab a Pen (or a Notepad lol), and write down the Hex Code related to each Button on the Standard Remote. Possibly going as far as to note such functions in the remote.conf itself.

                        In any case if it helps... The code to the Mouse I/O Code is: 0x3ac5bd02 (PIVOS) -> e.g. 0xac5, which is mapped to Key 388 (Which again like Key 704 i.e. Power....), doesn't seem to have a listing under the Vender_0001_Product_0001.kl File. I currently have the Guide Button mapped to use it. And it works a damned sight better then the Stock Remote that's for sure!...
                        NO MORE SINE WAVES!!! (God I how hated / hate that about the Stock Remote AUGGH!)

                        If you need the Stock Code... I think its: 0xad527f80 -> 0x52 which is again linked to Key 388...

                        But, I'm curious is it possible to have both Remotes in the same remote.conf File, in the event that I'd wish to lend my MXIII to my Old Man for a Week (or so...), to convince him why this Box is better then an G3 Apple TV? At the moment... This doesn't seem possible... As having done so... The Stock Remote seems to have taken over the Device. Causing my Harmony not to be seen... Or to be seen as using the wrong codes again.

                        'Cause you'd have to pretty much claw the Harmony from my cold dead Fingers before I'd give that One up!
                        Last edited by Ichijoe; 11-22-2014, 02:41.

                        Comment


                          #27
                          "I have just One question to him... Why can't you use the Harmony Software to re-learn that perticular IR Code from the original Remote. As the Pivos XIOS DS. Also seems to lack the correct code(s), for the Keypad / Mouse. I was also... (That is I WILL be able to scan that Signal into my Harmony One as well)."

                          And him is answering... :-) Actually in the example I provided, one is required to teach the Harmony remote the original M8 remote power-wake(/sleep) code. The actual limitation is not within the Harmony remote. It will easily learn any code you send to it with another remote. However, the M8 remote IR receiver and/or its driver is only able to work with one 'factory-code'. As explained, the power/wake/sleep button of the original M8 remote sends a specific factory code + key code. And only that signal will wake up the device. Probably hard-coded in hardware. Since the original remote does not provide enough key-codes and is not available in the Harmony Remote devices datavase, I choose the Pivos XIOS DS remote, which has more buttons( = key codes) *and* is available in the Harmony database. However, that one uses a different factory code. Hence a 'hack' is required like the one I explained in my article. Hope this clarifies things a little. It would have been much easier if the Harmony remote really was fully programmable and not limited by the GUI provided by Logitech.

                          Comment


                            #28
                            Originally posted by amain View Post
                            "I have just One question to him... Why can't you use the Harmony Software to re-learn that perticular IR Code from the original Remote. As the Pivos XIOS DS. Also seems to lack the correct code(s), for the Keypad / Mouse. I was also... (That is I WILL be able to scan that Signal into my Harmony One as well)."

                            And him is answering... :-) Actually in the example I provided, one is required to teach the Harmony remote the original M8 remote power-wake(/sleep) code. The actual limitation is not within the Harmony remote. It will easily learn any code you send to it with another remote. However, the M8 remote IR receiver and/or its driver is only able to work with one 'factory-code'. As explained, the power/wake/sleep button of the original M8 remote sends a specific factory code + key code. And only that signal will wake up the device. Probably hard-coded in hardware. Since the original remote does not provide enough key-codes and is not available in the Harmony Remote devices datavase, I choose the Pivos XIOS DS remote, which has more buttons( = key codes) *and* is available in the Harmony database. However, that one uses a different factory code. Hence a 'hack' is required like the one I explained in my article. Hope this clarifies things a little. It would have been much easier if the Harmony remote really was fully programmable and not limited by the GUI provided by Logitech.

                            Yep it was a case of my Brain, and fingers being too quicker then the actual reality of the situation...
                            The best "Work-a-round" I've come up with was to Clone the Power Button of the Stock Remote, as a additional Button that's not otherwise present in the PIVOS List. I named this new Button "Power On", and it's just the Stock Remote Code. It will turn the Device "on"... But, once the remote.conf gets loaded the Key is no longer recognized. Duh...

                            I took the liberty of replacing the ;--- --- POWER WAKE as 0x?? 704 POWER OFF SUSPEND.

                            And, that's been working out very nicely for me... Yeah a Single I/O Button would be better. But this is almost as good. I've since turned the 0xd9 116 POWER WAKE into a NOT CURRENTLY IN USE Button along with a few others.

                            Another Key you should possibly add is 0x?? 388 MOUSE Toggle.
                            Which if just added to the stock remote.conf file as seen at zoomeren.nl will work absolutely like you'd think it should. The only time it seems to get wonky is when I try to add additional MEDIA commands (Play, Pause, Stop FF, RW, Prev., Next & Record). ex for external Players. That aren't keyboard mapped to XBMC. Which it seems to infact be... So making a remote Keymap for XBMC that bypasses the Keyboard and can instead read the remote.conf or the *.kl Remote Map functions instead is somewhat higher on my todo list.

                            As I'd prefer MEDIA_PLAY over say "P" or the "Spacebar" as per the current standard....

                            I have just one other question is it possible to force RC5 on the M82 / S82? And if so... How?
                            I have this funny feeling that if we could get RC5 to work on this Device... Then sending T9 shouldn't be a problem anymore... At least this wasn't the case with my VDR System... Same remote, which also used RC5, and was also able to accept T9 Entry from with in XBMC.

                            Comment


                              #29
                              Anyone can help me out?
                              My device is a Xiaomi Box TV (enhanced version, 2gb ram), another amlogic based player.
                              I've been trying to get it to recognize ir signals from my logitech harmony using the Pivos Xios profile so I can get the 'Wrong Custom Code' message in the dmesg logs, and yet nothing shows up.

                              Here are the config files from the box

                              Remote.conf
                              Code:
                              #*********************************************************************************************************#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
                              #
                              # SW MODE:
                              #    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 leader1
                              # REG
                              #    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
                              #************************************************************************************************************* 
                              #amlogic DUOKAN remote
                              factory_code    = 0x00860001 
                              work_mode       = 1
                              repeat_peroid   = 67
                              repeat_delay    = 200
                              repeat_enable   = 1
                              release_delay   = 33
                              debug_enable    = 1
                              bit_count       = 20
                              key_begin
                                      0x05 103
                                      0x06 108
                                      0x0b 105
                                      0x0c 106
                                      0x0d 28
                                      0x08 102
                                      0x07 158
                                      0x04 139
                                      0xcc 116
                                      0x11 236
                                      0x01 235
                                      0x0e 115
                                      0x0f 114
                                      0x3f 59
                                      0xf3 60
                                      0xc3 61
                                      0x3c 62
                                      0xcf 63
                                      0xfc 64
                                      0x33 65
                                      0x30 66
                                      0x12 67
                                      0xf0 68
                                      0xc0 87
                                      0xff 88
                              key_end
                              repeat_key_begin                                       
                                      0x05 103                                    
                                      0x06 108                                    
                                      0x0b 105                                         
                                      0x0c 106                                         
                                      0x0d 28                                          
                                      0x08 102                                         
                                      0x07 158                                                                                      
                                      0x04 139                                                                                      
                                      0xcc 116
                                      0x11 236
                                      0x01 235
                                      0x0e 115    
                                      0x0f 114  
                              repeat_key_end
                              Vendor_0001_Product_0001.kl
                              Code:
                              key 399   GRAVEkey 1     BACK
                              key 2     1
                              key 3     2
                              key 4     3
                              key 5     4
                              key 6     5
                              key 7     6
                              key 8     7
                              key 9     8
                              key 10    9
                              key 11    0
                              key 15    BACK
                              key 158   BACK
                              key 58    SOFT_RIGHT
                              key 107   ENDCALL
                              #key 62    ENDCALL
                              key 139    MENU
                              key 125    MENU
                              #key 60    NOTIFICATION
                              key 127   SEARCH
                              key 217   SEARCH
                              key 228   POUND
                              key 227   STAR
                              key 231   CALL
                              #key 61    CALL
                              key 97    DPAD_CENTER
                              key 232   DPAD_CENTER
                              key 108   DPAD_DOWN
                              key 103   DPAD_UP
                              key 102   HOME
                              key 105   DPAD_LEFT
                              key 106   DPAD_RIGHT
                              key 115   VOLUME_UP
                              key 114   VOLUME_DOWN
                              key 104   VOLUME_UP
                              key 109   VOLUME_DOWN
                              key 212   CAMERA
                              key 236   POWERLOW
                              key 235   SWITCHRESOLUTION
                              key 164   MEDIA_PLAY_PAUSE
                              
                              
                              key 16    Q
                              key 17    W
                              key 18    E
                              key 19    R
                              key 20    T
                              key 21    Y
                              key 22    U
                              key 23    I
                              key 24    O
                              key 25    P
                              key 26    LEFT_BRACKET
                              key 27    RIGHT_BRACKET
                              key 43    BACKSLASH
                              
                              
                              key 30    A
                              key 31    S
                              key 32    D
                              key 33    F
                              key 34    G
                              key 35    H
                              key 36    J
                              key 37    K
                              key 38    L
                              key 39    SEMICOLON
                              key 40    APOSTROPHE
                              key 14    DEL
                              
                              
                              key 44    Z
                              key 45    X
                              key 46    C
                              key 47    V
                              key 48    B
                              key 49    N
                              key 50    M
                              key 51    COMMA
                              key 52    PERIOD
                              key 53    SLASH
                              key 28    ENTER
                              
                              
                              key 56    ALT_LEFT
                              key 100   ALT_RIGHT
                              key 42    SHIFT_LEFT
                              key 54    SHIFT_RIGHT
                              #key 15    TAB
                              key 57    SPACE
                              key 70    EXPLORER
                              key 155   ENVELOPE
                              
                              
                              key 12    MINUS
                              key 13    EQUALS
                              key 215   AT
                              key 119   MEDIA_PLAY_PAUSE
                              key 122   MEDIA_PREVIOUS
                              key 123   MEDIA_NEXT
                              key 120   MEDIA_FAST_FORWARD
                              key 121   MEDIA_REWIND
                              key 116   POWER    WAKE
                              key 113   VOLUME_MUTE
                              key 128   MEDIA_STOP
                              key 130   ZOOM_IN
                              key 131   ZOOM_OUT
                              key 133   TAB
                              key 140   F10
                              key 132   TV_REPEAT
                              key 134   TV_SHORTCUTKEY_DISPAYMODE
                              key 135   TV_SUBTITLE
                              key 136   TV_SHORTCUTKEY_VOICEMODE 
                              key 137   TV_SWITCH
                              key 59    F1    WAKE_DROPPED
                              key 60    F2    WAKE_DROPPED
                              key 61    F3    WAKE_DROPPED
                              key 62    F4    WAKE_DROPPED
                              key 63    F5    WAKE_DROPPED
                              key 64    F6    WAKE_DROPPED
                              key 65    F7    WAKE_DROPPED
                              key 66    F8    WAKE_DROPPED
                              key 67    F9    WAKE_DROPPED
                              key 68    F10   WAKE_DROPPED
                              key 87    F11   WAKE_DROPPED
                              key 88    F12   WAKE_DROPPED
                              I'd like to know if there's still additional few steps that I need to do to properly get the new remote log entries.
                              Also, I do notice the led light blinks when I'm using the original remote, but not with the logitech harmony 650.

                              Comment


                                #30
                                This didn't work for me.

                                When I follow your guide, I get stuck on "grep | "code is 0x" | rev | cut -c 5-6 -c 9-10 | uniq>> /IRDump.log
                                I get "sh: rev: not found
                                sh: rev: not found"
                                I've googled d rev not found to no avail so any help and I would be grateful.
                                Thanks in advance.

                                Originally posted by cde View Post
                                This is a guide on how to set it up.

                                First, the Tronsmart Prometheus (or clone or g18ref or whatever) normally comes with a 38khz Vishay IR receiver (TSOP34838 marked VS838, fairly common cheap sensor ~$1.50). The Amlogic SOC has a hardware NEC Remote protocol decoder. The Amlogic Remote software can also support RC5 and RC6 remote protocols in software, but I have not figured that out yet. So you need a remote with NEC remote protocol support. More on this in a minute.

                                In my case, I use a Comcast/Xfinity Remote control, which is really a UEI JP1.x Universal Remote Control. It has a ton of different device profiles, and can add and remove buttons, add secondary functions, or even macros, for a fully customized layout, manually. If you use the JP1.x port and some software, you can add so much more to it. Hifi-remote.com and getzweb.net/jp1 are great sources of information for them.

                                The reason I mention that is because I used a random NEC device code to program my Prometheus. It can be any with the NEC protocol, but try to find one which has most of the buttons pre-programmed. Mine was cable box code 899 added to the Cable button. Each device code can send up to 255 scan codes. (0x00 - 0xff).

                                There are four files/programs you will use:
                                Code:
                                * dmesg :     Where you will get your information
                                * Remotecfg :     Used to load new Remote.conf files and checking for errors in them
                                * /system/etc/Remote.conf :     File which maps your remote scan codes to linux key codes
                                * /system/usr/keylayout/Vendor_0001_Product_0001.kl :     File which turns Linux Key codes to Android Key codes for the Amlogic IR device
                                By default, the original Remote.conf should have debugging enabled and be set to a factory code of 0xff000001.

                                If you aim your NEC control at the Prometheus and press a few buttons, run "busybox dmesg", you should see something similar to:
                                Code:
                                [ 5094.377000] Wrong custom code is 0xXXYYZZZZ
                                [ 5095.872000] Wrong custom code is 0xef109c21
                                [ 5097.694000] Wrong custom code is 0xee119c21
                                If you don't see something similar, that remote does not have a NEC protocol. Find another one (or program a different device code). If you do, the code breaks down to 0x (Hex), XX (Checksum?), YY (scancode), ZZZZ (Device code). This means you will use a factorycode of 0xZZZZ0001 or 0x9c210001 in the remote.conf file. You will need this.

                                Before we edit the remote.conf file, we can pull all the scancodes from here.
                                1: Run "dmesg -c" to read then clear the dmesg log.
                                2: Press every button on your remote Once (Keep track of the order)
                                3: Run "dmesg | grep "code is 0x" | rev | cut -c 5-6 -c 9-10 | rev | uniq >> /IRDump.log"
                                This will create /IRDump.log with a list of scan codes, one for each button you pressed, in 0xYY format. These will be used in your Remote.conf file. They should match the order you pressed them in, if not, you will get mixed up buttons later.

                                Next is the Remote.conf file. The default is in (/system)/etc/Remote.conf. This is where the Android Init file for the Prometheus loads it from. Since System is mounted Read Only at start, you will need to be Root. Run "mount -o remount,rw /system" then make a backup just in case "cp /etc/Remote.conf /etc/Remote.conf.bk". Now we can edit the file. The first edit is the factorycode. You should change it like above (For me "factorycode = 0x9c210001")

                                The second is everything between key_begin and key_end. Delete it, and copy your IRDump.log into it. Now comes the annoying part. Mapping each line to a keycode. The format will be scancode, space, keycode (in 0xYY hex, or decimal with no leading zero). It can only be space, not a tab or anything else or Remotecfg will segfault. The default keycodes for the Amlogic IR Device are in /system/usr/Vendor_0001_Product_0001.kl. Format is "key Linux-Keycode Android-Keycode". The LinuxKeycode is what will be produced when your scancode is seen. Then the linux subsystem will send the AndroidKey to the Android system. (you might see FUNCTION, WAKE, WAKE_DROPPED, those parts can be left) The Keycode is fairly arbitrary, but must match between Remote.conf and Vendor_0001_Product_0001.kl

                                Code:
                                Remote.conf           | Vendor_0001_Product_0001.kl
                                0xff 242    ;Help     | key 242   APPSETTING    # SettingsMBox
                                In that case, Scancode 0xff (The Help Button on the remote) produces linux-keycode 242, which produces the "APPSETTING" Android-Keycode. That launches the SettingsMbox app btw. There is no reason that keycode 242 produces appsetting, it could be 1, its arbitrary, just has to match between the two files.

                                Notes. Multiple scancodes in the remote.conf can produce the same keycode. So the "Last" and "Exit" buttons can both produce keycode 158 which is the Android Back key. And multiple keycodes in the .kl can produce the same Android codes. But the same scancode can only produce the last keycode listed. And the same keycode will only produce the last android code listed (if it passes validation at all).
                                Code:
                                Remote.conf
                                0xff 241    ;Help
                                0xff 242    ;Help
                                Vendor_0001_Product_0001.kl
                                key 242   APPSETTING    # SettingsMBox
                                key 242   APPCAMERA    # SCREENSHOT
                                In this case, the Help button scancode 0xff will only produce 242, which will only produce APPCAMERA (Takes screenshots, surprise ).

                                You can edit the Vendor_0001_Product_0001.kl file as well, but the only way to test it is reboot. If the KeylayoutMap library sees an error, it won't load it ("dmesg | grep KeylayoutMap" to check for errors). I pulled every valid Android code from the prometheus framework to the included AMLogic_Keycodes.txt to avoid those errors (just remove the "KEYCODE_" part). Not all will do something, depends on the app really.

                                Remote.conf can be tested right away. Run "remotecfg /path/to/remote.conf" and you will see it read everything, and you can start pressing buttons.

                                Included is my remote.conf and modified Vendor_0001_Product_0001.kl with comments and expanded settings, an annotated Amlogic remote setup guide (google translate + adjustments) and the AMLogic_Keycodes.txt.

                                Useful notes. The POWER and ENDCALL android keycodes will turn off the Prometheus, but since power is cut to the usb hub or usb system or the 5v regulating ic section, and the IR stops responding afaik, the only way to turn it back on is flipping the power switch . The APPSETTING brings up the SettingsMbox, APPCAMERA takes a screenshot, DPAD_CENTER is the left mouse click (acts like the trackball click, very important), and APP_SWITCH brings up recent tasks! Unfortunately the Notifications keycode doesn't do anything?? Ugh.[ATTACH]4676[/ATTACH]

                                The dpad directions and volume keys, Home, Menu, Back, Search (or Assist for direct to google search) are all important. As is Enter and Escape, which act differently from DPAD_Center and Back btw.

                                Finally, APPARENTLY you could have multiple remotes set up. Just add a second setup and key_begin / key_end sections. Haven't tested it.
                                Code:
                                # Comcast Universal Remote NEC Code 00899 (Cable)factory_code    = 0x9c210001
                                work_mode    = 1
                                repeat_enable    = 1
                                release_delay    = 150
                                debug_enable    = 1
                                reg_control    = 0xfbe40
                                
                                
                                key_begin
                                
                                
                                # Numberpad
                                    0x02 2    ;NUM1
                                    0x13 3    ;NUM2
                                
                                key_end
                                
                                # Generic NEC Remote
                                factory_code    = 0x77dd0001
                                
                                
                                key_begin
                                # Numberpad
                                    0x10 2    ;NUM1
                                    0xe5 3    ;NUM2
                                key_end
                                UPDATE: Special Function Mouse settings
                                Just figured out the mouse feature. Adding an IRcode to "fn_key_scancode" will make it work like a toggle for the mouse. The rest act like the directions, left mouse click/finger press (with long press support), and the mouse forward/back buttons. These can be unique buttons, or they can be the same buttons, using the same method to find the scancodes as before. My setup turns 2, 4, 6, 8 into the mouse directions, 5 as the mouse click. The function key has to be pressed once to turn it on, again to turn it off. This should go between the factory code and the key_begin code.
                                Code:
                                fn_key_scancode    = 0x78left_key_scancode  = 0x16
                                right_key_scancode = 0x17
                                up_key_scancode    = 0x13
                                down_key_scancode  = 0x0d
                                ok_key_scancode    = 0x14
                                pageup_key_scancode = 0x18
                                pagedown_key_scancode = 0x19

                                [ATTACH]4676[/ATTACH]

                                Comment

                                Working...
                                X