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.

LP-EM-CC2340R5: How to use Bonding with Pair key

Part Number: LP-EM-CC2340R5
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

I was trying to bond the service with a pairing key or passcode. However, in the app, when I click on the service, it shows a popup for pairing, but in the background, it shows as connected to the service without taking the passcode or pairing key. Actually, I want the service to connect only after entering the correct passcode or pairing key. Until then, the service should not connect and should not allow any read or write actions to the characteristics.

Configurations i did in the sysconfig

SimpleLink Connect app shows a popup for pairing, but in the background, the service is already connected.

Please let me know how to do this

  • Hi,

    Thank you for reaching out. We will look into your question and get back to you as soon as possible. In the meantime, can you share the SDK version and simplelink connect app version you are using?

    Best Regards,

    Jan

  • Hi

    SDK Version - simplelink_lowpower_f3_sdk_8_10_01_02

    App Version - 1.3.5

  • Hi Navami,

    Thank you for confirming. Please see the user's guide on Selection of pairing method. If you need further assistance, let me know. 

    Regards,

    Ivan

  • Hi,

    Thanks for replying.

    I went through the document and set the pairing mode to initiate a pairing request, selecting the authenticated pairing only in sysconfig. However, in the app, we are still able to read and write for the service before entering the passcode or bonding.

    My requirement is that until we enter the passcode or complete bonding, we should not be able to read or write to the service. How can this be achieved?

  • Hi Navami, 

    The passcode entry pairing method is what you are looking for - one device will display a 6-digit passcode and the other device enters the passcode. Please follow the Passcode Entry section on this link. There is also a table in the page where can help you determine the IO capabilities which is below and help set the GAPBondMgr parameters. I hope this helps and has answered your question. Let me know if you need further help. 

    Regards

    Ivan

  • Hi,

    Yes, I need the passcode entry pairing.

    I went through the document and made the necessary configurations, but it is still not working as required. Before authenticating the passcode, the "myproject" service in the SimpleLink app connects, which is not working as per my requirement. It should not connect until the passcode is verified.

  • Hi Navami, you can try to implement a timer before establishing a connection to enter the passcode then if you are not able to enter the correct passcode on time then terminate the connection.

  • Hi,

    other than implementing timer, is there any other way to resolve this.

  • Hi,

    Per Bluetooth specifications, a peripheral device must enter a connection when instructed to do so by a central device. Said differently, the central device has no way to provide a key or anything similar at connection establishment.

    As a peripheral, you have two options to limit the connections you will be part of:

    - Option 1 (this is the option suggested by Ivan) - At connection establishment, expect the centrals to "identify" themselves providing a password or similar. If such identification is not completed, terminate the link.

    - Option 2 - Limit the device visibility (so no-unwanted connection can be formed). This can be done in several ways, using directed advertising, Allow/Deny list (formerly call white list), or even by turning on/off advertisement based on relevant events

    I hope this will help,

    Best regards,

  • Option 1:
    We don't have the source code of the BLE stack to start the timer. We are working at the application level and don't have the BLE source code to know when the connection is established or started.

    Option 2:
    We can't use direct advertising to limit the device's visibility, as we don't know who is going to connect or the customer's address

  • Hi,

    Option 2:
    We can't use direct advertising to limit the device's visibility, as we don't know who is going to connect or the customer's address

    Fair - Let's abandon this option then :)

    Option 2:
    We can't use direct advertising to limit the device's visibility, as we don't know who is going to connect or the customer's address

    The source code of the BLE stack is not required here.
    The application is notified of the connection establishment by the reception of the BLEAPPUTIL_LINK_ESTABLISHED_EVENT event. The sample applications available in the SDK showcase the usage of this event.

    I also recommend reviewing the SimpleLink Academy labs - https://dev.ti.com/tirex/explore/node?node=A__AVRnmrtFxgvqV6QR8RweHQ__SIMPLELINK-ACADEMY-CC23XX__gsUPh5j__LATEST.

    Let me know if you need more details.

    Best regards,