Replies: 59 comments 61 replies
-
Yes, it can, and it will, given that I have the resource to do it. It has always been my intention to create a version in C. When I have added the last few features to the Python reference implementation, and I lock in the API, I will start work on the C implementation. |
Beta Was this translation helpful? Give feedback.
-
Also, I would very much appreciate help on this endeavour, so if you want to join in, you are very welcome. I do however think it’s necessary to wait until the Python implementation is done, the API has been locked in, and the documentation has been completed. |
Beta Was this translation helpful? Give feedback.
-
Okay ping me once you're ready to create the C version. I've listed some interesting ideas on the Meshtastic forum. |
Beta Was this translation helpful? Give feedback.
-
Are you still maintaining it? |
Beta Was this translation helpful? Give feedback.
-
hard to tell , no updating since last August. Let's find out is there anything we can do? |
Beta Was this translation helpful? Give feedback.
-
Well first of all check if the current version is reliable enough to be used, then start porting it to C using a proper HAL in order to support as many embedded platforms as possible. |
Beta Was this translation helpful? Give feedback.
-
sounds like a plan |
Beta Was this translation helpful? Give feedback.
-
I am still very much maintaining Reticulum. Life has not been too generous with time lately though, and I've had to focus on things more related to survival than passions. Although I had a goal of having Reticulum in an API-stable beta release by the first day of 2021, it did not pan out that way, and I was severely delayed. Things have calmed down for me now though, and for the next few months, I should be able to complete that work. I'd really strongly suggest against starting a C-port right now. There's still a few crucial details that need locking in, and doing this without the API documentation I'm currently writing would be a frustrating experience. I would very much appreciate the help once it is time, but please have just a little more patience :) I know it's been a long wait, but it will be worth it very soon. |
Beta Was this translation helpful? Give feedback.
-
And in the meantime I am open for any discussion on the matter in this thread. I will be available to answer questions and discuss it here. |
Beta Was this translation helpful? Give feedback.
-
How nice, happy to know you were back. It's ok, we will wait for your docs and lock in the few crucial details |
Beta Was this translation helpful? Give feedback.
-
Hello everyone who is still listening here. Today, I released Reticulum 0.2.0. This is the first release marked as being in beta state. This also means the API documentation and manual has been published at: https://markqvist.github.io/Reticulum/manual/. In a sense, one could at this point start writing a C port. In the service of being as transparent as possible, I will have to say that I am planning a very big change to the internals of Reticulum though, which will greatly impact any implementations. I am 95% sure that I will change Reticulum to completely use Elliptic Curve Cryptography on Curve25519 for all assymetric cryptography operations. This will mean RSA is no longer needed, which has been a very limiting factor in the project so far. By using Ed25519 signatures and X25519 ECDH key derivation instead of RSA, protocol overhead will be greatly reduced, and security will be staggeringly enhanced. It really seems like a win-win, but when I worked on the theory behind Reticulum 5 years ago, I didn't know enough about elliptic curves to utilize them confidently, and as such chose to go with RSA-1024 instead. I'm currently researching the last 5% of doubt I have about this decision, and one of the topics I'm looking into is the feasibility of running X25519/Ed25519 on low-power MCUs and what C implementations exist. I am very interested to hear anyones thoughts on this. |
Beta Was this translation helpful? Give feedback.
-
Hey, first of all nice to have you back and to see Reticulum is under development. Going to the actual task of porting it to C, we need to define some common guidelines beforehand, such as using size-constrained integers ( |
Beta Was this translation helpful? Give feedback.
-
The m parameter is not appended into the message, because it is already there in the header field ;) Byte two of the header field is the "hops" byte, which tells how many hops a packet has taken, which is also true for announces. I updated the "wire format" section in the manual to make it more clear. Ok, I just finished moving everything to elliptic curves. Was actually a lot less work than I had anticipated. And as you say, it seems there is good support on microcontrollers and in C, so this is going to be the way forward. Protocol overhead has also been greatly reduced now. It's all very, very nice. What you're saying regarding locking in the typing definitely makes sense, as does having a way to control dynamic vector allocation. I'm going to take a break for a couple of days now, cause I'm literally exhausted ;) When I start again, I will start mapping out the outline of the C version. I'm quite hesitant to use a RTOS, since I've been down that road before a long time ago, and in the end it ended up being much more hassle than help. My current stance is that making the C port as dependency free as possible is the way to go. We'll need crypto libraries, yes, but that should be more or less it. Task scheduling and async io should be possible with an internal job handler, since the internal "transport machine" of Reticulum is actually pretty simple. You're welcome to convince me otherwise though :) |
Beta Was this translation helpful? Give feedback.
-
Happy to hear that. I am here still listening |
Beta Was this translation helpful? Give feedback.
-
Ok moving forward, I've created a pull request to act as WIP for us all. Other general things we need to think about before starting are:
Small OT: have you seen the Helium project (www.helium.com)? |
Beta Was this translation helpful? Give feedback.
-
That is really cool! C rocks! |
Beta Was this translation helpful? Give feedback.
-
Just recently found Reticulum. Very compelling project. Amazing that you've done all of this solo @markqvist. I'd love to be able to help push the µRNS effort along. Nice to see @ellenhp tackling the rust implementation. I assume the plan is to still have a C/C++ implementation as well, is that right? If so and you still don't have the bandwidth yourself I'd be willing to take a stab at it. Just want to be sure I wouldn't be stepping on any toes. |
Beta Was this translation helpful? Give feedback.
-
Yay, this is just wonderful, a C++ reticulum! I'll test soon in a Raspberry Pi 4 running Linux. |
Beta Was this translation helpful? Give feedback.
-
It's great to see the work that's been done on other implementations of Reticulum. Currently I'm working on an implementation of Reticulum in Zig. For those unfamiliar with Zig - here are some reasons why it's a great choice.
The more implementations the better in my opinion. |
Beta Was this translation helpful? Give feedback.
-
That is great news!! Right now as a user (hopefully will be able to start helping with code at some point), we support whatever decision to put Reticulum in place running native code! |
Beta Was this translation helpful? Give feedback.
-
I was busy for a while, but there is now also a zig implementation in progress for people to look at and hopefully use not too far in the future. There's a proof of concept that builds an image for the pico. All still WIP. |
Beta Was this translation helpful? Give feedback.
-
What are the full requirements a board needs to have in order to run micro reticulum on it? I know it works for esp32 like the Heltec V3 but I’m looking for something more conservative on power. It seems Heltec fixed the bug with the Heltec T114 V1 with the new V2. Is the T114 V2 enough for the requirements of a transport node? |
Beta Was this translation helpful? Give feedback.
-
I've been reading up on Reticulum lately and find porting to C / C++ very important, so that there can also be clients on microcontrollers. Therefore, I have now extended the very well implemented MicroReticulum from @attermann a bit, so that a link can now be established and LXMF messages can be decoded correctly. Here is an example with a T4 S3 board (Lilygo) which receives the message via UDP. There is still some work to do but I hope I can contribute to the success of this great project! My code is currently in my fork of MicroReticulum: https://github.com/stumpigit/microReticulum/tree/link_support |
Beta Was this translation helpful? Give feedback.
-
Throwing my 2cents in. As much as it pains me, as a C/C++ developer, Rust would be the right answer for rewrite of Reticulum. There is a lot of push for Rust. Many developers are switching to it, commercial companies are transitioning, etc. |
Beta Was this translation helpful? Give feedback.
-
Rust has a lot of hype (and I understand the benefits), but most comparisons are to OLD C/C++ standards. C++ is not the wild west portrayed by some articles. Also, some of the all-encompassing libraries (like Qt) have done a fantastic job of eliminating the need for pointers, or provide excellent pointer wrappers to greatly diminish the risk associated with pointer use. In that vein, maybe use of the Qt framework with C++ would be a good idea. (They even have ESP32 specific support so their development tools could help accelerate a project). |
Beta Was this translation helpful? Give feedback.
-
One issue with Rust is that if you want to use async (and you likely do), then you're often coupled to the async runtime that you choose, unless you manage to very carefully abstract over different runtimes. This is relevant if you want to both support std and no_std (embedded), as you'll be using either tokio or embassy respectively. I've only seen this project successfully abstract over runtimes, and it didn't include embassy. If you try and avoid using async, you'll then run into the issue of being unable to use crates that make use of async functions. That being said, if you decide to pick only std or only no_std, then it's a perfectly good choice. Personally, I've chosen to use Zig as it's a much simpler language, and I'm pretty sure I can get the same level of safety through extensive testing. An example of which is fuzzing - natively supported by Zig. I've already mentioned it above, but my implementation is here and continuing to make progress. Current goal is to target WASM and get a node listening to the test net from the browser. WASM also happens to function as an easier way to test freestanding builds than embedded. |
Beta Was this translation helpful? Give feedback.
-
Just letting y'all know that @attermann is still around; @stumpigit you might want to get in touch ;) ![]() ![]() ![]() ![]() ![]() |
Beta Was this translation helpful? Give feedback.
-
I would like to put a card in for the Rust rewrite club. In my opinion its philosophies better align with Reticulum in terms of security. It also has come a very long way in the embedded world from what people think. I'm unsure "I'm more comfortable with C" is a great way to go about furthering a network stack that I'm sure everyone here wants to see succeed. It would be no different than others in the future saying "I'm more comfortable with IPs and TCP." Besides that, I honestly wouldn't want something this focused on security to, in my eyes, actively take steps backwards. When I saw the entire project was in Python I was extremely surprised (in a good way). To further ensure the security of the stack, focusing on a language like Rust (or at least Zig) would be extremely beneficial. I feel if a C/C++ port were to happen, the odds of vulnerabilities related to mishandled components of the stack would significantly increase especially as the codebase itself does. Using Rust as an example, implementing a new interface wouldn't have high chances of someone mishandling memory when you can define the trait of an interface strictly and enforce its behavior no matter what it interfaces with. |
Beta Was this translation helpful? Give feedback.
-
I just want to say, good work to the three of you who worked on this so far. I am able to see Lora packets between a Heltec v3 and a T1000-E using your branch mentioned above @stumpigit. Testing to see if it will bridge from wifi to Lora as well soon. Also, would be nice if the 'I don't think there should be C/C++ implementation crowd' would start a discussion thread for their favorite Rust/Zigg/etc, since this is a C/C++ porting thread. Lots of opinions about what people should work on... Great to see what people want. Make a thread for your favorite language and go to town... |
Beta Was this translation helpful? Give feedback.
-
Thoughts on a transparent published spec, so we don't need to worry about language and implementation? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
A question more than an issue.
Can Reticulum be ported to C? It would benefit all those uC like the ESP32 or the NRF52840 that power many low power LoRa transceivers. Micropython is quite expensive CPU-wise and increases power consumption.
What are the main problems to be faced when porting it to C? I can do it myself but I'll need support throughout the process.
Beta Was this translation helpful? Give feedback.
All reactions