client side example of LBS using NCS

Back in SDK 17 or so there were code samples for both the client and server side of the LED button service.

What happened to the client/central example when you migrated to NCS?  Is it still available under a different name?

I'm trying to run an nrf5340 as the central (in a dual role setup).  I'd like to call LBS specific discovery functions (i.e. bt_lbs_client_handles_assign() and bt_lbs_client_subscribe_button()) but they don't appear to exist..

Searching the internet, I see examples (likely from old SDK versions) that want me to include <client_LBS.h>  but this file does not exist in the ncs\v3.2.1 directory structure anywhere.

I'm running NCS v3.2.1 in VScode 

Note: your AI assistant directed me the the NUS central example, but it calls bt_nus_handles_assign and bt_nus_subscribe_receive which are exactly the analogous calls I'd like to make for LBS

Parents
  • Hello,

    Unfortunately, it looks like the central sample for the LBS didn't make the cut into NCS.

    You can find the equivalent peripheral sample here:

    v3.2.1\nrf\samples\bluetooth\peripheral_lbs

    As for the central sample, this doesn't exist. If you need it, I would look into how the central_uart sample (same location) is built up. You can use this to see how to do service discovery, and since both of these are vendor specific services (NUS and LBS) the setup should be pretty much the same. The difference is that you would have to write the files lbs_client.c/h yourself, similar to how nus_client.c/h is built up.

    Best regards,

    Edvin

Reply
  • Hello,

    Unfortunately, it looks like the central sample for the LBS didn't make the cut into NCS.

    You can find the equivalent peripheral sample here:

    v3.2.1\nrf\samples\bluetooth\peripheral_lbs

    As for the central sample, this doesn't exist. If you need it, I would look into how the central_uart sample (same location) is built up. You can use this to see how to do service discovery, and since both of these are vendor specific services (NUS and LBS) the setup should be pretty much the same. The difference is that you would have to write the files lbs_client.c/h yourself, similar to how nus_client.c/h is built up.

    Best regards,

    Edvin

Children
No Data
Related