I am experimenting with trying to improve the current range of gzll nRF52840 dongle to dongle (which is not that far from what I need). I am developing using nRF5_SDK_15.2.0_9412b96 with SEGGER Embedded Studio for ARM Release 4.12 Build 2018112601.37855 Linux x64 on SUSE Linux.
I think that I understand from reading other posts that the only dynamic part of power control gazelle is relating to reduced power when pairing which reads the current TX power setting, sets it to a value GZP_POWER configured in nrf_gzp_config.h and then restores it after pairing.
Can anyone confirm that gzll does no operation (other than pairing) with the power output after initialising it to NRF_GZLL_DEFAULT_TX_POWER (which, by the way, does not appear to be used anywhere in the entire source tree of the SDK). (or indeed, does it set the power output to that??).
A secondary question is relating to the ability to set the power using an existing function. There is a documented function nrf_gzll_set_tx_power (nrf_gzll_tx_power_t tx_power) but no explanation as to when it may be called e.g. when with respect to initialisation or operation of the radio. Furthermore, the definition of nrf_gzll_tx_power_t is shown below. It will be noted that it does not correspond to the available transmit power of the nRF52840 (+8dbm) so it is unusable for +8db.
/**
* @enum nrf_gzll_tx_power_t
* @brief Enumerator used for selecting the transmit (TX) power.
*/
typedef enum
{
NRF_GZLL_TX_POWER_4_DBM, ///< 4 dBm transmit power.
NRF_GZLL_TX_POWER_0_DBM, ///< 0 dBm transmit power.
NRF_GZLL_TX_POWER_N4_DBM, ///< -4 dBm transmit power.
NRF_GZLL_TX_POWER_N8_DBM, ///< -8 dBm transmit power.
NRF_GZLL_TX_POWER_N12_DBM, ///< -12 dBm transmit power.
NRF_GZLL_TX_POWER_N16_DBM, ///< -16 dBm transmit power.
NRF_GZLL_TX_POWER_N20_DBM ///< -20 dBm transmit power.
} nrf_gzll_tx_power_t;
The only place where nrf_gzll_set_tx_power (which is a "binary resource") is used in the source tree of the SDK is twice in nrf_gzp_device.c for saving and restoring as above. So can anyone enlighten me as to when the TX power is set to default so I can change it shortly afterwards (please). I guess that, if the radio is not actually in use, I can just set the register appropriately. It would be good to know though, just when it is set.
Perhaps in the longer term gzll can be updated to support the nRF52840 or changed to accept a signed byte dbm (like the chip itself in register 0x50C) and "just do the closest you can with it" depending on the chip, rather than using an enumerated type.
Thanks in advance for any assitance.
Ray Foulkes