diff --git a/VERSION b/VERSION index b5021469..fd2a0186 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -3.0.2 +3.1.0 diff --git a/libloragw/Makefile b/libloragw/Makefile index fd2376d6..49b197ed 100644 --- a/libloragw/Makefile +++ b/libloragw/Makefile @@ -24,15 +24,6 @@ else $(error No SPI physical layer selected, check ../target.cfg file.) endif -ifeq ($(CFG_BRD),iot_sk_1301_868) - CFG_BRD_MSG := SX1301 IoT Starter Kit board with SX1257 radios, 868 MHz filters - CFG_BRD_OPT := CFG_BRD_1301IOTSK868 -else - $(info [Info] No specific board selected.) - CFG_BRD_MSG := None - CFG_BRD_OPT := CFG_BRD_NONE -endif - ### linking options ifeq ($(CFG_SPI),native) @@ -65,9 +56,6 @@ inc/config.h: ../VERSION library.cfg # SPI interface @echo "SPI interface : $(CFG_SPI_MSG)" @echo " #define $(CFG_SPI_OPT) 1" >> $@ - # Board misc. parameters - @echo "Board misc. param : $(CFG_BRD_MSG)" - @echo " #define $(CFG_BRD_OPT) 1" >> $@ # Debug options @echo " #define DEBUG_AUX $(DEBUG_AUX)" >> $@ @echo " #define DEBUG_SPI $(DEBUG_SPI)" >> $@ @@ -87,8 +75,6 @@ obj/loragw_aux.o: src/loragw_aux.c inc/loragw_aux.h inc/config.h ifeq ($(CFG_SPI),native) obj/loragw_spi.o: src/loragw_spi.native.c inc/loragw_spi.h inc/config.h $(CC) -c $(CFLAGS) $< -o $@ -obj/loragw_gpio.o: src/loragw_gpio.native.c inc/loragw_gpio.h inc/config.h - $(CC) -c $(CFLAGS) $< -o $@ else ifeq ($(CFG_SPI),ftdi) obj/loragw_spi.o: src/loragw_spi.ftdi.c inc/loragw_spi.h inc/config.h $(CC) -c $(CFLAGS) $< -o $@ @@ -106,7 +92,7 @@ obj/loragw_gps.o: src/loragw_gps.c inc/loragw_gps.h inc/config.h ### static library ifeq ($(CFG_SPI),native) -libloragw.a: obj/loragw_hal.o obj/loragw_gps.o obj/loragw_reg.o obj/loragw_spi.o obj/loragw_aux.o obj/loragw_gpio.o +libloragw.a: obj/loragw_hal.o obj/loragw_gps.o obj/loragw_reg.o obj/loragw_spi.o obj/loragw_aux.o else ifeq ($(CFG_SPI),ftdi) libloragw.a: obj/loragw_hal.o obj/loragw_gps.o obj/loragw_reg.o obj/loragw_spi.o obj/loragw_aux.o endif diff --git a/libloragw/inc/loragw_gpio.h b/libloragw/inc/loragw_gpio.h deleted file mode 100644 index f63e7d85..00000000 --- a/libloragw/inc/loragw_gpio.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - / _____) _ | | -( (____ _____ ____ _| |_ _____ ____| |__ - \____ \| ___ | (_ _) ___ |/ ___) _ \ - _____) ) ____| | | || |_| ____( (___| | | | -(______/|_____)_|_|_| \__)_____)\____)_| |_| - (C)2013 Semtech-Cycleo - -Description: - Host specific functions to address the GPIO. mainly the Reset pin - -License: Revised BSD License, see LICENSE.TXT file include in the project -Maintainer: Miguel Luis -*/ - - -#ifndef _LORAGW_GPIO_H -#define _LORAGW_GPIO_H - -/* -------------------------------------------------------------------------- */ -/* --- DEPENDANCIES --------------------------------------------------------- */ - -#include /* C99 types*/ - -#include "config.h" /* library configuration options (dynamically generated) */ - -/* -------------------------------------------------------------------------- */ -/* --- PUBLIC CONSTANTS ----------------------------------------------------- */ - -#define LGW_GPIO_SUCCESS 0 -#define LGW_GPIO_ERROR -1 - -#define LGW_GPIO_IN 0 -#define LGW_GPIO_OUT 1 - -#define LGW_GPIO_LOW 0 -#define LGW_GPIO_HIGH 1 - -/* -------------------------------------------------------------------------- */ -/* --- PUBLIC FUNCTIONS PROTOTYPES ------------------------------------------ */ - -/** -@brief Reserves the given GPIO pin -@param pin pin ID to be reserved -@return status of operation (LGW_GPIO_SUCCESS/LGW_GPIO_ERROR) -*/ -int lgw_gpio_export(int pin); - -/** -@brief Releases the given GPIO pin reservation -@param pin pin ID to be released -@return status of operation (LGW_GPIO_SUCCESS/LGW_GPIO_ERROR) -*/ -int lgw_gpio_unexport(int pin); - -/** -@brief Sets the GPIO pin to the given direction -@param pin pin ID to be changed -@param dir new direction for the pin(LGW_GPIO_IN/LGW_GPIO_OUT) -@return status of operation (LGW_GPIO_SUCCESS/LGW_GPIO_ERROR) -*/ -int lgw_gpio_direction(int pin, int dir); - -/** -@brief Reads the given GPIO pin -@param pin pin ID to be read -@return value of the given pin ID (LGW_GPIO_LOW/LGW_GPIO_HIGH/LGW_GPIO_ERROR) -*/ -int lgw_gpio_read(int pin); - -/** -@brief Writes the given GPIO pin with value -@param pin pin ID to be changed -@param value new value for the pin(LGW_GPIO_LOW/LGW_GPIO_HIDH) -@return status of operation (LGW_GPIO_SUCCESS/LGW_GPIO_ERROR) -*/ -int lgw_gpio_write(int pin, int value); - -#endif - -/* --- EOF ------------------------------------------------------------------ */ diff --git a/libloragw/inc/loragw_hal.h b/libloragw/inc/loragw_hal.h index 05dba2fc..54251f89 100644 --- a/libloragw/inc/loragw_hal.h +++ b/libloragw/inc/loragw_hal.h @@ -75,15 +75,6 @@ Maintainer: Sylvain Miermont IF_LORA_STD, \ IF_FSK_STD } /* configuration of available IF chains and modems on the hardware */ -/* board-specific parameters */ -#if (CFG_BRD_1301IOTSK868 == 1) -#if (CFG_SPI_NATIVE == 1) - #define LGW_SX1301_RESET_PIN 7 /* reset pin for SX1301 (GPIO7 <-> pin 26 on RPi connector) */ -#else - /* NOT SUPPORTED */ -#endif -#endif - /* values available for the 'modulation' parameters */ /* NOTE: arbitrary values */ #define MOD_UNDEFINED 0 diff --git a/libloragw/library.cfg b/libloragw/library.cfg index 1f641184..f5b6e1d4 100644 --- a/libloragw/library.cfg +++ b/libloragw/library.cfg @@ -9,13 +9,6 @@ CFG_SPI= native -### Board misc parameters ### -# Used to configure misc board options. -# iot_sk_1301_868 IoT SX1301 Starter Kit, with 868 MHz filter -# Keep empty for no calibration parameters (neutral values will be used). - -CFG_BRD= iot_sk_1301_868 - ### Debug options ### # Set the DEBUG_* to 1 to activate debug mode in individual modules. # Warning: that makes the module *very verbose*, do not use for production @@ -25,4 +18,3 @@ DEBUG_SPI= 0 DEBUG_REG= 0 DEBUG_HAL= 0 DEBUG_GPS= 0 -DEBUG_GPIO= 0 diff --git a/libloragw/readme.md b/libloragw/readme.md index 774894d3..f1427284 100644 --- a/libloragw/readme.md +++ b/libloragw/readme.md @@ -123,7 +123,7 @@ steps, typically to allow for supply voltages or clocks to stabilize after been switched on. An accuracy of 1 ms or less is ideal. -If your system doesn't allow that level of accuracy, make sure that the actual +If your system does not allow that level of accuracy, make sure that the actual delay is *longer* that the time specified when the function is called (ie. wait_ms(X) **MUST NOT** before X milliseconds under any circumstance). @@ -186,8 +186,6 @@ The other settings available in library.cfg are: which is to be opened on your host is the same as the one defined in libloragw/src/loragw_spi.native.c -* CFG_BRD configures board misc parameters. - ### 3.3. Building procedures ### For cross-compilation set the CROSS_COMPILE variable in the Makefile with the diff --git a/libloragw/src/loragw_gpio.native.c b/libloragw/src/loragw_gpio.native.c deleted file mode 100644 index 617bd69e..00000000 --- a/libloragw/src/loragw_gpio.native.c +++ /dev/null @@ -1,167 +0,0 @@ -/* - / _____) _ | | -( (____ _____ ____ _| |_ _____ ____| |__ - \____ \| ___ | (_ _) ___ |/ ___) _ \ - _____) ) ____| | | || |_| ____( (___| | | | -(______/|_____)_|_|_| \__)_____)\____)_| |_| - (C)2013 Semtech-Cycleo - -Description: - Host specific functions to address the GPIO. mainly the Reset pin - -License: Revised BSD License, see LICENSE.TXT file include in the project -Maintainer: Miguel Luis -*/ - - -/* -------------------------------------------------------------------------- */ -/* --- DEPENDANCIES --------------------------------------------------------- */ - -#include /* C99 types */ -#include /* printf fprintf */ -#include /* malloc free */ -#include /* lseek, close */ -#include /* open */ -#include /* memset */ - -#include "loragw_aux.h" -#include "loragw_gpio.h" - -/* -------------------------------------------------------------------------- */ -/* --- PRIVATE MACROS ------------------------------------------------------- */ - -#define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) -#if DEBUG_GPIO == 1 - #define DEBUG_MSG(str) fprintf(stderr, str) - #define DEBUG_PRINTF(fmt, args...) fprintf(stderr,"%s:%d: "fmt, __FUNCTION__, __LINE__, args) - #define CHECK_NULL(a) if(a==NULL){fprintf(stderr,"%s:%d: ERROR: NULL POINTER AS ARGUMENT\n", __FUNCTION__, __LINE__);return LGW_GPIO_ERROR;} -#else - #define DEBUG_MSG(str) - #define DEBUG_PRINTF(fmt, args...) - #define CHECK_NULL(a) if(a==NULL){return LGW_GPIO_ERROR;} -#endif - -/* -------------------------------------------------------------------------- */ -/* --- PRIVATE CONSTANTS ---------------------------------------------------- */ -#define BUFFER_MAX 255 - -/* -------------------------------------------------------------------------- */ -/* --- PUBLIC FUNCTIONS DEFINITION ------------------------------------------ */ - -/* GPIO export */ -int lgw_gpio_export(int pin) { - char buffer[BUFFER_MAX]; - ssize_t bytes_written; - int fd; - - fd = open("/sys/class/gpio/export", O_WRONLY); - if (fd == LGW_GPIO_ERROR) { - DEBUG_MSG("Failed to open export for writing!\n"); - return(LGW_GPIO_ERROR); - } - - bytes_written = snprintf(buffer, BUFFER_MAX, "%d", pin); - if (write(fd, buffer, bytes_written) != bytes_written) { - DEBUG_MSG("Failed to export GPIO: write to sysfs error\n"); - close(fd); - return(LGW_GPIO_ERROR); - } - - close(fd); - wait_ms( 100 ); - return(LGW_GPIO_SUCCESS); -} - -/* GPIO unexport */ -int lgw_gpio_unexport(int pin) { - char buffer[BUFFER_MAX]; - ssize_t bytes_written; - int fd; - - fd = open("/sys/class/gpio/unexport", O_WRONLY); - if (fd == LGW_GPIO_ERROR) { - DEBUG_MSG("Failed to open unexport for writing!\n"); - return(LGW_GPIO_ERROR); - } - - bytes_written = snprintf(buffer, BUFFER_MAX, "%d", pin); - if (write(fd, buffer, bytes_written) != bytes_written) { - DEBUG_MSG("Failed to unexport GPIO: write to sysfs error\n"); - close(fd); - return(LGW_GPIO_ERROR); - } - - close(fd); - return(LGW_GPIO_SUCCESS); -} - -/* GPIO direction */ -int lgw_gpio_direction(int pin, int dir) { - static const char s_directions_str[] = "in\0out"; - - char path[BUFFER_MAX]; - int fd; - - snprintf(path, BUFFER_MAX, "/sys/class/gpio/gpio%d/direction", pin); - fd = open(path, O_WRONLY); - if (fd == LGW_GPIO_ERROR) { - DEBUG_MSG("Failed to open gpio direction for writing!\n"); - return(LGW_GPIO_ERROR); - } - - if (write(fd, &s_directions_str[LGW_GPIO_IN == dir ? 0 : 3], LGW_GPIO_IN == dir ? 2 : 3) == LGW_GPIO_ERROR) { - DEBUG_MSG("Failed to set direction!\n"); - return(LGW_GPIO_ERROR); - } - - close(fd); - return(LGW_GPIO_SUCCESS); -} - -/* GPIO read */ -int lgw_gpio_read(int pin) { - char path[BUFFER_MAX]; - char value_str[3]; - int fd; - - snprintf(path, BUFFER_MAX, "/sys/class/gpio/gpio%d/value", pin); - fd = open(path, O_RDONLY); - if (fd == LGW_GPIO_ERROR) { - DEBUG_MSG("Failed to open gpio value for reading!\n"); - return(LGW_GPIO_ERROR); - } - - if (read(fd, value_str, 3) == LGW_GPIO_ERROR) { - DEBUG_MSG("Failed to read value!\n"); - return(LGW_GPIO_ERROR); - } - - close(fd); - return(atoi(value_str)); -} - -/* GPIO write */ -int lgw_gpio_write(int pin, int value) { - static const char s_values_str[] = "01"; - - char path[BUFFER_MAX]; - int fd; - - snprintf(path, BUFFER_MAX, "/sys/class/gpio/gpio%d/value", pin); - fd = open(path, O_WRONLY); - if (fd == LGW_GPIO_ERROR) { - DEBUG_MSG("Failed to open gpio value for writing!\n"); - return(LGW_GPIO_ERROR); - } - - if (write(fd, &s_values_str[LGW_GPIO_LOW == value ? 0 : 1], 1) != 1) { - DEBUG_MSG("Failed to write value!\n"); - return(LGW_GPIO_ERROR); - } - - close(fd); - return(LGW_GPIO_SUCCESS); -} - - -/* --- EOF ------------------------------------------------------------------ */ diff --git a/libloragw/src/loragw_hal.c b/libloragw/src/loragw_hal.c index aeffa4b1..f897c648 100644 --- a/libloragw/src/loragw_hal.c +++ b/libloragw/src/loragw_hal.c @@ -124,19 +124,8 @@ const uint32_t rf_rx_bandwidth[LGW_RF_CHAIN_NB] = LGW_RF_RX_BANDWIDTH; #define CFG_SPI_STR "spi?" #endif -#if (CFG_BRD_1301IOTSK868 == 1) - #define CFG_BRD_STR "iot_sk_1301_868" -/* === ADD CUSTOMIZATION FOR YOUR OWN BOARD HERE === -#elif (CFG_BRD_MYBOARD == 1) -*/ -#elif (CFG_BRD_NONE == 1) - #define CFG_BRD_STR "no_brd" -#else - #define CFG_BRD_STR "brd?" -#endif - /* Version string, used to identify the library version/options once compiled */ -const char lgw_version_string[] = "Version: " LIBLORAGW_VERSION "; Options: " CFG_SPI_STR " " CFG_BRD_STR ";"; +const char lgw_version_string[] = "Version: " LIBLORAGW_VERSION "; Options: " CFG_SPI_STR ";"; /* -------------------------------------------------------------------------- */ /* --- PRIVATE VARIABLES ---------------------------------------------------- */ diff --git a/libloragw/src/loragw_spi.native.c b/libloragw/src/loragw_spi.native.c index de8c8f7d..c6cf5594 100644 --- a/libloragw/src/loragw_spi.native.c +++ b/libloragw/src/loragw_spi.native.c @@ -31,7 +31,6 @@ Maintainer: Sylvain Miermont #include #include -#include "loragw_gpio.h" #include "loragw_spi.h" #include "loragw_hal.h" @@ -128,30 +127,6 @@ int lgw_spi_open(void **spi_target_ptr) { return LGW_SPI_ERROR; } - /* If a RESET PIN has been defined, we reset the SX1301 */ -#ifdef LGW_SX1301_RESET_PIN - if( lgw_gpio_export(LGW_SX1301_RESET_PIN) < 0 ){ - DEBUG_MSG("ERROR: FAILED TO RESET SX1301\n"); - return LGW_SPI_ERROR; - } - if( lgw_gpio_direction(LGW_SX1301_RESET_PIN, LGW_GPIO_OUT) < 0 ){ - DEBUG_MSG("ERROR: FAILED TO RESET SX1301\n"); - return LGW_SPI_ERROR; - } - if( lgw_gpio_write(LGW_SX1301_RESET_PIN, LGW_GPIO_HIGH) < 0 ){ - DEBUG_MSG("ERROR: FAILED TO RESET SX1301\n"); - return LGW_SPI_ERROR; - } - if( lgw_gpio_write(LGW_SX1301_RESET_PIN, LGW_GPIO_LOW) < 0 ){ - DEBUG_MSG("ERROR: FAILED TO RESET SX1301\n"); - return LGW_SPI_ERROR; - } - if( lgw_gpio_direction(LGW_SX1301_RESET_PIN, LGW_GPIO_IN) < 0 ){ - DEBUG_MSG("ERROR: FAILED TO RESET SX1301\n"); - return LGW_SPI_ERROR; - } -#endif - *spi_device = dev; *spi_target_ptr = (void *)spi_device; DEBUG_MSG("Note: SPI port opened and configured ok\n"); @@ -173,13 +148,6 @@ int lgw_spi_close(void *spi_target) { a = close(spi_device); free(spi_target); -#ifdef LGW_SX1301_RESET_PIN - if( lgw_gpio_unexport(LGW_SX1301_RESET_PIN) < 0 ){ - DEBUG_MSG("ERROR: FAILED TO RESET SX1301\n"); - return LGW_SPI_ERROR; - } -#endif - /* determine return code */ if (a < 0) { DEBUG_MSG("ERROR: SPI PORT FAILED TO CLOSE\n"); diff --git a/readme.md b/readme.md index 2c51626f..899aa777 100644 --- a/readme.md +++ b/readme.md @@ -56,6 +56,11 @@ for spectral measurement. 3. Changelog ------------- +### v3.1.0 ### + +* Removed GPIO module from HAL, that was specific to IoT Starter Kit platform. GPIO configuration will be done from application script instead. +* Removed CFG_BRD configuration from library.cfg, not needed anymore + ### v3.0.2 ### * Bugfix: Fixed frequency calculation on uplinks: lgw_receive() function was using a variable to calculate the frequency before it was initialized with correct value. diff --git a/util_pkt_logger/global_conf.json b/util_pkt_logger/global_conf.json index 36d508f2..55b58e3f 100644 --- a/util_pkt_logger/global_conf.json +++ b/util_pkt_logger/global_conf.json @@ -1,199 +1,199 @@ { - "SX1301_conf": { - "lorawan_public": true, - "clksrc": 1, /* radio_1 provides clock to concentrator */ - "radio_0": { - "enable": true, - "type": "SX1257", - "freq": 867500000, - "rssi_offset": -166.0, - "tx_enable": true - }, - "radio_1": { - "enable": true, - "type": "SX1257", - "freq": 868500000, - "rssi_offset": -166.0, - "tx_enable": false - }, - "chan_multiSF_0": { - /* Lora MAC channel, 125kHz, all SF, 868.1 MHz */ - "enable": true, - "radio": 1, - "if": -400000 - }, - "chan_multiSF_1": { - /* Lora MAC channel, 125kHz, all SF, 868.3 MHz */ - "enable": true, - "radio": 1, - "if": -200000 - }, - "chan_multiSF_2": { - /* Lora MAC channel, 125kHz, all SF, 868.5 MHz */ - "enable": true, - "radio": 1, - "if": 0 - }, - "chan_multiSF_3": { - /* Lora MAC channel, 125kHz, all SF, 867.1 MHz */ - "enable": true, - "radio": 0, - "if": -400000 - }, - "chan_multiSF_4": { - /* Lora MAC channel, 125kHz, all SF, 867.3 MHz */ - "enable": true, - "radio": 0, - "if": -200000 - }, - "chan_multiSF_5": { - /* Lora MAC channel, 125kHz, all SF, 867.5 MHz */ - "enable": true, - "radio": 0, - "if": 0 - }, - "chan_multiSF_6": { - /* Lora MAC channel, 125kHz, all SF, 867.7 MHz */ - "enable": true, - "radio": 0, - "if": 200000 - }, - "chan_multiSF_7": { - /* Lora MAC channel, 125kHz, all SF, 867.9 MHz */ - "enable": true, - "radio": 0, - "if": 400000 - }, - "chan_Lora_std": { - /* Lora MAC channel, 250kHz, SF7, 868.3 MHz */ - "enable": true, - "radio": 1, - "if": -200000, - "bandwidth": 250000, - "spread_factor": 7 - }, - "chan_FSK": { - /* FSK 50kbps channel, 868.8 MHz */ - "enable": true, - "radio": 1, - "if": 300000, - "bandwidth": 125000, - "datarate": 50000 - }, - "tx_lut_0": { - /* TX gain table, index 0 */ - "pa_gain": 0, - "mix_gain": 8, - "rf_power": -6, - "dig_gain": 0 - }, - "tx_lut_1": { - /* TX gain table, index 1 */ - "pa_gain": 0, - "mix_gain": 10, - "rf_power": -3, - "dig_gain": 0 - }, - "tx_lut_2": { - /* TX gain table, index 2 */ - "pa_gain": 0, - "mix_gain": 12, - "rf_power": 0, - "dig_gain": 0 - }, - "tx_lut_3": { - /* TX gain table, index 3 */ - "pa_gain": 1, - "mix_gain": 8, - "rf_power": 3, - "dig_gain": 0 - }, - "tx_lut_4": { - /* TX gain table, index 4 */ - "pa_gain": 1, - "mix_gain": 10, - "rf_power": 6, - "dig_gain": 0 - }, - "tx_lut_5": { - /* TX gain table, index 5 */ - "pa_gain": 1, - "mix_gain": 12, - "rf_power": 10, - "dig_gain": 0 - }, - "tx_lut_6": { - /* TX gain table, index 6 */ - "pa_gain": 1, - "mix_gain": 13, - "rf_power": 11, - "dig_gain": 0 - }, - "tx_lut_7": { - /* TX gain table, index 7 */ - "pa_gain": 2, - "mix_gain": 9, - "rf_power": 12, - "dig_gain": 0 - }, - "tx_lut_8": { - /* TX gain table, index 8 */ - "pa_gain": 1, - "mix_gain": 15, - "rf_power": 13, - "dig_gain": 0 - }, - "tx_lut_9": { - /* TX gain table, index 9 */ - "pa_gain": 2, - "mix_gain": 10, - "rf_power": 14, - "dig_gain": 0 - }, - "tx_lut_10": { - /* TX gain table, index 10 */ - "pa_gain": 2, - "mix_gain": 11, - "rf_power": 16, - "dig_gain": 0 - }, - "tx_lut_11": { - /* TX gain table, index 11 */ - "pa_gain": 3, - "mix_gain": 9, - "rf_power": 20, - "dig_gain": 0 - }, - "tx_lut_12": { - /* TX gain table, index 12 */ - "pa_gain": 3, - "mix_gain": 10, - "rf_power": 23, - "dig_gain": 0 - }, - "tx_lut_13": { - /* TX gain table, index 13 */ - "pa_gain": 3, - "mix_gain": 11, - "rf_power": 25, - "dig_gain": 0 - }, - "tx_lut_14": { - /* TX gain table, index 14 */ - "pa_gain": 3, - "mix_gain": 12, - "rf_power": 26, - "dig_gain": 0 - }, - "tx_lut_15": { - /* TX gain table, index 15 */ - "pa_gain": 3, - "mix_gain": 14, - "rf_power": 27, - "dig_gain": 0 - } - }, - "gateway_conf": { - "gateway_ID": "AA555A0000000000" - } + "SX1301_conf": { + "lorawan_public": true, + "clksrc": 1, /* radio_1 provides clock to concentrator */ + "radio_0": { + "enable": true, + "type": "SX1257", + "freq": 867500000, + "rssi_offset": -166.0, + "tx_enable": true + }, + "radio_1": { + "enable": true, + "type": "SX1257", + "freq": 868500000, + "rssi_offset": -166.0, + "tx_enable": false + }, + "chan_multiSF_0": { + /* Lora MAC channel, 125kHz, all SF, 868.1 MHz */ + "enable": true, + "radio": 1, + "if": -400000 + }, + "chan_multiSF_1": { + /* Lora MAC channel, 125kHz, all SF, 868.3 MHz */ + "enable": true, + "radio": 1, + "if": -200000 + }, + "chan_multiSF_2": { + /* Lora MAC channel, 125kHz, all SF, 868.5 MHz */ + "enable": true, + "radio": 1, + "if": 0 + }, + "chan_multiSF_3": { + /* Lora MAC channel, 125kHz, all SF, 867.1 MHz */ + "enable": true, + "radio": 0, + "if": -400000 + }, + "chan_multiSF_4": { + /* Lora MAC channel, 125kHz, all SF, 867.3 MHz */ + "enable": true, + "radio": 0, + "if": -200000 + }, + "chan_multiSF_5": { + /* Lora MAC channel, 125kHz, all SF, 867.5 MHz */ + "enable": true, + "radio": 0, + "if": 0 + }, + "chan_multiSF_6": { + /* Lora MAC channel, 125kHz, all SF, 867.7 MHz */ + "enable": true, + "radio": 0, + "if": 200000 + }, + "chan_multiSF_7": { + /* Lora MAC channel, 125kHz, all SF, 867.9 MHz */ + "enable": true, + "radio": 0, + "if": 400000 + }, + "chan_Lora_std": { + /* Lora MAC channel, 250kHz, SF7, 868.3 MHz */ + "enable": true, + "radio": 1, + "if": -200000, + "bandwidth": 250000, + "spread_factor": 7 + }, + "chan_FSK": { + /* FSK 50kbps channel, 868.8 MHz */ + "enable": true, + "radio": 1, + "if": 300000, + "bandwidth": 125000, + "datarate": 50000 + }, + "tx_lut_0": { + /* TX gain table, index 0 */ + "pa_gain": 0, + "mix_gain": 8, + "rf_power": -6, + "dig_gain": 0 + }, + "tx_lut_1": { + /* TX gain table, index 1 */ + "pa_gain": 0, + "mix_gain": 10, + "rf_power": -3, + "dig_gain": 0 + }, + "tx_lut_2": { + /* TX gain table, index 2 */ + "pa_gain": 0, + "mix_gain": 12, + "rf_power": 0, + "dig_gain": 0 + }, + "tx_lut_3": { + /* TX gain table, index 3 */ + "pa_gain": 1, + "mix_gain": 8, + "rf_power": 3, + "dig_gain": 0 + }, + "tx_lut_4": { + /* TX gain table, index 4 */ + "pa_gain": 1, + "mix_gain": 10, + "rf_power": 6, + "dig_gain": 0 + }, + "tx_lut_5": { + /* TX gain table, index 5 */ + "pa_gain": 1, + "mix_gain": 12, + "rf_power": 10, + "dig_gain": 0 + }, + "tx_lut_6": { + /* TX gain table, index 6 */ + "pa_gain": 1, + "mix_gain": 13, + "rf_power": 11, + "dig_gain": 0 + }, + "tx_lut_7": { + /* TX gain table, index 7 */ + "pa_gain": 2, + "mix_gain": 9, + "rf_power": 12, + "dig_gain": 0 + }, + "tx_lut_8": { + /* TX gain table, index 8 */ + "pa_gain": 1, + "mix_gain": 15, + "rf_power": 13, + "dig_gain": 0 + }, + "tx_lut_9": { + /* TX gain table, index 9 */ + "pa_gain": 2, + "mix_gain": 10, + "rf_power": 14, + "dig_gain": 0 + }, + "tx_lut_10": { + /* TX gain table, index 10 */ + "pa_gain": 2, + "mix_gain": 11, + "rf_power": 16, + "dig_gain": 0 + }, + "tx_lut_11": { + /* TX gain table, index 11 */ + "pa_gain": 3, + "mix_gain": 9, + "rf_power": 20, + "dig_gain": 0 + }, + "tx_lut_12": { + /* TX gain table, index 12 */ + "pa_gain": 3, + "mix_gain": 10, + "rf_power": 23, + "dig_gain": 0 + }, + "tx_lut_13": { + /* TX gain table, index 13 */ + "pa_gain": 3, + "mix_gain": 11, + "rf_power": 25, + "dig_gain": 0 + }, + "tx_lut_14": { + /* TX gain table, index 14 */ + "pa_gain": 3, + "mix_gain": 12, + "rf_power": 26, + "dig_gain": 0 + }, + "tx_lut_15": { + /* TX gain table, index 15 */ + "pa_gain": 3, + "mix_gain": 14, + "rf_power": 27, + "dig_gain": 0 + } + }, + "gateway_conf": { + "gateway_ID": "AA555A0000000000" + } } diff --git a/util_pkt_logger/local_conf.json b/util_pkt_logger/local_conf.json index 624893d5..51fc7c26 100644 --- a/util_pkt_logger/local_conf.json +++ b/util_pkt_logger/local_conf.json @@ -1,5 +1,5 @@ { - "gateway_conf": { - "gateway_ID": "AA555A0000000101" - } + "gateway_conf": { + "gateway_ID": "AA555A0000000101" + } }