This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LPSTK-CC1352R: Simple Central Two-button menu modification

Part Number: LPSTK-CC1352R

Dear all,

I uploaded both "simple peripheral" and "simple central" examples on two LPSK-cc1352R1.

As expected, everything works fine and I'm able to connect the "simple central" device to the "simple peripheral" one by using the TB menu on "simple central".

However, since I know "simple peripheral" device MAC address (TARGET MAC ADDRESS), I need to simplify the TB menu on "simple central" by following this simple and direct way:

-------------------------

- 1 click on Button 1 should perform CONNECTION by properly "merging" the following functions in a way similar to this one:

       - SimpleCentral_doDiscoverDevices() until TARGET MAC ADDRESS is detected in ADV report list

       if (TARGET MAC ADDRESS is detected in ADV list)

              {

             - SimpleCentral_doStopDiscovering()

              - SimpleCentral_doConnect() to TARGET MAC ADDRESS

             - SimpleCentral_doSelectConn() with TARGET MAC ADDRESS

             }

 ---------------------------

- 1 click on Button 2 should perform DISCONNECTION:

           - SimpleCentral_doDisconnect()

Please, could you help me with code or pseudo-code to correctly perform this conceptually simple variation?

In the example I assumed to compare the mac address (wich is public in my case), but also other characteristics such as deviceName or service UUID could be fine to filter the desired peripheral.

Thank you.