From 4977430ef31fb52994fed42b9cb180930ed943d0 Mon Sep 17 00:00:00 2001 From: Sylvain Miermont Date: Tue, 22 Oct 2013 18:23:52 +0200 Subject: Beta 8 - API: lgw_receive now return info on RX frequency and RF path for each packet (no need to keep track of RF/IF settings) - Unified some portion of the code with the 470 MHz variant of the HAL (use SX1255 radios instead of SX1257) - Improved AGC and ARB firmwares - Adding -Wall -Wextra for compilation, fixing all the new warnings for cleaner code - Fixed bugs in handling of FSK datarate - test_loragw_hal now dumps the content of all Lora registers after configuration in reg_dump.log --- libloragw/inc/loragw_hal.h | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'libloragw/inc/loragw_hal.h') diff --git a/libloragw/inc/loragw_hal.h b/libloragw/inc/loragw_hal.h index 08aa945..0739f37 100644 --- a/libloragw/inc/loragw_hal.h +++ b/libloragw/inc/loragw_hal.h @@ -104,8 +104,8 @@ Description: #define DR_LORA_SF11 0x20 #define DR_LORA_SF12 0x40 #define DR_LORA_MULTI 0x7E -/* NOTE: for FSK directly use baudrate between 300 bauds and 250 kbauds */ -#define DR_FSK_MIN 300 +/* NOTE: for FSK directly use baudrate between 500 bauds and 250 kbauds */ +#define DR_FSK_MIN 500 #define DR_FSK_MAX 250000 /* values available for the 'coderate' parameters (Lora only) */ @@ -179,13 +179,15 @@ struct lgw_conf_rxif_s { @brief Structure containing the metadata of a packet that was received and a pointer to the payload */ struct lgw_pkt_rx_s { + uint32_t freq_hz; /*!> central frequency of the IF chain */ uint8_t if_chain; /*!> by which IF chain was packet received */ uint8_t status; /*!> status of the received packet */ + uint32_t count_us; /*!> internal gateway counter for timestamping, 1 microsecond resolution */ + uint8_t rf_chain; /*!> through which RF chain the packet was received */ uint8_t modulation; /*!> modulation used by the packet */ uint8_t bandwidth; /*!> modulation bandwidth (Lora only) */ - uint16_t datarate; /*!> RX datarate of the packet */ - uint8_t coderate; /*!> error-correcting code of the packet */ - uint32_t count_us; /*!> internal gateway counter for timestamping, 1 microsecond resolution */ + uint32_t datarate; /*!> RX datarate of the packet (SF for Lora) */ + uint8_t coderate; /*!> error-correcting code of the packet (Lora only) */ float rssi; /*!> average packet RSSI in dB */ float snr; /*!> average packet SNR, in dB (Lora only) */ float snr_min; /*!> minimum packet SNR, in dB (Lora only) */ @@ -207,10 +209,10 @@ struct lgw_pkt_tx_s { int8_t rf_power; /*!> TX power, in dBm */ uint8_t modulation; /*!> modulation to use for the packet */ uint8_t bandwidth; /*!> modulation bandwidth (Lora only) */ + uint32_t datarate; /*!> TX datarate (baudrate for FSK, SF for Lora) */ + uint8_t coderate; /*!> error-correcting code of the packet (Lora only) */ bool invert_pol; /*!> invert signal polarity, for orthogonal downlinks (Lora only) */ uint8_t f_dev; /*!> frequency deviation, in kHz (FSK only) */ - uint16_t datarate; /*!> TX datarate (baudrate for FSK) */ - uint8_t coderate; /*!> error-correcting code of the packet (Lora only) */ uint16_t preamble; /*!> set the preamble length, 0 for default */ bool no_crc; /*!> if true, do not send a CRC in the packet */ bool no_header; /*!> if true, enable implicit header mode (Lora), fixed length (FSK) */ -- cgit v1.2.3