Skip to content

Commit 23127d9

Browse files
author
Sylvain Miermont
committed
v1.6.0
- Fixed bug with 250kHz and 500 kHz TX filtering - Adjusted FSK timestamp calibration in RX for accurate RX/TX alignment - Added lgw_abort_tx() function to stop a TX at any time (scheduled or ongoing) - Added support for user-settable FSK sync word (same for RX and TX) - Added support for the Chinese 780 MHz band - Added support for Kerlink 433 gateway - Added support for Cisco 433, 470 & 780 MHz concentrators boards
1 parent a39d133 commit 23127d9

File tree

11 files changed

+736
-554
lines changed

11 files changed

+736
-554
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.5.0
1+
1.6.0

libloragw/Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,13 @@ else ifeq ($(CFG_BAND),eu433)
7474
else
7575
$(error The selected radio(s) cannot work in the selected band.)
7676
endif
77+
else ifeq ($(CFG_BAND),cn780)
78+
ifeq ($(CFG_RADIO),sx1257)
79+
CFG_BAND_MSG := China 780 MHz band
80+
CFG_BAND_OPT := CFG_BAND_780
81+
else
82+
$(error The selected radio(s) cannot work in the selected band.)
83+
endif
7784
else
7885
$(warning [Warning] No frequency band selected, full radio capability assumed.)
7986
CFG_BAND_MSG := Full range supported by the radio(s)
@@ -92,6 +99,18 @@ else ifeq ($(CFG_BRD),ref_1301_433)
9299
else ifeq ($(CFG_BRD),kerlink_868)
93100
CFG_BRD_MSG := Kerlink LoRa 868MHz gateway
94101
CFG_BRD_OPT := CFG_BRD_KERLINK868
102+
else ifeq ($(CFG_BRD),kerlink_433)
103+
CFG_BRD_MSG := Kerlink LoRa 433MHz gateway
104+
CFG_BRD_OPT := CFG_BRD_KERLINK433
105+
else ifeq ($(CFG_BRD),cisco_433)
106+
CFG_BRD_MSG := Cisco LoRa 433MHz gateway
107+
CFG_BRD_OPT := CFG_BRD_CISCO433
108+
else ifeq ($(CFG_BRD),cisco_470)
109+
CFG_BRD_MSG := Cisco LoRa 470MHz gateway
110+
CFG_BRD_OPT := CFG_BRD_CISCO470
111+
else ifeq ($(CFG_BRD),cisco_780)
112+
CFG_BRD_MSG := Cisco LoRa 780MHz gateway
113+
CFG_BRD_OPT := CFG_BRD_CISCO780
95114
else
96115
$(info [Info] No specific board selected.)
97116
CFG_BRD_MSG := None

libloragw/inc/loragw_hal.h

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ Maintainer: Sylvain Miermont
5656
/* to use array parameters, declare a local const and use 'rf_chain' as index */
5757
#if (CFG_BAND_FULL == 1)
5858
#if (CFG_RADIO_1257 == 1)
59-
#define LGW_RF_RX_LOWFREQ { 862000000, 862000000} /* lower limit of the usable band in RX for each radio */
59+
#define LGW_RF_RX_LOWFREQ { 778000000, 778000000} /* lower limit of the usable band in RX for each radio */
6060
#define LGW_RF_RX_UPFREQ {1020000000,1020000000} /* upper limit of the usable band in RX for each radio */
61-
#define LGW_RF_TX_LOWFREQ { 862000000, 862000000} /* lower limit of the usable band in TX for each radio */
61+
#define LGW_RF_TX_LOWFREQ { 778000000, 778000000} /* lower limit of the usable band in TX for each radio */
6262
#define LGW_RF_TX_UPFREQ {1020000000,1020000000} /* upper limit of the usable band in TX for each radio */
6363
#elif (CFG_RADIO_1255 == 1)
6464
#define LGW_RF_RX_LOWFREQ { 400000000, 400000000}
@@ -86,6 +86,11 @@ Maintainer: Sylvain Miermont
8686
#define LGW_RF_RX_UPFREQ { 434790000, 434790000}
8787
#define LGW_RF_TX_LOWFREQ { 433050000, 433050000}
8888
#define LGW_RF_TX_UPFREQ { 434790000, 434790000}
89+
#elif (CFG_BAND_780 == 1)
90+
#define LGW_RF_RX_LOWFREQ { 779000000, 779000000}
91+
#define LGW_RF_RX_UPFREQ { 787000000, 787000000}
92+
#define LGW_RF_TX_LOWFREQ { 779000000, 779000000}
93+
#define LGW_RF_TX_UPFREQ { 787000000, 787000000}
8994
#endif
9095

9196
/* type of if_chain + modem */
@@ -136,9 +141,12 @@ Maintainer: Sylvain Miermont
136141
#if (CFG_BRD_NANO868 == 1)
137142
#define LGW_RF_TX_ENABLE { true, true} /* both radio A and B are usable in TX */
138143
#define LGW_RF_CLKOUT { true, true} /* both radios have clkout enabled */
139-
#elif ((CFG_BRD_1301REF868 == 1) || (CFG_BRD_1301REF433 == 1) || (CFG_BRD_KERLINK868 == 1))
144+
#elif ((CFG_BRD_1301REF868 == 1) || (CFG_BRD_1301REF433 == 1) || (CFG_BRD_KERLINK868 == 1) || (CFG_BRD_KERLINK433 == 1))
140145
#define LGW_RF_TX_ENABLE { true,false} /* radio B TX output is disconnected */
141146
#define LGW_RF_CLKOUT {false, true} /* radio A clkout disabled for spur optimization */
147+
#elif ((CFG_BRD_CISCO433 == 1) || (CFG_BRD_CISCO470 == 1) || (CFG_BRD_CISCO780 == 1))
148+
#define LGW_RF_TX_ENABLE { true,false} /* radio B TX output is disconnected */
149+
#define LGW_RF_CLKOUT { true, true} /* Do not know */
142150
/* === ADD CUSTOMIZATION FOR YOUR OWN BOARD HERE ===
143151
#elif (CFG_BRD_MYBOARD == 1)
144152
*/
@@ -237,11 +245,13 @@ struct lgw_conf_rxrf_s {
237245
@brief Configuration structure for an IF chain
238246
*/
239247
struct lgw_conf_rxif_s {
240-
bool enable; /*!> enable or disable that IF chain */
241-
uint8_t rf_chain; /*!> to which RF chain is that IF chain associated */
242-
int32_t freq_hz; /*!> center frequ of the IF chain, relative to RF chain frequency */
243-
uint8_t bandwidth; /*!> RX bandwidth, 0 for default */
244-
uint32_t datarate; /*!> RX datarate, 0 for default */
248+
bool enable; /*!> enable or disable that IF chain */
249+
uint8_t rf_chain; /*!> to which RF chain is that IF chain associated */
250+
int32_t freq_hz; /*!> center frequ of the IF chain, relative to RF chain frequency */
251+
uint8_t bandwidth; /*!> RX bandwidth, 0 for default */
252+
uint32_t datarate; /*!> RX datarate, 0 for default */
253+
uint8_t sync_word_size; /*!> size of FSK sync word (number of bytes, 0 for default) */
254+
uint64_t sync_word; /*!> FSK sync word (ALIGN RIGHT, eg. 0xC194C1) */
245255
};
246256

247257
/**
@@ -344,6 +354,12 @@ int lgw_send(struct lgw_pkt_tx_s pkt_data);
344354
*/
345355
int lgw_status(uint8_t select, uint8_t *code);
346356

357+
/**
358+
@brief Abort a currently scheduled or ongoing TX
359+
@return LGW_HAL_ERROR id the operation failed, LGW_HAL_SUCCESS else
360+
*/
361+
int lgw_abort_tx(void);
362+
347363
/**
348364
@brief Return value of internal counter when latest event (eg GPS pulse) was captured
349365
@param trig_cnt_us pointer to receive timestamp value

libloragw/inc/loragw_reg.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,8 +366,9 @@ this file is autogenerated from registers description
366366
#define LGW_DATA_MNGT_CPT_FRAME_ALLOCATED 322
367367
#define LGW_DATA_MNGT_CPT_FRAME_FINISHED 323
368368
#define LGW_DATA_MNGT_CPT_FRAME_READEN 324
369+
#define LGW_TX_TRIG_ALL 325
369370

370-
#define LGW_TOTALREGS 325
371+
#define LGW_TOTALREGS 326
371372

372373
/* -------------------------------------------------------------------------- */
373374
/* --- PUBLIC FUNCTIONS PROTOTYPES ------------------------------------------ */

libloragw/library.cfg

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ CFG_RADIO= sx1257
2929
# us915 FCC 915 MHz band
3030
# cn470 China 470 MHz band
3131
# eu433 ETSI 433 MHz band
32+
# cn780 China 780 MHz band
3233

3334
CFG_BAND= eu868
3435

@@ -41,6 +42,10 @@ CFG_BAND= eu868
4142
# ref_1301_868 SX1301 reference board with SX1257 radios, 868 MHz filters
4243
# ref_1301_433 SX1301 reference board with SX1255 radios, 433 MHz filters
4344
# kerlink_868 Kerlink LoRa 868MHz gateway
45+
# kerlink_433 Kerlink LoRa 433MHz gateway
46+
# cisco_433 Cisco LoRa 433MHz gateway
47+
# cisco_470 Cisco LoRa 470MHz gateway
48+
# cisco_780 Cisco LoRa 780MHz gateway
4449
# Keep empty for no calibration parameters (neutral values will be used).
4550

4651
CFG_BRD= ref_1301_868

0 commit comments

Comments
 (0)