Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BLE Link Context Manager - example of usage in multiconnect scenario?

I suspect I could avoid writing (admittedly, simple) code to map ble service objects to connection handles and vice-versa if I knew how to properly use the BLE Link Context Manager. I'm finding it challenging sussing out how to do so in a multi-connection scenario from the macro defs and documentation.

Is there an example of the LCM being used against multiple simultaneous BLE services?  The uart example only uses it in the single link case.  Absent that does someone have better docs for it than exist in infocenter here https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.sdk5.v15.2.0%2Fgroup__ble__link__ctx__manager.html?

TIA Howard

Parents
  • Hi,

    You have a point. As mentioned here, the BLE Link Context Manager is used in the HID, NUS, and IAS implementations. However, none of those are used in a multilink example. The Message Sequence Chart shows how it is used. The usage is quite simple though, so i suggest you refer to for instance the NUS implementation in ble_nus.c for an example.

  • I'm ashamed to have been all over that implementation but the macro def is difficult to grasp in my head, like squiggly tunnels that, Wumpus-like, all look the same. I'm being kept from my Nordic dopamine high. It's been too long since I had it.  So what should be a simple matter of array-izing the context pointer, isn't.  Please consider putting this on someone's to-do list, maybe an intern or someone you want to challenge with in-head preproc-macro compilation.

    I'm electing to pretend it doesn't exist and code something I won't really care to reuse for one time use because, as you note, it is quite simple.

Reply
  • I'm ashamed to have been all over that implementation but the macro def is difficult to grasp in my head, like squiggly tunnels that, Wumpus-like, all look the same. I'm being kept from my Nordic dopamine high. It's been too long since I had it.  So what should be a simple matter of array-izing the context pointer, isn't.  Please consider putting this on someone's to-do list, maybe an intern or someone you want to challenge with in-head preproc-macro compilation.

    I'm electing to pretend it doesn't exist and code something I won't really care to reuse for one time use because, as you note, it is quite simple.

Children
No Data
Related