Advertisement in BL5 isn't visible

Hello,

I'm trying to test and document my device (nrf52840 pcb) BLE5 abilities. so far i tested connection and dfu using my nrf connect mobile app.

Now its time to test advertisement. i tested it using BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED that as i understand is by default LE 1M PHY,
and Im trying to test LE 2M PHY and LE CODED PHY. plus when i try to set m_adv_params.primary_phy and m_adv_params.secondary_phy to BLE_GAP_PHY_CODED im getting a runtime error: [NRF_ERROR_INVALID_PARAM].

So i tried using BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED, here i am not getting an error, but i also cant see the advertisement in my nrf mobile app (yes, my mobile device is suitable for 2M PHY and CODED PHY).

Any idea how can i test advertisement on my device that will use BLE5 only?
Pluse i didnt really understand the diffrance between BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED  vs BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED.

Parents
  • Hi Raz

    So i tried using BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED, here i am not getting an error, but i also cant see the advertisement in my nrf mobile app (yes, my mobile device is suitable for 2M PHY and CODED PHY).

    Which phone do you have, and which app are you using to scan for the advertisements? 

    In some apps it might be necessary to enable extended advertising and/or coded phy explicitly before starting the scan. 

    Pluse i didnt really understand the diffrance between BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED  vs BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED

    The extended advertising specification was added in Bluetooth 5, and includes a larger advertising payload that have more capabilities than the 'legacy' advertising specification in Bluetooth 4. Extended advertising is necessary in order to do things like advertising on secondary channels, advertising on other PHY's (legacy advertising supports 1M only), advertise packets larger than 37 bytes, and do things like chained or periodic advertisements. 

    For a more detailed description you can refer to the following blog:
    https://novelbits.io/bluetooth-5-advertisements/

    Best regards
    Torbjørn

Reply
  • Hi Raz

    So i tried using BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED, here i am not getting an error, but i also cant see the advertisement in my nrf mobile app (yes, my mobile device is suitable for 2M PHY and CODED PHY).

    Which phone do you have, and which app are you using to scan for the advertisements? 

    In some apps it might be necessary to enable extended advertising and/or coded phy explicitly before starting the scan. 

    Pluse i didnt really understand the diffrance between BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED  vs BLE_GAP_ADV_TYPE_EXTENDED_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED

    The extended advertising specification was added in Bluetooth 5, and includes a larger advertising payload that have more capabilities than the 'legacy' advertising specification in Bluetooth 4. Extended advertising is necessary in order to do things like advertising on secondary channels, advertising on other PHY's (legacy advertising supports 1M only), advertise packets larger than 37 bytes, and do things like chained or periodic advertisements. 

    For a more detailed description you can refer to the following blog:
    https://novelbits.io/bluetooth-5-advertisements/

    Best regards
    Torbjørn

Children
  • Thanks Torbjørn,

    I'm using google pixel 6a, and i was able to connect and dfu using 2M PHY and CODED PHY and nrf Connect app for mobile, as such:
    connect->Set preferred PHY->and then you can see in the device log there is an update to the chosen PHY.
    That's why i assume that my phone can support it. 
    However i am not able to see the advertising device.

    But i tried again with Samsung galaxy S24 with the app and it was able to see the advertising device.
    I wonder if it is due to different phones specifications or some thing is defined differently in the nrf Connect app for mobile.

  • Hi Raz

    I discussed this with one of the Android developers, and apparently the coded support in different phones is very fragmented. Even if they claim to support coded phy they don't necessarily support all the different features needed. 

    For more information please refer to the information shared in this github issue.

    Samsung phones generally seem to offer the best performance and feature set for BLE on the Android side. 

    Best regards
    Torbjørn 

  • Hey, Torbjørn 

    I just looked again on the Bluetooth specification of both phones.

    Samsung Galaxy S24 has Bluetooth 5.3, while Google Pixel has Bluetooth 5.2. 
    I did some research between the key differences but i didn't notice any thing that can explain the reason that the device wasn't shown in the app.

    It would be great to understand this phenomenon, but for no i have my solution.  

    Thanks!!

  • Hi Raz

    Advertising extensions, coded phy and 2M support were all added in Bluetooth 5, so the difference between 5.2 and 5.3 should not make a difference. The problem is that the phones probably use different wireless chipsets with different feature sets and different low level drivers. 

    The Bluetooth specification includes a lot of optional features which doesn't necessarily need to be implemented, and which of these optional features are included varies between vendors. 

    Best regards
    Torbjørn

Related