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.

CC2642R: sdk_5.2.0 multi_role做为主机扫描流程

Part Number: CC2642R
Other Parts Discussed in Thread: LAUNCHXL-CC26X2R1,
对与扫描连接配对流程问题有如下问题,当前我函数调用流程如下:
multi_role_scanInit()——>multi_role_doDiscoverDevices()中实现设备过滤,执行GapScan_enable(),然后通过multi_role_scanCB()执行相应的事件,在MR_EVT_REPORT事件中执行GapScan_disable()——》在MR_EVT_SCAN_DISABLE事件中完成GAPInit_connect发起主动连接功能,部分函数代码见附件。抓包数据和之前的一致。我这样执行能够发起连接,为什么在连接后配对时流程不对,因为在产生GAP_LINK_ESTABLISHED_EVENT事件后,即使第一次配对直接进入GAPBOND_PAIRING_STATE_ENCRYPTED事件而不是GAPBOND_PAIRING_STATE_STARTED,在此跳转过程中底层代码我无法看到是如何进入这个事件的,所以导致流程不对。希望能给出解答。谢谢。
  • https://e2e.ti.com/support/wireless-connectivity/bluetooth-group/bluetooth/f/bluetooth-forum/1203229/cc2642r-sdk_5-2-0-multi_role/4543123?tisearch=e2e-sitesearch&keymatch=%20user%3A555044#4543123

    This is the previous feedback that has not been solved. The current state is that when I set the host, I scan the device and initiate a connection. If the setting is set as no pairing, the connection is normal, but if I change it to initiate a pairing request, the connection fails, because I have not modified the pairing part, which is executed by the protocol stack

  • Hi,

    Thank you for reaching out to us. We will look into your query and get back to you as soon as possible. in the meantime, can you specify if you are using a custom board or a LAUNCHXL-CC26X2R1 development board? Is this behavior occurring on an unmodified multi_role example?

    Best Regards,

    Jan

  • Currently in LAUNCHXL-CC26X2R1 development board, the scanning function is masked in the multi_role example, there is no scanning function, and the connection is triggered by keys. I modified the process to scan the broadcast device to initiate the connection actively, and the connection process is OK when the pairing is set to disable. However, when setting up a pairing request, disconnection occurs.

    The process is as follows: multi_role_scanInit () -- >multi_role_doDiscoverDevices () implements device filtering by doing GapScan_enable () and then executes the corresponding events via multi_role_scanCB (). Run GapScan_disable () MR_EVT_REPORT in the event - Complete GAPInit_connect MR_EVT_SCAN_DISABLE in the middle of the event to enable active connections.

  • Can you modify the multi_role of SDK5_2_0 to automatically initiate connections after scanning to broadcast for test? I don't understand the function of grouping, do you still need grouping for automatic connections

  • Hi,

    We will focus on the initial question related to pairing.

    Please open separate threads (in English on this forum, or in Mandarin if you use https://e2echina.ti.com/).

    The process is as follows: multi_role_scanInit () -- >multi_role_doDiscoverDevices () implements device filtering by doing GapScan_enable () and then executes the corresponding events via multi_role_scanCB (). Run GapScan_disable () MR_EVT_REPORT in the event - Complete GAPInit_connect

    Ok, so with this process you manage to connect the device. Correct?

    What about the pairing procedure? How do you trigger it and what are the actions taken? 

    Regards,

  • The connection is fine when I do not set it to initiate pairing. The pairing Settings are as follows

    I set it as master and slave, but it is normal for broadcast pairing, and abnormal pairing occurs only when scanning devices.

  • Hi,

    Thank you for the additional information.

    I understand you are setting the CC2642R in multirole mode (central + peripheral modes). The pairing issue only occurs when the CC2642 is used as central and initiate the pairing procedure. Is this understanding correct?

    I have also noticed the device is setup to terminate the connection whenever bonding fails.

    In order to debug further the issue, I would recommend the following:

    - Look at the disconnection reason to confirm it is related to the pairing / bonding procedure

    - Verify which are the events passed by the stack to the CC2642R application. Among other, I expect you are getting GAPBOND_PAIRING_STATE_STARTED, GAPBOND_PAIRING_STATE_COMPLETE, GAPBOND_PAIRING_STATE_ENCRYPTED, GAPBOND_PAIRING_STATE_BOND_SAVED, etc. Try to identify if the status passed with one of these events is different from "SUCCESS"

    Please keep us updated.

  • Closing this thread as I'll be OOO until April 12th

    Please open a new thread if you need additional support.

    Best regards,