10 Replies Latest reply on Oct 22, 2019 10:53 AM by agmi_3321141

    status of ble_observe

    agmi_3321141

      Hi  - How to check if ble_observe was successfully started? When the API wiced_bt_ble_observe is called, it returns "pending" result. It eventually starts after a while, so how can I conclusively check if it went from pending to success, in the case that it somehow failed? Is that status returned to the callback?

      Second question is how when observer role needs to be stopped, does the API need the callback fn pointer?

        • 1. Re: status of ble_observe
          SheetalJ_96

          Hi agmi_3321141,

           

          Can you please provide details about the Cypress product, software (WICED Studio or Modus Toolbox or others) and application you are using?

          • 2. Re: status of ble_observe
            agmi_3321141

            CYW43438, WICED SDK 6.4. Please also advice on how to check status of observer role, ie if any API can be used to check if observer role is on or off.

            • 3. Re: status of ble_observe
              SheetalJ_96

              1. The API will return the status wiced_result_t. There is no callback for the return status checking.

              2. When you want to stop the observe functionality, call the API wiced_bt_ble_observe with FALSE parameter (first parameter-start).

              The API will call the callback p_scan_result_cback with scan results.

              1 of 1 people found this helpful
              • 4. Re: status of ble_observe
                agmi_3321141

                Hi - Thanks for the answer, but I don't think you answered my questions.

                 

                1 - As I mentioned in my first post, the API returns "pending" as status result. Does that mean it will always successfully start, or can it still fail? I am not sure, can you clarify?

                2 - My question was if it is required to pass a callback when observer role needs to stop. Will this callback give any status result about change in role?

                 

                If I understood correctly, you are saying there is no API to check if BLE observer role is currently running successfully or not? Checking the callback may not be a good way to test/verify if the role is running since there is not guarantee of a BLE device in vicinity.

                • 5. Re: status of ble_observe
                  SheetalJ_96

                  1. Logically the API should return success. I will check this once and update.

                  2. There is no need to pass any callback to stop the observer functionality.

                   

                  You are correct, we do not have any API to check if the role is running successfully or not.

                  • 6. Re: status of ble_observe
                    agmi_3321141

                    1. Logically the API should return success. I will check this once and update.

                    Do you have any update?

                    • 7. Re: status of ble_observe
                      agmi_3321141

                      Hi - do you have any update

                      • 8. Re: status of ble_observe
                        AxLi_1746341

                        SheetalJ_96 wrote:

                         

                        1. Logically the API should return success. I will check this once and update.

                        Are you sure?

                        wiced_bt_ble_observe() never returns WICED_SUCCESS in my test.

                        It seems return WICED_PENDING when success.

                        • 9. Re: status of ble_observe
                          AxLi_1746341

                          agmi_3321141 wrote:

                           

                          CYW43438, WICED SDK 6.4. Please also advice on how to check status of observer role, ie if any API can be used to check if observer role is on or off.

                          FYI,

                          I just found a bug in SDK-6.4 BT library -- the rssi in scan result is 0.

                           

                          Test steps:

                          1. Use android phone and run "nRF Connect" as advertiser to broadcast some data

                          2. Run wiced_bt_ble_observe() or wiced_bt_ble_scan() and check the scan result, the rssi is 0.

                           

                          PS. The RSSI was correct in older sdk, only WICED 6.4.0 has this problem.

                          • 10. Re: status of ble_observe
                            agmi_3321141

                            wiced_bt_ble_observe() never returns WICED_SUCCESS in my test.

                            It seems return WICED_PENDING when success.

                             

                            This has been my observation as well. I have mentioned this in my original post too, but I have not received any confirmation on how to check a successful start/or status check.