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.

LAUNCHXL-CC2640R2: NRF Connect Desktop cannot Connect to LaunchXL

Part Number: LAUNCHXL-CC2640R2
Other Parts Discussed in Thread: CC2640R2L

Hello,

I have a launchxl-CC2640R2 board with SimpleLink CC2640R2 SDK 4.40.00.10 and the project zero example.
To test the device I want to use nordic development board PCA10028 as a central device to connect to the launchxl.
I try to connect with nrf connect for desktop but it fails. (see nrf connect logs of failed connection) The error is BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED.
I also attached the logs from launchxl (ti.log).
Interestingly the PCA10028 can connect to any other device that I have.
And my Phone can also connect to Launchxl.
It is a compatibility issue between Launchxl and PCA10028.
And it seems like the launchxl does not respond to connection setup package. But I am not sure, where the package got dropped.
Unfortunately I do not have a Bluetooth sniffer at hand so the log output of both devices is the only debug information I have.

How can I get the launchxl to work with PCA10028 and where should I continue searching for the solution.

regards
Alex

ti.log
#000028 [ 117.669 ] INFO: (project_zero.c:1252) Adv Set 0 Disabled
#000029 [ 117.669 ] INFO: (project_zero.c:1272) Adv Set 0 disabled after conn 0
#000030 [ 117.669 ] INFO: (project_zero.c:1081) Link establish event, status 0x00. Num Conns: 1
#000031 [ 117.669 ] INFO: (project_zero.c:1094) Connected. Peer address: FB:8F:C5:DE:85:14
#000032 [ 117.670 ] INFO: (project_zero.c:1105) Max Number of Connection reach: 1, Adv. will not be enable again
#000033 [ 118.676 ] INFO: (project_zero.c:1115) Device Disconnected!
#000034 [ 118.676 ] INFO: (project_zero.c:1116) Num Conns: 0
#000035 [ 118.677 ] INFO: (project_zero.c:1129) Restart Advertising, 1 possible connection remain
#000036 [ 118.678 ] INFO: (project_zero.c:1247) Adv Set 0 Enabled
nrf_connect.log
2021-04-09T13:04:46.996Z INFO Connecting to device
2021-04-09T13:04:47.012Z DEBUG       46 ->  [00 8c 01 00 6c 0a 9f 0e 6c 54 01 01 00 a0 00 50 00 14 00 01 a0 00 a0 00 00 00 f4 01 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:7 payload_length:1c data_integrity:1 header_checksum:32 err_code:0x0
2021-04-09T13:04:47.036Z DEBUG    44/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
2021-04-09T13:04:47.036Z DEBUG    45/ 0 <-  [01 8c 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:7 ack#:0 payload_length:6 data_integrity:1 header_checksum:cb err_code:0x0
2021-04-09T13:04:47.036Z DEBUG       47 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:0 payload_length:0 data_integrity:0 err_code:0x0
2021-04-09T13:04:47.445Z DEBUG    46/ 0 <-  [02 10 00 00 00 00 6c 0a 9f 0e 6c 54 01 14 85 de c5 8f fb 02 00 a0 00 a0 00 00 00 f4 01 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:0 payload_length:1d data_integrity:1 header_checksum:61 err_code:0x0
2021-04-09T13:04:47.446Z DEBUG       48 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
2021-04-09T13:04:47.452Z DEBUG GAP_EVT_CONNECTED time:2021-04-09T13:04:47.445Z connHandle:0 peerAddr:[address:54:6C:0E:9F:0A:6C type:public] role:central connParams:[minConnInterval:200 maxConnInterval:200 slaveLatency:0 connSupTimeout:5000] ownAddr:[address:FB:8F:C5:DE:85:14 type:randomStatic] irkMatch:false
2021-04-09T13:04:47.473Z INFO Connected to device 54:6C:0E:9F:0A:6C: interval: 200ms, timeout: 5000ms, latency: 0
2021-04-09T13:04:47.488Z DEBUG       49 ->  [00 90 00 00 01 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:0 ack#:1 payload_length:7 data_integrity:1 header_checksum:ba err_code:0x0
2021-04-09T13:04:47.518Z DEBUG    47/ 0 <-  [N/A] type:                 ACK reliable: no seq#:0 ack#:1 payload_length:0 data_integrity:0 err_code:0x0
2021-04-09T13:04:47.518Z DEBUG    48/ 0 <-  [01 90 00 00 00 00 ] type:     VENDOR_SPECIFIC reliable:yes seq#:1 ack#:1 payload_length:6 data_integrity:1 header_checksum:c9 err_code:0x0
2021-04-09T13:04:47.518Z DEBUG       50 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:2 payload_length:0 data_integrity:0 err_code:0x0
2021-04-09T13:04:48.444Z DEBUG    49/ 0 <-  [02 11 00 00 00 3e ] type:     VENDOR_SPECIFIC reliable:yes seq#:2 ack#:1 payload_length:6 data_integrity:1 header_checksum:c8 err_code:0x0
2021-04-09T13:04:48.445Z DEBUG       51 ->  [N/A] type:                 ACK reliable: no seq#:0 ack#:3 payload_length:0 data_integrity:0 err_code:0x0
2021-04-09T13:04:48.445Z DEBUG GAP_EVT_DISCONNECTED time:2021-04-09T13:04:48.444Z connHandle:0 reason:62 reasonName:connFailedToBeEstablished
2021-04-09T13:04:48.447Z INFO Disconnected from device 54:6C:0E:9F:0A:6C, reason: BLE_HCI_CONN_FAILED_TO_BE_ESTABLISHED

  • Hey Alex,

    Are you using a BLE5 stack project or a BLE stack project zero? (Based of the log prints, I think you are using a BLE5 stack project and just want to make sure).

    With an interoperability issue like this, it's crucial we take a look at the behavior of the devices over the air with the help of the sniffer. Without this, it may be difficult to narrow this issue down.

    The logs provided don't really provide any clue as to why the disconnect occurred, just that it did. The error code returned by NRF is 0x3E. This error code is summarized in the spec and also here in this related e2e post: https://e2e.ti.com/support/wireless-connectivity/bluetooth/f/bluetooth-forum/347330/simpleblecentral-disconnected-reason-62 

    On the project zero side, can you check the reason that was returned inside case GAP_LINK_TERMINATED_EVENT? Take the pPkt variable returned from the stack and check the reason parameter. This will serve as a simple sanity check and provide us with what project_zero thinks is the disconnect reason. If there is any mismatch this can be a clue.

    Have you tried moving the peripheral closer to the PCA10028 to see if you are able to connect? Some user's reported this as their solution so I want to rule this out as well.

  • Hi Ammar,

    thank you for your response. I will try to answer all your questions:

    1. I can confirm that we use BLE5 Stack and not the ble_stack project zero

    2. We will receive a ellisys bluetooth sniffer soon. But until then I need to work on a solution for this issue.

    3. the pPkt->reason parameter has the value 0x3e=LL_STATUS_ERROR_CONN_FAILED_TO_BE_ESTABLISHED. You can see this in the ti2.log. Unfortunately it is the same as on PCA10028.

    4. Both development boards are directly next to each other. I also tried different orientations with the same result.

    I also found out that I can establish a connection from PCA10028 to LAUNCHXL, when previously connecting the PCA10028 to another device. But this does not help me anything, but make the problem more confusing.

    ti2.log
    #000001 [ 0.014 ] INFO: (led_service.c:221) Registered service, 5 attributes, status 0x00
    #000002 [ 0.015 ] INFO: (button_service.c:260) Registered service, 7 attributes
    #000003 [ 0.015 ] INFO: (data_service.c:239) Registered service, 6 attributes
    #000004 [ 0.015 ] INFO: (led_service.c:237) Registered callbacks to application. Struct @20000e04
    #000005 [ 0.015 ] INFO: (button_service.c:278) Registered callbacks to application. Struct @20000df4
    #000006 [ 0.015 ] INFO: (data_service.c:257) Registered callbacks to application. Struct @20000dfc
    #000007 [ 0.015 ] INFO: (led_service.c:272) SetParameter : LED0 len: 1
    #000008 [ 0.015 ] INFO: (led_service.c:280) SetParameter : LED1 len: 1
    #000009 [ 0.015 ] INFO: (button_service.c:319) SetParameter : BUTTON0 len: 1
    #000010 [ 0.015 ] INFO: (button_service.c:352) Trying to send noti/ind: connHandle ffff, Noti/ind disabled
    #000011 [ 0.015 ] INFO: (button_service.c:330) SetParameter : BUTTON1 len: 1
    #000012 [ 0.015 ] INFO: (button_service.c:352) Trying to send noti/ind: connHandle ffff, Noti/ind disabled
    #000013 [ 0.015 ] INFO: (data_service.c:295) SetParameter : String len: 40
    #000014 [ 0.015 ] INFO: (data_service.c:306) SetParameter : Stream len: 20
    #000015 [ 0.015 ] INFO: (data_service.c:328) Trying to send noti/ind: connHandle ffff, Noti/ind disabled
    #000016 [ 0.019 ] INFO: (project_zero.c:1026) GAP is started. Our address: 54:6C:0E:9F:0A:6C
    #000017 [ 0.020 ] INFO: (project_zero.c:1044) Name in advertData array: ProjectZero
    #000018 [ 0.026 ] INFO: (project_zero.c:1252) Adv Set 0 Enabled
    #000019 [ 7.638 ] INFO: (project_zero.c:1257) Adv Set 0 Disabled
    #000020 [ 7.638 ] INFO: (project_zero.c:1277) Adv Set 0 disabled after conn 0
    #000021 [ 7.639 ] INFO: (project_zero.c:1081) Link establish event, status 0x00. Num Conns: 1
    #000022 [ 7.639 ] INFO: (project_zero.c:1094) Connected. Peer address: FB:8F:C5:DE:85:14
    #000023 [ 7.639 ] INFO: (project_zero.c:1105) Max Number of Connection reach: 1, Adv. will not be enable again
    #000024 [ 8.645 ] INFO: (project_zero.c:1115) Device Disconnected!
    #000025 [ 8.646 ] INFO: (project_zero.c:1116) Num Conns: 0x0
    #000026 [ 8.646 ] INFO: (project_zero.c:1117) pPkt->reason: 0x3e
    #000027 [ 8.646 ] INFO: (project_zero.c:1118) pPkt->opcode: 0x6
    #000028 [ 8.646 ] INFO: (project_zero.c:1119) pPkt->connectionHandle: 0x0
    #000029 [ 8.646 ] INFO: (project_zero.c:1120) pPkt->hdr.event: 0xd0
    #000030 [ 8.646 ] INFO: (project_zero.c:1121) pPkt->hdr.status: 0x0
    #000031 [ 8.647 ] INFO: (project_zero.c:1134) Restart Advertising, 1 possible connection remain
    #000032 [ 8.655 ] INFO: (project_zero.c:1252) Adv Set 0 Enabled
    

  • Hey Alex,

    I also found out that I can establish a connection from PCA10028 to LAUNCHXL, when previously connecting the PCA10028 to another device. But this does not help me anything, but make the problem more confusing.

    Can you clarify this statement?

  • Hi Ammar,

    yes sure. I follow these steps to reproduce the "Scenario without Error":

    1. configure my phone as bluetooth peripheral with nrf connect android app and put it into advertising mode

    2. start LAUNCHXL with project zero in debug mode

    3. connect PC nrf connect desktop over usb to PCA10028

    4. connect PCA10028 to my phone by using nrf connect desktop (1. BLE Connection)

    5. when the connection is established I connect PCA10028 to LAUNCHXL (2. BLE Connection)

    <- at this point I have the PCA10028 development board connected to LAUNCHXL and my Phone without the error. I can even disconnect my Phone without affecting LAUNCHXL connection

    I made a quick connection diagram to make it more clear.

    Maybe It is possible to log the raw packages to find out the difference between both scenarios?

    regards

    Alex

  • Hi Ammar,

    good news, our bluetooth tracker is finally here. I recorded the data transfer of both scenarios. Unfortunately I do not know, how to attach the capture files to this post. So I only can present you the screenshots of the captures.

    It seems like LAUNCHXL does not respond after Connection Indication Packet. After some time it starts advertising again.

    Do you know what could cause such behavior?

    As I have not done any debugging on the link layer before, can you give me some tips or resources on what to look for?

    regards

    Alex

  • Hey Alex,

    It's quite difficult to do lower-level debugging, particularly when you get into the stack APIs as this is provided as a library.

    You can try to attach the logs by hitting the Insert button below and selecting File.

    I would like to take a look at the logs to see what's going on.

  • Thank you for the Info. I added the logs as csv export and as btt capture files from ellisys bluetooth analyzer (see zip). The error files are recordings of the failed connection. The noerror files are recorded while following the above described scenario with my phone.

    Please let me know, if I can provide any further information for solving this issue.

    regards

    Alex

    noerror.csv

    error.csvbtt_logs.zip

  • Hey Alex,

    Thanks for providing these logs. It's quite strange that there is no traffic except for empty PDU's and that there isn't a feature exchange sent. Let me ping the team internally about this behavior and I will follow up soon.

  • Alex, Just wanted to confirm with you once more. The hardware you are using is a CC2640R2L Launchpad, correct?

  • Hey Alex,

    One thing I noticed is that the SCA (clock Accuracy) is about 20 ppm on the central, which is high. Have you configured this on the central side? I know for TI devices, if you are using a different crystal then you must set the accuracy accordingly.

    I am not familiar with this product and unfortunately cannot reproduce this issue on my end because I don't have access to this part. Can you verify that the "Scenario with Error" is a valid configuration/use case of the PCA10028? I find it strange that one configuration works well, including your phone too. If your laptop has Bluetooth capabilities, perhaps try to connect with the CC2640R2 Launchpad directly from the laptop. Is that successful?

  • Hi Ammar,

    thank you for your help. I solved the problem by changing the nordic development board from PCA10028 to PCA10040.

    It was probably an issue with the PCA10028.

    regards

    Alex