• The modification has been done in this way:

    1. case BLE_GATTS_EVT_WRITE: {
    2. // Peripheral's Characteristic was written to
    3. const ble_gatts_evt_write_t * p_evt_write = &p_ble_evt->evt.gatts_evt.params.write;
    4. // TODO: detect if this was a nus write. If so, DO NOT create an event for it!
    5. // We got a param write event - add this to the bluetooth event queue
    6. jsiConsolePrintf("indication confirmed!");
    7. jsble_queue_pending_buf(BLEP_WRITE, p_evt_write->handle, (char*)p_evt_write->data, p_evt_write->len);
    8. jsble_peripheral_activity(); // flag that we've been busy
    9. break;
    10. }

    Everytime an BLE_GATTS_EVT_HVC event is raised from the softdevice, indication confirmed! is printed in the console. This is a really good start.

    Now I just need to understand how to update this in order to be able to react on this event on the JS layer. If anyone has a clue, Please share :-)

About

Avatar for Jean-Philippe_Rey @Jean-Philippe_Rey started