This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to set VID and PID on a BLE HID device?

Hello,

I am developing a composite HID peripheral based on the nRF52840 that can connect to a PC either via USB or BLE.

I am using SDK 15.0.0.

Regardless of the connection type (BLE or USB), the device is supposed to have exactly the same functionality (keyboard + mouse).

Our company has some assistive PC software that relies on identifying the device based on its VID and PID, in order to access the correct functionalities.

We would like to have that both interfaces (USB, BLE) expose the same VID / PID pair.

My problem is: how / where can VID and PID be configured on BLE?

While it was quite easy to find where to define the VID and PID for the USB connection (APP_USBD_VID and APP_USBD_PID respectively in sdk_config.h), I couldn't find where the same values are defined for BLE.

In the Device Manager of the PC I see that when connected over BLE, the device exposes VID = 0x40C8, PID = 0x0000.

But I could find no place where these values are defined, in order to modify them.

Can anyone kindly let me know where these values are stored and a code example on how to personalize them?

Many thanks!

Parents
  • Hi,

    VID/PID are USB concepts which you will not find in BLE. However, there is nothing preventing you from communicating the same data over BLE in an application specific way. For instance, if you want to be able to read this after connection to the device, you can make a custom service with a VID and a PID characteristic. And/of you cna add the information to the advertising packet as manufacturer specific data if you need this information before the connection is established.

Reply
  • Hi,

    VID/PID are USB concepts which you will not find in BLE. However, there is nothing preventing you from communicating the same data over BLE in an application specific way. For instance, if you want to be able to read this after connection to the device, you can make a custom service with a VID and a PID characteristic. And/of you cna add the information to the advertising packet as manufacturer specific data if you need this information before the connection is established.

Children
Related