Skip to content

Commit 28df8c0

Browse files
committed
v2.2.1
* util_tx_test: added FSK support and specific payload for easier PER testing. * base64: fixed padding check. * Updated all makefiles to handle the creation of obj directory when necessary. * [gps/beacon]_pkt_fwd: fixed crash on exit when GPS not enabled. * [*]_pkt_fwd: added a cfg/ directory containing different flavours or the global_conf.json file for different boards: Ref Design PCB_E336 (GW1.5-27dBm), Ref Design PCB_E286 (GW1.0), Ref Design with US902 frequency plan.
1 parent a274df4 commit 28df8c0

35 files changed

+2207
-427
lines changed

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.2.0
1+
2.2.1

basic_pkt_fwd/Makefile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ LGW_PATH ?= ../../lora_gateway/libloragw
88
ARCH ?=
99
CROSS_COMPILE ?=
1010

11+
OBJDIR = obj
12+
INCLUDES = $(wildcard inc/*.h)
13+
1114
### External constant definitions
1215
# must get library build option to know if mpsse must be linked or not
1316

@@ -41,23 +44,23 @@ LIBS := -lloragw -lrt -lpthread
4144
all: $(APP_NAME)
4245

4346
clean:
44-
rm -f obj/*.o
47+
rm -f $(OBJDIR)/*.o
4548
rm -f $(APP_NAME)
4649

4750
### Sub-modules compilation
4851

49-
obj/base64.o: src/base64.c inc/base64.h
50-
$(CC) -c $(CFLAGS) $< -o $@
52+
$(OBJDIR):
53+
mkdir -p $(OBJDIR)
5154

52-
obj/parson.o: src/parson.c inc/parson.h
55+
$(OBJDIR)/%.o: src/%.c $(INCLUDES) | $(OBJDIR)
5356
$(CC) -c $(CFLAGS) $< -o $@
5457

5558
### Main program compilation and assembly
5659

57-
obj/$(APP_NAME).o: src/$(APP_NAME).c $(LGW_INC) inc/parson.h inc/base64.h
60+
$(OBJDIR)/$(APP_NAME).o: src/$(APP_NAME).c $(LGW_INC) $(INCLUDES) | $(OBJDIR)
5861
$(CC) -c $(CFLAGS) $(VFLAG) -I$(LGW_PATH)/inc $< -o $@
5962

60-
$(APP_NAME): obj/$(APP_NAME).o $(LGW_PATH)/libloragw.a obj/parson.o obj/base64.o
61-
$(CC) -L$(LGW_PATH) $< obj/parson.o obj/base64.o -o $@ $(LIBS)
63+
$(APP_NAME): $(OBJDIR)/$(APP_NAME).o $(LGW_PATH)/libloragw.a $(OBJDIR)/parson.o $(OBJDIR)/base64.o
64+
$(CC) -L$(LGW_PATH) $< $(OBJDIR)/parson.o $(OBJDIR)/base64.o -o $@ $(LIBS)
6265

6366
### EOF
Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
{
2+
"SX1301_conf": {
3+
"lorawan_public": true,
4+
"clksrc": 1, /* radio_1 provides clock to concentrator */
5+
"radio_0": {
6+
"enable": true,
7+
"type": "SX1257",
8+
"freq": 867500000,
9+
"rssi_offset": -166.0,
10+
"tx_enable": true
11+
},
12+
"radio_1": {
13+
"enable": true,
14+
"type": "SX1257",
15+
"freq": 868500000,
16+
"rssi_offset": -166.0,
17+
"tx_enable": false
18+
},
19+
"chan_multiSF_0": {
20+
/* Lora MAC channel, 125kHz, all SF, 868.1 MHz */
21+
"enable": true,
22+
"radio": 1,
23+
"if": -400000
24+
},
25+
"chan_multiSF_1": {
26+
/* Lora MAC channel, 125kHz, all SF, 868.3 MHz */
27+
"enable": true,
28+
"radio": 1,
29+
"if": -200000
30+
},
31+
"chan_multiSF_2": {
32+
/* Lora MAC channel, 125kHz, all SF, 868.5 MHz */
33+
"enable": true,
34+
"radio": 1,
35+
"if": 0
36+
},
37+
"chan_multiSF_3": {
38+
/* Lora MAC channel, 125kHz, all SF, 867.1 MHz */
39+
"enable": true,
40+
"radio": 0,
41+
"if": -400000
42+
},
43+
"chan_multiSF_4": {
44+
/* Lora MAC channel, 125kHz, all SF, 867.3 MHz */
45+
"enable": true,
46+
"radio": 0,
47+
"if": -200000
48+
},
49+
"chan_multiSF_5": {
50+
/* Lora MAC channel, 125kHz, all SF, 867.5 MHz */
51+
"enable": true,
52+
"radio": 0,
53+
"if": 0
54+
},
55+
"chan_multiSF_6": {
56+
/* Lora MAC channel, 125kHz, all SF, 867.7 MHz */
57+
"enable": true,
58+
"radio": 0,
59+
"if": 200000
60+
},
61+
"chan_multiSF_7": {
62+
/* Lora MAC channel, 125kHz, all SF, 867.9 MHz */
63+
"enable": true,
64+
"radio": 0,
65+
"if": 400000
66+
},
67+
"chan_Lora_std": {
68+
/* Lora MAC channel, 250kHz, SF7, 868.3 MHz */
69+
"enable": true,
70+
"radio": 1,
71+
"if": -200000,
72+
"bandwidth": 250000,
73+
"spread_factor": 7
74+
},
75+
"chan_FSK": {
76+
/* FSK 50kbps channel, 868.8 MHz */
77+
"enable": true,
78+
"radio": 1,
79+
"if": 300000,
80+
"bandwidth": 125000,
81+
"datarate": 50000
82+
},
83+
"tx_lut_0": {
84+
/* TX gain table, index 0 */
85+
"pa_gain": 0,
86+
"mix_gain": 8,
87+
"rf_power": -6,
88+
"dig_gain": 0
89+
},
90+
"tx_lut_1": {
91+
/* TX gain table, index 1 */
92+
"pa_gain": 0,
93+
"mix_gain": 10,
94+
"rf_power": -3,
95+
"dig_gain": 0
96+
},
97+
"tx_lut_2": {
98+
/* TX gain table, index 2 */
99+
"pa_gain": 0,
100+
"mix_gain": 12,
101+
"rf_power": 0,
102+
"dig_gain": 0
103+
},
104+
"tx_lut_3": {
105+
/* TX gain table, index 3 */
106+
"pa_gain": 1,
107+
"mix_gain": 8,
108+
"rf_power": 3,
109+
"dig_gain": 0
110+
},
111+
"tx_lut_4": {
112+
/* TX gain table, index 4 */
113+
"pa_gain": 1,
114+
"mix_gain": 10,
115+
"rf_power": 6,
116+
"dig_gain": 0
117+
},
118+
"tx_lut_5": {
119+
/* TX gain table, index 5 */
120+
"pa_gain": 1,
121+
"mix_gain": 12,
122+
"rf_power": 10,
123+
"dig_gain": 0
124+
},
125+
"tx_lut_6": {
126+
/* TX gain table, index 6 */
127+
"pa_gain": 1,
128+
"mix_gain": 13,
129+
"rf_power": 11,
130+
"dig_gain": 0
131+
},
132+
"tx_lut_7": {
133+
/* TX gain table, index 7 */
134+
"pa_gain": 2,
135+
"mix_gain": 9,
136+
"rf_power": 12,
137+
"dig_gain": 0
138+
},
139+
"tx_lut_8": {
140+
/* TX gain table, index 8 */
141+
"pa_gain": 1,
142+
"mix_gain": 15,
143+
"rf_power": 13,
144+
"dig_gain": 0
145+
},
146+
"tx_lut_9": {
147+
/* TX gain table, index 9 */
148+
"pa_gain": 2,
149+
"mix_gain": 10,
150+
"rf_power": 14,
151+
"dig_gain": 0
152+
},
153+
"tx_lut_10": {
154+
/* TX gain table, index 10 */
155+
"pa_gain": 2,
156+
"mix_gain": 11,
157+
"rf_power": 16,
158+
"dig_gain": 0
159+
},
160+
"tx_lut_11": {
161+
/* TX gain table, index 11 */
162+
"pa_gain": 3,
163+
"mix_gain": 9,
164+
"rf_power": 20,
165+
"dig_gain": 0
166+
},
167+
"tx_lut_12": {
168+
/* TX gain table, index 12 */
169+
"pa_gain": 3,
170+
"mix_gain": 10,
171+
"rf_power": 23,
172+
"dig_gain": 0
173+
},
174+
"tx_lut_13": {
175+
/* TX gain table, index 13 */
176+
"pa_gain": 3,
177+
"mix_gain": 11,
178+
"rf_power": 25,
179+
"dig_gain": 0
180+
},
181+
"tx_lut_14": {
182+
/* TX gain table, index 14 */
183+
"pa_gain": 3,
184+
"mix_gain": 12,
185+
"rf_power": 26,
186+
"dig_gain": 0
187+
},
188+
"tx_lut_15": {
189+
/* TX gain table, index 15 */
190+
"pa_gain": 3,
191+
"mix_gain": 14,
192+
"rf_power": 27,
193+
"dig_gain": 0
194+
}
195+
},
196+
197+
"gateway_conf": {
198+
"gateway_ID": "AA555A0000000000",
199+
/* change with default server address/ports, or overwrite in local_conf.json */
200+
"server_address": "localhost",
201+
"serv_port_up": 1680,
202+
"serv_port_down": 1680,
203+
/* adjust the following parameters for your network */
204+
"keepalive_interval": 10,
205+
"stat_interval": 30,
206+
"push_timeout_ms": 100,
207+
/* forward only valid packets */
208+
"forward_crc_valid": true,
209+
"forward_crc_error": false,
210+
"forward_crc_disabled": false
211+
}
212+
}

0 commit comments

Comments
 (0)