Skip to content

Instantly share code, notes, and snippets.

@Hypnotriod
Created October 6, 2025 15:24
Show Gist options
  • Select an option

  • Save Hypnotriod/7822065293142ed652540329df7f1024 to your computer and use it in GitHub Desktop.

Select an option

Save Hypnotriod/7822065293142ed652540329df7f1024 to your computer and use it in GitHub Desktop.
Zephyr BLE trace the Service attributes uuids helper.
#include <zephyr/bluetooth/bluetooth.h>
static void trace_service_attributes(const struct bt_gatt_service_static *service)
{
uint16_t i;
char buff[64];
for (i = 0; i < service->attr_count; i++) {
bt_uuid_to_str(service->attrs[i].uuid, buff, sizeof(buff));
LOG_INF("Attribute %d UUID: %s", i, buff);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment