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.

CC2340R2: Application Sending Response vs BLE Stack

Expert 3750 points
Part Number: CC2340R2
Other Parts Discussed in Thread: SYSCONFIG

Tool/software:

Hi Jan,

Following up on a question I had about the BLE stack sending the pairing response vs. the customer's application. :) Apparently, they had already had the “Pairing Mode” set to Wait for a paring request and in that configuration the BLE stack sent the pairing response.  Their application was notified pairing was started but the response was already sent. When setting the “Pairing Mode”  to Pairing is not allowed the BLE stack responded with “Pairing Failed” once the pairing request was received (see screenshot below).

It appears the stack is always sending a response to the pairing request and there isn't a way for the application to send the response currently. 

Any idea on why this might be happening for them?

Thanks,

Luke

  • Hi Luke, 

    I am not sure I fully understand your request. 

    Could you please point me to the thread you meant by "Following up on a question I had about the BLE stack sending the pairing response vs. the customer's application"

    Thanks and regards, 

  • Clement,

    Apologies for the missing context on this one. I had previously asked if there was a way to configure Sysconfig to not have the BLE stack send the pairing response? Can you have application code send the response instead?

    It was assumed that if the "Pairing Mode" was set to Wait for Pairing Request or Pairing not Allowed, then this would allow the customer's application code to handle sending the pairing response instead but it seems we are not seeing that as the case shown above!

    Thanks,

    Luke

  • Hi Luke,

    No problem. It should be possible to pass the pairing request to the application to deny/approve based on whatever criteria the developer implements. That said, when using wait for pairing requests what I expect to happen is that the pairing request will be sent by the other device some point after connection establishment and the CC device will respond with a success or failure. Can you provide a bit more details what the customer is interested in implementing?

    Best Regards,

    Jan

  • Jan,

    I will work to get more details on what exactly they are trying to implement but maybe what they are attempting to do in BTool right now will give some idea.

    After establishing a connection to the peripheral, they send the pairing request message via BTool. The settings and commands/responses to the dev kit are in the next 2 screenshots.

    Their code receives the pairing request but does not send a response. Below is a screenshot of the Bluetooth capture. They also have debug messages in their code to confirm the request was received.

    They also tried using the GAP_Authenticate message under the advanced command list, but the result was the same – the pairing request was received but no response was sent.

    I assumed if the stack received a pairing request, a response would be sent. Since they're not seeing a response, does that mean something in BTool is configured incorrectly? Or is there something else that needs to occur along with the reception of the pairing request?

    Thanks,

    Luke

  • Some additional context:

    They are trying to test the processing of various pairing requests based on the bond manager configuration shown below.

    They'd like to be able to select various pairing options (MITM, bonding, etc.) and verify that the responses are as expected. 

    -Luke

  • Hi Luke,

    Got it. Seems they want to have a bit more control than i was expecting. I believe they will very likely need to make modifications to the gapbondmgr.c file in order to implement their desired functionality. From there they should be able to evaluate each pairing request that comes in and determine what to do.

    Best Regards,

    Jan