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
  • I solved this different way. For peripheral devices i use device_manager_central.h from nrf-sdk in the same way as in the S120 examples (since S130 is a mix of S110 and S120). So it handles all the connectivity, bonding, etc. When i need discover services i use ble_db_discovery.h, which handles discovery process (also example is form 120). But before all that i add custom service UUID, because i know what services i need:

    err_code = sd_ble_uuid_vs_add(&base_uuid, &uuidType);
    APP_ERROR_CHECK(err_code);
    

    And now everything is ok.

    There is also device_maneger_peripheral.h to use in S130, for example when you whant to connect your phone. But for now i see that you can't use both device managers. Would be greate if Nordic update this sdk with devices_manager that handles both central and peripheral devices.

  • Well in general you have 3 situations:

    1. You know the custom 128-bit UUID base at the development time - then it is pretty much trivial to hard code into the FW,
    2. You get 128-bit UUID from ADV_IND or SCAN_RSP data - then you just need to parse string for particular AD nodes, not a big deal.
    3. You cannot get 128-bit UUID(s) before connection time and then you need to do Service Discovery procedure as suggested above.

    Regarding "device manager": I do not use it any more but Central and Peripheral roles are opposite and it's hard to imagine how to merge it. If you run dual role at the same time then you should anyway keep them separately in the FW e.g. by having one module managing GAP Central and GAP Peripheral. From what I see in S120 documentation released with SDK it's the case already but I might be missing some detail which prevents you from using it this way.

Reply
  • Well in general you have 3 situations:

    1. You know the custom 128-bit UUID base at the development time - then it is pretty much trivial to hard code into the FW,
    2. You get 128-bit UUID from ADV_IND or SCAN_RSP data - then you just need to parse string for particular AD nodes, not a big deal.
    3. You cannot get 128-bit UUID(s) before connection time and then you need to do Service Discovery procedure as suggested above.

    Regarding "device manager": I do not use it any more but Central and Peripheral roles are opposite and it's hard to imagine how to merge it. If you run dual role at the same time then you should anyway keep them separately in the FW e.g. by having one module managing GAP Central and GAP Peripheral. From what I see in S120 documentation released with SDK it's the case already but I might be missing some detail which prevents you from using it this way.

Children
No Data
Related