CYW43012 BLE connection fails often

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

cross mob
CharlesOram
Level 3
Level 3
First like received Welcome!

Hi,

I am using the CYW43012 (or more specifically the Murata Type 1LV module) with the STM32F412G Discovery board to prototype a product where the CYW43012 operates as a central and connects to a peripheral and I have 2 problems (possibly related) that I am trying to solve.

1. My device scans and when it finds my peripheral it tries to connect by calling wiced_bt_gatt_le_connect(source_address, addr_type, BLE_CONN_MODE_LOW_DUTY, WICED_TRUE).

Even though wiced_bt_gatt_le_connect() returns true, it usually does not connect. It only connects about one time out of 5 and usually it is the first try after a reset or power on.

2. Most of the time, after the connect fails, I then get a BTM_ENABLED_EVT event with an enabled event status of WICED_TIMEOUT (2).

The task stack shows that the btu_task() called btu_hcif_cmd_timeout() to post this event.

Sometimes scanning continues to work after this event, but often it does not.

If anyone has some suggestions on what to try next to fix this, I'd welcome them!

regards,

Charles

0 Likes
15 Replies
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

Hi Charles,

Your function parameters look good. Can you try connecting with iOS device?

FYI- How does background connect work?

0 Likes

Thanks Sheetalj_96 , I don't have an IOS device but will see if I can borrow one.

I have found that if I disable pairing in both the peripheral (a Nordic nRF52832) and the central (the CYW43012) then it seems to work fine and always connects and I do not get the BTM_ENABLED_EVT events.

The main difference in the source code is that when I have disabled pairing I do not call wiced_bt_dev_sec_bond() and wiced_bt_dev_set_encryption() when discovery of the characteristcs is complete. So I suspect that the problem is related to saved state from a previous connection with pairing, since when the problem occurs (i.e it does not connect) it does not even get as far as starting the discovery.

0 Likes

I still haven't got this working, but I just ran a sniffer to see if that helps understand what is happening.

When it works my BLE GATT event callback gets a GATT_CONNECTION_STATUS_EVT and when it works I don't get that event.

When it does not connect the CYW43012 sends a scan request and gets a scan response from the advertising peripheral, but when it does connect successfully I don't see any scan request from the central (i.e. the CYW43012).

I don't know if that is relevant, because if I configure passive scanning it still has the same problems connecting.

Why does it not connect, even though wiced_bt_gatt_le_connect() returns success?

I am also often getting a BTM_ENABLED_EVT with p_event_data->enabled.status == 2 (WICED_TIMEOUT), after the connection fails.

Can someone from Cypress please tell me what this means? What has timed out?

If I can't solve this soon I will have to look for an alternative to the CYW43012. The documentation is just not good enough and I am wasting a lot of time on basic functionality.

0 Likes

The other thing is that the sniffer trace shows that no connect request is being sent.

Can anyone tell me under what circumstances a connect request would not be sent when wiced_bt_gatt_le_connect() returns success?

Thanks.

Charles

0 Likes

I still have not solved this problem.

I have added some code to platform_uart.c so that I can monitor the HCI messages being sent to and received from the CYW43012.

When the BLE connection works the trace looks like this (BTRx: indicates bytes received by the microcontroller from the module and BTTx: indicates bytes sent to the module.):

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,04,d8,88,32,64,17,2a,0d,c9,52,e3,b1,52,b5,25,73,7b,03,a0,25,c0,

{

Advertisement from my peripheral detected, call wiced_bt_ble_scan(BTM_BLE_SCAN_TYPE_NONE, WICED_TRUE, client_scan_result_cback)

  to stop scanning and call wiced_bt_gatt_le_connect(source_address, addr_type, BLE_CONN_MODE_HIGH_DUTY, WICED_TRUE) to connect.

}

BTTx: 01,0c,20,02,00,01,

{

Scan result callback called with p_scan_result == NULL (scan complete)

}

{

BTM_BLE_SCAN_STATE_CHANGED_EVT with ble_scan_state_changed == BTM_BLE_SCAN_TYPE_NONE (scan stopped)

}

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,c1,

BTRx: 04,

BTRx: 0e,04,

BTRx: 01,0c,20,00,

BTTx: 01,0b,20,07,01,60,00,30,00,00,00,

BTRx: 04,

BTRx: 0e,04,

BTRx: 01,0b,20,00,

BTTx: 01,0d,20,19,60,00,30,00,00,01,e6,e8,14,04,ce,ea,00,18,00,28,00,00,00,bc,02,00,00,00,00,

BTRx: 04,

BTRx: 0f,04,

BTRx: 00,01,0d,20,

BTRx: 04,

BTRx: 3e,1f,

BTRx: 0a,00,40,00,00,01,e6,e8,14,04,ce,ea,00,00,00,00,00,00,00,00,00,00,00,00,27,00,00,00,bc,02,00,

BTTx: 01,16,20,02,40,00,

BTRx: 04,

BTRx: 3e,04,

BTRx: 14,40,00,01,

BTRx: 04,

BTRx: 0f,04,

BTRx: 00,01,16,20,

BTRx: 02,

BTRx: 40,20,07,00,

BTRx: 03,00,04,00,02,f7,00,

{

GATT_CONNECTION_STATUS_EVT connection_status.connected == WICED_TRUE

}

BTTx: 02,40,20,1b,00,17,00,04,00,06,01,00,ff,ff,00,28,3c,9d,7a,84,d1,b2,48,24,9f,10,0b,02,16,93,93,16,

BTTx: 02,40,20,07,00,03,00,04,00,03,40,00,

BTRx: 04,

BTRx: 3e,0c,

BTRx: 04,00,40,00,25,41,00,00,00,00,00,00,

BTRx: 02,

BTRx: 40,20,09,00,

BTRx: 05,00,04,00,07,0e,00,ff,ff,

BTTx: 02,40,20,0b,00,07,00,04,00,08,0e,00,ff,ff,03,28,

BTRx: 04,

BTRx: 13,05,

BTRx: 01,40,00,02,00,

BTRx: 04,

BTRx: 3e,0b,

BTRx: 07,40,00,1b,00,48,01,fb,00,48,08,

BTRx: 02,

BTRx: 40,20,1b,00,

BTRx: 2c,00,04,00,09,15,0f,00,02,10,00,3c,9d,7a,84,d1,b2,48,24,9f,10,0b,02,17,93,93,16,

BTRx: 02,

BTRx: 40,10,15,00,

BTRx: 11,00,08,12,00,3c,9d,7a,84,d1,b2,48,24,9f,10,0b,02,18,93,93,16,

BTTx: 02,40,20,0b,00,07,00,04,00,08,12,00,ff,ff,03,28,

BTRx: 04,

BTRx: 13,05,

BTRx: 01,40,00,02,00,

BTRx: 02,

BTRx: 40,20,09,00,

BTRx: 05,00,04,00,01,08,12,00,0a,

BTTx: 02,40,20,07,00,03,00,04,00,0a,10,00,

BTRx: 02,

BTRx: 40,20,29,00,

BTRx: 25,00,04,00,0b,c6,84,6e,8c,5d,32,90,c7,68,cc,00,e4,19,7a,ce,2e,85,d0,40,a1,0a,d4,c7,8d,52,9a,09,af,23,3a,ae,15,a9,01,00,00,

{

GATT_OPERATION_CPLT_EVT operation_complete.op == GATTC_OPTYPE_READ and operation_complete.status == WICED_BT_SUCCESS

finished successfully reading data from my peripheral device

}

BTTx: 02,40,20,08,00,04,00,04,00,12,12,00,00,

BTRx: 04,

BTRx: 13,05,

BTRx: 01,40,00,01,00,

BTRx: 02,

BTRx: 40,20,05,00,

BTRx: 01,00,04,00,13,

{

GATT_OPERATION_CPLT_EVT operation_complete.op == GATTC_OPTYPE_WRITE and operation_complete.status == WICED_BT_SUCCESS

finished successfully writing data to my peripheral device

}

BTTx: 01,06,04,03,40,00,13,

{

BTM_BLE_SCAN_STATE_CHANGED_EVT ble_scan_state_changed == BTM_BLE_SCAN_TYPE_HIGH_DUTY

}

BTRx: 04,

BTRx: 0f,04,

BTRx: 00,01,06,04,

BTTx: 01,0b,20,07,01,60,00,30,00,00,00,

BTRx: 04,

BTRx: 0e,04,

BTRx: 01,0b,20,00,

BTTx: 01,0c,20,02,01,00,

BTRx: 04,

BTRx: 0e,04,

BTRx: 01,0c,20,00,

BTRx: 04,

BTRx: 13,05,

BTRx: 01,40,00,01,00,

BTRx: 04,

BTRx: 05,04,

BTRx: 00,40,00,13,

BTRx: 04,

BTRx: 3e,1a,

BTRx: 02,01,00,01,1d,af,1e,de,9e,5d,0e,02,01,06,0a,ff,4c,00,10,05,01,18,8c,c4,30,9a,

BTRx: 04,

BTRx: 3e,0c,

BTRx: 02,01,04,01,1d,af,1e,de,9e,5d,00,9d,

BTRx: 04,

BTRx: 3e,1a,

BTRx: 02,01,00,01,1d,af,1e,de,9e,5d,0e,02,01,06,0a,ff,4c,00,10,05,01,18,8c,c4,30,9d,

When the BLE connection fails the trace looks like this:

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cf,

{

Advertisement from my peripheral detected, call wiced_bt_ble_scan(BTM_BLE_SCAN_TYPE_NONE, WICED_TRUE, client_scan_result_cback)

  to stop scanning and call wiced_bt_gatt_le_connect(source_address, addr_type, BLE_CONN_MODE_HIGH_DUTY, WICED_TRUE) to connect.

}

BTTx: 01,0c,20,02,00,01,

{

Scan result callback called with p_scan_result == NULL (scan complete)

}

{

BTM_BLE_SCAN_STATE_CHANGED_EVT with ble_scan_state_changed == BTM_BLE_SCAN_TYPE_NONE (scan stopped)

}

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cf,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cb,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cb,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cb,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cb,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cf,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cf,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,ca,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cb,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cb,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cb,

BTRx: 04,

BTRx: 3e,28,

BTRx: 02,01,03,00,f7,50,10,79,bd,54,1c,1b,ff,75,00,42,04,01,80,60,54,bd,79,10,50,f7,56,bd,79,10,50,f6,01,98,00,00,00,00,00,9c,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cf,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cf,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cc,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cb,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,ca,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cb,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,c9,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,ca,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cf,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cf,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,c9,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,ca,

BTRx: 04,

BTRx: 3e,15,

BTRx: 02,01,00,01,26,9e,1f,1b,99,f5,09,02,01,06,05,ff,87,00,0c,d2,b6,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cc,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cc,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,d1,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,d0,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cb,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cb,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cc,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cc,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,d1,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,d0,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cb,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cb,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cc,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cb,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,d0,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,d0,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,c9,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,ca,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,c7,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,c7,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cb,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cc,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cf,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cf,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,c9,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,c8,

BTRx: 04,

BTRx: 3e,15,

BTRx: 02,01,00,01,26,9e,1f,1b,99,f5,09,02,01,06,05,ff,87,00,0c,d2,b7,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cc,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cb,

BTRx: 04,

BTRx: 3e,28,

BTRx: 02,01,03,00,f7,50,10,79,bd,54,1c,1b,ff,75,00,42,04,01,80,60,54,bd,79,10,50,f7,56,bd,79,10,50,f6,01,98,00,00,00,00,00,9d,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,d0,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,d0,

BTRx: 04,

BTRx: 3e,28,

BTRx: 02,01,03,00,f7,50,10,79,bd,54,1c,1b,ff,75,00,42,04,01,80,60,54,bd,79,10,50,f7,56,bd,79,10,50,f6,01,98,00,00,00,00,00,9b,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,d0,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,d0,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,c8,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,c8,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cc,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cc,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,d0,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cf,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,c8,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,c8,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cc,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cc,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,d0,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,d0,

BTRx: 04,

BTRx: 3e,28,

BTRx: 02,01,02,01,aa,5c,3a,1c,68,40,1c,03,03,9f,fe,17,16,9f,fe,02,69,49,4f,6b,70,33,56,54,4f,7a,63,00,00,01,6e,af,f3,7d,a3,9c,

{

My application times out waiting to connect and calls wiced_bt_gatt_cancel_connect()

}

{

BTM_BLE_SCAN_STATE_CHANGED_EVT ble_scan_state_changed == BTM_BLE_SCAN_TYPE_HIGH_DUTY

}

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,cc,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,cc,

several seconds later...

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,c8,

BTRx: 04,

BTRx: 3e,18,

BTRx: 02,01,04,01,e6,e8,14,04,ce,ea,0c,0b,09,41,41,4e,5a,52,20,76,30,2e,30,c7,

{

BTM_ENABLED_EVT enabled.status == WICED_TIMEOUT

}

BTTx: 01,0b,20,07,01,60,00,30,00,00,00,

BTRx: 04,

BTRx: 3e,29,

BTRx: 02,01,00,01,e6,e8,14,04,ce,ea,1d,02,01,06,19,ff,2e,01,01,64,9d,b4,f8,8c,57,0d,0d,41,5b,de,39,67,40,60,9d,c1,f5,a3,31,27,ca,

and several seconds later...

BTTx: 01,0e,20,00,

BTRx: 04,

BTRx: 3e,0c,

BTRx: 02,01,04,01,26,9e,1f,1b,99,f5,00,b0,

BTRx: 04,

BTRx: ff,f4,

BTRx: 1b,03,2c,52,01,00,00,00,8c,00,00,00,00,01,00,c0,00,00,20,00,00,10,05,00,0a,00,00,00,00,00,00,00,09,5a,00,09,31,01,0f,61,00,00,13,00,00,00,01,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,0 {overflows my trace buffer}

BTRx: 04,

BTRx: ff,f4,

BTRx: 1b,03,2c,29,02,0a,00,00,a0,e4,24,00,c0,71,00,00,bf,57,00,00,08,00,00,00,00,00,00,e0,02,00,00,00,00,10,00,00,a2,e6,24,00,02,00,00,00,00,00,36,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,0 {overflows my trace buffer}

{ continue to get lots of the above messages received until it its an assert in platform_uart_receive_bytes()

  wiced_assert( "bad argument", ( driver != NULL ) && ( data_in != NULL ) && ( expected_data_size != NULL ) && ( *expected_data_size != 0 ) );

}

I do not always get the behaviour with the long 04, ff, f4 messages being received when the connection fails.

One thing that seems odd is that in both cases I continue to receive advertisement messages even after I have stopped scanning. Maybe the output to the serial port is slowing things down and those are events queued up in the CYW43012.

It seems to me that there is a bug in the CYW43012 firmware, because my firmware is doing exactly the same thing each time, but often it fails.

Can someone from Cypress please look into this?

regards,

Charles

0 Likes
user_3563711
Level 2
Level 2
First like received First like given

HI all

I have  encounter similar  problem with CHIP CYW43438.CYW43438 operates as a central and connects to a CYW20706A1,once connected it will disconnected quickly ,and the ble connect api is wiced_bt_gatt_le_connect(source_address, addr_type, BLE_CONN_MODE_LOW_DUTY, WICED_TRUE) too.set the BT_CHIP_XTAL_FREQUENCY := 37_4MHz

Is there somebody help us?Many thanks!

0 Likes

@user3563711 Not really a similar problem, since it is a different chip and in your case it connects and disconnects.

In my case it does not connect.

0 Likes
user_3563711
Level 2
Level 2
First like received First like given

add the disconnect reason is 0x16,thanks!@

MichaelF_56broadcomwiced-admin

0 Likes

Hi user_3563711​,

I tested by setting CYW43438 as peripheral and CYW4343W as client. The connection was successful between both devices and disconnection din't occur until I disconnected manually. Please check your code again if you are calling disconnect API somewhere.

Hi ChOr_1920696​,

My sincere apologies for the delay in response!

wiced_bt_gatt_le_connect() returns Success when the API executes properly; it does not return the connection status.

Seeing your previous responses- Do you want client (CYW43012) to continue scanning even if it has connected to peripheral?

Can you please check if you are specifying correct BD address of the peripheral in gatt_le_connect API? Also, try setting the connection mode to BLE_CONN_MODE_HIGH_DUTY.

Hi all

test in CYW43438a1 it can connect to cyw20736 and my mobile phone(Android OS),and keep connected until I disconnected manually.only CYW20706A1 occur DISCONNECTED rapidly ,is there some connection parameters need to be changed,currently CYW20706a1 connection parameters is  6,20,0,700,and i try to changed them ,it not work  well as before,thanks!

0 Likes

Hi Sheetal,

Once I have found the peripheral to connect to I want to stop scanning.

I will then start scanning again after connecting to the peripheral, reading some characteristics and disconnecting.

>Can you please check if you are specifying correct BD address of the peripheral in gatt_le_connect API? Also, try setting the connection mode to BLE_CONN_MODE_HIGH_DUTY.

Thanks for the suggestion, I have checked and the BD address is correct and I am using BLE_CONN_MODE_HIGH_DUTY.

The other thing that I have noticed is that after stopping scanning and getting the callback to say scanning has stopped the traces above (both for when it works and when it doesn't) who quite a few advertisements being received after scanning has supposedly stopped. Maybe that's just advertisements queued up in the module.

regards,

Charles

0 Likes
SheetalJ
Moderator
Moderator
Moderator
First comment on KBA 750 replies posted 500 likes received

user_3563711​ Please create a new thread for your issue as these are not similar problems & it will be easy to keep the track of the issues seperately.

Hi Charles,

Does this problem still exist after keeping the setting as mentioned in CYW43012 BLE passkey with LE security ?

Also, ya the advertisement packets you are observing might be queued up before.

I will try my best to find the root cause & provide some solution to this problem soon.

Sheetal

0 Likes

Hi Sheetal,

Yes, this problem happens regardless of the pairing or security settings, so it is not clear whether the issue mentioned in my other thread CYW43012 BLE passkey with LE security is at all related. It is only because it sometimes connects that I was able to progress and try to get the passkey pairing working.

(Note: For some reason my other issue is locked and I cannot add any more comments to it, but the issue is not solved).

regards,

Charles

0 Likes

ChOr_1920696​, SheetalJ_96​,

Hi Charles,
Please, did you find a solution to your issue with the BTM_ENABLED_EVT event with an enabled event status of WICED_TIMEOUT (2)?
I too am experiencing a similar issue on a 4343W device. Just wondering if the found the cause of your issue and were able to share it?

Regards,
R

0 Likes

Hi R,

No I did not manage to solve the issue and concluded that the version of firmware from Cypress had bugs (see the reply to my other issue CYW43012 BLE passkey with LE security ).

I ended up re-designing the application so that it did not need to connect to the peripheral and all data was exchanged in the advertising messages.

This was quite a few months ago and there may be different versions available by now (I haven't been working on this project again, so I have not kept up with the Wiced versions).

regards,

Charles