Compare commits

..

3 Commits

Author SHA1 Message Date
markqvist
b381a61be8
Update Changelog.md 2023-02-18 23:35:41 +01:00
Mark Qvist
1e2fa2068c Updated manual 2023-02-18 16:53:18 +01:00
Mark Qvist
c604214bb9 Improved RNode reconnection when serial device disappears 2023-02-18 13:31:22 +01:00
3 changed files with 65 additions and 10 deletions

View File

@ -1,3 +1,39 @@
### 2023-02-17: RNS β 0.4.9
This maintenance release contains a number of bugfixes and minor improvements, along with a few additions to the API.
**Changes**
- Added JSON output mode to rnstatus
- Added Link ID to response_generator callback
- Added Link establishment rate calculation
- Added get_establishment_rate call to Link API
- Fixed a number of typos in programs and documentation
- Fixed some broken links in documentation
**Release Hashes**
```
b44eaed796dcd194bec7a541aaeeb1685b07b2ffce068ca268841e6a8661717f rns-0.4.9-py3-none-any.whl
a15f965a27d208493485724486eb6bc6268d699f2a22ae4fb816bb9b979330fc rnspure-0.4.9-py3-none-any.whl
```
### 2023-02-04: RNS β 0.4.8
This release introduces the useful `rnid` utility, which makes it possible to use Reticulum Identities for offline file encryption, decryption, signing and validation. The IFAC system has also been significantly improved, and several outdated parts of the documentation was updated and fixed. Thanks to @Erethon and @jooray who contributed to this release!
**Changes**
- Added header and payload masking to the IFAC system
- Added `rnid` utility for encrypting, decrypting, signing and validating with Reticulum Identities
- Added Bluetooth pairing PIN output to `rnodeconf` utility
- Fixed a bug in announce callback handling
- Fixed a inconsistency in header flag handling since IFACs were introduced
- Updated documentation and manual
**Release Hashes**
```
fbbd55ee43a68c18491f5deabed51085c46fadca7e1bda823ad455c2f7c95a51 rns-0.4.8-py3-none-any.whl
335b0d5dd1d2aacd0d8810191aa09567ecf5d3aa990c446f3e3b1bbf7fce1387 rnspure-0.4.8-py3-none-any.whl
```
### 2023-01-14: RNS β 0.4.7 ### 2023-01-14: RNS β 0.4.7
This maintenance release adds support for using the `rnodeconf` utility to replicate RNode devices, and bootstrap device creation using only tools and software packages obtained from an RNode Bootstrap Console. This maintenance release adds support for using the `rnodeconf` utility to replicate RNode devices, and bootstrap device creation using only tools and software packages obtained from an RNode Bootstrap Console.
@ -662,4 +698,4 @@ This was the first publicly available pre-release alpha of Reticulum.
### 2016-05-29: Inintial Repository Commit ### 2016-05-29: Inintial Repository Commit
The first commit to the Reticulum reference implementation was 9a9630cfd29e11ace3f12716ddb4dff0e5419b4b, which occurred on Sunday, the 22nd of May 2016. The first commit to the Reticulum reference implementation was 9a9630cfd29e11ace3f12716ddb4dff0e5419b4b, which occurred on Sunday, the 22nd of May 2016.

View File

@ -125,6 +125,8 @@ class RNodeInterface(Interface):
self.stopbits = 1 self.stopbits = 1
self.timeout = 100 self.timeout = 100
self.online = False self.online = False
self.detached = False
self.reconnecting= False
self.frequency = frequency self.frequency = frequency
self.bandwidth = bandwidth self.bandwidth = bandwidth
@ -210,9 +212,10 @@ class RNodeInterface(Interface):
RNS.log("Could not open serial port for interface "+str(self), RNS.LOG_ERROR) RNS.log("Could not open serial port for interface "+str(self), RNS.LOG_ERROR)
RNS.log("The contained exception was: "+str(e), RNS.LOG_ERROR) RNS.log("The contained exception was: "+str(e), RNS.LOG_ERROR)
RNS.log("Reticulum will attempt to bring up this interface periodically", RNS.LOG_ERROR) RNS.log("Reticulum will attempt to bring up this interface periodically", RNS.LOG_ERROR)
thread = threading.Thread(target=self.reconnect_port) if not self.detached and not self.reconnecting:
thread.daemon = True thread = threading.Thread(target=self.reconnect_port)
thread.start() thread.daemon = True
thread.start()
def open_port(self): def open_port(self):
@ -233,7 +236,15 @@ class RNodeInterface(Interface):
def configure_device(self): def configure_device(self):
self.r_frequency = None
self.r_bandwidth = None
self.r_txpower = None
self.r_sf = None
self.r_cr = None
self.r_state = None
self.r_lock = None
sleep(2.0) sleep(2.0)
thread = threading.Thread(target=self.readLoop) thread = threading.Thread(target=self.readLoop)
thread.daemon = True thread.daemon = True
thread.start() thread.start()
@ -242,7 +253,8 @@ class RNodeInterface(Interface):
sleep(0.2) sleep(0.2)
if not self.detected: if not self.detected:
raise IOError("Could not detect device") RNS.log("Could not detect device for "+str(self), RNS.LOG_ERROR)
self.serial.close()
else: else:
if self.platform == KISS.PLATFORM_ESP32: if self.platform == KISS.PLATFORM_ESP32:
self.display = True self.display = True
@ -260,7 +272,6 @@ class RNodeInterface(Interface):
RNS.log("Make sure that your hardware actually supports the parameters specified in the configuration", RNS.LOG_ERROR) RNS.log("Make sure that your hardware actually supports the parameters specified in the configuration", RNS.LOG_ERROR)
RNS.log("Aborting RNode startup", RNS.LOG_ERROR) RNS.log("Aborting RNode startup", RNS.LOG_ERROR)
self.serial.close() self.serial.close()
raise IOError("RNode interface did not pass configuration validation")
def initRadio(self): def initRadio(self):
@ -395,7 +406,7 @@ class RNodeInterface(Interface):
def validateRadioState(self): def validateRadioState(self):
RNS.log("Wating for radio configuration validation for "+str(self)+"...", RNS.LOG_VERBOSE) RNS.log("Waiting for radio configuration validation for "+str(self)+"...", RNS.LOG_VERBOSE)
sleep(0.25); sleep(0.25);
self.validcfg = True self.validcfg = True
@ -668,11 +679,17 @@ class RNodeInterface(Interface):
RNS.log("Reticulum will attempt to reconnect the interface periodically.", RNS.LOG_ERROR) RNS.log("Reticulum will attempt to reconnect the interface periodically.", RNS.LOG_ERROR)
self.online = False self.online = False
self.serial.close() try:
self.reconnect_port() self.serial.close()
except Exception as e:
pass
if not self.detached and not self.reconnecting:
self.reconnect_port()
def reconnect_port(self): def reconnect_port(self):
while not self.online: self.reconnecting = True
while not self.online and not self.detached:
try: try:
time.sleep(5) time.sleep(5)
RNS.log("Attempting to reconnect serial port "+str(self.port)+" for "+str(self)+"...", RNS.LOG_VERBOSE) RNS.log("Attempting to reconnect serial port "+str(self.port)+" for "+str(self)+"...", RNS.LOG_VERBOSE)
@ -682,10 +699,12 @@ class RNodeInterface(Interface):
except Exception as e: except Exception as e:
RNS.log("Error while reconnecting port, the contained exception was: "+str(e), RNS.LOG_ERROR) RNS.log("Error while reconnecting port, the contained exception was: "+str(e), RNS.LOG_ERROR)
self.reconnecting = False
if self.online: if self.online:
RNS.log("Reconnected serial port for "+str(self)) RNS.log("Reconnected serial port for "+str(self))
def detach(self): def detach(self):
self.detached = True
self.disable_external_framebuffer() self.disable_external_framebuffer()
self.setRadioState(KISS.RADIO_STATE_OFF) self.setRadioState(KISS.RADIO_STATE_OFF)
self.leave() self.leave()

Binary file not shown.