Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

ATT_MTU throughput example: data received by responder?

Hello, I'm running the nRF5 SDK's ATT_MTU throughput example and I want to check that the data sent by the 'tester' (nRF52832 in my case) is effectively received by the 'responder' (nRF52840 in my case).

I can check the data sent by the tester but don't see where the data received by the responder can be found in the code.

Anyone that can help me, or tell what I need to do to find it? Thank you very much!

Parents
  • Hi

    If I understand you correctly you are looking for the code that receives notifications sent by the amt server?

    Incoming notifications are handled by the on_hvx(..) function on line 135 of amtc.c, which forwards the data to the registered AMT client callback. In the standard example this is the function called amtc_evt_handler(..), which is defined on line 472 of main.c

    As you can see this callback can respond to different types of events, and the event corresponding to an incoming notification is the NRF_BLE_AMT_C_EVT_NOTIFICATION event. 

    Hopefully this made it a bit clearer ;)

    Best regards
    Torbjørn

  • Hi,

    Thanks for this info. It confirms I was on the right track, which is always good to know. But my question obviously wasn't clear enough.

    When handling the NRF_BLE_AMT_C_EVT_NOTIFICATION event in amtc_evt_handler(..) in main.c, I was expecting to see an array of received bytes or a pointer to the received bytes in the p_evt ->params.hvx structure. I however only see the number of received bytes (bytes_rcvd), not the bytes themselves or a pointer to them.

    I assume I'm missing something. Therefore my question is how I can retrieve the received bytes, either in this event handler or in on_hvx(..), or anywhere else.

    Best regards,

    Luc

Reply
  • Hi,

    Thanks for this info. It confirms I was on the right track, which is always good to know. But my question obviously wasn't clear enough.

    When handling the NRF_BLE_AMT_C_EVT_NOTIFICATION event in amtc_evt_handler(..) in main.c, I was expecting to see an array of received bytes or a pointer to the received bytes in the p_evt ->params.hvx structure. I however only see the number of received bytes (bytes_rcvd), not the bytes themselves or a pointer to them.

    I assume I'm missing something. Therefore my question is how I can retrieve the received bytes, either in this event handler or in on_hvx(..), or anywhere else.

    Best regards,

    Luc

Children
Related