mirror of
https://github.com/ratspeak/microReticulum
synced 2026-11-22 23:10:38 +00:00
3af51116063cea77db95cbf5e04e9e1e4fdfdca9
Changed a few key logs to use printf-style instead of string concatenation to avoid dynamic memory allocation. Still need to move all remaining logging over to printf-style. Added option (-DRNS_USE_ALLOCATOR=1) to override new/delete operators for both allocation metrics and the ability to implement an alternate memory allocator. Added option (-DRNS_USE_TLSF=1) to use the alternate TLSF allocator (must also define RNS_USE_ALLOCATOR). This allocator is well known for reducing fragmentation and providing constant, O(1)-time allocation and deallocation for real-time embedded systems. This TLSF allocator appears to already be the default allocator for ESP32 boards, but the allocator used by NRF52 is unknown at this time so the TLSF allocator internal to microReticulum is only being used for NRF52 boards at this time. Future memory management improvements will include custom allocators for long-lived structures like the path table that will segregate them from the general pool of memory that is constantly cycling, thereby further reducing fragmentation. It will also allow these structures to use alternate memory like PSRAM present on T-Beam boards.
microReticulum
Port of Reticulum Network Stack to C++ specifically but not exclusively targeting 32-bit and better MCUs.
Dependencies
Build environment is configured for use in VSCode and PlatformIO.
This API is dependent on the following external libraries:
Building
Building and uploading to hardware is simple through the VSCode PlatformIO IDE
- Install VSCode and PlatformIO
- Clone this repo
- Lanch PlatformIO and load repo
- In PlatformIO, select the environment for intended board
- Build, Upload, and Monitor to observe application logging
Instructions for command line builds and building of individual example applications coming soon.
Roadmap
- Framework for simple C++ API that mimics Python reference implementation with implicit object sharing
- Utility class to efficiently handle byte buffers
- Implemenmtat basic Identity, Destination and Packet
- Successful testing of Announce mechanism
- Implement Ed2551 public-key signature and X25519 key exchange
- Implement encryption including AES, AES-CBC, HKDF, HMAC, PKCS7, and Fernet
- Successful testing of Packet encrypt/decrypt/sign/prof
- Implement dynamic Interfaces
- Implement UDP Interface for testing against Python reference Reticulum instances
- Implement basic Transport functionality
- Successful testing of end-to-end Path Finding
- Implement persistence for storage of runtime data structures (config, identities, routing tables, etc.)
- Support for Links and Resources in Transport
- Implement Packet proofs
- Successful testing of Transport of both Packets and Links
- Implement memory management appropriate for memory constricted MCUs
- Implement Link, Resource, Channel and Buffer
- Add example applications utilizing the C++ API
- Configure PlatformIO to easily build and upload test applications to board
- Add buid tagets for all boards currently supported by RNode
Please open an Issue if you have trouble building ior using the API, and feel free to start a new Discussion for anything else.
Languages
C++
93.1%
C
6.6%
CMake
0.3%