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

S130 Custom UUID Service discovery

I have S110 peripheral device with custom UUID, created as described in www.nordicsemi.com/.../80193304 . On the other side i have S130 device who successfuly scans and connects to peripheral device. But when i try to discover services, i cant get custom service - i get that type is BLE_UUID_TYPE_UNKNOWN. All other servces is like ble_bas, ble_dis are discovered. I use S130 demo code.

So my question - how to discover custom UUIID service on S130 device?

Parents Reply Children
  • I've added example to original post (just one post per user restriction and limited length of comments...). Cheers Jan

  • Hello Thanks everyone for the reply. Now I am using nAN-36 example in the peripheral and I am trying to read the example service in the S130 example code. With your code I read the value generic attribute profile and Generic access profile, but when I enter in the if condition, the sd_ble_gattc_read funtion return a error and my peripheral disconnect. Do you have any idea of what cause the error? With my smartphone I connect with my peripheral without any problem, but with the central device I cannot find my service.

    Thanks for your help

  • Hi James,

    what error code is returned from sd_ble_gattc_read function? It should be easier when you match that 16-bit code with error codes reserved for SD (see particular header files in the SDK). Then also make sure that m_central_conn_handle is valid (= connection request was sent and BLE stack inside SD is maintaining it) and that you are calling GATTC Read on proper GATT handle ID (it should be starting handle of Service you are looking to). Hard to recommend anything else, in my case this example just works (I'm using also nRF51822 on Peripheral side with S110 SD and one proprietary service with 128-bit UUID).

    Cheers Jan

  • Hi James,

    Just to make sure: do you call sd_ble_gattc_primary_services_discover(...) after provisioning 128-bit UUID base by sd_ble_uuid_vs_add(...)? It's not visible in my code sample because I'm running it (similarly to S130 example from nRF51 SDK) in the loop going through entire GATT handle space. It's also not completely mandatory to do it as you already know the handle ID at the moment of calling sd_ble_uuid_vs_add, very much depends on what you are doing in your code afterwards (e.g. continuing with Characteristics/Descriptors discovery etc.)

    Cheers Jan

Related