Run bluetoothctl and run the functions pair, trust and connect with the gamepad’s MAC address as an argument.
Use scan on to find your device or run the command hcitool scan.
$ bluetoothctl
[bluetooth]# scan on
Discovery started
[CHG] Controller 9C:B6:BA:A5:CA:9D Discovering: yes
[NEW] Device E4:17:D8:C5:07:62 8Bitdo SFC30 GamePad
[bluetooth]# pair E4:17:D8:C5:07:62
Attempting to pair with E4:17:D8:C5:07:62
[CHG] Device E4:17:D8:C5:07:62 Connected: yes
[CHG] Device E4:17:D8:C5:07:62 Modalias: usb:v2DC8p2830d0100
[CHG] Device E4:17:D8:C5:07:62 UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device E4:17:D8:C5:07:62 UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device E4:17:D8:C5:07:62 ServicesResolved: yes
[CHG] Device E4:17:D8:C5:07:62 Paired: yes
Pairing successful
[CHG] Device E4:17:D8:C5:07:62 ServicesResolved: no
[CHG] Device E4:17:D8:C5:07:62 Connected: no
[bluetooth]# trust E4:17:D8:C5:07:62
[CHG] Device E4:17:D8:C5:07:62 Trusted: yes
Changing E4:17:D8:C5:07:62 trust succeeded
[bluetooth]# connect E4:17:D8:C5:07:62
Attempting to connect to E4:17:D8:C5:07:62
[CHG] Device E4:17:D8:C5:07:62 Connected: yes
Connection successful
[CHG] Device E4:17:D8:C5:07:62 ServicesResolved: yes