<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>What does the BLE event 0x57 mean?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48357/what-does-the-ble-event-0x57-mean</link><description>I&amp;#39;ve added a HID service in my project. 
 I see a lot of messages 
 &amp;lt;00&amp;gt; debug&amp;gt; nrf_sdh_ble: BLE event: 0x57. 
 in the RTT Viewer. 
 What does the event 0x57 mean?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 15 Jun 2019 07:35:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48357/what-does-the-ble-event-0x57-mean" /><item><title>RE: What does the BLE event 0x57 mean?</title><link>https://devzone.nordicsemi.com/thread/193002?ContentTypeID=1</link><pubDate>Sat, 15 Jun 2019 07:35:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7e7e142b-43a2-45e5-94fa-a94f87b039df</guid><dc:creator>timapus</dc:creator><description>&lt;p&gt;It is very helpful, thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What does the BLE event 0x57 mean?</title><link>https://devzone.nordicsemi.com/thread/192988?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2019 22:15:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4aeb387f-17c8-410d-972e-35dfb25c34d0</guid><dc:creator>hmolesworth</dc:creator><description>&lt;p&gt;This helps; I&amp;#39;m showing decimal instead of hex, but 0x57 = 87 decimal. I like to see all events without having to search for them, note the ones handled elsewhere in ble_gap_event() are simply commented out as they already have a trace message - start by uncommenting all then comment out the duplicates:.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;        // BLE_GAP_EVTS - GAP Event IDs - uniquely identify an event coming from the stack to the application
//      case BLE_GAP_EVT_ADV_REPORT:
//      case BLE_GAP_EVT_CONNECTED:                    // 16 Connected to peer
//      case BLE_GAP_EVT_DISCONNECTED:                 // 17 Disconnected from peer
//      case BLE_GAP_EVT_CONN_PARAM_UPDATE:            // 18 Connection Parameters updated
//      case BLE_GAP_EVT_SEC_PARAMS_REQUEST:           // 19 Request to provide security parameters
        case BLE_GAP_EVT_SEC_INFO_REQUEST:             // 20 Request to provide security information
        case BLE_GAP_EVT_PASSKEY_DISPLAY:              // 21 Request to display a passkey to the user
        case BLE_GAP_EVT_KEY_PRESSED:                  // 22 Notification of a keypress on the remote device
        case BLE_GAP_EVT_AUTH_KEY_REQUEST:             // 23 Request to provide an authentication key
        case BLE_GAP_EVT_LESC_DHKEY_REQUEST:           // 24 Request to calculate an LE Secure Connections DHKey
        case BLE_GAP_EVT_AUTH_STATUS:                  // 25 Authentication procedure completed with status
        case BLE_GAP_EVT_CONN_SEC_UPDATE:              // 26 Connection security updated
//      case BLE_GAP_EVT_TIMEOUT:                      // 27 Timeout expired
//      case BLE_GAP_EVT_RSSI_CHANGED:                 // 28 RSSI report
//      case BLE_GAP_EVT_ADV_REPORT:                   // 29 Advertising report
        case BLE_GAP_EVT_SEC_REQUEST:                  // 30 Security Request
//      case BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST:    // 31 Connection Parameter Update Request
        case BLE_GAP_EVT_SCAN_REQ_REPORT:              // 32 Scan request report
//      case BLE_GAP_EVT_PHY_UPDATE_REQUEST:           // 33 PHY Update Request
//      case BLE_GAP_EVT_PHY_UPDATE:                   // 34 PHY Update Procedure is complete
        case BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST:   // 35 Data Length Update Request
        case BLE_GAP_EVT_DATA_LENGTH_UPDATE:           // 36 LL Data Channel PDU payload length updated
        case BLE_GAP_EVT_QOS_CHANNEL_SURVEY_REPORT:    // 37 Channel survey report
        case BLE_GAP_EVT_ADV_SET_TERMINATED:           // 38 Advertising set terminated

        // BLE_GATTC_EVTS - GATT Client Event IDs
        case BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP:         // 48 Primary Service Discovery Response event
        case BLE_GATTC_EVT_REL_DISC_RSP:               // 49 Relationship Discovery Response event
        case BLE_GATTC_EVT_CHAR_DISC_RSP:              // 50 Characteristic Discovery Response event
        case BLE_GATTC_EVT_DESC_DISC_RSP:              // 51 Descriptor Discovery Response event
        case BLE_GATTC_EVT_ATTR_INFO_DISC_RSP:         // 52 Attribute Information Response event
        case BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP:  // 53 Read By UUID Response event
        case BLE_GATTC_EVT_READ_RSP:                   // 54 Read Response event
        case BLE_GATTC_EVT_CHAR_VALS_READ_RSP:         // 55 Read multiple Response event
        case BLE_GATTC_EVT_WRITE_RSP:                  // 56 Write Response event
        case BLE_GATTC_EVT_HVX:                        // 57 Handle Value Notification or Indication event
        case BLE_GATTC_EVT_EXCHANGE_MTU_RSP:           // 58 Exchange MTU Response event
//      case BLE_GATTC_EVT_TIMEOUT:                    // 59 Timeout event
        case BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE:      // 60 Write without Response transmission complete

        // BLE_GATTS_EVTS - GATT Server Event IDs.
        case BLE_GATTS_EVT_WRITE:                      // 80 Write operation performed
        case BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST:       // 81 Read/Write Authorization request
        case BLE_GATTS_EVT_SYS_ATTR_MISSING:           // 82 A persistent system attribute access is pending
        case BLE_GATTS_EVT_HVC:                        // 83 Handle Value Confirmation
        case BLE_GATTS_EVT_SC_CONFIRM:                 // 84 Service Changed Confirmation
        case BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST:       // 85 Exchange MTU Request
//      case BLE_GATTS_EVT_TIMEOUT:                    // 86 Peer failed to respond to an ATT request in time
        case BLE_GATTS_EVT_HVN_TX_COMPLETE:            // 87 Handle Value Notification transmission complete
            if (p_ble_evt-&amp;gt;header.evt_id &amp;lt; NUM_BLE_EVENTS)
            {
               NRF_LOG_INFO(&amp;quot;p_ble_evt: %d %s&amp;quot;,p_ble_evt-&amp;gt;header.evt_id, ble_evt_description[p_ble_evt-&amp;gt;header.evt_id]);
            }
            else
            {
               NRF_LOG_INFO(&amp;quot;Unhandled p_ble_evt-&amp;gt;header.evt_id: %d&amp;quot;,p_ble_evt-&amp;gt;header.evt_id);
            }
            break;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;This is the text description array, verbose but helpful:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;// BLE_GAP_EVTS - GAP Event IDs - uniquely identify an event coming from the stack to the application
static char * ble_evt_description[] =
{
/*                                           */ &amp;quot; 0 ?&amp;quot;,
/*                                           */ &amp;quot; 1 ?&amp;quot;,
/*                                           */ &amp;quot; 2 ?&amp;quot;,
/*                                           */ &amp;quot; 3 ?&amp;quot;,
/*                                           */ &amp;quot; 4 ?&amp;quot;,
/*                                           */ &amp;quot; 5 ?&amp;quot;,
/*                                           */ &amp;quot; 6 ?&amp;quot;,
/*                                           */ &amp;quot; 7 ?&amp;quot;,
/*                                           */ &amp;quot; 8 ?&amp;quot;,
/*                                           */ &amp;quot; 9 ?&amp;quot;,
/*                                           */ &amp;quot;10 ?&amp;quot;,
/*                                           */ &amp;quot;11 ?&amp;quot;,
/*                                           */ &amp;quot;12 ?&amp;quot;,
/*                                           */ &amp;quot;13 ?&amp;quot;,
/*                                           */ &amp;quot;14 ?&amp;quot;,
/*                                           */ &amp;quot;15 ?&amp;quot;,
/* BLE_GAP_EVT_ADV_REPORT:					 */
/* BLE_GAP_EVT_CONNECTED:                    */ &amp;quot;16 Connected to peer&amp;quot;,
/* BLE_GAP_EVT_DISCONNECTED:                 */ &amp;quot;17 Disconnected from peer&amp;quot;,
/* BLE_GAP_EVT_CONN_PARAM_UPDATE:            */ &amp;quot;18 Connection Parameters updated&amp;quot;,
/* BLE_GAP_EVT_SEC_PARAMS_REQUEST:           */ &amp;quot;19 Request to provide security parameters&amp;quot;,
/* BLE_GAP_EVT_SEC_INFO_REQUEST:             */ &amp;quot;20 Request to provide security information&amp;quot;,
/* BLE_GAP_EVT_PASSKEY_DISPLAY:              */ &amp;quot;21 Request to display a passkey to the user&amp;quot;,
/* BLE_GAP_EVT_KEY_PRESSED:                  */ &amp;quot;22 Notification of a keypress on the remote device&amp;quot;,
/* BLE_GAP_EVT_AUTH_KEY_REQUEST:             */ &amp;quot;23 Request to provide an authentication key&amp;quot;,
/* BLE_GAP_EVT_LESC_DHKEY_REQUEST:           */ &amp;quot;24 Request to calculate an LE Secure Connections DHKey&amp;quot;,
/* BLE_GAP_EVT_AUTH_STATUS:                  */ &amp;quot;25 Authentication procedure completed with status&amp;quot;,
/* BLE_GAP_EVT_CONN_SEC_UPDATE:              */ &amp;quot;26 Connection security updated&amp;quot;,
/* BLE_GAP_EVT_TIMEOUT:                      */ &amp;quot;27 Timeout expired&amp;quot;,
/* BLE_GAP_EVT_RSSI_CHANGED:                 */ &amp;quot;28 RSSI report&amp;quot;,
/* BLE_GAP_EVT_ADV_REPORT:                   */ &amp;quot;29 Advertising report&amp;quot;,
/* BLE_GAP_EVT_SEC_REQUEST:                  */ &amp;quot;30 Security Request&amp;quot;,
/* BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST:    */ &amp;quot;31 Connection Parameter Update Request&amp;quot;,
/* BLE_GAP_EVT_SCAN_REQ_REPORT:              */ &amp;quot;32 Scan request report&amp;quot;,
/* BLE_GAP_EVT_PHY_UPDATE_REQUEST:           */ &amp;quot;33 PHY Update Request&amp;quot;,
/* BLE_GAP_EVT_PHY_UPDATE:                   */ &amp;quot;34 PHY Update Procedure is complete&amp;quot;,
/* BLE_GAP_EVT_DATA_LENGTH_UPDATE_REQUEST:   */ &amp;quot;35 Data Length Update Request&amp;quot;,
/* BLE_GAP_EVT_DATA_LENGTH_UPDATE:           */ &amp;quot;36 LL Data Channel PDU payload length updated&amp;quot;,
/* BLE_GAP_EVT_QOS_CHANNEL_SURVEY_REPORT:    */ &amp;quot;37 Channel survey report&amp;quot;,
/* BLE_GAP_EVT_ADV_SET_TERMINATED:           */ &amp;quot;38 Advertising set terminated&amp;quot;,
/*                                           */ &amp;quot;39 ?&amp;quot;,
/*                                           */ &amp;quot;40 ?&amp;quot;,
/*                                           */ &amp;quot;41 ?&amp;quot;,
/*                                           */ &amp;quot;42 ?&amp;quot;,
/*                                           */ &amp;quot;43 ?&amp;quot;,
/*                                           */ &amp;quot;44 ?&amp;quot;,
/*                                           */ &amp;quot;45 ?&amp;quot;,
/*                                           */ &amp;quot;46 ?&amp;quot;,
/*                                           */ &amp;quot;47 ?&amp;quot;,
/*LE_GATTC_EVTS - GATT Client Event IDs      */
/* BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP:         */ &amp;quot;48 Primary Service Discovery Response event&amp;quot;,
/* BLE_GATTC_EVT_REL_DISC_RSP:               */ &amp;quot;49 Relationship Discovery Response event&amp;quot;,
/* BLE_GATTC_EVT_CHAR_DISC_RSP:              */ &amp;quot;50 Characteristic Discovery Response event&amp;quot;,
/* BLE_GATTC_EVT_DESC_DISC_RSP:              */ &amp;quot;51 Descriptor Discovery Response event&amp;quot;,
/* BLE_GATTC_EVT_ATTR_INFO_DISC_RSP:         */ &amp;quot;52 Attribute Information Response event&amp;quot;,
/* BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP:  */ &amp;quot;53 Read By UUID Response event&amp;quot;,
/* BLE_GATTC_EVT_READ_RSP:                   */ &amp;quot;54 Read Response event&amp;quot;,
/* BLE_GATTC_EVT_CHAR_VALS_READ_RSP:         */ &amp;quot;55 Read multiple Response event&amp;quot;,
/* BLE_GATTC_EVT_WRITE_RSP:                  */ &amp;quot;56 Write Response event&amp;quot;,
/* BLE_GATTC_EVT_HVX:                        */ &amp;quot;57 Handle Value Notification or Indication event&amp;quot;,
/* BLE_GATTC_EVT_EXCHANGE_MTU_RSP:           */ &amp;quot;58 Exchange MTU Response event&amp;quot;,
/* BLE_GATTC_EVT_TIMEOUT:                    */ &amp;quot;59 Timeout event&amp;quot;,
/* BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE:      */ &amp;quot;60 Write without Response transmission complete&amp;quot;,
/*                                           */ &amp;quot;61 ?&amp;quot;,
/*                                           */ &amp;quot;62 ?&amp;quot;,
/*                                           */ &amp;quot;63 ?&amp;quot;,
/*                                           */ &amp;quot;64 ?&amp;quot;,
/*                                           */ &amp;quot;65 ?&amp;quot;,
/*                                           */ &amp;quot;66 ?&amp;quot;,
/*                                           */ &amp;quot;67 ?&amp;quot;,
/*                                           */ &amp;quot;68 ?&amp;quot;,
/*                                           */ &amp;quot;69 ?&amp;quot;,
/*                                           */ &amp;quot;70 ?&amp;quot;,
/*                                           */ &amp;quot;71 ?&amp;quot;,
/*                                           */ &amp;quot;72 ?&amp;quot;,
/*                                           */ &amp;quot;73 ?&amp;quot;,
/*                                           */ &amp;quot;74 ?&amp;quot;,
/*                                           */ &amp;quot;75 ?&amp;quot;,
/*                                           */ &amp;quot;76 ?&amp;quot;,
/*                                           */ &amp;quot;77 ?&amp;quot;,
/*                                           */ &amp;quot;78 ?&amp;quot;,
/*                                           */ &amp;quot;79 ?&amp;quot;,
/*LE_GATTS_EVTS - GATT Server Event IDs.     */
/* BLE_GATTS_EVT_WRITE:                      */ &amp;quot;80 Write operation performed&amp;quot;,
/* BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST:       */ &amp;quot;81 Read/Write Authorization request&amp;quot;,
/* BLE_GATTS_EVT_SYS_ATTR_MISSING:           */ &amp;quot;82 A persistent system attribute access is pending&amp;quot;,
/* BLE_GATTS_EVT_HVC:                        */ &amp;quot;83 Handle Value Confirmation&amp;quot;,
/* BLE_GATTS_EVT_SC_CONFIRM:                 */ &amp;quot;84 Service Changed Confirmation&amp;quot;,
/* BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST:       */ &amp;quot;85 Exchange MTU Request&amp;quot;,
/* BLE_GATTS_EVT_TIMEOUT:                    */ &amp;quot;86 Peer failed to respond to an ATT request in time&amp;quot;,
/* BLE_GATTS_EVT_HVN_TX_COMPLETE:            */ &amp;quot;87 Handle Value Notification transmission complete&amp;quot;,
};
#define NUM_BLE_EVENTS (sizeof(ble_evt_description)/sizeof(ble_evt_description[0]))
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And a few safety checks:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;STATIC_ASSERT(BLE_GAP_EVT_CONNECTED            == 0x10, &amp;quot;Enum Check Fails - BLE_GAP_EVTS&amp;quot;);
STATIC_ASSERT(BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP == 0x30, &amp;quot;Enum Check Fails - BLE_GATTC_EVTS&amp;quot;);
STATIC_ASSERT(BLE_GATTS_EVT_WRITE              == 0x50, &amp;quot;Enum Check Fails - BLE_GATTS_EVTS&amp;quot;);
STATIC_ASSERT(BLE_GAP_EVT_ADV_SET_TERMINATED       == 38, &amp;quot;Enum Check Fails - BLE_GAP_EVTS&amp;quot;);
STATIC_ASSERT(BLE_GATTC_EVT_WRITE_CMD_TX_COMPLETE  == 60, &amp;quot;Enum Check Fails - BLE_GATTC_EVTS&amp;quot;);
STATIC_ASSERT(BLE_GATTS_EVT_HVN_TX_COMPLETE        == 87, &amp;quot;Enum Check Fails - BLE_GATTS_EVTS&amp;quot;);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What does the BLE event 0x57 mean?</title><link>https://devzone.nordicsemi.com/thread/192987?ContentTypeID=1</link><pubDate>Fri, 14 Jun 2019 21:38:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fe45df2-ad06-4830-b004-76a136dcc611</guid><dc:creator>timapus</dc:creator><description>&lt;p&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What does the BLE event 0x57 mean?</title><link>https://devzone.nordicsemi.com/thread/191767?ContentTypeID=1</link><pubDate>Mon, 10 Jun 2019 03:48:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4ecb2bf-54ed-423e-85bb-064a3f515825</guid><dc:creator>natersoz</dc:creator><description>&lt;p&gt;See the file in the SDK :&lt;/p&gt;
&lt;p&gt;nRF5_SDK_15.3.0_59ac345/components/softdevice/s132/headers/ble_gatts.h&lt;/p&gt;
&lt;p&gt;I&amp;#39;m referencing the softdevice 132, but the others will be the same.&lt;/p&gt;
&lt;p&gt;Search for enum BLE_GATTS_EVT. Line 89.&lt;/p&gt;
&lt;p&gt;You will see that the first entry in the enum is BLE_GATTS_EVT_BASE. You can find that value in ble_ranges.h (same directory).&lt;/p&gt;
&lt;p&gt;The value of BLE_GATTS_EVT_BASE is 0x50. Increment through the enum and you will find 0x57 is BLE_GATTS_EVT_HVN_TX_COMPLETE.&lt;/p&gt;
&lt;p&gt;That event means that your indication or notification as been transmitted, and if I understand the softdevice correctly, the packets successfully received by the peer at the link layer.&lt;/p&gt;
&lt;p&gt;Your data made it! Party time.&lt;/p&gt;
&lt;p&gt;I highly recommend that you employ an editor with tagging capabilities and tag the softdevice and portions of the SDK you intend to use (or perhaps all of it).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>