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.

CC2652R: Conditional on peripheral based on central attDeviceName

Part Number: CC2652R

I need a peripheral to adjust behavior based on the central device. I can read the UUID of the central but I would rather not have to set that statically on the central. Instead, I would like to recognize the attDeviceName somewhere on the peripheral and set a flag. Where is that information or how do I retrieve it?

SDK 5.20

  • Hey Matt,

    On the peripheral, you can look inside SimplePeripheral_processGapMessage and find GAP_LINK_ESTABLISHED_EVENT. When the central establishes a connection with the peripheral, it will enter this statement. You can find details like the device address inside the gapEstLinkReqEvent_t *pPkt struct and store it as you wish.

    If you haven't already taken a look, take a look at our Simplelink Academy modules for additional info here.

  • Yea but I don't see the device name in there. Central settings:

    In GAP_LINK_ESTABLISHED_EVENT on peripheral.

    Thanks

  • Hey Matt,

    I see what you wish to do now. Unfortunately, the device name isn't used when forming a connection since only addresses are shared OTA in the CONNECT_IND. I think you will have to go with the original method described above (to read the UUID).

    Along those same lines, you may wish to add application logic using a characteristic (some sort of handshaking) so that you can filter out the centrals that way. This might be an excessive approach for what you need though.