A packet forwarder is a program running on a LoRa gateway. It forwards the LoRa packets emitted by end-devices and received by the gateway to a LoRa Network Server (LNS) and vice-versa, hence its name.
In other words, the packet forwarder is the bridge between the LoRa technology and the IP technology. This is the main program of a LoRa gateway, it has to be installed to implement a LoRaWAN network.
The Common Packet Forwarder (CPF) is an open source packet forwarder developed by Kerlink. It is a set of two daemons (working together): “lorad” and “lorafwd”.
“lorad” is responsible for the LoRa hardware. Its main purpose is to provide an abstraction of the LoRa devices to other processes. It initializes the hardware, configures it (channel frequencies, LBT, diversity, …), and uses it to send/receive LoRa packets or to achieve frequency scans.
“lorafwd” is responsible for the communication to the LNS. It handles the connection to the server. In case the connection to the server is lost (for example if there is a network issue), it will automatically try to reconnect to it. To prevent the loss of packets when the LNS cannot be reached, the “lorafwd” embeds a database. Once the connection is back, the packets stored in the database are forwarded to the LNS (by default this feature is disabled). “lorafwd” implements the GWMP protocol developed by Semtech over UDP to communicate with the LNS.
Starting from Keros 4.3.x, CPF is included in the firmware. It still needs to be configured: