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

Handling different offset in BaseUUID and pc_ble_driver

Hi,

I'm trying to use the pc_ble_driver_py framework and an NRF51/52 dongle to connect to a BLE device. The BLE device in question has some custom defined services for operation and DFU (not a nordic device).

The custom services UUID offset works slightly differently than what Nordic specifies, which is causing some incompatibilities. The offset in the BLE device is set at the end, instead of in the first 32bits like in Nordic. To illustrate:

Nordic UUIDs:

84e5xxxx-15d2-44a5-9572-eddc58a48483

BLE Device UUIDs:

84e5e4bc-15d2-44a5-9572-eddc58a4xxxx

Where the xxxx is where the offset sits.

This makes it so I can't build a proper Base UUID and then build offsets for each characteristic (mostly Notify and Write chars). I worked around this for one characteristic by creating a base service for each characteristic and then offsetting by some constant. The problem is that you can only use the ble_vs_uuid_add so many times due to memory constraints (according to the errors I'm seeing).

Is there anyway to build custom UUIDs without needing to build a baseUUID? Do they need to be added with ble_vs_uuid_add before they can be subscribed to? I'm still not very clear as to what ble_vs_uuid_add does and I have not found docs explaining it.

Thanks!

-Gabe

Related