In HCI Mode, CYW20706 does not LE Connect

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JaPr_3925141
Level 1
Level 1

Hi,

We were using BlueZ to try to connect to LE Device but we kept getting the error "Connection Failed to be Established"

We have attached the logs to review. Is there any sequence that has to occur to be able to connect to a LE Device in HCI Mode?

2019-03-28 22:18:45.371616 < 01 0D 20 19 04 00 04 00 00 00 63 65 AE 29 6A BC 00 0F 00 0F

  00 00 00 80 0C 01 00 01 00

2019-03-28 22:18:45.376299 > 04 0F 04 00 01 0D 20

2019-03-28 22:18:45.810715 > 04 3E 13 01 00 40 00 00 00 63 65 AE 29 6A BC 0F 00 00 00 80

  0C 00

2019-03-28 22:18:45.814669 < 02 40 00 07 00 03 00 04 00 02 05 02

2019-03-28 22:18:45.934895 > 04 13 05 01 40 00 01 00

2019-03-28 22:18:45.935244 > 04 05 04 00 40 00 3E

2019-03-28 22:19:31.000127 < HCI Command: LE Create Connection (0x08|0x000d) plen 25

    bdaddr BC:6A:29:AE:65:63 type 0

    interval 4 window 4 initiator_filter 0

    own_bdaddr_type 0 min_interval 15 max_interval 15

    latency 0 supervision_to 3200 min_ce 1 max_ce 1

2019-03-28 22:19:31.005148 > HCI Event: Command Status (0x0f) plen 4

    LE Create Connection (0x08|0x000d) status 0x00 ncmd 1

2019-03-28 22:19:32.623672 > HCI Event: LE Meta Event (0x3e) plen 19

    LE Connection Complete

      status 0x00 handle 64, role master

      bdaddr BC:6A:29:AE:65:63 (Public)

2019-03-28 22:19:32.628316 < ACL data: handle 64 flags 0x00 dlen 7

    ATT: MTU req (0x02)

      client rx mtu 517

2019-03-28 22:19:32.747783 > HCI Event: Number of Completed Packets (0x13) plen 5

    handle 64 packets 1

2019-03-28 22:19:32.748138 > HCI Event: Disconn Complete (0x05) plen 4

    status 0x00 handle 64 reason 0x3e

    Reason: Connection Failed to be Established

Regards,

Jay

0 Likes
9 Replies
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

Which application do you download to the device?

0 Likes

We are using cybluetool and BlueZ to test. In both cases we get the same result a "Connection Failed to be Established". We are not downloading any application simply using HCI Mode that should be supported per Bluetooth spec.

Please see HCI LE Connect Command:

01 0D 20 19 04 00 04 00 00 00 63 65 AE 29 6A BC 00 0F 00 0F 00 00 00 80 0C 01 00 01 00

Regards,

Jay Prendes

0 Likes

The configure parameter in the ROM code has some problem. Please download an application code such as hello_sensor with HCI Baudrate 115200 and trace off to the RAM to initiate it. Then you can use the HCI command to connect successfully.

Please refer to doc/WICED-HCI-Control-Protocol.pdf in the SDK about how to download code to RAM.

I unlocked this thread as the FAE GrCa_1363456 supporting the account has addition feedback.

Specifically, the customer in this instance would like to install a functional version of the factory installed program onto a CYW20706.

As OwenZ_26 points out, there’s an error in the program that was installed by the factory:

The configure parameter in the ROM code has some problem.

There may be a project in WICED that is the factory default with the configure parameter fixed. If so, which one?

0 Likes

OwenZ_26

Can Cypress tell which project would allow standard HCI access to the chipset and fix the LE Connect issue?

0 Likes

There is a demo code in the attachment of this blog: Run CYW20706 in HCI Mode

0 Likes

Hi Jay,

You can try the method mentioned by Owen Zhang.

However you may try the below steps as well. I tested at my side and its working.

1. Download the CYW20706 with empty application as only the below code in main.c to enable 20706 to work on HCI commands

2. I tested with CyBluetool. Connect HCI UART to CyBluetool (  settings as mentioned in CyBluetool user guide)

3. First send Reset command and see if the response is success

4. Try some other command like 'Read_BD_ADDR' to check if HCI commands are working

5. Now send LE_create_connection command. Make sure your peer device is advertising. Only then, your 20706 will be able to establish a connection.

I tested with peer device CYW20719 running hello_sensor application and was able to complete  connection.

see the below logs in CyBluetool

Le_create_connection.PNG

logs.PNG

Hi AnjanaM_61,

You mention an empty main.c file. Can you point the location or example snippet. I assume the downloader still has to put in new firmware to the chipset, correct?

Regards,
jay

0 Likes

Hi Jay,

Create a new project in WICED with just one file which is empty:

#include "sparcommon.h"

APPLICATION_START() {}

Thanks,
Anjana