From 1ac72383472d29578b4770e23cb106e11c1fdba7 Mon Sep 17 00:00:00 2001 From: Mark Qvist Date: Fri, 10 Jun 2022 17:05:00 +0200 Subject: [PATCH] Cleanup --- README.md | 28 ++++++++++++++-------------- RNS/Interfaces/AutoInterface.py | 2 ++ RNS/Interfaces/I2PInterface.py | 3 ++- 3 files changed, 18 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 5f1fbf7..3217c87 100755 --- a/README.md +++ b/README.md @@ -113,32 +113,32 @@ Reticulum should currently be considered beta software. All core protocol featur ## Development Roadmap - Version 0.3.8 - - Improving [the manual](https://markqvist.github.io/Reticulum/manual/) with sections specifically for beginners + - A portable cryptography core, supporting multiple backends - Utilities for managing identities, signing and encryption - - Support for radio and modem interfaces on Android - - User friendly interface configuration tool - - Easy way to share interface configurations, see [#19](https://github.com/markqvist/Reticulum/discussions/19) - More interface types for even broader compatibility - Plain ESP32 devices (ESP-Now, WiFi, Bluetooth, etc.) - More LoRa transceivers - - AT-compatible modems - IR Transceivers - - AWDL / OWL - - HF Modems - - CAN-bus - - ZeroMQ - - MQTT - - IrDA / IrPHY - - SPI - - i²c - Version 0.3.9 - - A portable cryptography core, supporting multiple backends + - Improving [the manual](https://markqvist.github.io/Reticulum/manual/) with sections specifically for beginners + - Support for radio and modem interfaces on Android + - User friendly interface configuration tool - Performance optimisations - Memory optimisations - Planned, but not yet scheduled - Globally routable multicast - Bindings for other programming languages - A portable Reticulum implementation in C, see [#21](https://github.com/markqvist/Reticulum/discussions/21) + - Easy way to share interface configurations, see [#19](https://github.com/markqvist/Reticulum/discussions/19) + - More interface types + - AT-compatible modems + - AWDL / OWL + - HF Modems + - CAN-bus + - ZeroMQ + - MQTT + - SPI + - i²c diff --git a/RNS/Interfaces/AutoInterface.py b/RNS/Interfaces/AutoInterface.py index 96d54e3..a0a5b14 100644 --- a/RNS/Interfaces/AutoInterface.py +++ b/RNS/Interfaces/AutoInterface.py @@ -296,6 +296,7 @@ class AutoInterface(Interface): announce_socket.setsockopt(socket.IPPROTO_IPV6, socket.IPV6_MULTICAST_IF, ifis) announce_socket.sendto(discovery_token, addr_info[0][4]) announce_socket.close() + except Exception as e: if (ifname in self.timed_out_interfaces and self.timed_out_interfaces[ifname] == False) or not ifname in self.timed_out_interfaces: RNS.log(str(self)+" Detected possible carrier loss on "+str(ifname)+": "+str(e), RNS.LOG_WARNING) @@ -337,6 +338,7 @@ class AutoInterface(Interface): peer_addr = str(peer)+"%"+str(self.peers[peer][0]) addr_info = socket.getaddrinfo(peer_addr, self.data_port, socket.AF_INET6, socket.SOCK_DGRAM) self.outbound_udp_socket.sendto(data, addr_info[0][4]) + except Exception as e: RNS.log("Could not transmit on "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR) diff --git a/RNS/Interfaces/I2PInterface.py b/RNS/Interfaces/I2PInterface.py index 11300a9..79ac8f9 100644 --- a/RNS/Interfaces/I2PInterface.py +++ b/RNS/Interfaces/I2PInterface.py @@ -525,7 +525,7 @@ class I2PInterfacePeer(Interface): def processOutgoing(self, data): if self.online: while self.writing: - time.sleep(0.01) + time.sleep(0.001) try: self.writing = True @@ -538,6 +538,7 @@ class I2PInterfacePeer(Interface): self.socket.sendall(data) self.writing = False self.txb += len(data) + if hasattr(self, "parent_interface") and self.parent_interface != None and self.parent_count: self.parent_interface.txb += len(data)