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

How can I use a "long range mode" in the proprietary mode in the nRF52840?

Hi,

I'm using nRF52840 and SDK 15.2 and want to realize a proprietary radio.

I tested the ESB (enhanced shock burst) example and it worked quite well. Next I tried to configure the chip to use a lower data rate to achieve higher ranges (similar to LE CODED mode in BLE).

I used one of:

#define RADIO_MODE_MODE_Ble_LR125Kbit (5UL) /*!< Long range 125 kbit/s TX, 125 kbit/s and 500 kbit/s RX */
#define RADIO_MODE_MODE_Ble_LR500Kbit (6UL) /*!< Long range 500 kbit/s TX, 125 kbit/s and 500 kbit/s RX */
#define RADIO_MODE_MODE_Ieee802154_250Kbit (15UL) /*!< IEEE 802.15.4-2006 250 kbit/s */

I updated the nrf_esb_bitrate_t struct and defined new timing. Anyhow, the transmission/reception test failed (it seems that the radio does not receive), and I do not understand why it should be impossible.

Any suggestions?

Thanks!

  • Hi

    To enable long range you have to set your advertising and scanning phy to BLE_GAP_PHY_CODED.

    In your peripheral, set adv_params.primary_phy = BLE_GAP_PHY_CODED; (found in ble_advertising.c)

    In your central, set .scan_phys = BLE_GAP_PHY_CODED; (found in main.c and/or nrf_ble_scan.c)

    Best regards,

    Simon

  • Hi Simon,

    I'm talking about proprietary radio (like ESB), not BLE. I refer to this ESB example where the ESB only allows

    typedef enum {
        NRF_ESB_BITRATE_2MBPS     = RADIO_MODE_MODE_Nrf_2Mbit,      /**< 2 Mb radio mode.                                                */
        NRF_ESB_BITRATE_1MBPS     = RADIO_MODE_MODE_Nrf_1Mbit,      /**< 1 Mb radio mode.                                                */
    #if !(defined(NRF52840_XXAA) || defined(NRF52810_XXAA))
        NRF_ESB_BITRATE_250KBPS   = RADIO_MODE_MODE_Nrf_250Kbit,    /**< 250 Kb radio mode.                                              */
    #endif //NRF52840_XXAA
        NRF_ESB_BITRATE_1MBPS_BLE = RADIO_MODE_MODE_Ble_1Mbit,      /**< 1 Mb radio mode using @e Bluetooth low energy radio parameters. */
    #if defined(NRF52_SERIES)
        NRF_ESB_BITRATE_2MBPS_BLE = RADIO_MODE_MODE_Ble_2Mbit,       /**< 2 Mb radio mode using @e Bluetooth low energy radio parameters. */
    #endif
    } nrf_esb_bitrate_t;

    In my opinion, the long range feature is part of the nRF52840-hardware, thus the software should somehow make use of it. The question is how?

    Thank you!

  • Hi

    Sorry for the misunderstanding! Yes this should be possible, however we don't have any support in our libraries for something like this, so it won't be easy. Also using the new radio modes will not be backwards compatible with other ESB devices. Another issue will be time on air, as the ESB library won't wait for an ACK packet (+ACK payload). This long range demo uses a simple proprietary protocol that is similar to ESB. I will try to get my hands on the .c-files so we can see exactly how it is done, but it might take some time to find it.

    Best regards,

    Simon

  • Thank you Simon! Yes, the ACK-timing issue will be considered as soon as the long range mode is active.

    For this reason, getting the c-files of the mentioned long range demo would be very helpful!

    I would really appreciate if you could check for it and come back to me. Thank you for the support!

  • Hi

    Having a hard time finding the demo project as the guy who wrote it is not available. But I found this case, which might have code relevant to your application. I will update you if I am able to get the demo project.

    Best regards,

    Simon

Related