Sounds like an USB problem to me. Here is what you might try : build you own kernel with a modified hid.h
value (usb2.0 driver), to allow the USB 2.0 to be more permissive. I used to do that until kernel 3.11 was out for my Perixx gaming mouse.
Building a new kernel with modifier hid.h value :
1) Open a terminal (ctrl-alt-T)
2) Launch the command :
sudo apt-get install fakeroot kernel-wedge build-essential makedumpfile kernel-package libncurses5 libncurses5-dev
It installs the requiered packages for the kernel building. You can apt-get remove <packages>
afterwards to uninstall them if you wish.
3) Enter the following commands to create a directory for the kernel sources :
mkdir ~/source
cd ~/source
apt-get source linux-image-$(uname -r)
4) Type :
Press Tab to auto-fill the name, then press Enter.
5) Launch :
gedit include/linux/hid.h
Find (Ctrl + F) the line #define HID_MAX_USAGES
and change it's value to '64000'
.
6) Launch :
cp -vi /boot/config-`uname -r` .config
To copy the configuration file of your current system.
7) (Optionnal) To speed up the building process, you can adjust the concurrency level. Launch :
export CONCURRENCY_LEVEL=#
Replace #
by the number of your CPU's cores + 1 (Dual-core will be "3", Quad-core "5", …)
8) Launch :
To prepare the directory needed by the building process.
9) Launch :
fakeroot make-kpkg --initrd --append-to-version=-sk kernel-image kernel-headers
This will start the kernel building process. It can take a while (between 1h and 8h following your hardware). If the process is interrupted for some reason, you should launch the command rm ~/source
and start over from step 3. The kernel binaries .deb will be placed in ~/source.
To install the new kernel :
1) Open nautilus (file explorer) and go to /lib/modules.
2) Open a Terminal and launch :
3) Type the following commands and press **Tab to auto-fill the version of kernel, named here (KERNEL_VERSION) :**
sudo dpkg -i linux-image-
sudo dpkg -i linux-headers-
Both commands (once filled by Tab) must end by .deb
4) Launch :
sudo update-initramfs -c -k KERNEL_NAME
You have to replace KERNEL_NAME by the name used by the directory containing the modifier kernel (should end with "-sk" in nautilus).
5) Launch :
(and also sudo update-burg
if you use BURG).
6) Restart the computer.
You now run a custom kernel ! Congrats'
If that doesn't work, the problem is NOT caused by HID (usb2.0 driver) and I have no idea how to help you :)
Best Answer
If you don't mind installing Windows on your computer there is a way of doing this.
As you said, the pairing happens over USB and it's only possible on Windows. What you can do is to pair the keyboard on Windows and transfer the pairing information to Linux. There's plenty of information out there on how to "dual-pair" or how to make Bluetooth devices work in "dual-boot" environments.
This worked for me: http://console.systems/2014/09/how-to-pair-low-energy-le-bluetooth.html on Ubuntu 18.04, the only different thing I had to do is to add an additional key not mentioned in that guide (but mentioned in the comments): IRK and set the enclave size to 16.
Here's how my info file looks like, for reference:
EDIT - Problem Solving: In case you don't have a CSRK key from the Registry Export, leaving it out works just fine. If you still have connection problems, run
psexec -s -i regedit.exe
, navigate toHKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Services\BTHPORT\Parameters\Keys
and take the decimal value displayed inregedit.exe
.