summaryrefslogtreecommitdiff
path: root/recipes-connectivity
diff options
context:
space:
mode:
authorJason Reiss <jreiss@multitech.com>2019-07-09 10:24:28 -0500
committerJohn Klug <john.klug@multitech.com>2019-11-11 11:33:18 -0600
commite4a4782ec31990224bd94d0616393fb13cfe71bc (patch)
tree97e26026599467c6a2e6cdb06f5d846f6301d29e /recipes-connectivity
parent841e5ff8666789ab6b07b365be4a2fa0ecf50add (diff)
downloadmeta-mlinux-e4a4782ec31990224bd94d0616393fb13cfe71bc.tar.gz
meta-mlinux-e4a4782ec31990224bd94d0616393fb13cfe71bc.tar.bz2
meta-mlinux-e4a4782ec31990224bd94d0616393fb13cfe71bc.zip
lora: update duty-cycle patch
Diffstat (limited to 'recipes-connectivity')
-rw-r--r--recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-duty-cycle.patch16
1 files changed, 13 insertions, 3 deletions
diff --git a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-duty-cycle.patch b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-duty-cycle.patch
index ee9ecf4..b1790e7 100644
--- a/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-duty-cycle.patch
+++ b/recipes-connectivity/lora/lora-packet-forwarder/lora-packet-forwarder-duty-cycle.patch
@@ -2,7 +2,7 @@ diff --git a/lora_pkt_fwd/src/lora_pkt_fwd.c b/lora_pkt_fwd/src/lora_pkt_fwd.c
index 801f28d..7b63b8f 100644
--- a/lora_pkt_fwd/src/lora_pkt_fwd.c
+++ b/lora_pkt_fwd/src/lora_pkt_fwd.c
-@@ -134,7 +134,13 @@ static char serv_port_up[8] = STR(DEFAULT_PORT_UP); /* server port for upstream traffic */
+@@ -134,6 +134,12 @@ static char serv_port_up[8] = STR(DEFAULT_PORT_UP); /* server port for upstream traffic */
static char serv_port_down[8] = STR(DEFAULT_PORT_DW); /* server port for downstream traffic */
static int keepalive_time = DEFAULT_KEEPALIVE; /* send a PULL_DATA request every X seconds, negative = disabled */
@@ -45,9 +45,19 @@ index 801f28d..7b63b8f 100644
+
/* packet filtering parameters */
- val = json_object_get_value(conf_obj, "forward_crc_valid");
+ val = json_object_get_value(conf_obj, "best_packet_filter");
if (json_value_get_type(val) == JSONBoolean) {
- fwd_valid_pkt = (bool)json_value_get_boolean(val);
+ fwd_best_pkt = (bool)json_value_get_boolean(val);
+@@ -1349,6 +1406,8 @@ int main(void)
+ printf("# PUSH_DATA datagrams sent: %u (%u bytes)\n", cp_up_dgram_sent, cp_up_network_byte);
+ printf("# PUSH_DATA acknowledged: %.2f%%\n", 100.0 * up_ack_ratio);
+ printf("### [DOWNSTREAM] ###\n");
++ if (duty_cycle_enabled)
++ printf("# TIME ON AIR available: %u ms\n", duty_cycle_time_avail);
+ printf("# PULL_DATA sent: %u (%.2f%% acknowledged)\n", cp_dw_pull_sent, 100.0 * dw_ack_ratio);
+ printf("# PULL_RESP(onse) datagrams received: %u (%u bytes)\n", cp_dw_dgram_rcv, cp_dw_network_byte);
+ printf("# RF packets sent to concentrator: %u (%u bytes)\n", (cp_nb_tx_ok+cp_nb_tx_fail), cp_dw_payload_byte);
+
@@ -2833,6 +2921,25 @@ void thread_valid(void) {
while (!exit_sig && !quit_sig) {
wait_ms(1000);