In this article, we will go from reverse, that is not to teach the remote control give clear command device, and teach the device to realize favorite, convenient and familiar IR remote. I personally like the idea a lot more. Yes and it's a great response marketers because the costs 0. I think every holder of our miracle receiver on the operating system Can have on storing favorite handy remote control.
Immediately I say this statement is suitable for any media consoles () on processors by Amlogic Android, regardless of the number of cores or the version of Android. Ruth is required!!
And so to case.
1. Need of programmes: Root Explorer (File Manager) Better Terminal Emulator Magic
2. Preparation for consoles: – Запускаем программу терминала, Better Terminal Emulator. – последовательно вводим команды :
su (will give root access
терминалу)
dmesg
-(C) (Команда, output message buffer of the kernel on the screen, and for one cleaning buffer )
– Берём в руки пульт, send the media box and press any button of the remote control several times (for example, OK). – Откладываем IR пульт ду, Enter the command in the Terminal:
dmesg | grep "code is 0x"
see the following code buttons (in the example, OK) Wrong custom code is 0x31CEfd01 We are interested in the last four characters
fd01– код производителя и 5-ый ,6-Oh characters CE – код кнопки.
So do for each remote button, naturally write the draft.
3. Add a new remote control codes in console CPU based Amlogic:
Remote management is the responsibility of two file
/system/etc/Remote.conf
– файл содержит настройки кода производителя пульта и привязку кодов кнопок пульта к номерам кнопок в linux.
/System/usr/Vendor_0001_Product_0001/keylayout. kl
– файл содержит привязку номеров кнопок в linux к функциям.
Read more: Remote.
#amlogic NEC remote factory_code = 0x<span style ="color: #ff0000;">fd01</span>0001 - manufacturer code, <span style ="color: #ff0000;">fd01 </span>- obtained from the complete button code (the last four characters), 0001 - у всех одинаково и не меняется work_mode = 0 repeat_enable = 1 repeat_delay = 40 repeat_peroid = 39 release_delay = 121 debug_enable = 1 mouse_begin 0 - number buttons 0 x for linux<span style ="color: #ff0000;">CE</span> - symbols 5,6 code Remote button 1 0x 48 2 0x 44 3 0x1d mouse_end key_begin 0x17 113 0x04 114 0x06 115 0x00 105 0x15 103 0x02 106 0x05 108 0x01 97 0x11 158 0x13 102 0xdc 116 0x0c 217 0x14 388 0x08 2 0x12 3 0x09 4 0x10 5 0x0a 6 0x0b 7 0x0f 8 0x07 9 0x16 10 0x03 11 0x19 14 0x18 228 key_end repeat_key_begin 0x17 113 0x04 114 0x06 115 0x00 105 0x15 103 0x02 106 0x05 108 0x01 97 0x11 158 0x13 102 0xdc 116 0x0c 217 0x14 388 0x08 2 0x12 3 0x09 4 0x10 5 0x0a 6 0x0b 7 0x0f 8 0x07 9 0x16 10 0x03 11 0x19 14 0x18 228 repeat_key_end
Vendor_0001_Product_0001.kl
key 399 GRAVE key <span style ="color: #ff0000;">0</span> номер кнопки в linux - <span style ="color: #3333ff;">OK</span> - функция 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 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
Memorable save original files before you edit!
4. Change codes Remote buttons., comparing their numbers buttons in linux and their functions.
Tested