[riot-notifications] [RIOT-OS/RIOT] examples/nimble_gatt: extend application with ble characteristics (#10465)

Hauke Petersen notifications at github.com
Wed Jan 30 14:21:34 CET 2019

haukepetersen requested changes on this pull request.

Sorry for the delayed review...

In general this PR looks good to me, everything makes sense. My only proposition for improvement is to let the device info characteristics return some (more or less) usefull data when read.

> @@ -78,10 +166,130 @@ static void start_advertise(void)
+static int gatt_svr_chr_access_device_info(
+        uint16_t conn_handle, uint16_t attr_handle,
+        struct ble_gatt_access_ctxt *ctxt, void *arg)
+    puts("service 'device info' callback triggered");
+    (void) conn_handle;

how about we split this function and return some information to the caller?

- for `GATT_MANUFACTURER_NAME_UUID` we could return the RIOT version (`RIOT_VERSION`, see kernel_init.c)
- for `GATT_MODEL_NUMBER_UUID` we could return the board and cpu (`RIOT_BOARD` and `RIOT_MCU`, see the hello world example)

You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190130/3f4d2e59/attachment-0001.html>

More information about the notifications mailing list