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

I need some help with nrf52 ATT_MTU_Thoughtput example!

Hello every! I am working with ATT_MTU_Thoughtput example (S132). My purpose is send data from "sever" to "client" and wait until "client" response to confirm . I was send "my useful data" from sever to client and show this data via nrf_log module. But I have some problem :

  1. how client does sends (response) data to sever?
  2. how server can receive the data from client?

Help me please!!!

Parents
  • There is GATTC (GATT Client) method called Write and that's how Client can update some Characterisitc's or Descriptor's handle value on GATT Server side. If you run Nordic BLE stack (Soft Device) on counter side then - similar to what you do with Notifications or Indications when you send data from Server to Client - there is corresponding event and event data structure containing the data once they are received on Server side.

    See following sequence charts from GATT Client perspective and GATT Server perspective.

  • All you need is in nRF5_SDK_14.0.0_3bcc1f7\examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput\amtc.c file:

    • On the lowest level sd_ble_gattc_write is called in tx_buffer_process function.
    • Then tx_buffer_process is called from several places to kick-start/continue whole transfer (there can be several ways how to trigger it in application flow) but the main interest might be function nrf_ble_amtc_on_ble_evt. The same function also receives all BLE events.
    • Finally nrf_ble_amtc_on_ble_evt handler is registered in main.c to receive all BLE related event call-backs.
Reply
  • All you need is in nRF5_SDK_14.0.0_3bcc1f7\examples\ble_central_and_peripheral\experimental\ble_app_att_mtu_throughput\amtc.c file:

    • On the lowest level sd_ble_gattc_write is called in tx_buffer_process function.
    • Then tx_buffer_process is called from several places to kick-start/continue whole transfer (there can be several ways how to trigger it in application flow) but the main interest might be function nrf_ble_amtc_on_ble_evt. The same function also receives all BLE events.
    • Finally nrf_ble_amtc_on_ble_evt handler is registered in main.c to receive all BLE related event call-backs.
Children
No Data
Related