I've had a lot of problems using the built in blueman application under Ubuntu/Mint distributions. I'm not exactly sure why, frequently devices will connect then instantly disconnect. I've parsed through various StackOverflow articles and other help pages, I could never get a working answer.
If you're having bluetooth issues, do not uninstall the libbluetooth3
package. It
may uninstall your desktop environment.
Be sure to have a good and well supported bluetooth adapter. I suspect a lot of the issues out there are from old, poor quality, improperly implemented, and/or slightly broken bluetooth adapters.
I've had great luck with the Edimax BT-8500 as of this writing it was about $13. Device info is attached below.
I was originally using an Intel Dual Band Wireless-AC 7260HMW and had nothing but problems.
With many of the great things in Linux, let's ignore the GUI for now.
bluetoothctl
This opens its own [bluetooth]
shell.
Shows your adapters (controllers).
# list controllers
list
# returns one or more controllers like:
Controller FF:FF:FF:FF:FF:FF hostname [default]
# get controller information
show FF:FF:FF:FF:FF:FF
Before trying to pair, let's try scanning.
scan on
# shows:
[CHG] Controller FF:FF:FF:FF:FF:FF Discovering: yes
# followed by showing Devices within range.
[CHG] Device E8:51:77:CE:02:BB RSSI: -72
[CHG] Device E8:51:77:CE:02:BB LegacyPairing: yes
You can get a device's information with:
info E8:51:77:CE:02:BB
This should return metadata for this device such as:
Device E8:51:77:CE:02:BB (public)
Name: Bedroom TV
Alias: Bedroom TV
Class: 0x0028043c
Icon: audio-card
Paired: no
Trusted: no
Blocked: yes
Connected: no
LegacyPairing: no
UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific (00000000-0000-0000-0000-000000000000)
RSSI: -76
Blacklisting unwanted devices, the first thing I'm going to do is blacklist any devices which I'm never going to connect to with this machine.
Here I'm blocking the TV as above and some kind of hydrometer, which I think is at my neighbor's house.
block E8:51:77:CE:02:BB
block A4:C1:38:F6:DF:69
Now I can do devices
to see what has been registered.
devices
# returns
Device E8:51:77:CE:02:BB Bedroom TV
Device A4:C1:38:F6:DF:69 Govee_H5074_DF69
And I can verify these have been blacklisted.
info E8:51:77:CE:02:BB
# returns
Device E8:51:77:CE:02:BB (public)
Name: Bedroom TV
Alias: Bedroom TV
Class: 0x0028043c
Icon: audio-card
Paired: no
Trusted: no
Blocked: yes
Connected: no
LegacyPairing: no
UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
UUID: Vendor specific (00000000-0000-0000-0000-000000000000)
RSSI: -74
Now I'll start attempting to pair a Sunwaytek H510 controller which I was previously having issues with staying connected.
To pair, hold the center circle button and one of the ABXY buttons for 2 seconds. I'm not 100% sure what the difference is, I think I used the Android pairing, but you'll have to experiement. They show the following in the manual:
- WII: 🔘 + B
- Android: 🔘 + A
- Windows: 🔘 + X
- Apple: 🔘 + Y
Hold your combination for 2 seconds, then wait for it to appear in the scanning stream.
Mine for example:
[CHG] Device 00:90:E0:12:01:37 Gamepad
Then pair it and trust it.
pair 00:90:E0:12:01:37
trust 00:90:E0:12:01:37
devices
# My list including blacklisted devices.
Device E8:51:77:CE:02:BB Bedroom TV
Device 00:90:E0:12:01:37 Gamepad
Device A4:C1:38:F6:DF:69 Govee_H5074_DF69
# info the device
info 00:90:E0:12:01:37
# returns
Device 00:90:E0:12:01:37 (public)
Name: Gamepad
Alias: Gamepad
Class: 0x00002508
Icon: input-gaming
Paired: yes
Trusted: yes
Blocked: no
Connected: no
WakeAllowed: yes
LegacyPairing: no
UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
Modalias: usb:v1949p0402d011B
Stop scanning.
scan off
Power off the device, then power it back on and it should automatically connect and keep the connection.