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

nRF52840 Coded PHY with ble_advertising

Can I use the ble_advertising module for the BLE_GAP_PHY_CODED?

Currently my Coded PHY parameters without the module are defined as:

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**@brief Struct that contains pointers to the encoded advertising data. */
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 = NULL,
.len = 0
}
};
static void advertising_init(void)
{
ret_code_t err_code;
ble_gap_adv_params_t adv_params =
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


Following the example at NordicPlayground-nrf52-ble-app-uart-long-range

This method of advertising works for both 1Mbps and CODED PHY.

However with this I am having trouble defining the on_adv_evt callback, which would normally allow me to go to low-power mode through BLE_ADV_EVT_IDLE when the APP_ADV_DURATION is over.
Is it possible to use the coded phy with the ble_advertising module so I can use the same callbacks and functions as the 1Mbps PHY?


Any input would be appreciated,

Jeff

  • Hi!

    You should be able to use coded phy with the ble_advertising module.

    There is a lot of Q&A's around devzone regarding long range, so you should be able to find a lot of useful information.

    This thread might be of interest for you:
    https://devzone.nordicsemi.com/f/nordic-q-a/34543/ble-long-range

    Specifically see Kenneth's answer:
    "Hopefully you can make it work. Seems like different engineers like to do it differently, some use the ble_advertisment module to handle the advertisment, while other use the softdevice api to setup advertisment directly without the ble_advertisment module to handle the advertisment."

    Also, I would suggest that you take a look at the blog-post that Kenneth refers to in one of his answers;
    Testing Long Range (Coded PHY) with Nordic solution (It Simply Works)

    Best regards,
    Joakim.