CYBT 343026 with A2DP and BLE (contd.)

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

cross mob
Anonymous
Not applicable

If I'm not streaming, I'm able to discover services and characteristics and write and read these.

With connection interval to 200ms and the supervision timeout to 2000ms I can streming and dicovering services and characteristics, thank you!

Now I have other problems:

  1. every time I reset device the mac address is different. If I remember correctly this is a special function but I'm not able to find and disable it.
  2. the PUART RX pin has an offset about 1,2 V (all SW5 is off). What could be the problem? I tried also to set GPIO and PULL-UP but nothing change.
  3. when I disconnect the module from my device, it's impossible to reconnect again. I solved this only when I connect and disconnect module for discovering services and characteristics (calling wiced_bt_start_advertisements function in hci_control_le_conn_status_callback when module is disconnects) but not when I connect and disconnect module for streaming. Is it a know issue?
1 Solution
Anonymous
Not applicable

1) There is an issue with setting it to WICED_FALSE. So don't use that. Either use the API with WICED_TRUE or comment it out.

Are you able to discover the device on another phone? Also can you post the advertisement data you are configuring.

3) Yes, adding those lines should be fine.

View solution in original post

0 Likes
8 Replies
Anonymous
Not applicable

1. Check if you are using wiced_bt_ble_enable_privacy(). This generates a RPA and so the address might be different every time you reset. Also make sure you don't have a BT_DEVICE_ADDRESS=random in the make target.

2. This is odd. Make sure that you are not using/configuring any other pin on the same pad as PUART RX pin.

3. A2DP is a BR/EDR profile which means you have to perform inquiry scan and paging scan to allow the other device to connect to you.

Make sure these APIs are used to turn on inquiry and paging scan and that they are not turned off:

            wiced_bt_dev_set_discoverability();

            wiced_bt_dev_set_connectability();

1) Yes wiced_bt_ble_enable_privacy (WICED_TRUE) function is used but if I comment the wiced_bt_ble_enable_privacy (WICED_TRUE) I can't anymore connect BLE and audio streaming in the same time (problem solved with this answer https://community.cypress.com/message/156627#156627) and, if I set wiced_bt_ble_enable_privacy (WICED_FALSE), I can't see the device in the discoverable devices. Could be a framework issue?

2) yes it's strange. I have already verified but for me all seems ok. However I wonder, it's possible configure two peripherals in the same pin and obtain this behaviour? There aren't a specific mechanisms inside micrcontroller to avoid this one? Usually in microcntrollers this peripherals conflicts do not occours.

3) Thanks! I have insert the calls wiced_bt_dev_set_discoverability(); and  wiced_bt_dev_set_connectability(); in the event WICED_BT_A2DP_SINK_DISCONNECT_EVT inside a2dp_sink_control_cback function in hci_contro_audio.c file and now seems works fine.

0 Likes
Anonymous
Not applicable

1) There is an issue with setting it to WICED_FALSE. So don't use that. Either use the API with WICED_TRUE or comment it out.

Are you able to discover the device on another phone? Also can you post the advertisement data you are configuring.

3) Yes, adding those lines should be fine.

0 Likes

1) It's my mistake: if I comment out wiced_bt_ble_enable_privacy (WICED_TRUE) with Samsung A5 phone the application works fine for audio streaming and for BLE; if I try with Samsung Galaxy TAB 3, I'm able to connect for audio streaming and BLE but the scanning of services stop and no services and characteristics are visible.

3) Ok sorry, in the previous comment I have asked you again answer about point 3 but the problem had already been solved.

0 Likes

I have another problem with A2DP and PUART and I have thinked to create another discussion:CYBT 343026 with A2DP and PUART

0 Likes

A note about point 2: I tried also to change pin for PUART RX but I have the same behaviour and, if I disconnect the wire the signal has no offset (the RX pin is connected with UART TX pin of another microcontroller).

0 Likes

Hi Luca

For point 2, if you are use the P04 as PUART RX, please refer to this link:Could I config WICED_P04 as GPIO with CYW20706?

Regards

Jenson

Thank you very much, now PUART RX works fine!

I suspected the problem could be BT_CLK_REQ. I did not find much information about this but this function what would it be?

Awaiting for answers about points 1 and 3.

0 Likes