diff --git a/insighioNode/lib/networking/modem/modem_rak4270.py b/insighioNode/lib/networking/modem/modem_rak4270.py index 72ee396..d15ea7d 100644 --- a/insighioNode/lib/networking/modem/modem_rak4270.py +++ b/insighioNode/lib/networking/modem/modem_rak4270.py @@ -27,6 +27,7 @@ def power_off(self): logging.debug("modem powered off") def is_connected(self): + status = self.send_at_cmd('at+get_config=lora:channel') (status, lines) = self.send_at_cmd('at+get_config=lora:status') line_regex = r'Joined Network\s*:\s*(\w+)' for line in lines: @@ -58,6 +59,12 @@ def set_dr(self, dr): return status def join(self): + self.send_at_cmd('at+set_config=lora:ch_mask:8:0') + self.send_at_cmd('at+set_config=lora:ch_mask:9:0') + self.send_at_cmd('at+set_config=lora:ch_mask:10:0') + self.send_at_cmd('at+set_config=lora:ch_mask:11:0') + self.send_at_cmd('at+set_config=lora:ch_mask:12:0') + (status, lines) = self.send_at_cmd('at+join') return status