4.1 Xiaomi controller impossible to pair in new 4.1 version



  • I was using my xiaomi controller in previous version of recalbox without problems, but in new 4.1 version is impossible to pair, always says than there's nothing to pair.
    I also try to unpair all previous paired without success.

    I try these commands to get more information:

    bluetoothctl
    [NEW] Controller 00:11:67:99:FA:BE Recalbox [default]
    [NEW] Device 1C:96:5A:DD:BC:CE 小米蓝牙手柄

    [bluetooth]# scan on
    Discovery started
    [NEW] Device 1C:96:5A:DD:BF:CE 1C-96-5A-DD-BF-CE
    [NEW] Device 26:16:5A:DD:BC:CE 26-16-5A-DD-BC-CE
    [CHG] Device 26:16:5A:DD:BC:CE LegacyPairing: no
    [CHG] Device 26:16:5A:DD:BC:CE RSSI: 127
    [CHG] Device 26:16:5A:DD:BC:CE Name: 小米蓝牙手柄
    [CHG] Device 26:16:5A:DD:BC:CE Alias: 小米蓝牙手柄
    [CHG] Device 26:16:5A:DD:BC:CE Connected: yes
    [CHG] Device 26:16:5A:DD:BC:CE Trusted: yes
    [CHG] Device 26:16:5A:DD:BC:CE Connected: no

    pair 26:16:5A:DD:BC:CE
    Attempting to pair with 26:16:5A:DD:BC:CE
    [CHG] Device 26:16:5A:DD:BC:CE Connected: yes
    Failed to pair: org.bluez.Error.AuthenticationFailed
    [CHG] Device 26:16:5A:DD:BC:CE Connected: no

    pair 1C:96:5A:DD:BC:CE
    Attempting to pair with 1C:96:5A:DD:BC:CE
    [CHG] Device 1C:96:5A:DD:BC:CE Connected: yes
    Failed to pair: org.bluez.Error.AuthenticationFailed
    [CHG] Device 1C:96:5A:DD:BC:CE Connected: no


  • Moderator
    Team
    Moderator
    Translator

    @pillabichos I have heard that some controllers store the mac address of the device they were paired initially, so you need to refresh that to be able to pair with another one again. I assume you were using an usb dongle before and you now are trying to pair with the RPi3 internal bluetooth adapter, right? So find out how to reset the pairing information of that controller, do it and try to pair again.



  • @pillabichos i had the same problem and i found a solution to connect (sometimes) the controller using Putty. im using a raspberry 3 with xiaomi controller and recalbox 4.1.

    login as: root
    root@192.168.1.85's password:recalboxroot
    long press the central Mi button of your controller. It should blink fast.

    hcitool scan

    Scanning ...
    XX:XX:XX:XX:XX:XX 小米蓝牙手柄

    XX:XX:XX:XX:XX:XX is your MAC adress (ex: 1C:96:5A:DD:BC:CE)

        # **hidd --connect XX:XX:XX:XX:XX:XX** (your MAC adress ex 1C:96:5A:DD:BC:CE)
    

    Your controller should stop blinking and connect to your raspberry.
    sometimes it works and sometimes it won't... i still dont know why...
    furthermore you will have to make all of this each time you need to connect your controller.
    hope this helps and if someone know why sometimes it doesn't work (hidd connection refused) feel free to help.
    and im still looking for a solution in order to make my raspberry remember my controller.


  • Moderator
    Team

    The problem with this one is mainly that ot doesn't get listed in ES for pairing. I'm really clueless on this one


  • Moderator
    Team

    @marina there is no hidd on a REAL 4.1, you should do everything through bluetoothctl



  • I am trying with the most recent lastest 4.1 version and now I can see the device when I select the option " pair a controller" (before I had to unpair all the controllers) and it shows than the device is really paired but it is not true because the light is still blinking and the controller doesn't respond yet.

    I tried too with 'hcitool scan' but the result is the same.


  • Moderator
    Team

    @pillabichos hcitool scan, as the options says, SCANS, but does not pair.

    Make sure you reset the pairing of your pad, because the autopairing process doesn't handle PIN input (I.E you need to enter a PIN to pair).

    What I'd suggest is follow https://wiki.archlinux.org/index.php/bluetooth#Bluetoothctl and dont forget to trust the paired device.

    You could also try a simpler method : run /recalbox/scripts/bluetooth/simple-agent <macaddress>. I think the mac address must be written in lower case. Try both lower and upper eventually. This is what I use for stubborn pads that don't want to pair.

    And Yes, ES still always show the pair successed, whereas it doesn't. bug :o



  • @Substring I try
    /recalbox/scripts/bluetooth/simple-agent <MY_MAC_WITH_CAPITALS_&_COLON>
    But it ask me for a pin and always ends with error:
    Agent registered RequestPinCode (/org/bluez/hci0/dev_MY_MAC_WITH_CAPITALS_&_UNDERLINES)
    Enter PIN Code:
    Creating device failed: org.bluez.Error.AuthenticationFailed: Authentication Failed

    If I try with lowercase it does nothing.


  • Moderator
    Team

    @pillabichos CHeck your documentation, it should tell you the default pin if it's ever asked



  • @Substring Recalbox 4.0 never ask me for a pin and the controller runs ok, I try to pair the controller with my android phone and it pair successfully without enter any pin.
    In its specifications site don't say nothing about a 'default pin'.


  • Moderator
    Team

    @pillabichos recalbox 4.1 is not recalbox 4.0, the whole BT stack totally changed.

    have you tried the other link i provided ?



  • @Substring i tried your method with recalbox 4.1 :
    run /recalbox/scripts/bluetooth/simple-agent <macaddress>
    sometimes it works without any problem, i can even connect a second xiaomi controller with the same method.
    but when i reboot recalbox, sometimes i can't connect any controller. I keep rebooting until it works.
    to sum up : 1) when it works i can connect two xiaomi controllers and autopair works too.

    1. Sometimes i cant connect any controller and i have to reboot until it works.
      I tried to run bluetoothctl to see whats going on when it can't connect. it tries to connect without success. here is what i get :
      Attempting to connect to AC:FD:93:CB:50:16
      Failed to connect: org.bluez.Error.NotReady
      [CHG] Device AC:FD:93:CC:44:EF Connected: no
      [CHG] Device AC:FD:93:CB:50:16 Connected: yes
      [CHG] Device AC:FD:93:CB:50:16 Connected: no
      [CHG] Device AC:FD:93:CB:50:16 Connected: yes
      [CHG] Device AC:FD:93:CB:50:16 Connected: no
      [CHG] Device AC:FD:93:CC:44:EF Connected: yes
      [CHG] Device AC:FD:93:CC:44:EF Connected: no

  • Moderator
    Team



Want to support us ?

Join us on :

195
Online

26814
Users

13817
Topics

105155
Posts

Looks like your connection to Recalbox Forum was lost, please wait while we try to reconnect.