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

using S120 as a central

Hi,

I have a BLE peripheral with a custom service (using a different chipset). I'm working with S120 as a central, and attempting to read/write various characteristics in my peripheral.

There are a lot of examples in the nRF51 SDK using nRF51x as a peripheral, but very few central examples. Using ble_app_hrs_c as an example, I have been able to actively scan, parse advertisement data, connect to my peripheral, and read/write to a characteristic using sd_ble_gattc_char_value_by_uuid_read and BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP.

However, I'm wondering if there are higher layer API's one can use to interact with a peripheral. For example, there are BLE Services API's for a Heart Rate Client Service and Battery Service Client, but I don't see any other client code.

So my question is, what's the recommended way to interact with a custom peripheral? Should I be using calls like sd_ble_gattc_char_value_by_uuid_read and BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP, manually reading the data in ble_gattc_evt_t, etc, or are there higher layer API's? Ideally there would be something like a Generic Client Service, but it doesn't appear as though something like that exists...

  • @Mike: I don't think we have other client service library besides ble_ias_c,ble_ans_c, ble_cts_c and ble_bas_c, ble_hrs_c.

    The S110 was developed much earlier than the S120. So the material for S110 is more adequate.

    However I don't think it would be too tricky to implement one on your own based on what we do with ble_hrs_c for example.

    In addition, we also have an example on client for 128bit UUID proprietary service, you can refer here.

Related