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

BDS Plug IN - Optional Characteristics

Is there any way of instructing the BDS plug-in which optional characteristics to include in code generation for adopted services without converting to a custom service?

For example if I have the adopted DIS service in my project but don't want to generate characteristics for PnP ID or IEEE-20601 Regulatory Certification Data List characteristics (which are optional), how would I do that without changing the service definition in BDS which would cause it to change to a custom service (with a different UUID) instead of the adopted service UUID.

Short of manually hacking the generated code, any ideas?

  • :) I was about to say that you should hack the manually generated code, before I read the last line.

    The easiest way seems to be that we remove the characteristic: Steps:

    1. Drag and drop the Device Information Service that you want to the Right panel "Import a Service or Profile".
    2. Click on the Characteristic that you do not want, for example PnP ID
    3. Scroll to the end of the Characteristic Panel for PnP ID , all the way to the end and you will see three buttons, "Remove", "Save" and "Cancel".
    4. Click "Remove", this will remove PnP ID from the Service and will also prompt you to make the Service into custom local Service. Say "Yes".
    5. Now you should have a Service that has the right UUIDs for the Characteristics.
    6. Unfortunately the Service UUID is switched to a custom UUID by BDS so this does need manual intervention in the code to change the UUID the actual BTLE Service UUID.

    Setting the "ble_uuid.type = 0; " would switch the UUID to a 16 bit BTLE UUID.

    So yes, you do need manual intervention, but that is an issue with the BDS itself as it switches the Service UUID to the one specified in your project.

    Hope this helps.

Related