WICED CYW20719-B1: BR/EDR Connection failed to setup after BLE connection established already

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

cross mob
LixinD_46
Employee
Employee
10 replies posted 5 replies posted 10 questions asked

Hi Team,

For the CYW20719-B1 dual mode device, does anyone can help fix the BR/EDR connection failed issue? when BLE connection was established firslty, then trying to establishing a BR/EDR connection.

Detail information of this issue is described below:

Environments:

HW Master: Android Phone (Both Android 7.0 and Android 8.0 have same issue)

HW Slave: CYW20719-B1 chip based module (CYBT-423028-02)

FW: CYW20719-B1 based firmware support GATT server functions and also support BR/EDR Audio Sink function.

       So in the Android Phone, two devices: a LE and an Audio type devices can be discovered and seen.

Steps to reproduce the issue:

1) Use the Android Phone to discover the LE device and Audio icon device supported by the CYW20719-B1 device.

2) Click the LE device to establish the BLE connection firstly.

3) Then, click the Audio icon device to establish the audio BR/EDR connection.

4) After step3), the Android Phone device always failed to established the BR/EDR connection.

    The Android Phone would fail until waiting 30s timeout or directly shown mismatched PIN code.

Note,

1) if use the same Android Phone to establish the BR/EDR connection firstly, then established the BLE connection, there was no problem. Both connected successfully.

2) When Android Phone failed to establish the BR/EDR connection after connected BLE firstly, then, even after disconnect the BLE connection, the Android Phone still cannot connect to the CYW20791-B1 device until the CYW20719-B1 device was reset.

3) After capturing the BR/EDR data through Ellisys, we found that the LMP encapsulated P-256 Public Key is empty.

    It would be an possible problem, see following screenshot for detail information.

fail_to_establish_bredr_connection.PNG

Thanks,

Dudley

0 Likes
1 Solution

Hi Dudley

We can just combine the BT's code like SPP or A2DP and Hello_sensor to verify. 

Per cypress's BT experts' experience:

don’t create both LE and BR/EDR connection with one Android phone, there is many IOP issue if phone think LE and BR/EDR connection are from the one device.

If must to do it, please try to set LE address to the static address(random address) with wiced_bt_set_local_bdaddr(xxx, BLE_ADDR_RANDOM), phone should think the LE address and BR/EDR address aren’t from one device.

BTW, no problem with iOS phone.

And I had checked the SumsungC9 Pro connect BT and BLE(set random address) works successfully.

Also use one phone connect to BT, and other phone connect to BLE works well also.

Regards

Jenson

View solution in original post

0 Likes
6 Replies
ShengY_96
Employee
Employee
10 sign-ins 5 sign-ins Welcome!

If I use one phone to connect both BLE and BT(Like A2DP), BT failed to set up after BLE connection established already.

But if I use the Dongle to connect the BLE and use the phone connect to BT, both link works well.   Use two phone: one connect to BLE and the other connect to A2DP, both link works well.

So I suspect the reason is: BT and BLE both use the same MAC address, and the phone missed it up for both BLE/BT connection.  Looks like the issue exists on phone side.

Regards

Jenson

Anonymous
Not applicable

You are right. If you are using the same BT address for advertisement and for inquiry scan, the phone might not behave correctly when you try to establish and LE connection. I have observed that even if you try to establish an LE connection, the phone (stack) tries to connect over BR/EDR.

As a workaround, I used random address for BLE and public address for BR/EDR. This seemed to work for me.

0 Likes

Hi YANS and YSSU,

Thanks for the verification and response.

Based on your information, I did following testing, and the result in my side was still same failed when pairing through BR/EDR connection after BLE connected.

Steps to reproduce:

1) Update firmware, set public address A before calling wiced_bt_dev_set_discoverability() and wiced_bt_dev_set_connectability() to start BR/EDR inquiry scan.

2) Update firmware, set static private address B (different from A) before calling wiced_bt_start_advertisements() for BLE advertising;

3) Build and download the firmware to CYW20719-B1 module device and reboot it.

4) Using CySmart on PC to connect to the module device through BLE connection. Done success.

5) Using Android Phone device default Bluetooth function (in Setting->Bluetooth) to discover the BT module device (with Audio Icon).

6) Click the Audio icon to try to connect to the module device through BT connection, it still failed as I described before.

    Note, at this time, there was no BLE and BT connection established before the connecting operation on my Android Phone.

So, based on my test result, this issue should not be caused by the confusion of BLE and BR/EDR BD_ADDR in Android Phone side.

Thanks,

Dudley

0 Likes
Anonymous
Not applicable

Can you try this with the watch example or the headset app, both of which have LE and BR/EDR functionalities.

For some reason, I am not able to reproduce the issue.

0 Likes

Hi YSSU,

I failed to do a quick test with the watch sample app. And since limited of time, I didn't debug in.

The issue is that, the watch sample app can be booted up, but the BLE and BT device cannot be discovered at all. So the test cannot be implemented.

Note, to build the watch app, the "C_FLAGS += -DCATEGORY_2_PASSTROUGH" must be disabled, otherwise the build will fail by default setting.
Following is the booting up log of the watch app:

APP START

hci_control_management_callback 0x15

hci_control_management_callback 0x00

hci_control_write_eir 269b70

EIR :09 57 61 74 63 68 09 03 0a 11 0c 11 0e 11 0b 11 00 bd

hci_control_le_enable

wiced_bt_gatt_register status 0

wiced_bt_gatt_db_init 0

[avdt_init]

[hci_control_rc_target_init]:

[av_app_start] Application start

[av_app_init] exit

[hci_control_rc_target_init]:

[hci_control_sleep_configure]

hci_control_management_callback 0x14

hci_control_management_callback 0x14

Hi Dudley

We can just combine the BT's code like SPP or A2DP and Hello_sensor to verify. 

Per cypress's BT experts' experience:

don’t create both LE and BR/EDR connection with one Android phone, there is many IOP issue if phone think LE and BR/EDR connection are from the one device.

If must to do it, please try to set LE address to the static address(random address) with wiced_bt_set_local_bdaddr(xxx, BLE_ADDR_RANDOM), phone should think the LE address and BR/EDR address aren’t from one device.

BTW, no problem with iOS phone.

And I had checked the SumsungC9 Pro connect BT and BLE(set random address) works successfully.

Also use one phone connect to BT, and other phone connect to BLE works well also.

Regards

Jenson

0 Likes