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

Parents
  • Hi,

    The system with base UUIDs that are combined with a 16 bit value to form a full 128 bit UUID are made specifically to use bytes 12 and 13 as the shorter 16 bit portion of the full 128 bit UUID. This is handled internally in the SoftDevice and cannot be changed.

    That means you must do as you describe and manually create a set of base UUIDs and 16 bit UUIDs in order to compose the actual 128 bit UUIDs that you need. And, as you wrote, accept the memory usage resulting from such an approach.

    Regards,
    Terje

  • Terje,

    Thanks for the reply. Can you point me in the right direction as to where I can change the base uuid limit? I'm not sure if that is part of the softdevice that is flashed to the dongle or part of the shared library that the python bindings use.

    -Gabe

Reply Children
Related