poniedziałek, 18 grudnia 2017

Chinese "3.0 Bluetooth Numeric Keypad"

I bought a bluetooth numeric keypad on Aliexpress.
The main purpose was to use it for Blender, to switch views. My laptop has only a basic keyboard, so I decided to try this cheap device. There are also versions with radio dongle but I preferred BT version not to block the USB port. Here is the obligatory photo:
You will find A LOT of these on Aliexpress.

So, problems... and solutions:
  1. There are no instructions bundled! How to enter pairing mode?
    After some trials I found that quickly blinking green diode indicates pairing mode. I managed to enter it by pressing 4 5 6 keys together (not every attempt was successfull).
    In Linux I used bluetoothctl to pair it. Probably using Gnome or some other graphical tools would also work, but with bluetoothd one can see the entire dialog between the system and a device. Bold are commands typed by me (when PIN is given, type it on the keypad and press ENTER at the end):

    > bluetoothctl
    [Bluetooth Mouse]# devices
    Device 00:00:00:00:1C:77 Bluetooth Mouse
    [Bluetooth Mouse]# scan on
    Discovery started
    [CHG] Controller E4:A7:A0:38:D1:BD Discovering: yes
    [Bluetooth Mouse]# agent on
    Agent is already registered
    [Bluetooth Mouse]# default-agent
    Default agent request successful
    [NEW] Device 92:29:1C:04:00:8A Bluetooth Keyboard
    [Bluetooth Mouse]# pair 92:29:1C:04:00:8A
    Attempting to pair with 92:29:1C:04:00:8A
    [CHG] Device 92:29:1C:04:00:8A Connected: yes
    ****** [agent] PIN code: 123456
    [CHG] Device 92:29:1C:04:00:8A Modalias: usb:v05ACp0220d0001
    [CHG] Device 92:29:1C:04:00:8A UUIDs: 00001124-0000-1000-8000-00805f9b34fb
    [CHG] Device 92:29:1C:04:00:8A UUIDs: 00001200-0000-1000-8000-00805f9b34fb
    [CHG] Device 92:29:1C:04:00:8A ServicesResolved: yes
    [CHG] Device 92:29:1C:04:00:8A Paired: yes
    Pairing successful
    [CHG] Device 92:29:1C:04:00:8A ServicesResolved: no
    [CHG] Device 92:29:1C:04:00:8A Connected: no
    [Bluetooth Mouse]# connect 92:29:1C:04:00:8A
    Attempting to connect to 92:29:1C:04:00:8A
    [CHG] Device 92:29:1C:04:00:8A Connected: yes
    Connection successful
    [CHG] Device 92:29:1C:04:00:8A ServicesResolved: yes
    [Bluetooth Keyboard]# trust 92:29:1C:04:00:8A
    [CHG] Device 92:29:1C:04:00:8A Trusted: yes
    Changing 92:29:1C:04:00:8A trust succeeded
  2. Now it is connected and working, but... I still can't use it in Blender(!). The device reports normal numbers not the "keypad numbers" to the system! So it can't be used to switch views :(
    Here Linux comes to rescue (I do not think anything similar can be done in  Windows...). In Linux it is possible to remap the keys of any keyboard/gamepad/etc. by placing the map file in /etc/udev/hwdb.d/ folder. Here is the file I used: /etc/udev/hwdb.d/70-pd_bluetooth_keypad.hwdb. It also remaps numlock (and make it always on) as a home key.

Brak komentarzy:

Prześlij komentarz