v2.0.0
> #### New features * Added support for USB interface between the HOST and the concentrator, for sx1250 based concentrator only. * Added support for Listen-Before-Talk for AS923 region, using the additional sx1261 radio from the Semtech Corecell reference design v3. * Added support for Spectral Scan with additional sx1261 radio from the Semtech Corecell reference design v3. * Added support for SX1303 chip, for further Fine Timestamping support. * Merged the master-fdd-cn490 branch to bring support for CN490 Full-Duplex reference design. It is an integration of the releases v1.1.0, v1.1.1, v1.1.2 described below. > #### Changes * HAL: Reworked the complete communication layer. A new loragw_com module has been introduced to handle switching from a USB or a SPI communication interface, aligned function prototypes for sx125x, sx1250 and sx1261 radios. For USB, a mode has been added to group SPI write commands request to the STM32 MCU, in order to optimize latency during time critical configuration phases. * HAL: Added preliminary support for Fine Timestamping for TDOA localization. * HAL: Updated AGC firmware to v6: add configurable delay for PA to start, add Listen-Before-Talk support. * HAL: Added new API function lgw_demod_setconf() to set global demodulator settings. * HAL: Added new API functions for Spectral Scan. * Packet Forwarder: The type of interface is configurable in the global_conf.json file: com_type can be "USB" or "SPI". * Packet Forwarder: Changed the parameters to configure fine timestamping in the global_conf.json. * Packet Forwarder: Added sections to configure the spectral scan and Listen-Before-Talk features. * Packet Forwarder: Added a new thread for background spectral scan example, to show how to use the spectral scan API provided by the HAL, without interfering with the main tasks of the gateway (aka Receive uplinks and transmit downlinks). * Packet Forwarder: Added "nhdr" field parsing from "txpk" JSON downlink request in order to be able to send beacon request from Network Server. * Packet Forwarder: Added chan_multiSF_All in global_conf.json to choose which spreading factors to enable for multi-sf demodulators. * Packet Forwarder: Updated PROTOCOL.md to v1.6. * Tools: added util_spectral_scan, a standalone spectral scanner utility. > #### Notes * This release has been validated on the Semtech Corecell reference design v3 with USB interface. v1.1.2 > Integrated in ***v2.0.0*** from ***master-fdd-cn490*** branch. * packet forwarder: updated global_conf.json.sx1255.CN490.full-duplex with RSSI temperature compensation coefficients, and updated RSSI offset for radio 1. v1.1.1 > Integrated in ***v2.0.0*** from ***master-fdd-cn490*** branch. * HAL: Updated SX1302 LNA/PA LUT configuration for Full Duplex CN490 reference design. * test_loragw_hal_rx/tx: added --fdd option to enable Full Duplex * packet forwarder: updated global_conf.json.sx1255.CN490.full-duplex for CN490 reference design. v1.1.0 > Integrated in ***v2.0.0*** from ***master-fdd-cn490*** branch. * HAL: Added support for CN490 full duplex reference design.
This commit is contained in:
parent
6291e62ef9
commit
2c14708bdb
107 changed files with 13516 additions and 3249 deletions
|
|
@ -43,7 +43,8 @@ License: Revised BSD License, see LICENSE.TXT file include in the project
|
|||
/* -------------------------------------------------------------------------- */
|
||||
/* --- PRIVATE CONSTANTS ---------------------------------------------------- */
|
||||
|
||||
#define LINUXDEV_PATH_DEFAULT "/dev/spidev0.0"
|
||||
#define COM_TYPE_DEFAULT LGW_COM_SPI
|
||||
#define COM_PATH_DEFAULT "/dev/spidev0.0"
|
||||
|
||||
/* -------------------------------------------------------------------------- */
|
||||
/* --- PRIVATE VARIABLES ---------------------------------------------------- */
|
||||
|
|
@ -65,10 +66,13 @@ static void gps_process_coords(void);
|
|||
|
||||
void usage(void) {
|
||||
//printf("Library version information: %s\n", lgw_version_info());
|
||||
printf( "Available options:\n");
|
||||
printf( " -h print this help\n");
|
||||
printf( " -k <uint> Concentrator clock source (Radio A or Radio B) [0..1]\n");
|
||||
printf( " -r <uint> Radio type (1255, 1257, 1250)\n");
|
||||
printf("Available options:\n");
|
||||
printf(" -h print this help\n");
|
||||
printf(" -u set COM type as USB (default is SPI)\n");
|
||||
printf(" -d <path> COM path to be used to connect the concentrator\n");
|
||||
printf(" => default path (SPI): " COM_PATH_DEFAULT "\n");
|
||||
printf(" -k <uint> Concentrator clock source (Radio A or Radio B) [0..1]\n");
|
||||
printf(" -r <uint> Radio type (1255, 1257, 1250)\n");
|
||||
}
|
||||
|
||||
static void sig_handler(int sigio) {
|
||||
|
|
@ -170,8 +174,9 @@ static void gps_process_coords(void) {
|
|||
int main(int argc, char **argv)
|
||||
{
|
||||
/* SPI interfaces */
|
||||
const char spidev_path_default[] = LINUXDEV_PATH_DEFAULT;
|
||||
const char * spidev_path = spidev_path_default;
|
||||
const char com_path_default[] = COM_PATH_DEFAULT;
|
||||
const char * com_path = com_path_default;
|
||||
lgw_com_type_t com_type = COM_TYPE_DEFAULT;
|
||||
|
||||
struct sigaction sigact; /* SIGQUIT&SIGINT&SIGTERM signal handling */
|
||||
|
||||
|
|
@ -180,7 +185,7 @@ int main(int argc, char **argv)
|
|||
|
||||
/* concentrator variables */
|
||||
uint8_t clocksource = 0;
|
||||
lgw_radio_type_t radio_type = LGW_RADIO_TYPE_NONE;
|
||||
lgw_radio_type_t radio_type = LGW_RADIO_TYPE_SX1250;
|
||||
struct lgw_conf_board_s boardconf;
|
||||
struct lgw_conf_rxrf_s rfconf;
|
||||
|
||||
|
|
@ -193,12 +198,20 @@ int main(int argc, char **argv)
|
|||
enum gps_msg latest_msg; /* keep track of latest NMEA/UBX message parsed */
|
||||
|
||||
/* parse command line options */
|
||||
while ((i = getopt (argc, argv, "hk:r:")) != -1) {
|
||||
while ((i = getopt (argc, argv, "hk:r:d:u")) != -1) {
|
||||
switch (i) {
|
||||
case 'h':
|
||||
usage();
|
||||
return -1;
|
||||
break;
|
||||
case 'd':
|
||||
if (optarg != NULL) {
|
||||
com_path = optarg;
|
||||
}
|
||||
break;
|
||||
case 'u':
|
||||
com_type = LGW_COM_USB;
|
||||
break;
|
||||
case 'r': /* <uint> Radio type */
|
||||
i = sscanf(optarg, "%u", &arg_u);
|
||||
if ((i != 1) || ((arg_u != 1255) && (arg_u != 1257) && (arg_u != 1250))) {
|
||||
|
|
@ -234,13 +247,6 @@ int main(int argc, char **argv)
|
|||
}
|
||||
}
|
||||
|
||||
/* Check arguments */
|
||||
if (radio_type == LGW_RADIO_TYPE_NONE) {
|
||||
printf("ERROR: radio type must be specified\n");
|
||||
usage();
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* configure signal handling */
|
||||
sigemptyset(&sigact.sa_mask);
|
||||
sigact.sa_flags = 0;
|
||||
|
|
@ -253,10 +259,12 @@ int main(int argc, char **argv)
|
|||
printf("Beginning of test for loragw_gps.c\n");
|
||||
printf("*** Library version information ***\n%s\n***\n", lgw_version_info());
|
||||
|
||||
/* Board reset */
|
||||
if (system("./reset_lgw.sh start") != 0) {
|
||||
printf("ERROR: failed to reset SX1302, check your reset_lgw.sh script\n");
|
||||
exit(EXIT_FAILURE);
|
||||
if (com_type == LGW_COM_SPI) {
|
||||
/* Board reset */
|
||||
if (system("./reset_lgw.sh start") != 0) {
|
||||
printf("ERROR: failed to reset SX1302, check your reset_lgw.sh script\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
/* Open and configure GPS */
|
||||
|
|
@ -272,8 +280,9 @@ int main(int argc, char **argv)
|
|||
boardconf.lorawan_public = true;
|
||||
boardconf.clksrc = clocksource;
|
||||
boardconf.full_duplex = false;
|
||||
strncpy(boardconf.spidev_path, spidev_path, sizeof boardconf.spidev_path);
|
||||
boardconf.spidev_path[sizeof boardconf.spidev_path - 1] = '\0'; /* ensure string termination */
|
||||
boardconf.com_type = com_type;
|
||||
strncpy(boardconf.com_path, com_path, sizeof boardconf.com_path);
|
||||
boardconf.com_path[sizeof boardconf.com_path - 1] = '\0'; /* ensure string termination */
|
||||
if (lgw_board_setconf(&boardconf) != LGW_HAL_SUCCESS) {
|
||||
printf("ERROR: failed to configure board\n");
|
||||
return EXIT_FAILURE;
|
||||
|
|
@ -405,10 +414,12 @@ int main(int argc, char **argv)
|
|||
lgw_stop();
|
||||
}
|
||||
|
||||
/* Board reset */
|
||||
if (system("./reset_lgw.sh stop") != 0) {
|
||||
printf("ERROR: failed to reset SX1302, check your reset_lgw.sh script\n");
|
||||
exit(EXIT_FAILURE);
|
||||
if (com_type == LGW_COM_SPI) {
|
||||
/* Board reset */
|
||||
if (system("./reset_lgw.sh stop") != 0) {
|
||||
printf("ERROR: failed to reset SX1302, check your reset_lgw.sh script\n");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
printf("\nEnd of test for loragw_gps.c\n");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue