How to enable BLE on linux

I recently bought a small mechanical keyboard and, as expected, the only models available out in the market were all damn wireless.
It’s linux Bluetooth configuration time!

The device is not showing up on bluetoothctl

These cheap Chinese devices comes with very little to none technical description, and they might require BLE rather than Bluetooth.

What is BLE?

As stated in Wikipedia the Low Energy Bluetooth standard “is independent of classic Bluetooth” and is not compatible - although both standards can coexist.

Is the device not listed, aka not seen by your card?

Since the manufacturer might not specify that the device is using BRLE rather than the legacy Bluetooth, you might not see it listed when putting the search on mode on bluetoothctl command (same as listing from the GUI).

The first thing to do is to check that your BT card supports BLE:

btmgmt info
Index list with 1 item
hci0:	Primary controller
	addr 88:88:88:88:88:88 version 8 manufacturer 2 class 0x7c010c
	supported settings: powered connectable fast-connectable discoverable bondable link-security ssp br/edr le advertising secure-conn debug-keys privacy configuration static-addr phy-configuration 
	current settings: powered bondable ssp br/edr le secure-conn 
	name myname
	short name 

Among the supported settings we can see that the above adapter supports le, which stands for Low Energy.

The adapter supports LE, now what?


Most probably the agent is not configure properly.
Check the Bluetooth daemon configuration file main.conf for ControllerMode = dual

sudo vim /etc/bluetooth/main.conf
# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
#ControllerMode = bredr

ControllerMode = dual

and restart the service:

sudo systemctl restart bluetooth

Now the system should find (and pair with success) your BLE device.

A not working workaround

Arch wiki usually has most (if not all) the answers, although the solution in here will mislead you!
If you follow point 6.14 Device does not show up in scan, you end up with an unpairable device (listed but which cannot be paired due to some mysterious and not even coherent authentication issue).