Accept advertising packets without flags

Hello,

i have written an App that evaluates data from advertisement of different sensors. When using the simulator everything works fine and I can see the readings from my sensors. But when running on my watch (fenix 6 pro) I can see advertising devices but not my sensors. I logged the raw advertisment data and compared it to the output from the simulator and noticed that there seems to be a filter on the data on the real device. On the watch I can only see advertisment data that starts with  "[2, 1, ...]" or "[2, 1, ...]. So these packets contain flags at the beginning.

Unfortunately my sensors advertisment data start with "[Len, 0xFF, ..."] (you can't connect to them, they just advertise) and seems not to be recognized by the watch. But I don't see any information why this is the case or how to switch of this filter. Any suggestions from your side?

Thanks and best regards!

  • You are talking CIQ BLE, I guess.  How are you requesting the data, a read or notify?  Is the BLE profile you have set up in your app correctly?  You can only pair with a limited number of services at one time (3 at most).

    I have never seen any kind of a filer, but there is a limit on how much can be read at a time - 20 bytes or so.  Can you see what your sensor is sending?

    You won't see everything that's in the data for an advertisement - a common thing is you might not see the UUID.

    What do you see with blescan? https://apps.garmin.com/en-US/apps/9bcc8b66-8385-4afb-b93e-f69e01422284

  • Hi, I don't want to connect to the device, just read the information from the manufacturer specific data from the advertised data. I have the app in scan mode and see different devices. On the simulator I can see the advertised data from the sensor, on the real watch not. With blescan I also cannot see the divice.

  • Is it that you can't see it in blescan, or you can't see a name/uuid?   When I scan at my desk, I see 10 or more devices, but many don't have a name or UUID.  How are you trying to decide what you use?  Just anything you see in a scan?  You might be trying to use the incorrect device.

  • I can't see it in blescan or in my software in the function onScanResults(scanResults). And then I just iterate over the scan results. So this is the minimal example:

    function onScanResults(scanResults) {
        for (var scanResult = scanResults.next(); scanResult != null; scanResult = scanResults.next()) 
        {
            var packageData = scanResult.getRawData();
            System.println(packageData);
        }
    }
    On the simulator I can see a lot of data from different devices, on the watch (written to the file) I just see the devices starting with the flags.
  • Also, if the sensor is already connected to anything (your watch, your phone, another watch) it will probably stop advertising.

    For something like an HRM-PRO, if it's paired using ANT, you won't see a BLE advertisement.

  • No, the sensor is not connected to any device (and it also won't connect). And I can see the advertisement data in parallel on my phone (with the scanner of nrf connect). If you test in on the simulator - do you see any raw data not starting with "[2, 1,...]" that you don't see on the wath with your ble scanner?

  • I see 1a ff, 07 ff, 1b ff ,02 01 right now for the devices I see with blescan - currently 11 devices on a real watch.

    Using the blescan code in the sim, I see pretty much the same thing (14 devices), but there I see one device with no raw data at all

    Here's just one case of what I see in the sim and on a real device:

  • On one device in the sim, the raw data varies between 27 and 30 bytes, and the first two bytes change between 1d ff and 1a ff and I see the same on a real device.

  • To give you an example of my data: this is what I see when I log the data on my watch with code I have posted:

    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [2, 1, 26, 2, 10, 12, 12, 255, 76, 0, 16, 7, 32, 31, 202, 111, 40, 166, 8]
    [2, 1, 6, 3, 3, 241, 255, 23, 22, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202, 100]
    [2, 1, 26, 2, 10, 12, 12, 255, 76, 0, 16, 7, 32, 31, 202, 111, 40, 166, 8]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 43, 202]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 43, 202]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 55, 202]
    [2, 1, 26, 2, 10, 12, 12, 255, 76, 0, 16, 7, 32, 31, 202, 111, 40, 166, 8]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [2, 1, 6, 3, 3, 241, 255, 23, 22, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 43, 202, 100]
    [2, 1, 26, 2, 10, 12, 12, 255, 76, 0, 16, 7, 32, 31, 202, 111, 40, 166, 8]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [2, 1, 26, 2, 10, 12, 12, 255, 76, 0, 16, 7, 32, 31, 202, 111, 40, 166, 8]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 43, 202]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [2, 1, 6, 3, 3, 241, 255, 23, 22, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 41, 202, 100]
    [2, 1, 6, 3, 3, 241, 255, 23, 22, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 43, 202, 100]
    [2, 1, 26, 2, 10, 12, 12, 255, 76, 0, 16, 7, 32, 31, 202, 111, 40, 166, 8]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 43, 202]
    [2, 1, 26, 2, 10, 12, 12, 255, 76, 0, 16, 7, 32, 31, 202, 111, 40, 166, 8]
    [2, 1, 26, 2, 10, 12, 12, 255, 76, 0, 16, 7, 32, 31, 202, 111, 40, 166, 8]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [2, 1, 6, 3, 3, 241, 255, 23, 22, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 55, 202, 100]
    [2, 1, 26, 2, 10, 12, 12, 255, 76, 0, 16, 7, 32, 31, 202, 111, 40, 166, 8]
    

    And this is what I see when I log the data in the simulator:

    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 42, 202]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 43, 202]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [2, 1, 6, 3, 3, 241, 255, 23, 22, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 43, 202, 100]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [7, 255, 76, 0, 18, 2, 0, 0]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 43, 202]
    [2, 1, 6, 3, 3, 241, 255, 23, 22, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202, 100]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 43, 202]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [7, 255, 76, 0, 18, 2, 0, 0]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 43, 202]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [2, 1, 6]
    [2, 1, 6]
    [2, 1, 6]
    [12, 255, 190, 20, 193, 1, 0, 0, 100, 175, 1, 17, 71]
    [2, 1, 6, 3, 3, 241, 255, 23, 22, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 43, 202, 100]
    [12, 255, 190, 20, 193, 1, 0, 0, 100, 175, 1, 17, 71]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [12, 255, 190, 20, 193, 1, 0, 0, 100, 175, 1, 17, 71]
    [2, 1, 6, 26, 255, 76, 0, 2, 21, 211, 203, 214, 205, 180, 21, 65, 149, 157, 166, 152, 75, 176, 31, 47, 69, 7, 97, 1, 50, 202]
    [12, 255, 190, 20, 193, 1, 0, 0, 100, 175, 1, 17, 71]
    [28, 255, 190, 20, 193, 1, 49, 49, 19, 0, 0, 36, 116, 72, 161, 161, 102, 102, 208, 208, 23, 183, 209, 56, 0, 207, 207, 96, 96]

    So there is a lot of advertising data I don't see on the real watch

  • Which watch?  The BLE range can vary a large amount based on the watch, and the placement of the dongle or DK can also make a difference in the sim. It's understandable that you wont see the identical things on the watch and in the sim.

    in blesim, you are prebaby actually seeing the device you expect, but the name is null and there's no UUID, so not easy to ID

    Also with ble scan, it's not a one time snapshot, but the results update, and devices can come and go See the time on the second line.