• 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12
Solved Connect Xiaomi Mi Box BT remotes to LibreELEC devices
As the latest update made the MiBox kind of unusuable, I thought I wanted to use the MiRemote with my Mecool M8S Pro+ CoreElec box.

Unfortunately I'm not able to find the remote to get it paired to the CE Box.

First I thought I would just have to unpair it from the MiBox and did that, but still I'm not able to get the remote to be shown.

Is there some kind of special trick I have to do or may it just be that the MiRemote is one of the newer ones, that can't be paired with other devices?
Reply
@wrxtasy  I have the aftermarket Xiaomi Mi Box remote with the Chinese name 小米蓝牙遥控器, I'm trying to connect it to my raspberry pi 3 running libreelec v8.2.5 only using "Trust and Connect" and when asked to pair afterwards I choose "no" but i can't get it to connect. I know that you added native support for this remote to libreelec but i don't know what am I doing wrong ,here is the log file and a list of the connected devices and the Xiaomi remote is not among them.
Reply
@wrxtasy  I'm using LE 8.2.3.1 on S905 and I have 2 Xiaomi remotes. The old Xiaomi bluetooth remote with Chinese name 小米蓝牙遥控器 works out of the box. However, the newer Xiaomi voice remote with Chinese name 小米语音遥控器 doesn't work. 

In the LibreELEC Configuration add-on, the newer Xiaomi voice remote displays with a gamepad icon. I can connect to it successfully, but "cat /proc/bus/input/devices" won't show the device at all. I guess the newer remote must have a different idVendor or idProduct, causing it not being recognized correctly. I plan to edit 51-these-are-not-joysticks.rules to avoid it being recognized as gamepad, then hopefully it should appear in "cat /proc/bus/input/devices". The problem is, how can I find out idVendor and idProduct?

I don't see any useful info in dmesg output. but buletoothctl shows the following. Anything I can do to make it work?

[小米语音遥控器]# info
Device 08:EB:29:3E:02:0F
        Name: 小米语音遥控器
        Alias: 小米语音遥控器
        Class: 0x000504
        Icon: input-gaming
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
        UUID: Battery Service           (0000180f-0000-1000-8000-00805f9b34fb)
        UUID: Human Interface Device    (00001812-0000-1000-8000-00805f9b34fb)
        Modalias: bluetooth:v2717p32B0d1024
        ManufacturerData Key: 0x0000
Reply
Hi,
I would follow the instructions in THIS post

And then SSH login:

Code:
nano /storage/.config/udev.rules.d/99-eventlircd.rules

and edit out Xiaomi Remote and copy and paste and replace with 小米语音遥控器 (it might be tricky)

CTRL-O to save
CTRL-X to exit
then reboot

Trust and Connect in LibreELEC Bluetooth settings.
Once connected you can start logging Kodi (activate in Kodi Settings > System) and see which buttons do what:

Code:
cat /storage/.kodi/temp/kodi.log



I can add support for that 3rd type of Xiaomi Remote into LE 8.9.x Kodi Leia easily.
A Kodi Log file would be very helpful once you get it connected and start pressing buttons:
https://kodi.wiki/view/Log_file/Easy

I also have THIS BT remote working as well.
It's a snappy little bugger on my overclocked ODROID C2 running a slightly modded version of CoreELEC Leia.

Reply
Thanks for the prompt reply. That's exactly the steps I was following up, and the trick to replace the Chinese name didn't work...

I'm not a Linux expert, but after reading https://github.com/denilsonsa/udev-joystick-blacklist, I'm just wondering, should I see a new device created under /dev/input after bluetooth voice remote connects? I'm asking this because I don't see anything named with js*. (see output below)

I can only see this device via bluetoothctl, but nowhere else. What did I miss?

BTW, if it helps, I can reconnect the old remote that works to do the comparison. Just let me know what I can provide to help investigate.

LibreELEC:/dev/input # ls -l
total 0
drwxr-xr-x    2 root     root           100 Jan  1  2015 by-path
crw-rw----    1 root     input      13,  64 Jan  1  2015 event0
crw-rw----    1 root     input      13,  65 Jan 19  2018 event1
crw-rw----    1 root     input      13,  66 Jan  1  2015 event2
crw-rw----    1 root     input      13,  63 Jan  1  2015 mice
crw-rw----    1 root     input      13,  32 Jan 19  2018 mouse0

LibreELEC:/dev/input # cat /proc/bus/input/devices
I: Bus=0010 Vendor=0001 Product=0001 Version=0100
N: Name="aml_keypad"
P: Phys=keypad/input0
S: Sysfs=/devices/meson-remote.12/input/input0
U: Uniq=
H: Handlers=kbd mouse0 event0
B: PROP=0
B: EV=f
B: KEY=7fffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe
B: REL=103
B: ABS=0

I: Bus=0010 Vendor=0001 Product=0001 Version=0100
N: Name="gpio_keypad"
P: Phys=gpio_keypad/input0
S: Sysfs=/devices/gpio_keypad.46/input/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=100003
B: KEY=100000 0 0 0

I: Bus=0010 Vendor=1b8e Product=0cec Version=0001
N: Name="cec_input"
P: Phys=
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=3
B: KEY=20000000 0 0 0 0 0 0 0 0 0 0 fc004 4c00 0 0 1 4 10300 51fa 40000801 1e1680 0 100000 10000ffc
Reply
I reconnect the old bt remote. Here's the output for comparison. It appears as /dev/input/event3, strange the vendorid is 0000 instead of 2717, but it indeed works. Any idea?

LibreELEC:~ # ls -l /dev/input/
total 0
drwxr-xr-x    2 root     root           100 Jan  1  2015 by-path
crw-rw----    1 root     input      13,  64 Jan  1  2015 event0
crw-rw----    1 root     input      13,  65 Jan  1  2015 event1
crw-rw----    1 root     input      13,  66 Jan  1  2015 event2
crw-rw----    1 root     input      13,  67 Dec 15 08:32 event3
crw-rw----    1 root     input      13,  63 Jan  1  2015 mice
crw-rw----    1 root     input      13,  32 Jan 19  2018 mouse0

LibreELEC:~ # cat /proc/bus/input/devices
I: Bus=0010 Vendor=0001 Product=0001 Version=0100
N: Name="aml_keypad"
P: Phys=keypad/input0
S: Sysfs=/devices/meson-remote.12/input/input0
U: Uniq=
H: Handlers=kbd mouse0 event0
B: PROP=0
B: EV=f
B: KEY=7fffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe
B: REL=103
B: ABS=0

I: Bus=0010 Vendor=0001 Product=0001 Version=0100
N: Name="gpio_keypad"
P: Phys=gpio_keypad/input0
S: Sysfs=/devices/gpio_keypad.46/input/input1
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=100003
B: KEY=100000 0 0 0

I: Bus=0010 Vendor=1b8e Product=0cec Version=0001
N: Name="cec_input"
P: Phys=
S: Sysfs=/devices/virtual/input/input2
U: Uniq=
H: Handlers=kbd event2
B: PROP=0
B: EV=3
B: KEY=20000000 0 0 0 0 0 0 0 0 0 0 fc004 4c00 0 0 1 4 10300 51fa 40000801 1e1680 0 100000 10000ffc

I: Bus=0005 Vendor=0000 Product=0000 Version=0000
N: Name="小米蓝牙遥控器"
P: Phys=00:1A:7DBig GrinA:71:11
S: Sysfs=/devices/virtual/misc/uhid/0005:0000:0000.0001/input/input4
U: Uniq=F4:B8:5E:A0:F3:58
H: Handlers=kbd event3
B: PROP=0
B: EV=120013
B: KEY=10000 7 ff9f207a c14057ff febeffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=1f

bluetoothctl
[XiaoMi RC]# info
Device F4:B8:5E:A0:F3:58
        Name: XiaoMi RC
        Alias: XiaoMi RC
        Appearance: 0x03c0
        Paired: yes
        Trusted: yes
        Blocked: no
        Connected: yes
        LegacyPairing: no
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Immediate Alert           (00001802-0000-1000-8000-00805f9b34fb)
        UUID: Link Loss                 (00001803-0000-1000-8000-00805f9b34fb)
        UUID: Tx Power                  (00001804-0000-1000-8000-00805f9b34fb)
        UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
        UUID: Battery Service           (0000180f-0000-1000-8000-00805f9b34fb)
        UUID: Human Interface Device    (00001812-0000-1000-8000-00805f9b34fb)
        UUID: Scan Parameters           (00001813-0000-1000-8000-00805f9b34fb)
        Modalias: bluetooth:v2717p3200d0110
Reply
@wrxtasy I think I have some findings. With "udevadm info -e" command, the output shows the following:

P: /devices/virtual/misc/uhid/0005:0000:0000.0001
E: DEVPATH=/devices/virtual/misc/uhid/0005:0000:0000.0001
E: HID_ID=0005:00000000:00000000
E: HID_NAME=小米语音遥控器
E: HID_PHYS=00:1A:7DBig GrinA:71:11
E: HID_UNIQ=08:EB:29:3E:02:0F
E: MODALIAS=hid:b0005g0003v00000000p00000000
E: SUBSYSTEM=hid

This means the remote was not recognized as an input device. I have done some google search and it seems I need create udev rules to correct this. I had zero experience on this, so any suggestions would be greatly appreciated.
Reply
I haven't been able to figure it out yet, but "udevadm monitor" output shows more useful info. Why the kernal doesn't create the input device?

The newer voice remote:
KERNEL[111.098117] add      /devices/dwc2_a/usb2/2-1/2-1:1.0/bluetooth/hci0/hci0:63 (bluetooth)
UDEV  [111.101503] add      /devices/dwc2_a/usb2/2-1/2-1:1.0/bluetooth/hci0/hci0:63 (bluetooth)
KERNEL[122.728156] add      /devices/virtual/misc/uhid/0005:0000:0000.0001 (hid)
UDEV  [122.733313] add      /devices/virtual/misc/uhid/0005:0000:0000.0001 (hid)

The old remote that works:
KERNEL[269.315224] add      /devices/dwc2_a/usb2/2-1/2-1:1.0/bluetooth/hci0/hci0:63 (bluetooth)
UDEV  [269.318970] add      /devices/dwc2_a/usb2/2-1/2-1:1.0/bluetooth/hci0/hci0:63 (bluetooth)
KERNEL[282.200329] add      /devices/virtual/misc/uhid/0005:0000:0000.0002 (hid)
KERNEL[282.203883] add      /devices/virtual/misc/uhid/0005:0000:0000.0002/input/input4 (input)
KERNEL[282.205074] add      /devices/virtual/misc/uhid/0005:0000:0000.0002/input/input4/event3 (input)
UDEV  [282.205788] add      /devices/virtual/misc/uhid/0005:0000:0000.0002 (hid)
KERNEL[282.206057] add      /devices/virtual/misc/uhid/0005:0000:0000.0002/hidraw/hidraw0 (hidraw)
UDEV  [282.215844] add      /devices/virtual/misc/uhid/0005:0000:0000.0002/input/input4 (input)
UDEV  [282.216145] add      /devices/virtual/misc/uhid/0005:0000:0000.0002/hidraw/hidraw0 (hidraw)
UDEV  [282.450576] add      /devices/virtual/misc/uhid/0005:0000:0000.0002/input/input4/event3 (input)
Reply
Does anyone know what pair of buttons to press on this version of the Xiaomi Bluetooth Remote to get it into discovery mode? It looks identical to the one that came with y Mi Box from Walmart and doesn't have the menu/3-bars button that others have referenced
 
Image
Thanks
Fire TV Stick, Xiaomi Mi Box, Tanix TX3 Mini (S905W), Fire TV with 4K, Apple TV 4K, Tanix TX3 (S905X3)
Reply
Couple questions

1. Does anyone know where I can buy the official Xiaomi bluetooth remote? Seems out of stock everywhere I look and all the Ebay versions seem like cheap knockoffs with rubber directional keys.

2. With regards to the Mecool Bluetooth Voice Input Remote that you got working, will it work out of the box, like the Xiaomi remote? I like the look of the Xiaomi better, but if I can't find one I'd use this other one you got working well. If it's not officially supported, are you able to share your config files?

I currently have the OSMC remote. It has great range, nice button layout, but the response speed pisses me off. It's just too slow. I bought a fire tv stick 4k, and loved the remote speed. Sadly I had issues with video playback and audio syncing, so I'm back to my trusty libreelec setup. So I'm on the hunt for a fast simple remote. The Xiaomi looks perfect.
Reply
Could you please try this combination?
Image
Reply
@ashrafhumax

Thanks for the suggestion. I tried holding them down momentarily and also for 10 seconds but LibreELEC does not see the remote. The box does see other Bluetooth devices when they are put into discovery mode.

Maybe I should try and procure the other Mi remote.
Fire TV Stick, Xiaomi Mi Box, Tanix TX3 Mini (S905W), Fire TV with 4K, Apple TV 4K, Tanix TX3 (S905X3)
Reply
Could you try again and connect it to any android mobile phone via bluetooth

This to make sure that the button combination is able to activate the connect mode and the remote is working

Incase you successfully paired the remote to the moblie phone then it is working and the problem in your libreelec setup

Also if you are intrested in bluetooth remote my recommendation is to try first generation amazon fire tv or first generation fire tv stick bluetooth remote

I remember using it before with my libreelec s905x box 2 years ago

Please keep us informed about the results
Regards
Reply
Oh, FTV gen1 remote works? Out of the box to pair, or are there other steps?
Reply
I tried it before but not sure all buttons were recognised, I tested ok and the 4 directions and they were ok out of the box.

Unfortunately I cannot remember whether the back was working or not
Hope this will help you hdmkv Big Grin

I don’t have the amazon fire tv so I cannot test it for you
Regards
Reply
  • 1
  • 8
  • 9
  • 10(current)
  • 11
  • 12

Logout Mark Read Team Forum Stats Members Help
Connect Xiaomi Mi Box BT remotes to LibreELEC devices0