Xiaomi Mi Box BT remote and Raspberry Pi

Hi team,

Hope I've done my homework well before posting Big Grin

Been googling for days to find out a way to get the Xiaomi Mi Box bluetooth remote working with Kodi (Krypton) on a Raspberry Pi (2 + bluetooth dongle). It's a simple and cheap BT remote, pretty close to the Apple TV one, so I gave it a try. Oh boy, what a ride so far ...

The remote can be paired with Kodi. I can see it in /proc/bus/input/devices.

I can use evtest to see what codes it sends :

Code:
Event: time 1498063117.174288, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70081
Event: time 1498063117.174288, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1
Event: time 1498063117.174288, -------------- SYN_REPORT ------------
Event: time 1498063117.354399, type 4 (EV_MSC), code 4 (MSC_SCAN), value 70081
Event: time 1498063117.354399, type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 0
Event: time 1498063117.354399, -------------- SYN_REPORT ------------

So I've used this thread to try to get the remote to work. No luck.

I've created the evmap file (how exciting ... KEY_VOLUMEUP = KEY_VOLUMEUP and so on). No luck (yes, the 99-eventlircd.rules is created, and the directory is mounted properly).

There are a few things that seem weird ... maybe it has nothing to do though. Xiaomi being a Chinese company, the name of the device is in Chinese :

From dmesg :

Code:
[   93.437676] input: 小米蓝牙遥控器 as /devices/virtual/misc/uhid/0005:2717:32B1.0001/input/input0
[   93.441379] hid-generic 0005:2717:32B1.0001: input,hidraw0: BLUETOOTH HID v10.0b Keyboard [小米蓝牙遥控器] on 00:19:86:00:0B:C1

So my 99- file contains this name, in Chinese. Not sure if there's a problem there (plus it says keyboard here, while Kodi shows it as a gamepad).

Code:
OpenELEC:~/.config/udev.rules.d # more 99-eventlircd.rules
SUBSYSTEMS=="bluetooth", GOTO="begin-bluetooth"
GOTO="end-bluetooth"
LABEL="begin-bluetooth"

ATTRS{name}=="小米蓝牙遥控器", \
  ENV{eventlircd_enable}="true", \
  ENV{eventlircd_evmap}="miboxremote.evmap"

LABEL="end-bluetooth"
Second, the codes sent by the remote seem to use a different BT protocol ?

Code:
> ACL data: handle 64 flags 0x02 dlen 15
    ATT: Handle notify (0x1b)
      handle 0x0030
      value 0x00 0x00 0x52 0x00 0x00 0x00 0x00 0x00
> ACL data: handle 64 flags 0x02 dlen 15
    ATT: Handle notify (0x1b)
      handle 0x0030
      value 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00

This is totally different from the (working) BT keyboard I've used for comparison (sends L2CAP codes instead).

I've tried the keymap editor, but nothing happens when I press the buttons ...

I also wanted to create a small eventclient to mimic what happens with the PS3 BD remote, but I'm stuck with some python libs that can't be installed. So no luck this way either.

Would anyone have other pointers to things I could try ? Debug settings to turn on to monitor the BT status in Kodi ?

Cheers,
Petzi

TV Show – Next Aired

hello... have recently updated to kodi 17 and the updated Metropolis... is there a issue with TV Show - Next Aired as I doesn't seem to display an overlay any more like it used to.

[CMIK] TFC.tv addon – repo / updates / support

Hello world, I'm creating this new and fresh thread after that the old TFC.tv one was closed (https://forum.kodi.tv/showthread.php?tid...pid2602806) This addon was originally created by Todits (many thanks for his work) and I'm continuing to maintain...

TLBB V1 Help

Hello all, I need help fixing my TLBB V1 box, as it appears to be bricked and not booting up. Tried to address and communicate the problem with the developer and I'm getting no response. It appears the developer no longer provides support for this b...

Kodi 17.3 Subtitles cause video playback stuttering

Hello, Since Kodi 17, all video files start to stutter when subtitles are enabled. The stuttering occurs every few seconds or less, irregularly. The pause is for less then a second each. With Kodi 16, there was no issue at all. More info: - local vi...

Krypton

Hi, Movie search dont work on krypton any idea how to solve it ,,,,

Open PVR LiveTV Architecture somehow for new features

Hi, since broadcasting is shifting more and more to IPTV or DVB-S to ethernet streaming (in LAN), I notice that the IPTV provider features are not possible to realize in kodi PVR code. As far as I understood realizing anything as a Video Addon is ea...

can not reach online zip files on kodi 17.3.

Hi there, I have problem with my kodi 17.3. Since yesterday I can not install anything from zip what is online only if I download zip file and install from external disk. I uninstall 17.3. and install 16.1. and with 16.1. I can reach everything, but c...

Will the Amazon FireTV 4k output Atmos and DTS X?

Hi, After browsing through a few threads and getting slightly confused I thought I'd just ask the question . Does the Amazon FireTV 4k box (https://www.amazon.co.uk/Amazon-Fire-TV-...ds=fire+4k) output a full Atmos and DTS X soundtrack? I really need...

Adding DVD’s to Kodi

I am adding DVD's to Kodi with an external hard drive. After adding them I get a message saying "this file is no longer available would you like to remove it from your library?" What am I doing wrong? Thank you. Lou

Trying to get Jarvis 16.1 back!!!!

Hi all New to all this so I am not exactly tech savvy with kodi/ android. Installed krypton 17.3 to my android sumvision x4 box (version 4.4.2) and it ran really slow- looks like I need android 5 or above? The question is can I get Jarvis 16.1 back...

What equipment do I need for Winegard satellites?

Hello, I'm new to this forum,and I apologize if I posted this question in the wrong place.I was wondering what equipment I would need in order for Kodi to work with a Winegard durastat d4 antenna.It would be perfect for my truck,but I would like to be...