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

How can I transfer "useful data" by throughput example( nRF52840).

I just test nRF52840 DK with ble_app_att_mtu_throughput_pca10040_s132 example. I know BOARD_TESTER transmits 1024 dummy kbytes to BOARD_DUMMY. I want to replace dummy byte by my data. How can I do this? Thanks for your help!!!

Parents
  • Hi Focus,

    If you have a look at the test_run() function in main.c you can find that we call nrf_ble_amts_notif_spam() which then call char_notification_send(). Inside char_notification_send() you can find we continuously send dummy data[256] there. You can replace the dummy "data" with your own data. Note that you have to check for the return code of sd_ble_gatts_hvx() to make sure the data is queued properly or not or if CCCD is enabled or not.

Reply
  • Hi Focus,

    If you have a look at the test_run() function in main.c you can find that we call nrf_ble_amts_notif_spam() which then call char_notification_send(). Inside char_notification_send() you can find we continuously send dummy data[256] there. You can replace the dummy "data" with your own data. Note that you have to check for the return code of sd_ble_gatts_hvx() to make sure the data is queued properly or not or if CCCD is enabled or not.

Children
Related