Issues testing BLE range with different PHY and TX power settings (nRF52840 + nRF5340) – I'm a beginner

Hi everyone, I'm a beginner in Nordic development and currently learning how to work with BLE and Zephyr (NCS 2.9).

I'm using an nRF52840 Dongle as a peripheral and an nRF5340 DK as a central. The dongle periodically sends "PING N" messages using the NUS service, and the DK connects automatically when it detects the device name, subscribes to the service, and measures RSSI and bitrate.

My goal is to perform range tests by changing the PHY (1M, 2M, CODED S=2/S=8) and the TX power (+8, 0, -8 dBm), to observe how they affect signal distance and quality. However, I'm not seeing clear differences in bitrate across the different configurations. I'm currently sending 20-byte packets every 500 ms, and it seems that at this rate the differences are not significant. When I try to send larger packets or reduce the interval, the DK stops receiving them properly — even at short distances.

The full code and configuration files for both boards (central and peripheral) are available here:
 https://github.com/diegonovo02/ble_prueba1

I'd appreciate any suggestions or feedback on how to better configure the setup for these kinds of tests, or if there are any known limitations with the NUS service or Zephyr BLE stack I should consider.

Thanks in advance!

Parents Reply Children
  • Thank you very much for your assistance and explanations. After considering both options, I have the following question:

    Would you recommend—for my throughput and RSSI measurements—managing static TX power levels directly from the prj.conf using entries such as:

    # Power TX (enable/disable per build)
    CONFIG_BT_CTLR_TX_PWR_PLUS_8=y
    #CONFIG_BT_CTLR_TX_PWR_0=y
    #CONFIG_BT_CTLR_TX_PWR_MINUS_8=y

    and then producing a separate firmware build for each power level I wish to test?

    Or, on the other hand, do you believe it would not be overly difficult to implement a config pwr <level> command in the shell (as we discussed) so that I can adjust TX power at runtime without needing to recompile every time?

    Thank you!!

  • Hi!

    Both options work, if having it runtime configurable with a "config pwr <level> command" makes it easier for you to test, then I suggest you can try implement that.

Related