This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Too many received beacon packages by IPhone

Hi,

I use Iphone to scan for arround ble package.

The beacon is configured broadcasting every 200ms (I think all 3 channels 37, 38, 39 is default to broadcast signal in the beacon example in SDK15)

I develop an app on Iphone (base on BluetoothCore Lib) to scan for ble packages for 5 seconds. If the beacon is set to broadcast every 200s on 3 channels and mobile only listen in 1 channel in each scanning interval (https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5751532/, section 2.2.1). So the maximum scanned beacon packages should be 5*5=25 for every 5s.

However, I received some time up to 44 beacon packages in 5s.

Does anyone has experienced that how Iphone scanned for beacon package (number of scanning channel)?

I also include the result I got from Iphone, there are start_time (when mobile scaned for beacon and received_time - when mobile scanned beacon package). There are some received_time that just few mili second different.

beacon_pkg_in_5s.csv

Parents
  • Hello,

    Are you sure that all of the advertising reports (scan events on the phone) are from the same device? You can check the device address in the scan report.

    In addition, does your beacon have scan response in it's advertising data?

    It is correct, as you say that it will advertise on all three channels each advertising_interval. The reason that you see 208ms sometimes is because a random delay between 0 and 10ms are added on each adv_interval (according to the BLE spec).

    beacon_pkg_in_5s.csv

    But I still see some numbers that doesn't add up (which you can see in the modified .csv file): A couple of them are 0.178 and 0.179 ms from the last one. The only reason I can think of is that this is from another device. 

    The advertisements that are 1ms apart must either be a scan response, or another device that by chance has advertising events nearly at the same time.

    But check the BLE address of the advertisements, which would hopefully clear up some things.

    Best regards,

    Edvin

  • Hi Advin,

    Thanks for your answer.

    1. I think all packages are come from  one device, here data of other device: 

    beacon_pkg_44_.csv

    2. about the scan resspone:

    here are some snipset of configuartion:

    static ble_gap_adv_data_t m_adv_data =
    {
        .adv_data =
        {
            .p_data = m_enc_advdata,
            .len    = BLE_GAP_ADV_SET_DATA_SIZE_MAX
        },
        .scan_rsp_data =
        {
            .p_data = m_enc_srvdata,
            .len    = BLE_GAP_ADV_SET_DATA_SIZE_MAX
    
        }
    };
    

    err_code = ble_advdata_encode(&advdata, m_adv_data.adv_data.p_data, &m_adv_data.adv_data.len);
    APP_ERROR_CHECK(err_code);
    
    //    err_code = ble_advdata_encode(&srdata, m_adv_data.scan_rsp_data.p_data, &m_adv_data.scan_rsp_data.len);
    //    APP_ERROR_CHECK(err_code);
    
    err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &m_adv_data, &m_adv_params);
    APP_ERROR_CHECK(err_code);

    So that I think I have no data in the scan respond package.

    I still wonder where is the problem come from, the scanner on mobile (do you know iphone listen on only one channel or three channel each time it scans for beacon data)? or reflection of beacon signal in a room.

    Thanks.

Reply
  • Hi Advin,

    Thanks for your answer.

    1. I think all packages are come from  one device, here data of other device: 

    beacon_pkg_44_.csv

    2. about the scan resspone:

    here are some snipset of configuartion:

    static ble_gap_adv_data_t m_adv_data =
    {
        .adv_data =
        {
            .p_data = m_enc_advdata,
            .len    = BLE_GAP_ADV_SET_DATA_SIZE_MAX
        },
        .scan_rsp_data =
        {
            .p_data = m_enc_srvdata,
            .len    = BLE_GAP_ADV_SET_DATA_SIZE_MAX
    
        }
    };
    

    err_code = ble_advdata_encode(&advdata, m_adv_data.adv_data.p_data, &m_adv_data.adv_data.len);
    APP_ERROR_CHECK(err_code);
    
    //    err_code = ble_advdata_encode(&srdata, m_adv_data.scan_rsp_data.p_data, &m_adv_data.scan_rsp_data.len);
    //    APP_ERROR_CHECK(err_code);
    
    err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &m_adv_data, &m_adv_params);
    APP_ERROR_CHECK(err_code);

    So that I think I have no data in the scan respond package.

    I still wonder where is the problem come from, the scanner on mobile (do you know iphone listen on only one channel or three channel each time it scans for beacon data)? or reflection of beacon signal in a room.

    Thanks.

Children
Related