The issue is that , i have custom board which have nrf52833 and nrf21540 (Range extender) , i have to increase the range of tx gain = 20dbm using gpio method
this is my overlay file
/ {
nrf21540_fem: nrf21540_fem {
compatible = "nordic,nrf21540-fem";
tx-en-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
rx-en-gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
pdn-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
mode-gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
};
};
and this is my prj conf
# Bluetooth configuration
CONFIG_BT=y
CONFIG_BT_PERIPHERAL=y
CONFIG_BT_DEVICE_NAME="Range extender"
CONFIG_BT_EXT_ADV=y
CONFIG_BT_BROADCASTER=y
CONFIG_BT_ADV_PROV=y
CONFIG_BT_CTLR_ADV_EXT=y
# Logging
CONFIG_LOG=y
CONFIG_LOG_DEFAULT_LEVEL=3
CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y
CONFIG_GPIO=y
# MPSL FEM (nRF21540)
CONFIG_MPSL=y
CONFIG_MPSL_FEM=y
CONFIG_MPSL_FEM_NRF21540_GPIO=y
CONFIG_MPSL_FEM_NRF21540_TX_GAIN_DB=20
# Config logger
CONFIG_LOG=y
CONFIG_USE_SEGGER_RTT=y
CONFIG_LOG_BACKEND_RTT=y
CONFIG_LOG_BACKEND_UART=n
CONFIG_LOG_PRINTK=n
and this my main.c
#include <zephyr/kernel.h>
#include <zephyr/sys/printk.h>
#include <zephyr/bluetooth/bluetooth.h>
#include <zephyr/bluetooth/hci.h>
static const struct bt_data ad[] = {
BT_DATA_BYTES(BT_DATA_FLAGS, BT_LE_AD_NO_BREDR),
BT_DATA(BT_DATA_NAME_COMPLETE, CONFIG_BT_DEVICE_NAME, sizeof(CONFIG_BT_DEVICE_NAME) - 1),
};
static void bt_ready(int err)
{
if (err) {
printk("Bluetooth init failed (err %d)\n", err);
return;
}
bt_le_adv_start(BT_LE_ADV_NCONN_IDENTITY, ad, ARRAY_SIZE(ad), NULL, 0);
}
void main(void)
{
printk("STARTING I BEACON CODE");
bt_enable(bt_ready);
}
I also add external battery for current requirement
I have compare the range extender custom board with a normal device with 0dbm tx power they both scan upto same distance is there any thing other than that ihave to include or change i have to use only TX_EN pin