/ _____) _ | |
( (____ _____ ____ _| |_ _____ ____| |__
\____ \| ___ | (_ _) ___ |/ ___) _ \
_____) ) ____| | | || |_| ____( (___| | | |
(______/|_____)_|_|_| \__)_____)\____)_| |_|
(C)2020 Semtech
This directory contains the sources of the library to build a gateway based on a Semtech LoRa 2.4GHz concentrator board (a.k.a. concentrator). Once compiled all the code is contained in the libloragw.a file that will be statically linked (ie. integrated in the final executable).
The library also comes with few basic tests programs that are used to test the different sub-modules of the library.
Please refer to the readme.md file located in the libloragw directory for more details.
This directory contains the binary file to be flashed on the concentrator MCU. There is a version with debug information "dbg_xxx.bin" and a release version without those debug information "rlz_xxx.bin". Please refer to util_boot/readme.md for more information about how to flash it.
Those programs are included in the project to provide examples on how to use the HAL library, and to help the system builder test different parts of it.
The packet forwarder is a program running on the host of a Lora gateway that forwards RF packets receive by the concentrator to a server through a IP/UDP link, and emits RF packets that are sent by the server.
((( Y )))
|
|
+- -|- - - - - - - - - - - - -+ xxxxxxxxxxxx +--------+
|+--+-----------+ +------+| xx x x xxx | |
|| | | || xx Internet xx | |
|| Concentrator |<----+ Host |<------xx or xx-------->| |
|| | USB | || xx Intranet xx | Server |
|+--------------+ +------+| xxxx x xxxx | |
| | xxxxxxxx | |
| | | |
| Gateway | +--------+
+- - - - - - - - - - - - - - -+
Uplink: radio packets received by the gateway, with metadata added by the gateway, forwarded to the server. Might also include gateway status.
Downlink: packets generated by the server, with additional metadata, to be transmitted by the gateway on the radio channel. Might also include configuration data for the gateway.
Please refer to the readme.md file located in the packet_forwarder directory for more details.
The downlink packet sender is a simple helper program listening on a single UDP port, responding to PUSH_DATA and PULL_DATA datagrams with proper ACK, and sending downlink JSON packets to the socket, with given frame parameters, at regular time interval. It is a network packet sender.
It can also be used as a UDP packet logger to store received uplinks in a local CSV file.
Please refer to the readme.md file located in the util_net_downlink directory for more details.
This utility can be used to switch the concentrator in DFU mode in order to program its internal MCU. Please refer to the util_boot/readme.md to get information about how to use dfu-util for flashing the MCU with binaries provided in the mcu_bin directory.
This utility configures the concentrator to be able to retrieve its EUI. It can then be used as a Gateway ID.
All the libraries and test programs can be compiled and installed from the root directory of this project.
make clean all
- Add the path to the binaries of the compiler corresponding to the target
platform to the
PATH
environment variable. - set the
ARCH
environment variable toarm
. - set the
CROSS_COMPILE
environment variable to the prefix corresponding to the compiler for the target platform.
An example for a Raspberry Pi target:
export PATH=[path]/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
Then, from the same console where the previous environment variables have been set, do:
make clean all
This project relies on several third-party open source libraries, that can be
found in the libtools
directory.
- parson: a JSON parser (http://kgabis.github.com/parson/)
- tinymt32: a pseudo-random generator (only used for debug/test)
This script is to be used when using the gateway board on a Raspberry Pi through the adaptation board, in order to properly drive the MCU_RESET and MCU_BOOT0 pins.
- Initial release for LoRa 2.4Ghz gateway
See the LICENSE.TXT file provided in the root directory of this project.
EOF