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

Is it possible to use ble_gattc with S110?

Hi,

I have an nRF51822-based peripheral with S110 softdevice, and it would be handy if I could nose around central's capabilities when it connects my device (I'd like to read out GAP device name, for starters).

The API to make GATTC stuff is present in S110, though when I call functions like sd_ble_gattc_primary_services_discover() I receive BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP with evt->evt.gattc_evt.params.prim_srvc_disc_rsp.count == 0 even though I am quite positive there is at least GAP service exposed in the central.

So, is it possible to read central characteristics with S110, or do I need at least S130 (peripheral+central SD) to do GATTC things?

Thank you.

Parents
  • Hi, during the weekend I've done some additional testing and it seems to me only Windows 10 as a central works for GATTC discovery with S110.

    I've tested following API calls:

    • sd_ble_gattc_primary_services_discover(conn_handle, 0, NULL)
    • sd_ble_gattc_char_value_by_uuid_read(conn_handle, &uuid, &range) with GAP device name UUID
    • sd_ble_gattc_characteristics_discover(conn_handle, &range)

    against following centrals:

    • Android 4.4.2 LG D160 phone, both with and without "nRF Master control panel" application runned, with started GATT server containing heart rate service and standard 1800/1801 - empty data received for all 3 calls
    • Mac mini (late 2012) with OSX ElCapitan- empty data received
    • Lenovo laptop with Linux and latest BlueZ (with -E flag) - empty data received
    • the same laptop with Windows 10 - primary services 1800 and 1801 were present as expected, device name char readout by UUID worked

    Notes:

    • discovery has been made always after bonding
    • in all cases I received correct reply events on each request (BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP, BLE_GATTC_EVT_CHAR_DISC_RSP and BLE_GATTC_EVT_CHAR_VAL_BY_UUID_READ_RSP), just having no data (except on Win10 where discovery worked as I expected)
    • when I connected LG Android phone (central) to linux laptop (as a peripheral), services 1800/1801 of laptop were visible in nRF Master control panel and laptop's device name characteristic was readable
  • Thanks for your reply. Yesterday I tried discovery against iPhone4S (central) with iOS8.X.X and discovery of primary services returned 0, so again - no luck with that. Weird thing is though, that iOS and AFAIK MacOSX should both expose ANCS services, so I have no idea why I don't see them from S110. I may test it against Android 6.0 on weekend, but I don't give it much chances.

Reply
  • Thanks for your reply. Yesterday I tried discovery against iPhone4S (central) with iOS8.X.X and discovery of primary services returned 0, so again - no luck with that. Weird thing is though, that iOS and AFAIK MacOSX should both expose ANCS services, so I have no idea why I don't see them from S110. I may test it against Android 6.0 on weekend, but I don't give it much chances.

Children
No Data
Related