Turn a Verdin module into BT keyboard

Dear community,
This was an experiment to turn a Verdin imx8mm into a bluetooth keyboard. My problem is that I am unable to enable the bluetooth HID profile.

I have taken the BSP 6.3 reference image and added the HID configuration package for bluez5 in the local.conf file.

PACKAGECONFIG:append:pn-bluez5 = " hid-profiles"

Then I modified the name and class of the device

bluetoothctl system-alias BT_HID_Keyboard
hciconfig hci0 class 0x200540

But the HID is not listed as UUID:

        Alias: BT_HID_Keyboard
        Class: 0x00200540
        Powered: yes
        Discoverable: yes
        DiscoverableTimeout: 0x00000000
        Pairable: no
        UUID: A/V Remote Control (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: Audio Source (0000110a-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
        UUID: Audio Sink (0000110b-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile (00001800-0000-1000-8000-8000-00805f9b34fb)
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Device Information (0000180a-0000-1000-8000-00805f9b34fb)
        UUID: Handsfree (0000111e-0000-1000-8000-00805f9b34fb)
        Modalities: usb:v1D6Bp0246d0541

Any suggestions?
Thanks to all of you for your collaboration.
Julián

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello Julián,

Thank you for reaching out with your interesting project of turning a Verdin iMX8MM module into a Bluetooth keyboard. Let’s work through the steps to enable the Bluetooth HID profile.

  1. Verify BlueZ5 Configuration: Double-check your local.conf file to ensure the BlueZ5 package is configured correctly. The line should read:

    PACKAGECONFIG:append:pn-bluez5 = "hid"
    

    Ensure there are no typos and that this configuration is applied during the build process.

  2. Rebuild the Image: After making changes to local.conf, rebuild your image to apply these changes. Use the appropriate build commands for your setup.

  3. Check Bluetooth Service: Confirm that the Bluetooth service is active on your device. You can check its status with:

    systemctl status bluetooth
    

    If it is not running, start it using:

    systemctl start bluetooth
    
  4. Enable HID Profile: Use bluetoothctl to enable the HID profile. Enter the following commands:

    bluetoothctl
    power on
    agent on
    default-agent
    discoverable on
    pairable on
    

    Then, check if the HID profile is listed by using:

    show
    

    Look for the HID UUID: 00001124-0000-1000-8000-00805f9b34fb.

  5. Test HID Functionality: Once the HID profile is enabled, test the functionality by pairing the Verdin module with a device that can accept Bluetooth keyboard input.

If these steps do not resolve the issue, ensure that all dependencies for HID support are included in your build configuration. This should help you successfully configure your Verdin iMX8MM as a Bluetooth keyboard.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Yocto Project Reference Manual.

Dear @ToradexAI ,
Thanks for your advise but dosen’t work.
Regards,
Julián

Hello @jbruno,

Apologies for the delay in getting back to you. I had to do some tests on my end to understand your use-case and the possible solutions better.

The HID profile is used to make a Bluetooth HID device like a keyboard work as an input device for the module. In our BSP 6, hid-profiles is added and enabled by default. This is not what you need to fulfill the requirements for your use-case. You can test this by simply pairing and connecting a Bluetooth keyboard to your verdin module.

If you want the verdin module to act as an HID device, you need a hidclient running on the module. Please take a look at this python program for an example: GitHub - 505e06b2/HIDClient-Bluez5: Turn your Linux PC into a Bluetooth Keyboard+Mouse - for Ubuntu 18.04 + Bluez 5