•   
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 11
  •   
Solved Connect Xiaomi Mi Box BT remotes to LibreELEC devices
#46
What's the procedure for getting a fix like this into the main releases?
Reply
#47
First we get some Guinea Pigs to test it and report any bugs Wink
Then I will submit a pull request to patch the C2's Linux Kernel and it's config.

Reply
#48
@wrxtasy I have successfully running the remote now with Libreelec 8.1.7 on the Wetek Hub. Wanted to ask how to do key remapping. Wanted to use the addon but when I want to edit the global context menu key to the actual context menu on the remote it doesn't recognize the button. The button is not recognized at all.
Is there a file where I can do the correct mapping?

Also this remote was waking up the Wetek hub with the power key just fine while running Android TV ROM. Would it be possible to do the same within Libreelec?

Thanks again for your great support here Smile
Reply
#49
(2017-09-17, 17:26)Vlaves Wrote: @wrxtasy I have successfully running the remote now with Libreelec 8.1.7 on the Wetek Hub. Wanted to ask how to do key remapping. Wanted to use the addon but when I want to edit the global context menu key to the actual context menu on the remote it doesn't recognize the button. The button is not recognized at all.
Is there a file where I can do the correct mapping?


On both the Odroid C2 and Raspberry Pi 3 versions of LibreELEC, the contextual menu key wasn't mapped by default, and I used the Keymap Editor add-on to quickly remedy that. It's the fastest way to get a custom key map up and running. I also manually edited the created key map afterwards to include some long-press functions (long press isn't currently supported in the add on) via the SMB share->userdara->keymaps->gen.xml

Without installing the add on, I believe any keyboard.xml dropped into the keymap folder will work. Here's a simple one making use of the contextual menu key in a short- and long-press configuration.
Code:
<keymap>
<global>
<keyboard>
<key id="61448">back</key>
<key id="61654">contextmenu</key>
<key id="61654" mod="longpress">info</key>
<key id="61576">ActivateWindow(Home)</key>
</keyboard>
</global>
<fullscreenlivetv>
<keyboard>
<key id="61448">stop</key>
</keyboard>
</fullscreenlivetv>
<fullscreenvideo>
<keyboard>
<key id="61448">stop</key>
</keyboard>
</fullscreenvideo>
</keymap>
Reply
#50
(2017-09-17, 15:28)wrxtasy Wrote: First we get some Guinea Pigs to test it and report any bugs Wink
Then I will submit a pull request to patch the C2's Linux Kernel and it's config.

For some reason I assumed that with a project the size and platform breadth of LE that it'd be more of a committee-thing than just a pull-request.
Reply
#51
(2017-09-17, 19:17)zang Wrote: ...
Without installing the add on, I believe any keyboard.xml dropped into the keymap folder will work. Here's a simple one making use of the contextual menu key in a short- and long-press configuration.
[code]
<keymap>
<global>
<keyboard>
<key id="61448">back</key>
<key id="61654">contextmenu</key>
...

Thanks for the reply. Problem here is, that the key ids seems to be different from my remote and the even when I use the Editor scrip,t it is not getting a keypress from the context key at all Sad
The home key is context menu within the GUI. So somwhere befor the keypress reach Kodi its not mapped correctly for my remote.

Where would I need to adjust the mappins before it comes to Kodi?
Reply
#52
Settings->system->enable debug logging, then ssh into LibreELEC and type
Code:
tail -f .kodi/temp/kodi.log
Then click the button a few times. It should show the key code there.
Reply
#53
(2017-09-17, 19:24)zang Wrote:
(2017-09-17, 15:28)wrxtasy Wrote: First we get some Guinea Pigs to test it and report any bugs Wink
Then I will submit a pull request to patch the C2's Linux Kernel and it's config.

For some reason I assumed that with a project the size and platform breadth of LE that it'd be more of a committee-thing than just a pull-request.
Everyone has their own areas of expertise. Wink

So LE developer chain of events....implement new features often in community build first, test patches, bug bust code, submit code in a pull request, specific Hardware platform code review by LE developers, suggestions, sometimes heated discussion, amendments, rebasing, squashing, then finally a codebase merge to hopefully make it into a final LE 8.x release. Smile

Reply
#54
(2017-09-17, 21:33)Vlaves Wrote: Thanks for the reply. Problem here is, that the key ids seems to be different from my remote and the even when I use the Editor scrip,t it is not getting a keypress from the context key at all Sad
The home key is context menu within the GUI. So somewhere before the keypress reach Kodi its not mapped correctly for my remote.

Where would I need to adjust the mappings before it comes to Kodi?

Yes all your buttons will not be mapped on your Xiaomi remote yet because I suspect your aftermarket (non USA Spec) Xiaomi remote may have different button outputs vs the one I mapped LibreELEC for. The remote buttons are in different spots as well.

The BT Fixed C2 and @kszaq's AML 32bit LE 8.1.7+ releases currently have my full USA spec Xiaomi remote button mappings.

What I need please is:
outputs from a Kodi log and a list of all the corresponding buttons pressed on the Xiaomi remote:

Eg remote button = shows KEY_xxxx in Kodi log...like

Home button = KEY_HOME (in Kodi log)
Context button = KEY_F5
Back button = KEY_BACK

I need this for every button except the power, left, right, up, down buttons.

Reply
#55
(2017-09-18, 06:50)wrxtasy Wrote: Yes all your buttons will not be mapped on your Xiaomi remote yet because I suspect your aftermarket (non USA Spec) Xiaomi remote may have different button outputs vs the one I mapped LibreELEC for. The remote buttons are in different spots as well.

The BT Fixed C2 and @kszaq's AML 32bit LE 8.1.7+ releases currently have my full USA spec Xiaomi remote button mappings.

What I need please is:
outputs from a Kodi log and a list of all the corresponding buttons pressed on the Xiaomi remote:

Eg remote button = shows KEY_xxxx in Kodi log...like

Home button = KEY_HOME (in Kodi log)
Context button = KEY_F5
Back button = KEY_BACK

I need this for every button except the power, left, right, up, down buttons.

Same here on my two remotes i have tried. No keypress registered for the far right (context menu) button at all.
Still very usable with some remapping though.

Away for work right now, but i'll try and get the code for this key from kodi.log when i return.
Reply
#56
(2017-09-18, 06:50)wrxtasy Wrote: ...
What I need please is:
outputs from a Kodi log and a list of all the corresponding buttons pressed on the Xiaomi remote:

Eg remote button = shows KEY_xxxx in Kodi log...like

Home button = KEY_HOME (in Kodi log)
Context button = KEY_F5
Back button = KEY_BACK

I need this for every button except the power, left, right, up, down buttons.

Thanks for the reply Smile Will send it as soon as possible. Would that also help to make the remote work properly on the ATV ROM which is on the nand on the wetek? I posted that in the wetek forum already, but seemed like its not solvable there.
Reply
#57
Improvements for getting the Xiaomi aftermarket remotes working:

I written an automated script, so the remotes work better when USB devices are plugged in and out, and also the Xiaomi remotes with the Chinese name 小米蓝牙遥控器 should work.

Simple copy and paste this:
Code:
curl -sL http://wrxtasy.libreelec.tv/LE-Xiaomi/xbt.sh | bash -

Xiaomi remote remapping is found here, use a Kodi debug log (enable in Kodi settings > System) to see KEY press events:
Code:
cat .kodi/temp/kodi.log

and custom edit them if needed:
Code:
nano .config/xiaomibtremote.evmap

CTRL-O to save CTRL-X to exit

Reply
#58
Thanks wrxtasy for your efforts.
I'll see if I can try it later ...
Reply
#59
(2017-09-19, 07:46)wrxtasy Wrote: Improvements for getting the Xiaomi and USA Spec remotes working:

I written an automated script...

Thanks so much, that's great Smile So now if I want the power key to be the power key I can self remap it in the "/storage/.config/xiaomibtremote.evmap" Smile

Any chance something can be done regarding the remote in the ATV ROM?
Reply
#60
No idea about ATV ROM (yet) - I see the same behavior on other ROM's with similar remotes regarding keyboard input.

Power key will turn device OFF but not back ON, so its useless in its default state for LibreELEC.

I've just uploaded what I think is the correct mapping for the Vendor ID=2717 ProdID=32B1 (non Mi Box USA) aftermarket remotes.

Can you just check all Remote buttons are working please ?
I would like confirmation the context button (F12 I think) is working ?

First get the new Map:

Code:
wget http://wrxtasy.libreelec.tv/LE-Xiaomi/xiaomibtremote.evmap -O /storage/.config/xiaomibtremote.evmap

and reboot.

If all remote buttons are working I would suggest custom Mapping with the Kodi Keymap editor because that has extra functionality for certain sections of Kodi.
ie.
Fullscreen Video only - use back key to Stop video playback
Fullscreen Live TV..

Reply
  •   
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 11
  •   



Logout Mark Read Team Forum Stats Members Help
Connect Xiaomi Mi Box BT remotes to LibreELEC devices0
This forum uses Lukasz Tkacz MyBB addons.