Skip to content

Commit a274df4

Browse files
committed
v2.2.0
* Removed FTDI support in makefiles to align with HAL v3.2.0. * Force IPv4 mode usage on UDP socket, instead of auto. The auto mode was causing an issue to properly resolve LoRa server hostname given in JSON configuration file (MariaDB issue: https://mariadb.atlassian.net/browse/MDEV-4356, https://mariadb.atlassian.net/browse/MDEV-4379).
1 parent 3e2bfb6 commit a274df4

File tree

11 files changed

+42
-60
lines changed

11 files changed

+42
-60
lines changed

VERSION

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

basic_pkt_fwd/Makefile

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,7 @@ LGW_INC += $(LGW_PATH)/inc/loragw_hal.h
3434

3535
### Linking options
3636

37-
ifeq ($(CFG_SPI),native)
38-
LIBS := -lloragw -lrt -lpthread
39-
else ifeq ($(CFG_SPI),ftdi)
40-
LIBS := -lloragw -lrt -lpthread -lmpsse
41-
else
42-
# keep compatibility with SX1301 HAL version 1.2.x and bellow
43-
ifeq ($(LGW_PHY),native)
44-
LIBS := -lloragw -lrt -lpthread
45-
else ifeq ($(LGW_PHY),ftdi)
46-
LIBS := -lloragw -lrt -lpthread -lmpsse
47-
else
48-
$(error [error] Can't find configuration for SPI phy)
49-
endif
50-
endif
37+
LIBS := -lloragw -lrt -lpthread
5138

5239
### General build targets
5340

basic_pkt_fwd/global_conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
"gateway_conf": {
198198
"gateway_ID": "AA555A0000000000",
199199
/* change with default server address/ports, or overwrite in local_conf.json */
200-
"server_address": "127.0.0.1",
200+
"server_address": "localhost",
201201
"serv_port_up": 1680,
202202
"serv_port_down": 1680,
203203
/* adjust the following parameters for your network */

basic_pkt_fwd/src/basic_pkt_fwd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ int main(void)
662662

663663
/* prepare hints to open network sockets */
664664
memset(&hints, 0, sizeof hints);
665-
hints.ai_family = AF_UNSPEC; /* should handle IP v4 or v6 automatically */
665+
hints.ai_family = AF_INET; /* WA: Forcing IPv4 as AF_UNSPEC makes connection on localhost to fail */
666666
hints.ai_socktype = SOCK_DGRAM;
667667

668668
/* look for server address w/ upstream port */

beacon_pkt_fwd/Makefile

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,7 @@ LGW_INC += $(LGW_PATH)/inc/loragw_gps.h
3535

3636
### Linking options
3737

38-
ifeq ($(CFG_SPI),native)
39-
LIBS := -lloragw -lrt -lpthread
40-
else ifeq ($(CFG_SPI),ftdi)
41-
LIBS := -lloragw -lrt -lpthread -lmpsse
42-
else
43-
# keep compatibility with SX1301 HAL version 1.2.x and bellow
44-
ifeq ($(LGW_PHY),native)
45-
LIBS := -lloragw -lrt -lpthread
46-
else ifeq ($(LGW_PHY),ftdi)
47-
LIBS := -lloragw -lrt -lpthread -lmpsse
48-
else
49-
$(error [error] Can't find configuration for SPI phy)
50-
endif
51-
endif
38+
LIBS := -lloragw -lrt -lpthread
5239

5340
### General build targets
5441

beacon_pkt_fwd/global_conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
"gateway_conf": {
198198
"gateway_ID": "AA555A0000000000",
199199
/* change with default server address/ports, or overwrite in local_conf.json */
200-
"server_address": "127.0.0.1",
200+
"server_address": "localhost",
201201
"serv_port_up": 1680,
202202
"serv_port_down": 1680,
203203
/* adjust the following parameters for your network */

beacon_pkt_fwd/src/beacon_pkt_fwd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -830,7 +830,7 @@ int main(void)
830830

831831
/* prepare hints to open network sockets */
832832
memset(&hints, 0, sizeof hints);
833-
hints.ai_family = AF_UNSPEC; /* should handle IP v4 or v6 automatically */
833+
hints.ai_family = AF_INET; /* WA: Forcing IPv4 as AF_UNSPEC makes connection on localhost to fail */
834834
hints.ai_socktype = SOCK_DGRAM;
835835

836836
/* look for server address w/ upstream port */

gps_pkt_fwd/Makefile

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,7 @@ LGW_INC += $(LGW_PATH)/inc/loragw_gps.h
3535

3636
### Linking options
3737

38-
ifeq ($(CFG_SPI),native)
39-
LIBS := -lloragw -lrt -lpthread
40-
else ifeq ($(CFG_SPI),ftdi)
41-
LIBS := -lloragw -lrt -lpthread -lmpsse
42-
else
43-
# keep compatibility with SX1301 HAL version 1.2.x and bellow
44-
ifeq ($(LGW_PHY),native)
45-
LIBS := -lloragw -lrt -lpthread
46-
else ifeq ($(LGW_PHY),ftdi)
47-
LIBS := -lloragw -lrt -lpthread -lmpsse
48-
else
49-
$(error [error] Can't find configuration for SPI phy)
50-
endif
51-
endif
38+
LIBS := -lloragw -lrt -lpthread
5239

5340
### General build targets
5441

gps_pkt_fwd/global_conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@
197197
"gateway_conf": {
198198
"gateway_ID": "AA555A0000000000",
199199
/* change with default server address/ports, or overwrite in local_conf.json */
200-
"server_address": "127.0.0.1",
200+
"server_address": "localhost",
201201
"serv_port_up": 1680,
202202
"serv_port_down": 1680,
203203
/* adjust the following parameters for your network */

gps_pkt_fwd/src/gps_pkt_fwd.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -751,7 +751,7 @@ int main(void)
751751

752752
/* prepare hints to open network sockets */
753753
memset(&hints, 0, sizeof hints);
754-
hints.ai_family = AF_UNSPEC; /* should handle IP v4 or v6 automatically */
754+
hints.ai_family = AF_INET; /* WA: Forcing IPv4 as AF_UNSPEC makes connection on localhost to fail */
755755
hints.ai_socktype = SOCK_DGRAM;
756756

757757
/* look for server address w/ upstream port */
@@ -786,6 +786,7 @@ int main(void)
786786
}
787787
freeaddrinfo(result);
788788

789+
789790
/* look for server address w/ downstream port */
790791
i = getaddrinfo(serv_addr, serv_port_down, &hints, &result);
791792
if (i != 0) {

readme.md

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -77,25 +77,45 @@ through the gateway-to-server downlink route.
7777

7878
### 4.1. reset_pkt_fwd.sh
7979

80-
This script is to be used on IoT Start Kit platform to reset concentrator chip through GPIO.
81-
It also allows automatic update of Gateway_ID with unique MAC address, in Packet Forwarder JSON
82-
configuration file.
80+
This script is to be used on IoT Start Kit platform to reset concentrator chip
81+
through GPIO.
82+
It also allows automatic update of Gateway_ID with unique MAC address, in
83+
packet forwarder JSON configuration file.
8384
Please refer to the script header for more details.
8485

8586
5. Changelog
8687
-------------
8788

89+
### v2.2.0 - 2015-10-08 ###
90+
91+
* Removed FTDI support in makefiles to align with HAL v3.2.0.
92+
* Force IPv4 mode usage on UDP socket, instead of auto. The auto mode was
93+
causing an issue to properly resolve LoRa server hostname given in JSON
94+
configuration file (MariaDB issue: https://mariadb.atlassian.net/browse/MDEV-4356,
95+
https://mariadb.atlassian.net/browse/MDEV-4379).
96+
8897
### v2.1.0 - 2015-06-29 ###
8998

90-
* Added helper script for concentrator reset through GPIO, needed on IoT Starter Kit (reset_pkt_fwd.sh).
91-
* The same reset_pkt_fwd.sh script also allows to automatically update the Gateway_ID field in JSON configuration file, with board MAC address.
92-
* Updated JSON configuration file with proper default value for IoT Starter Kit: server address set to local server, GPS device path set to proper value (/dev/ttyAMA0).
99+
* Added helper script for concentrator reset through GPIO, needed on IoT
100+
Starter Kit (reset_pkt_fwd.sh).
101+
* The same reset_pkt_fwd.sh script also allows to automatically update the
102+
Gateway_ID field in JSON configuration file, with board MAC address.
103+
* Updated JSON configuration file with proper default value for IoT Starter
104+
Kit: server address set to local server, GPS device path set to proper value
105+
(/dev/ttyAMA0).
93106

94107
### v2.0.0 - 2015-04-30 ###
95108

96-
* Changed: Several configuration parameters are now set dynamically from the JSON configuration file: RSSI offset, concentrator clock source, radio type, TX gain table, network type. The HAL does not need to be recompiled any more to update those parameters. An example for IoT Starter Kit platform is provided in global_conf.json for basic, gps and beacon packet_forwarder.
97-
* Removed: Band frequency JSON configuration file has been removed. An example for EU 868MHz is provided in global_conf.json for basic, gps and beacon packet_forwarder.
98-
* Changed: Updated makefiles to allow cross compilation from environment variable (ARCH, CROSS_COMPILE).
109+
* Changed: Several configuration parameters are now set dynamically from the
110+
JSON configuration file: RSSI offset, concentrator clock source, radio type,
111+
TX gain table, network type. The HAL does not need to be recompiled any more to
112+
update those parameters. An example for IoT Starter Kit platform is provided in
113+
global_conf.json for basic, gps and beacon packet_forwarder.
114+
* Removed: Band frequency JSON configuration file has been removed. An example
115+
for EU 868MHz is provided in global_conf.json for basic, gps and beacon packet
116+
forwarder.
117+
* Changed: Updated makefiles to allow cross compilation from environment
118+
variable (ARCH, CROSS_COMPILE).
99119

100120
** WARNING: **
101121
** Update your JSON configuration file with new dynamic parameters. **
@@ -140,10 +160,10 @@ specification updated accordingly (report include gateway geolocation).
140160
### v1.1.0 - 2013-12-09 ###
141161

142162
* Feature: added packet filtering parameters to the JSON configuration files.
143-
* Bugfix: won't send a datagram if all the packets returned by the receive()
163+
* Bugfix: will not send a datagram if all the packets returned by the receive()
144164
function have been filtered out.
145165
* Bugfix: removed leading zeros for the timestamp in the upstream JSON because
146-
it's not compliant with JSON standard (might be interpreted as octal number).
166+
it is not compliant with JSON standard (might be interpreted as octal number).
147167
* Removed TXT extension for README files for better Github integration.
148168
* Cleaned-up documentation, moving change log to top README.
149169
* Modified Makefiles to ease cross-compilation.

0 commit comments

Comments
 (0)