Synching Wii U Pro Controller with Lakka

deep breath OK, here is what I want to do:

  1. Fire up bluetooth. (got this to work)
  2. Pair my Wii U Pro Controller with my Lakka unit (yes, it does work with the instructions from this: http://www.lakka.tv/doc/Wii-Remote/)
  3. Configure the Wii U Pro Controller automatically like the Dual Shock 3/4 and XBox 360/One controllers (had to do it myself, no biggie). Saved the configuration for future use.
  4. Persistence across reboots (another hard-as-hell one to nail down).
  5. Automatically sync the Wii U Pro Controller with my Lakka unit as soon as I hit the Power button on the controller. (This is a hell of a lot harder)…

I tried writing a startup script to perform this upon reboot, but I get the following error message:

login as: root
[email protected]'s password:
###########################################
# Lakka - The DIY retro emulation console #
# ...... visit http://www.lakka.tv ...... #
###########################################

Lakka (official): 2.1-rc6 (Generic.x86_64)
Lakka:~ # sh /storage/.config/autostart.sh
[NEW] Controller 08:D4:0C:AD:E8:31 BlueZ 5.43 [default]
[NEW] Device 40:D2:8A:E8:CB:FB Nintendo RVL-CNT-01-UC
[NEW] Device 28:A1:83:41:F1:D8 PLAYSTATION(R)3 Controller
[bluetooth]# quit
[DEL] Controller 08:D4:0C:AD:E8:31 BlueZ 5.43 [default]
/storage/.config/autostart.sh: line 5: connect: not found

My script looks like this:

(
bluetoothctl;
connect <MAC address of Wii U Pro Controller>
) &

HELP! :slight_smile:

So I managed to get the Wii U Pro Controller configured:

input_device = "Nintendo Wii Remote Pro Controller"
input_vendor_id = "32903"
input_product_id = "2602"
input_b_btn = "0"
input_y_btn = "3"
input_select_btn = "8"
input_start_btn = "9"
input_up_btn = "13"
input_down_btn = "14"
input_left_btn = "15"
input_right_btn = "16"
input_a_btn = "1"
input_x_btn = "2"
input_l_btn = "4"
input_r_btn = "5"
input_l2_btn = "6"
input_driver = "udev"
input_r2_btn = "7"
input_l3_btn = "11"
input_r3_btn = "12"
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 = "+3"
input_r_y_minus_axis = "-3"

I’m trying. However, something tells me I might have to write a udev rule to auto connect on startup and scan for the Wii U Pro controller. I wonder if there is a way to fire it up automatically. Hmmmm…