RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Xiaomi Bluetooth Gamepad after 4.0.6 update

    Scheduled Pinned Locked Moved Help and Support
    xiaomibluetoothutf8
    9 Posts 4 Posters 5.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      farbird
      last edited by

      Xiaomi bluetooth gamepad has an alias with chinese characters. Aka 小米无线手柄.

      Before the update of 4.0.6, retroarch allowed me to see the gamepad's name as some garbled characters and I have no issues configuring the buttons binding within retroarch.

      After the update, each time I enter the input binding page ( of the connected controller) , retroarch will quit automatically and throw me back to emulationstation.

      If I turn off the controller and access the retroarch input binding page with my kb, it will not throw me out to emulationstation.

      Anyone with the same gamepad wanna comment also?

      1 Reply Last reply Reply Quote 0
      • BuZzB
        BuZz administrators
        last edited by BuZz

        The only thing that changed that I can think would affect it is the version of RetroArch and I suspect it's a bug with the newer version - you can report it here - https://github.com/libretro/RetroArch/issues

        The version of retroarch is probably

        RetroArch: Frontend for libretro -- v1.3.6 -- 4bffe5f --
        Compiler: GCC (4.9.2) 32-bitBuilt: Oct 22 2016
        

        but you can run from terminal /opt/retropie/emulators/retroarch/bin/retroarch --version to get the version

        To help us help you - please make sure you read the sticky topics before posting - https://retropie.org.uk/forum/topic/3/read-this-first

        F 1 Reply Last reply Reply Quote 0
        • F
          farbird @BuZz
          last edited by

          @BuZz said in Xiaomi Bluetooth Gamepad after 4.0.6 update:

          The only thing that changed that I can think would affect it is the version of RetroArch and I suspect it's a bug with the newer version - you can report it here - https://github.com/libretro/RetroArch/issues

          The version of retroarch is probably

          RetroArch: Frontend for libretro -- v1.3.6 -- 4bffe5f --
          Compiler: GCC (4.9.2) 32-bitBuilt: Oct 22 2016
          

          but you can run from terminal /opt/retropie/emulators/retroarch/bin/retroarch --version to get the version

          I tried to install retropie 4.1 on Ubuntu and paired the same xiaomi bt gamepad controller.. no issue encountered unlike the experience described above when using retroarch with rpi3

          1 Reply Last reply Reply Quote 0
          • F
            farbird
            last edited by farbird

            In my quest to resolve the xiaomi bt controller issue, I also realised the configure BT script in retropie setup did not cater for utf 8 characters and resulted in the xiaomi controller not being able to show up in the "Display Registered & Connected Bluetooth Devices"

            Did some research and added these lines in this script.
            RetroPie-Setup/scriptmodules/supplementary/bluetooth/bluez-test-device

            append under import sys
            [code]
            import sys
            reload(sys)
            sys.setdefaultencoding('utf-8')
            [/code]

            now my xiaomi bt gamepad shows up in the display bluetooth devices page instead of showing me this error msg

            "unicodeencodeerror 'ascii' codec can't encode characters in position 18-23"

            May I suggest this script to be updated to support BT devices with UTF-8 names?

            D 1 Reply Last reply Reply Quote 0
            • H
              HansWursT619
              last edited by

              Hey,
              I have the same issues as you do.

              Retroarch settings crash if I try to configure the Xiaomi Gamepad.

              Have yo made any progress on getting it working in the emulators?

              1 Reply Last reply Reply Quote 0
              • D
                diegopl2 @farbird
                last edited by

                @farbird said in Xiaomi Bluetooth Gamepad after 4.0.6 update:

                In my quest to resolve the xiaomi bt controller issue, I also realised the configure BT script in retropie setup did not cater for utf 8 characters and resulted in the xiaomi controller not being able to show up in the "Display Registered & Connected Bluetooth Devices"

                Did some research and added these lines in this script.
                RetroPie-Setup/scriptmodules/supplementary/bluetooth/bluez-test-device

                append under import sys
                [code]
                import sys
                reload(sys)
                sys.setdefaultencoding('utf-8')
                [/code]

                now my xiaomi bt gamepad shows up in the display bluetooth devices page instead of showing me this error msg

                "unicodeencodeerror 'ascii' codec can't encode characters in position 18-23"

                May I suggest this script to be updated to support BT devices with UTF-8 names?

                Thank very much for your fix. I got my xiaomi show its name at the bluetooth device display. But, like you said, there's must be a problem with the last retroarch update, when I try to map the xiaomi gamepad buttons on retroarch menu it closes itself automatically and I go back to emulestation.

                In other post there is a xiaomi cfg file to be placed at "/opt/retropie/configs/all/retroarch-joypads/udev/小米蓝牙手柄.cfg". With this file I've got my xiaomi gamepad work nearly perfect, only button that doesn't work is right triger and I don't know why

                H 1 Reply Last reply Reply Quote 0
                • H
                  HansWursT619 @diegopl2
                  last edited by HansWursT619

                  @diegopl2
                  Can you tell me which cfg you used exactly?
                  I tried different ones and put them directly into the retroarch-joypads folder and I tried to create the udev folder.
                  None of them worked inside the emulators.

                  Did you change something else?

                  EDIT:
                  After applying the fix mentioned by @farbird I was able to see my device in the bluetooth device list.
                  I still can't configure it through retroarch, because it crashes.

                  But using the .cfg posted here https://retropie.org.uk/forum/topic/2502/xiaomi-mi-bt-game-controller-issues/4 by @bohdans makes the controller work.

                  It seems like all buttons work. Just some weird behavior with the R1 Button. Select + R1 closes Retroarch emulators, no matter the hotkey settings. Select + Start does not work though. :(

                  @diegopl2 Are your troubles as well with R1? Because you said right trigger, but that would be R2.

                  D 1 Reply Last reply Reply Quote 0
                  • F
                    farbird
                    last edited by

                    This is my cfg file content that I had configured to use for retroarch when it was still able to be configured/binding before 4.0.6

                    input_driver = "udev"
                    input_device = "小米蓝牙手柄"
                    input_b_btn = "4"
                    input_y_btn = "7"
                    input_select_btn = "15"
                    input_start_btn = "14"
                    input_up_btn = "h0up"
                    input_down_btn = "h0down"
                    input_left_btn = "h0left"
                    input_right_btn = "h0right"
                    input_a_btn = "5"
                    input_x_btn = "8"
                    input_l_btn = "11"
                    input_r_btn = "10"
                    input_l2_btn = "12"
                    input_r2_btn = "13"
                    input_l3_btn = "17"
                    input_r3_btn = "18"
                    input_l_x_plus_axis = "+0"
                    input_l_x_minus_axis = "-0"
                    input_l_y_plus_axis = "+1"
                    input_l_y_minus_axis = "-1"
                    input_r_x_plus_axis = "+2"
                    input_r_x_minus_axis = "-2"
                    input_r_y_plus_axis = "+5"
                    input_r_y_minus_axis = "-5"
                    input_left_axis = "-0"
                    input_right_axis = "+0"

                    1 Reply Last reply Reply Quote 0
                    • D
                      diegopl2 @HansWursT619
                      last edited by

                      @HansWursT619
                      R2 is the button I'm not able to get recognized on libreto emulators :_(
                      I will try with the cfg that farbird has posted

                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post

                      Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.

                      Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.