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

Advertisement with LE Coded PHY

Hi,

I have recently been evaluating the nRF52840 for the research purpose. I came across a question related to this product that I could not figure it out myself. 

I noticed that when I use Coded PHY, the advertisement take places in uncoded 1M PHY. But this affects the range, as the advertisement is not in Coded PHY. 

I was reading the Bluetooth standards (version 5.1) and I found out that in section 4.4.2.4.4 of the standard, the advertisement is also possible using ADV_EXT_IND on the LE Coded PHY.

Now the question is, does nordic uses this feather? Can we have advertisements on LE Coded PHY in nRF52840?

Best regards,

Ben

Parents Reply
  • Hi Vidar,

    Thank you very much for the prompt reply. 

    However, I tried to use the CODED PHY for advertisement in ATT_MTU_Throuput example but I am not successful. 

    I changed the following line of codes:

    adv_params.primary_phy = BLE_GAP_PHY_1MBPS;
    adv_params.secondary_phy = BLE_GAP_PHY_1MBPS;

    adv_params.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED;

    When I run it on the board, it does not throw an error but just simply stops!

    Do you know the reason?

    Br,

    Ben

Children
  • Hi,

    What did you change the type to? Should be BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED. 

  • Hi Vidar,

    Yes I have changed the type to BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED. 

    "

    adv_params.primary_phy = BLE_GAP_PHY_CODED;
    adv_params.secondary_phy = BLE_GAP_PHY_CODED;

    adv_params.properties.type = BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED;

    "

    But I get this :

    "

    [00:00:00.000,091] <info> app: Preparing the test.
    [00:00:00.000,122] <info> app: Starting advertising.
    [00:00:00.000,244] <info> app: Starting scanning.
    [00:00:00.050,292] <info> app: Device "Nordic_ATT_MTU" found, sending a connection request.

    "

    It found the device but then it stops!!

    Br,

    Ben

  • Hi,

    I also add this to the scan parameter:

    "

    static ble_gap_scan_params_t m_scan_param =
    {
    .active = 0x00,
    .extended = 0x01,
    .interval = NRF_BLE_SCAN_SCAN_INTERVAL,
    .window = NRF_BLE_SCAN_SCAN_WINDOW,
    .timeout = 0x0000, // No timeout.
    .scan_phys = BLE_GAP_PHY_CODED, // BLE_GAP_PHY_CODED BLE_GAP_PHY_1MBPS
    .filter_policy = BLE_GAP_SCAN_FP_ACCEPT_ALL,
    };

    "

    And then I added this line of code:

    "  err_code = sd_ble_gap_scan_start(&m_scan_param, &m_scan_buffer);" 

    to scan_start() function.

    But still, the code doesn't work and it stops after finding the Nordic device!!!

    Br,

    Ben

  • Hi Ben,

    It looks like the example will require a few modifications to advertise and scan with CODED PHY. Did you try the other example I linked to?

  • Hi Vidar,

    I have not done the other. Since I am interested in The Throughput example. We are doing a heatmap of RSSI in the indoor environment for studying BLE 5 in the university. 

    I would appreciate if you help me with this example! If you could share the code that works with COED PHY, really would save my time for now. 

    Br,

    Ben

Related