4 Replies Latest reply on Nov 9, 2018 1:29 PM by JeHu_3414236

    CYW20719 connecting BTSpy clears advertising data

    JeHu_3414236

      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?

        • 1. Re: CYW20719 connecting BTSpy clears advertising data
          XinghaoZ_26

          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.

          1 of 1 people found this helpful
          • 2. Re: CYW20719 connecting BTSpy clears advertising data
            JeHu_3414236

            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?

            • 3. Re: CYW20719 connecting BTSpy clears advertising data
              XinghaoZ_26

              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?

              1 of 1 people found this helpful
              • 4. Re: CYW20719 connecting BTSpy clears advertising data
                JeHu_3414236

                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.