CYW20719 connecting BTSpy clears advertising data

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

cross mob
JeHu_3414236
Level 5
Level 5
10 likes received First like received

I am using CYW20719 and I am setting advertising data with wiced_bt_ble_set_raw_advertisement_data() on power up.  I can restart advertisement after timeout without problems.  If I connect BTSpy to print the WICED_BT_TRACE() logs, it will erase the advertisement data I set and advertise with empty data.  Does anyone know why this happens?

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.

I use the same low_power_sensor demo config and made 2 changes:

1. set advertising timeout to 30s for all modes

2. restart advertising when I press the button

I attached the BTSpy log.  After 30s advertising timeout I see this:

13:21:28.274 SENT [2] Command to HCI.  Name: HCI_LE_Write_Advertising_Enable  (Hex Code: 0x200a  Param Len: 1)

13:21:28.274                      Advertising Enable : Disabled (00)

13:21:28.275 2 hello_sensor_management_cback: 17

13:21:28.276 2 Advertisement State Change: 4

13:21:31.276 RCVD [2] Event from HCI.  Name: HCI_Hardware_Error  (Hex Code: 0x10  Param Len: 1)

13:21:31.276                      Hardware Error Code : 3 (0x03)

13:21:31.276 SENT [2] Command to HCI.  Name: HCI_Reset  (Hex Code: 0x0c03  Param Len: 0)

Now I press button to start advertising and all the advertisement data is cleared, probably because of the HCI_Reset.

View solution in original post

0 Likes
4 Replies
lock attach
Attachments are accessible only for community members.
Owen_Zhang123
Moderator
Moderator
Moderator
5 questions asked 500 solutions authored 250 sign-ins

I tested with the hello_sensor demo on the CYW20719Q40EVB-01 and scan the device with the CYSmart. But I can't reappear the problem. Following is the advertisement packet scanned by the CYSmart. Attachment is my project.

pastedImage_0.png

I see this problem in the hello_sensor demo if I configure sleep mode using

these settings and return WICED_SLEEP_ALLOWED_WITHOUT_SHUTDOWN in the sleep

handler:

sleep_config.sleep_mode = WICED_SLEEP_MODE_TRANSPORT;

sleep_config.device_wake_gpio_num = WICED_P17;

sleep_config.device_wake_mode = WICED_SLEEP_WAKE_ACTIVE_HIGH;

sleep_config.device_wake_source = WICED_SLEEP_WAKE_SOURCE_GPIO;

sleep_config.host_wake_mode = WICED_SLEEP_WAKE_ACTIVE_HIGH;

sleep_config.sleep_permit_handler = sleep_handler;

wiced_sleep_configure(&sleep_config);

Am I not allowed to sleep when using BTSpy to print traces?

0 Likes

I just tried with the low_power_sensor demo. The make target is "demo.low_power_sensor-CYW920719Q40EVB_01 SLEEP_MODE=SLEEP_MODE_TRANSPORT SLEEP_TYPE=SLEEP_TYPE_PDS download" which has the same configuration with you. I can see the advertising data successfully with CYSmart. Could you try it?

lock attach
Attachments are accessible only for community members.

I use the same low_power_sensor demo config and made 2 changes:

1. set advertising timeout to 30s for all modes

2. restart advertising when I press the button

I attached the BTSpy log.  After 30s advertising timeout I see this:

13:21:28.274 SENT [2] Command to HCI.  Name: HCI_LE_Write_Advertising_Enable  (Hex Code: 0x200a  Param Len: 1)

13:21:28.274                      Advertising Enable : Disabled (00)

13:21:28.275 2 hello_sensor_management_cback: 17

13:21:28.276 2 Advertisement State Change: 4

13:21:31.276 RCVD [2] Event from HCI.  Name: HCI_Hardware_Error  (Hex Code: 0x10  Param Len: 1)

13:21:31.276                      Hardware Error Code : 3 (0x03)

13:21:31.276 SENT [2] Command to HCI.  Name: HCI_Reset  (Hex Code: 0x0c03  Param Len: 0)

Now I press button to start advertising and all the advertisement data is cleared, probably because of the HCI_Reset.

0 Likes