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

ble gatts write event

I am having a small doubt in example UART Service. while writing characteristics value from master control panel to nrf51 chip, the stack generating BLE_GATTS_EVT_WRITE to application. How the stack knowing that the data is written in particular characteristics and generating BLE_GATTS_EVT_WRITE whether it periodically checking the characteristics value or any interrupt is happening in lower level to alert the stack about the characteristics value written

Parents
  • The SoftDevice is implemented according to the Bluetooth Core specification, which I hope you are familiar with. Anyways, I'll try to give you a high level abstraction explanation of how the BLE_GATTS_EVT_WRITE event is generated.

    In a connection the radio in the peripheral will listen for packets which has the access address of the central on every connection interval. If a packet is received, it is interpreted by the link layer and forwarded to the L2CAP layer if appropriate. L2CAP then forwards the packet to ATT, GAP or SM.

    The BLE_GATTS_EVT_WRITE event would originate from an ATT Write Request or an ATT Write Command from the client. If the ATT layer receives one of these methods it will write the value to the attribute server, and then notify the GATTS layer that a write has been done. GATTS will then forward a the BLE_GATTS_EVT_WRITE event to application through Software Interrupt 2.

Reply Children
No Data
Related