2 Replies Latest reply on Jul 26, 2018 7:57 AM by user_3597586

    BLE Advertising Junk Data



      I'm using the CY8CKIT-042-BLE-A PIONEER KIT and working on the Find Me project. My observer is an Android app that reads the advertising data (without establishing any connection), that is, using the getManufacturerSpecificData(MANUFACTURER_ID) Android function.


      I set the advertising data fields (Manufacturer ID and some data) in the GAP Settings and when I start advertising, my Android app gets this data, but sometimes, some junk data is also fetched. Initially I thought it was the "scan response" data and I unchecked all the boxes in this tab but the same thing is repeated.


      Broadcaster (board): My Manufacturer specific data: 01

      Observer (Android):

      Reading size: 1 with value: 01 (NEED ONLY THIS ONE)

      Reading size: 27 with value: 07 19 01 02 20 21 77 0F 00 00 00 D5 67 C4 B7 15 54 63 22 B1 2B 06 09 57 36 AB 1A

      Reading size: 8 with value: 09 06 03 03 C0 A8 4A 0A


      Code in Android:

      byte[] data = result.getScanRecord().getManufacturerSpecificData(MANUFACTURER_ID);

      if (data != null) Log.d(TAG, "Reading size: " + data.length + " with value: " + bytesToHex(data));


      I'm a beginner. Any help is appreciated.

        • 1. Re: BLE Advertising Junk Data

          It looks like you are receiving advertising packets from other devices. You can specify the UUID of the BLE device in your Android code so that you only connect to that. The data is not junk, but the manufacturer data of other devices near you.


          Other possible way to check this would be to place a breakpoint in the line where you get the result and then observe for the device name in the scanRecord in the debug window as shown below:



          You can see the value corresponding to the device name as highlighted. I had put device name as "Cypress" and Manufacture data as "0x02" which is being shown.


          Do let me know if you need any help. Make sure you use our Github Library for reference: bleapp/PSoCCapSenseLedService.java at master · cypresssemiconductorco/bleapp · GitHub




          1 of 1 people found this helpful
          • 2. Re: BLE Advertising Junk Data

            Perfect. Thanks Dheeraj.


            So what happened was I added Manufacturer ID of Apple for testing but it may have fetched data from the Apple devices nearby.

            1 of 1 people found this helpful