nRF51 SDK - S110 SoftDevice
|
Frame format encoding of the BLE_GATTS_EVT_WRITE packet.
Event ID = 0x50 for BLE_GATTS_EVT_WRITE
All BLE Events, ble_evt_t, are encoded with the header ble_evt_hdr_t first, containing only the 'Event ID', followed by the event. The 'Event Length' will not be encoded as the size of the event could be of different sizes depending on decoder architecture.
The BLE GAP event contains a connection handle, and for the BLE GATTS Write event, the ble_gatts_evt_write_t is encoded after connection handle as seen in Figure 2.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gatts_evt_t::conn_handle |
2 bytes | Attribute Handle | see ble_gatts_evt_write_t::handle |
1 byte | Write Operation | see ble_gatts_evt_write_t::op |
2 bytes | Service UUID | UUID Value |
1 byte | Service UUID Type | UUID Type |
2 bytes | Char UUID | Characteristic UUID if applicable |
1 byte | Char UUID Type | Characteristic UUID Type if applicable (BLE_UUID_TYPE_UNKNOWN if N/A) |
2 bytes | Desc UUID | Descriptor UUID if applicable |
1 byte | Desc UUID Type | Descriptor UUID Type if applicable (BLE_UUID_TYPE_UNKNOWN if N/A) |
2 bytes | Service Handle | Handle Value |
2 bytes | Value Handle | Characteristic Handle if applicable (BLE_GATT_HANDLE_INVALID if N/A) |
1 byte | Attribute Type | see GATT Server Attribute Types |
2 bytes | Offset | see ble_gatts_evt_write_t::offset |
2 bytes | Data Length | see ble_gatts_evt_write_t::len |
0...'Data Length' bytes | Data | see ble_gatts_evt_write_t::data |
Frame format encoding of the BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST packet.
Event ID = 0x51 for BLE_GATTS_EVT_RW_AUTHORIZE_REQUEST
All BLE Events, ble_evt_t, are encoded with the header ble_evt_hdr_t first, containing only the 'Event ID', followed by the event. The 'Event Length' will not be encoded as the size of the event could be of different sizes depending on decoder architecture.
The BLE GAP event contains a connection handle, and for the BLE GATTS RW Authorize Request event, the ble_gatts_evt_rw_authorize_request_t is encoded after connection handle as seen in Figure 1 and Figure 2.
Read authorization the order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gatts_evt_t::conn_handle |
1 byte | Authorization Type | see ble_gatts_evt_rw_authorize_request_t::type |
2 bytes | Attribute Handle | see ble_gatts_evt_read_t::handle |
2 bytes | Service UUID | UUID Value |
1 byte | Service UUID Type | UUID Type |
2 bytes | Char UUID | Characteristic UUID if applicable |
1 byte | Char UUID Type | Characteristic UUID Type if applicable (BLE_UUID_TYPE_UNKNOWN if N/A) |
2 bytes | Desc UUID | Descriptor UUID if applicable |
1 byte | Desc UUID Type | Descriptor UUID Type if applicable (BLE_UUID_TYPE_UNKNOWN if N/A) |
2 bytes | Service Handle | Handle Value |
2 bytes | Value Handle | Characteristic Handle if applicable (BLE_GATT_HANDLE_INVALID if N/A) |
1 byte | Attribute Type | see GATT Server Attribute Types |
2 bytes | Offset | Offset for the write operation |
Write authorization the order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gatts_evt_t::conn_handle |
1 byte | Authorization Type | see ble_gatts_evt_rw_authorize_request_t::type |
2 bytes | Attribute Handle | see ble_gatts_evt_write_t::handle |
1 byte | Write Operation | Type of write operation, see GATT Server Operations |
2 bytes | Service UUID | UUID Value |
1 byte | Service UUID Type | UUID Type |
2 bytes | Char UUID | Characteristic UUID if applicable |
1 byte | Char UUID Type | Characteristic UUID Type if applicable (BLE_UUID_TYPE_UNKNOWN if N/A) |
2 bytes | Desc UUID | Descriptor UUID if applicable |
1 byte | Desc UUID Type | Descriptor UUID Type if applicable (BLE_UUID_TYPE_UNKNOWN if N/A) |
2 bytes | Service Handle | Handle Value |
2 bytes | Value Handle | Characteristic Handle if applicable (BLE_GATT_HANDLE_INVALID if N/A) |
1 byte | Attribute Type | see GATT Server Attribute Types |
2 bytes | Offset | Offset for the write operation |
2 bytes | Data Length | Length of the incoming data |
0...'Data Length' bytes | Data | Incoming data, variable length |
Frame format encoding of the BLE_GATTS_EVT_SYS_ATTR_MISSING packet.
Event ID = 0x52 for BLE_GATTS_EVT_SYS_ATTR_MISSING
All BLE Events, ble_evt_t, are encoded with the header ble_evt_hdr_t first, containing only the 'Event ID', followed by the event. The 'Event Length' will not be encoded as the size of the event could be of different sizes depending on decoder architecture.
The BLE GATTS event contains a connection handle, and for the BLE GATTS System Attributes Missing event, the ble_gatts_evt_sys_attr_missing_t is encoded after connection handle as seen in Figure 1.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gatts_evt_t::conn_handle |
1 byte | Hint | see ble_gatts_evt_sys_attr_missing_t |
Frame format encoding of the BLE_GATTS_EVT_HVC packet.
Event ID = 0x53 for BLE_GATTS_EVT_HVC
All BLE Events, ble_evt_t, are encoded with the header ble_evt_hdr_t first, containing only the 'Event ID', followed by the event. The 'Event Length' will not be encoded as the size of the event could be of different sizes depending on decoder architecture.
The BLE GATTS event contains a connection handle, and for the BLE GATTS HVC event, the ble_gatts_evt_hvc_t is encoded after connection handle as seen in Figure 1.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gatts_evt_t::conn_handle |
2 bytes | Attribute Handle | see ble_gatts_evt_hvc_t::handle |
Frame format encoding of the BLE_GATTS_EVT_SC_CONFIRM packet.
Event ID = 0x54 for BLE_GATTS_EVT_SC_CONFIRM
All BLE Events, ble_evt_t, are encoded with the header ble_evt_hdr_t first, containing only the 'Event ID', followed by the event. The 'Event Length' will not be encoded as the size of the event could be of different sizes depending on decoder architecture.
BLE_GATTS_EVT_SC_CONFIRM event is encoded in a following order (also presented in Figure 1):
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gatts_evt_t::conn_handle |
Frame format encoding of the BLE_GATTS_EVT_TIMEOUT packet.
Event ID = 0x55 for BLE_GATTS_EVT_TIMEOUT
All BLE Events, ble_evt_t, are encoded with the header ble_evt_hdr_t first, containing only the 'Event ID', followed by the event. The 'Event Length' will not be encoded as the size of the event could be of different sizes depending on decoder architecture.
The BLE GATTS event contains a connection handle, and for the BLE GATTS Timeout event, the ble_gatts_evt_timeout_t is encoded after connection handle as seen in Figure 1.
The order of the encoding is:
Length | Parameter | Value |
---|---|---|
2 bytes | Connection Handle | see ble_gatts_evt_t::conn_handle |
1 byte | Timeout Source | see ble_gatts_evt_timeout_t::src |