Skip to content

Commit

Permalink
updated lora modem to disable channels during join
Browse files Browse the repository at this point in the history
  • Loading branch information
antonisgotsis committed May 12, 2023
1 parent be1dd80 commit 1752fa0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions insighioNode/lib/networking/modem/modem_rak4270.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 1752fa0

Please sign in to comment.