This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Where to find a health thermometer central device

In the examples delivered by Nordic, there is ble_app_hrs in ble_peripheral and ble_app_hrs_c in ble_central. But I cannot find a ble_app_hts_c in ble_central for the ble_perifpheral/ble_app_hts.

Is it available somewhere?

Parents Reply Children
  • I started writing the ble_app_hts_c. I copied the ble_app_hrs_c and made some name changes. I don't expect the whole thing work without significant changes, but I am expecting it can at least scan and get the advertisement from the HTS server. But it never stops at ble_hrs_on_db_disc_evt() function, where UUIDs of the service can be seen. Can you give me some pointers on how to convert the hrs_c to hts_c? What needs to be done to scan the HTS? Thanks.

  • The first thing you should do is to examine how the BLE_GAP_EVT_ADV_REPORT event is handled.

  • I was able to get pass the scanning and GAP connection. But service discovery was not successful. Th NUS example shows that I need to do the service discovery after getting the BLE_GAP_EVT_CONNECTED event. But the HRS_C is doing the service discovery under a different place in DM_EVT_LINK_SECURED. Why it is different?

    Another issue is that the Keil debugger "Call Stack + locals" shows not in scope for some variables, which is in scope. Is that a known issue?

  • Have you registered the hts UUID with ble_db_discovery_evt_register()? You can choose when to do service discovery, it seems hrs_c is bonding first, while uart_c does service discovery first. Maybe it has something to do with optimization? Set Options for Target->C/C++/Optimization to Level 0. Does it help?

  • Was able to receive the correct temperature data on the central device at initial connection. But since it is an indication, the HTS server is waiting for an ack from client. How to send an application level ack from HTS_C? Any code examples?

Related