I was trying to add a simple service with notification:

So I added to gatt_svr_svcs
    {
        /*** Service: Battery */
        .type = BLE_GATT_SVC_TYPE_PRIMARY,
        .uuid128 = BLE_UUID16(GATT_SVR_SVC_BATTERY),
        .characteristics = (struct ble_gatt_chr_def[]) { {
            .uuid128 = BLE_UUID16(GATT_SVR_CHR_BATTERY_LEVEL),
            .access_cb = gatt_svr_chr_access_battery,
            .flags = BLE_GATT_CHR_F_READ | BLE_GATT_CHR_F_NOTIFY,
        }, {
            0, /* No more characteristics in this service. */
        } },
    },

Adding the "| BLE_GATT_CHR_F_NOTIFY" result in an error when setting advertisement, which seems to be: pinkey missing.

105:[ts=102480ssb, mod=64 level=3] error enabling advertisement; rc=6
111:[ts=108336ssb, mod=4 level=0] Command Complete: cmd_pkts=1 ogf=0x0 ocf=0x0 status=5

I'm using bleprph (0.9-dev) as template, which is already using BLE_GATT_CHR_F_NOTIFY for it's Alert service, and I haven't seen such pinkey requirement. Any idea on what is wrong?

Sincerly

--
Stephane D'Alu

Reply via email to