JP1 Remotes Forum Index JP1 Remotes


FAQFAQ SearchSearch 7 days of topics7 Days MemberlistMemberlist UsergroupsUsergroups RegisterRegister
ProfileProfile Log in to check your private messagesLog in to check your private messages Log inLog in

Xiaomi Mi Box Streaming Android TV Device
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
 
Post new topic   Reply to topic    JP1 Remotes Forum Index -> Code Search
View previous topic :: View next topic  
Author Message
Jeff2525



Joined: 01 Feb 2017
Posts: 26

                    
PostPosted: Thu Mar 09, 2017 7:23 pm    Post subject: Reply with quote

Thanks. I added 0-10 in the OBC (skipping the ones already there) and just as you said it turned to A-F after 9. However at 16 it hex went to 00 10, at 17 the hex went to 00 11, and so forth.

When I was doing it, it made the Dev as 0. Should I change it to 134 as the others, or 34 as you mentioned, or leave it as 0? And should I change the first two digits of the hex to 86 like the others, or leave it as 00?

Edit:
Might be easier to show what it looks like:

http://imgur.com/AL3paCM
Back to top
View user's profile Send private message
mdavej
Expert


Joined: 08 Oct 2003
Posts: 4498

                    
PostPosted: Thu Mar 09, 2017 8:50 pm    Post subject: Reply with quote

That's how hex works 0-F, 10-1F, 20-2F, ... F0-FF.

All Device codes (except power) need to be 134. If I said, 34, that was a typo. Sorry about that.

Don't touch the hex. EFC and Hex are calculated from the OBC and Device. If you type in an EFC or Hex number it will back calculate the OBC and Device. OBC and Device are all you need to be concerned about at this point.
Back to top
View user's profile Send private message
mdavej
Expert


Joined: 08 Oct 2003
Posts: 4498

                    
PostPosted: Thu Mar 09, 2017 9:07 pm    Post subject: Reply with quote

I went ahead and made you a file with all 256 codes. You can test 38 at a time. I assigned the first 38 to all buttons on the remote starting with the colored buttons and going all the way down. When you're done with that batch, start at 39, drag it to the top button and go all the way down. Note that I repeated skipfwd/ffwd and skipback/rew because those buttons have a long press and short press and I couldn't remember which was which.

http://hifi-remote.com/forums/dload.php?action=file&file_id=14468

Have fun.


Last edited by mdavej on Thu Mar 09, 2017 10:34 pm; edited 1 time in total
Back to top
View user's profile Send private message
Jeff2525



Joined: 01 Feb 2017
Posts: 26

                    
PostPosted: Thu Mar 09, 2017 10:28 pm    Post subject: Reply with quote

Thank you!!

I opened it fine on RMIR, and now will test it. I will let you all know if I find anything.

Honestly, I appreciate all the help. I jumped in without knowing how damn complex this all is. Thinking that I know enough that I will figure it out with a little guidance.... yeah, that was not the case! From finding the right remote all the way to the last step of inputing numbers, I got lost.

This last part I am confident in. If I screw up drag and drop, clicking "upload to remote" and then pressing a remote button.... well there is no hope for me! haha

Thanks again to all of you. Very Happy

Edit:
I found that there are 6 additional functions that are not on the Mi Box remote.

When this all started I expected to find hidden universal button functions that were not on my original remote. For example I thought there would be a dedicated stop button. What it appears is that it has 6 non-standard keyboard buttons, of which each app uses them differently, if at all.

That said, 2 of the functions appear to act as a "page up" and "page down". I cannot be more happy about that one! Very useful for me in one particular app. Another 2 appears to be the "-" and "+" signs. I don't know the last 2 yet.
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21197
Location: Chicago, IL

                    
PostPosted: Fri Mar 10, 2017 5:01 pm    Post subject: Reply with quote

This kinda stuff makes us very happy here, so please list the new functions that you found, along with their OBC codes.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
Jeff2525



Joined: 01 Feb 2017
Posts: 26

                    
PostPosted: Fri Mar 10, 2017 7:56 pm    Post subject: Reply with quote

I will mention all the functions because there aren't many and one of them that was default (mute) is not functioning. However, I use my TV volume and so it isn't a big thing and the mute function may not exist.

I will be double checking all the 256 again. I can imagine that I may have missed one, but it seems like 0-79 were where all the functions resided. Oddly enough (to me) 4 of the 7 new functions are really high up in the OBC.

All of the functions have Dev as 134 with the exception of power, which is 60. I may try it again with 60 out of curiosity (unless power being a different dev number is normal).

Anyways, on to results (OBC #'s):
Code:

New:
Page Up: 48
Page Down: 51
Plus Sign: 53
Minus Sign:56
Unknown*:3
Unknown*:17
Unknown*:54

*It registers on the device, but I have not found an app where it does anything.

**To find out the keystroke/function I used Kodi/SPMC.  The one button caused the in app volume to go up and the other button caused the in app volume to go down.  Looking at the key mapping for Kodi/SPMC, that would correspond with the + and - keyboard keys. The page up and down buttons also correspond with the maps.  Functions of those keys vary per app.

Known:
Home: 8
Vol+:14
Vol-:15
Power:Dev(60) OBC(204)
Menu:4
Directional Up:5
Directional Down:6
Directional Left:11
Directional Right:12
OK:13
Back:7


Last edited by Jeff2525 on Sat Mar 11, 2017 3:53 am; edited 2 times in total
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21197
Location: Chicago, IL

                    
PostPosted: Fri Mar 10, 2017 8:13 pm    Post subject: Reply with quote

It's not normal for the POWER button to use a different device code, but it's not unheard of for a device to use a mixture of device codes. So yeah, if you're willing to try all 256 OBCs from the 60 device code, give it a shot, who knows, you might find discrete on and off there (do you know what they are?).
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
Jeff2525



Joined: 01 Feb 2017
Posts: 26

                    
PostPosted: Sat Mar 11, 2017 3:53 am    Post subject: Reply with quote

I rechecked the 134 Dev and found that I did miss one and added it to my last post. OBC 54 registers, but it's function is also unknown right now.

I also tried the 60 device code, but the only function seems to be the Power toggle. I'm got this testing going pretty smooth now, would it be worth trying any other device code? I don't really need more functions, but am liking finding these surprise functions.

As for discrete codes, I heard it mentioned before and assumed it is just a hidden code. Are discrete codes different than these 7 newly found codes?
Back to top
View user's profile Send private message
ddp_JP1



Joined: 25 Feb 2012
Posts: 24

                    
PostPosted: Sat Mar 11, 2017 8:35 am    Post subject: Reply with quote

Does the remote.conf file that you posted on the first page come from your device? Or is it just a guess from some other type of Xiaomo box or someone else who has rooted the same box?

That file lists factory_code = 0x00860001. The first four diigits of this code are the subdevice and device codes in hex. Here 0x86 = 134 decimal, which is the device code used in the upgrades that have been crated in this thread. The subdevice from factory_code is 0.

The following section of remote.conf defines the mapping of the OBCs to android functions:

key_begin
0x05 103
0x06 108
0x0b 105
0x0c 106
0x0d 97
0x08 102
0x07 158
0x04 139
0xea 116
0x11 236
0x03 240
0x0e 115
0x0f 114
0x30 104
0x33 109
0x35 68
0x36 87
0x38 67
key_end

The first value is the OBC in hex and the second value is the android key code. Android keycodes are referenced in this thread in the Vendor_0001_Product_0001.kl file: http://freaktab.com/forum/tv-player-support/amlogic-based-tv-players/aml872mx/tronsmart-ab/firmware-roms-tools-ab/9997-prometheus-universal-remote-setup-for-any-amlogic-board-with-ir/page2

Converting the hex OBC code to decimal so that it works with remotemaster and translating the second value to a key name gives us the following:

key_begin
0x05 = OBC 5 103 = DPAD_UP
0x06 = OBC 6 108 = DPAD_DOWN
0x0b = OBC 11 105 = DPAD_LEFT
0x0c = OBC 12 106 = DPAD_RIGHT
0x0d = OBC 13 97 = DPAD_CENTER
0x08 = OBC 8 102 = HOME
0x07 = OBC 7 158 = BACK
0x04 = OBC 4 139 = MENU
0xea = OBC 234 116 = POWER WAKE
0x11 = OBC 17 236 = POWERLOW
0x03 = OBC 3 240 = (not listed)
0x0e = OBC 14 115 = VOLUME_UP
0x0f = OBC 15 114 = VOLUME_DOWN
0x30 = OBC 48 104 = VOLUME_UP
0x33 = OBC 51 109 = VOLUME_DOWN
0x35 = OBC 53 68 = F10 WAKE_DROPPED
0x36 = OBC 54 87 = F11 WAKE_DROPPED
0x38 = OBC 56 67 = F9 WAKE_DROPPED
key_end


On the second page of this thread 3FG identified the following buttton names and OBCs, which match to what I have above:

Menu Xiaomi Dev= 134 OBC= 4
Up Xiaomi Dev= 134 OBC= 5
Down Xiaomi Dev= 134 OBC= 6
Exit Xiaomi Dev= 134 OBC= 7
Home Xiaomi Dev= 134 OBC= 8
Left Xiaomi Dev= 134 OBC= 11
Right Xiaomi Dev= 134 OBC= 12
Select Xiaomi Dev= 134 OBC= 13
Vol+ Xiaomi Dev= 134 OBC= 14
Vol- Xiaomi Dev= 134 OBC= 15
Power Xiaomi Dev= 60 OBC= 204

(This assumes that exit and back are just different names for the same key.)

Taking out the matching values leaves:

OBC 234 = POWER WAKE
OBC 17 = POWERLOW
OBC 3 = (not listed)
OBC 48 = VOLUME_UP
OBC 51 = VOLUME_DOWN
OBC 53 = F10 WAKE_DROPPED
OBC 54 = F11 WAKE_DROPPED
OBC 56 = F9 WAKE_DROPPED

If the remote.conf file you posted on the first page is from your box, it suggests that these are the only other values that the box will recognize. These additional volume_up and volume_down keys might be recognized as something else.
Back to top
View user's profile Send private message
ddp_JP1



Joined: 25 Feb 2012
Posts: 24

                    
PostPosted: Sat Mar 11, 2017 8:46 am    Post subject: Reply with quote

OK. I missed that you had already found the following new keys:

Page Up: 48
Page Down: 51
Plus Sign: 53
Minus Sign:56
Unknown*:3
Unknown*:17
Unknown*:54

Does OBC 234 do anything?

Also, can you remap F9, F10, and F11 (OBCs 56, 53, and 54) to other functions in Kodi using the keymap editor? See http://kodi.wiki/view/Add-on:Keymap_Editor
Back to top
View user's profile Send private message
Jeff2525



Joined: 01 Feb 2017
Posts: 26

                    
PostPosted: Sat Mar 11, 2017 6:15 pm    Post subject: Reply with quote

That is the exact file, pasted, from my device. The exit and back button does seem to be the same exact thing. After what appeared to be page up/down and the +/-, I figured many of the added functions would be keys from a standard keyboard... however I never thought about any of them being Function keys.

I tried using the Keymap editor add-on a few days ago, but when opened the add-on just showed all blank. I been having some difficulties with Kodi as of late, so may try SPMC or put some more time in fixing/reinstalling it.

I figured the +/- by looking at http://kodi.wiki/view/Keyboard_controls. It could very well be mapped to a function key. I don't have a wifi/bluetooth keyboard to connect and test it out. Now that I think of it, maybe I can see if a USB keyboard will work.

Later tonight I will test out 234 (see if it wakes the device while off, I only tried these when the Mi Box was on). I also noticed that you have functions for "Power Low" as 17 and "F11 Wake Drop" as 54. Both I had as unknown. That seems to make sense because I doubt those would actually give a response in an app itself. That leaves OBC 3 as the only Unknown function, and that will probably be similar to 17 and 54.

Thanks!
Back to top
View user's profile Send private message
Jeff2525



Joined: 01 Feb 2017
Posts: 26

                    
PostPosted: Sat Mar 11, 2017 9:30 pm    Post subject: Reply with quote

234 does in fact have a function. That will turn off the Mi Box, but will not turn it back on.

To attempt to simplify and put the info together, this is what "we" aka you all figured out:

Started off with a file that had:

Code:
key_begin
0x05 103
0x06 108
0x0b 105
0x0c 106
0x0d 97
0x08 102
0x07 158
0x04 139
0xea 116
0x11 236
0x03 240
0x0e 115
0x0f 114
0x30 104
0x33 109
0x35 68
0x36 87
0x38 67
key_end


Then with everyone's help (thanks mdavej, alanrichey, The Robman, 3FG, ddp_JP1):

Code:
key_begin
0x05 = OBC 5   103 = DPAD_UP
0x06 = OBC 6   108 = DPAD_DOWN
0x0b = OBC 11   105 = DPAD_LEFT
0x0c = OBC 12   106 = DPAD_RIGHT
0x0d = OBC 13   97 = DPAD_CENTER
0x08 = OBC 8   102 = HOME
0x07 = OBC 7   158 = BACK
0x04 = OBC 4   139 = MENU
0xea = OBC 234   116 = POWER WAKE
0x11 = OBC 17   236 = POWERLOW
0x03 = OBC 3   240 = (not listed)
0x0e = OBC 14   115 = VOLUME_UP
0x0f = OBC 15   114 = VOLUME_DOWN
0x30 = OBC 48   104 = VOLUME_UP
0x33 = OBC 51   109 = VOLUME_DOWN
0x35 = OBC 53   68 = F10 WAKE_DROPPED
0x36 = OBC 54   87 = F11 WAKE_DROPPED
0x38 = OBC 56   67 = F9 WAKE_DROPPED
key_end


Then after testing got functions from OBCs:

Code:
"--Original"--
Directional Up: 5
Directional Down: 6
Directional Left: 11
Directional Right: 12
OK: 13
Home: 8
Back/Exit: 7
Menu: 4
Vol+: 14
Vol-: 15
Power (Dev 60): 204   

--"New"--
Power Off (POWER WAKE): 234
Unknown (POWERLOW): 17
Unknown (not listed): 3
Page Up (VOLUME_UP): 48
Page Down (VOLUME_DOWN): 51
Plus Sign (F10 WAKE_DROPPED): 53
Unknown (F11 WAKE_DROPPED): 54
Minus Sign (F9 WAKE_DROPPED): 56 


That 8 additional codes and 11 original codes (on at least one of two versions of the remote)

The original file has 18 commands, but I assume this one additional command in the final list is the Power, which is listed as a different device number. If not, then I may have screwed up on my accounting.

Of the new ones, the description given doesn't match what the function seems to be. Part could be me taking a guess based on interactions with any given app, and part could be because its not really meant to be used (ie Wake_dropped doesn't seem to be a normal day-to-day button usage).

All in all, with the original file showing 18 functions, this is probably the full list of commands possible. Right?
Back to top
View user's profile Send private message
The Robman
Site Owner


Joined: 01 Aug 2003
Posts: 21197
Location: Chicago, IL

                    
PostPosted: Sat Mar 11, 2017 10:56 pm    Post subject: Reply with quote

Sounds like you have as complete a file as you can expect to get, good work. Be sure to post the complete RMDU file.
_________________
Rob
www.hifi-remote.com
Please don't PM me with remote questions, post them in the forums so all the experts can help!
Back to top
View user's profile Send private message Visit poster's website
ddp_JP1



Joined: 25 Feb 2012
Posts: 24

                    
PostPosted: Sun Mar 12, 2017 7:32 am    Post subject: Reply with quote

Sounds like this are all the functions. For buttons that don't work, it doesn't reallly matter what they're called unless you can find a way to map them to something new in an application. FWIW, you might look on your box for a Vendor_0001_Product_0001.kl file. It's possible that the missing button is mapped to something or that some of the buttons are mapped to different functions.
Back to top
View user's profile Send private message
cdvreede



Joined: 24 May 2017
Posts: 2

                    
PostPosted: Wed May 24, 2017 6:28 pm    Post subject: Reply with quote

Google found this site during my quest to get my Harmony remotes (I use 525's - 4 of them - just used to the layout) talk to my new Xiaomi Mi Box. Had already found the Mi box in the device definitions so I can control the box using the built-in IR receiver with the 525. Unfortunately that profile only exposes the functions that are present on the BT remote - no other buttons that I would like to map for Kodi running on the Mi Box (Guide to bring up the PVR guide is the most favorite..)

While I don't fully understand the posts in the thread it looks like you guys cracked it and discovered a couple of functions that I could "re-use" and map to Kodi??

Big question to me now is - how do I get these codes into the Harmony?? I got nothing to "learn" these codes from and no idea if I could manually enter the codes in the Harmony Remote software??

Any help??

thnx

Dennis
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic       JP1 Remotes Forum Index -> Code Search All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 5 of 8

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

Powered by phpBB © 2001, 2005 phpBB Group
Top 7 Advantages of Playing Online Slots The Evolution of Remote Control