These instructions are mostly for my later convenience but if you have an Intsun or Terios T3 bluetooth gamepad that you want to pair with Linux via the command line they might help you out.
These instructions assume you have a bluetooth dongle that is recognised by your kernel. I’ve had success with this one. These steps worked for me on Ubuntu 16.04 LTS.
- Install the following packages:
$ sudo apt-get install bluez joystick
- Put the gamepad in bluetooth pairing mode by holding down the X and Home buttons simultaneously. The LED ring around the home button should now start blinking rapidly.
- Start the interactive command-line interface to the bluetooth stack bluetoothctl
$ sudo bluetoothctl
[NEW] Controller XX:XX:XX:XX:XX:XX live-0 [default]
For readability I’ll put the typed commands in blue from here on. - Next power on your bluetooth interface and make it discoverable (maybe not strictly necessary):
[bluetooth]# power on
Changing power on succeeded
[bluetooth]# discoverable on
Changing discoverable on succeeded
[CHG] Controller XX:XX:XX:XX:XX:XX Discoverable: yes - Register as the default agent:
[bluetooth]# agent on
Agent registered
[bluetooth]# default-agent
Default agent request successful - Start scanning to look for discoverable devices:
[bluetooth]# scan on
Discovery started
[CHG] Controller XX:XX:XX:XX:XX:XX Discovering: yes - After a few seconds the devices command should list your gamepad:
[bluetooth]# devices
[NEW] Device YY:YY:YY:YY:YY:YY Bluetooth Gamepad - It seems that PIN-less pairing requires that the device be trusted first:
[bluetooth]# trust YY:YY:YY:YY:YY:YY
[CHG] Device YY:YY:YY:YY:YY:YY Trusted: yes
Changing YY:YY:YY:YY:YY:YY trust succeeded - Try to pair with the gamepad:
[bluetooth]# pair YY:YY:YY:YY:YY:YY
Attempting to pair with YY:YY:YY:YY:YY:YY
[CHG] Device YY:YY:YY:YY:YY:YY Connected: yes
[CHG] Device YY:YY:YY:YY:YY:YY Modalias: usb:v1949p0402d011B
[CHG] Device YY:YY:YY:YY:YY:YY UUIDs: 00001124-0000-1000-8000-00805f9b34fb
[CHG] Device YY:YY:YY:YY:YY:YY UUIDs: 00001200-0000-1000-8000-00805f9b34fb
[CHG] Device YY:YY:YY:YY:YY:YY Paired: yes
Pairing successful - Connect to the gamepad:
[bluetooth]# connect YY:YY:YY:YY:YY:YY
Attempting to connect to YY:YY:YY:YY:YY:YY - Quit bluetoolctl:
[bluetooth]# quit
Agent unregistered
[DEL] Controller XX:XX:XX:XX:XX:XX live-0 [default]
All being well the gamepad LEDs will now stop flashing and a single one will be illuminated.
You can test the gamepad using the jstest command:
jstest /dev/input/js0
(your device name may vary)