The nRF5 SDK for Mesh provides a PA/LNA module with APIs for interfacing external Front End Modules (FEMs) to increase the range of Bluetooth Low Energy communication.
The FEMs are controlled by the enable signals that turn on a power amplifier (PA) or a low noise amplifier (LNA) (see the following figure). To ensure sufficient ramp-up time, these signals must be activated some time before the start of the radio transmission or reception.
The Mesh PA/LNA module enables users to control such external components using GPIOs that are synchronized to the radio operation. The PA/LNA module drives the chosen GPIO pins according to the chosen polarity (Active High/Active Low).
See the following section for an example of how to use the PA/LNA module. You can find more information about the available APIs in the PA/LNA API documentation.
This section describes how to add PA/LNA support to the light_switch/server
example. For more information about this example, see Light switch example and Light switch server details and Mesh APIs.
To add the PA/LNA support:
light_switch/server/src/main.c
:mesh_pa_lna.h
mesh_init()
: mesh_pa_lna_gpiote_enable(&m_pa_lna_params);
If you connect a logic analyzer to the GPIO pins 25 and 24, you will see them toggling.
The unprovisioned device sends the unprovisioned node beacons every two seconds (NRF_MESH_PROV_BEARER_ADV_UNPROV_BEACON_INTERVAL_MS) and scans for the incoming provisioning invite for the rest of the time.
You will see brief Active High pulses on the GPIO pin 24, which is used for the PA control. Similarly, the GPIO pin 25 (used for the LNA control) is almost always ON, except for the time when the radio switches to the next advertising channel for scanning or for sending advertisements.