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

unidentified enum identifiers BLE_GAP_EVTS

Hello,
I am studying the example ble_app_gls from SDK 15.0.0. with a static password for the board nRF52810, SoftDevice s112.
When I write debug messages of the event identifier (p_ble_evt-> header.evt_id) coming in ble_evt_handler, then in some cases,
when the connection is established, the values ​​80 and 87 appear. Also, when I transferred the static password settings to my project,
immediately after the connection was established, id 58 appears.
I could not find the description of these id in the specification. Can I find out what they mean?
Thank!
Parents
  • Hi,

    In the file ble_ranges.h, found in the folder sdk_folder\components\softdevice\s112\headers, you can see the value range for the different BLE events.

    For example BLE_GATTS_EVT_BASE is 0x50 (decimal 80). Based on this, we can then take a look at ble_gatts.h in the same folder, here we have the following:

    /**
     * @brief GATT Server Event IDs.
     */
    enum BLE_GATTS_EVTS
    {
      BLE_GATTS_EVT_WRITE = BLE_GATTS_EVT_BASE,       /**< Write operation performed.                                           \n See @ref ble_gatts_evt_write_t.                 */
      BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST,             /**< Read/Write Authorization request.                                    \n Reply with @ref sd_ble_gatts_rw_authorize_reply. \n See @ref ble_gatts_evt_rw_authorize_request_t. */
      BLE_GATTS_EVT_SYS_ATTR_MISSING,                 /**< A persistent system attribute access is pending.                     \n Respond with @ref sd_ble_gatts_sys_attr_set.     \n See @ref ble_gatts_evt_sys_attr_missing_t.     */
      BLE_GATTS_EVT_HVC,                              /**< Handle Value Confirmation.                                           \n See @ref ble_gatts_evt_hvc_t.                   */
      BLE_GATTS_EVT_SC_CONFIRM,                       /**< Service Changed Confirmation.                                        \n No additional event structure applies.          */
      BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST,             /**< Exchange MTU Request.                                                \n Reply with @ref sd_ble_gatts_exchange_mtu_reply. \n See @ref ble_gatts_evt_exchange_mtu_request_t. */
      BLE_GATTS_EVT_TIMEOUT,                          /**< Peer failed to respond to an ATT request in time.                    \n See @ref ble_gatts_evt_timeout_t.               */
      BLE_GATTS_EVT_HVN_TX_COMPLETE                   /**< Handle Value Notification transmission complete.                     \n See @ref ble_gatts_evt_hvn_tx_complete_t.       */
    };

    Then we can see that BLE_GATTS_EVT_WRITE is the same as 0x50(decimal 80), and that 87 is BLE_GATTS_EVT_HVN_TX_COMPLETE.

    For id 58(hex 3A), we see that this belongs in this base range:

    #define BLE_GATTC_EVT_BASE 0x30 /**< GATTC BLE Event base. */
    #define BLE_GATTC_EVT_LAST 0x4F /**< GATTC BLE Event last. */

    And in ble_gattc.h, we see that 0x3A is BLE_GATTC_EVT_EXCHANGE_MTU_RSP.

Reply Children
No Data
Related