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

Can I use both UUIDs 16 bit and 128 bit in one project

I have 2 services are running using 16 bit UUIDs and now I am adding another service using our_service.c and our_service.h files but my program is crashing and leading to restarting continuously.

Is there proper guid to write our own custom service to send data to mobile (notify mode). data length is 20 byte.

Adding 3 three services in one project, guide or is there anything example to follow.

Thanks

  • Yes, you can certainly use both 16- and 128-but services in the same project.

    If you search the SDK for "sd_ble_uuid_vs_add", you will find some examples.

    Basic API's for creating your own 128-bit service
    - sd_ble_cfg_set(BLE_COMMON_CFG_VS_UUID, ...) // Configure BLE for your vendor-specific services
    - sd_ble_cfg_set(BLE_GATTS_CFG_ATTR_TAB_SIZE, ...) // ensure attribute table is large enough
    - sd_ble_uuid_vs_add() // Create a vendor-specific base UUID
    - sd_ble_gatts_service_add() // Add your service to the GATT server
    - sd_ble_gatts_characteristic_add() // Add your service characteristics to the GATT server

    The examples demonstrate how to hook up your service with the BLE runtime events.

    - Richard

Related