4 Replies Latest reply on Sep 13, 2014 7:52 AM by VictorZ_46

    Retrieving the 'adverstised' data from a BLE target


      I've succesfully used the SMART (BLE) end of WICED for the last few months, but I have a question.

      I know that after a BLE scan, that I can see the resultant Bluetooth Address and 'Friendly Device Name' of the various targets.

      Now, without doing a 'connect' and get into the GATT Services/Descriptors/Values, can I retrieve the "advertised data"?

      There are apps on iPhone ("LightBlue" for one) that can display the 'advertised' data, which can include the Manufacturer's Data, etc.

      How do we retrieve this adverstised data with WICKED SMART commands?

      Cheers, Robert Moore

        • 1. Re: Retrieving the 'adverstised' data from a BLE target

          I would love to see how to do this on Widows as well.  I've looked and there appears no way to do this with the current sdk.  The LE scanning is happening under the hood and you only get to see devices once they've been discovered.  Please correct me if I'm mistaken (with sample code!).

           

          I've resorted to using android to pluck advertisement data out of the ether.  This blog walks you though how to do it on that platform (jump to the adRecord section):

           

          http://www.doubleencore.com/2013/12/bluetooth-smart-for-android/

          • 2. Re: Retrieving the 'adverstised' data from a BLE target
            VictorZ_46

            Robert, are you asking about WICED Smart SDK or Windows?  In the SDK you register callback to receive advertisements using lecm_RegleAdvReportCb.  In the you receive all the information that has been sent by the advertiser.   The hello_client application gives the good example.  You can also check the ROM code which traces different pieces of the advertisement data.  It is in WICED-Smart-SDK/Wiced-Smart/bleapp/app/blecen.c.  Function

             

            blecen_AdvDataParse.

             

             

            Jose: Do you need it for a product, or testing, or fun and which OS version are you trying to address.  In general the answer to your question is that this functionality is not available from Microsoft.  Meanwhile if you are using Broadcom radio on Windows machine we might be able to provide you with a some solution.

            1 of 1 people found this helpful
            • 3. Re: Retrieving the 'adverstised' data from a BLE target


              Just figured it out for the WICED SDK ...

               

              After a successful 'smart' scan, there is a field "tempPtr->last_advertising_event_received.eir_data" and another "tempPtr->last_advertising_event_received.eir_data_length" that provide the 31-bytes-max "advertised" data.

               

              (of course, 'tempPtr' here is the pointer to the scan list results, from: wiced_bt_smartbridge_get_scan_result_list ( &temp, &count ); )

               

              Thanks for everyone's comments!

              1 of 1 people found this helpful
              • 4. Re: Retrieving the 'adverstised' data from a BLE target
                VictorZ_46

                If you would have posted WICED Wi-Fi question on the WICED forum rather than WICED Smart forum there would be less confusion. ☺.