Replies: 4 comments 2 replies
-
I think this has a lot of merit. I've been grappling with a couple of projects where I haved wanted to use meshtastic, but would require a separate MCU like an attiny85 paired with a meshtastic device to make work. A Meshtastic library would allow the host MCU to perform multiple functions and use the meshtastic network to communicate. |
Beta Was this translation helpful? Give feedback.
-
Perhaps even just a skinny library that formats messages and sends them with the correct prefix. What would be the bare minimum needed?
???? |
Beta Was this translation helpful? Give feedback.
-
Indeed, it would be very nice to have it working as library, but I expect it to be a lot of refactoring work. There is, however, another approach by using the secondary core, e.g. on an ESP32 or RP2040. The Meshtastic UI uses a PacketAPI (it's not yet in For the time being, the Module API could be used to run your own code that e.g. periodically sends data, or reacts upon receiving other packets. Or, indeed using a secondary MCU that interacts with it, e.g. using the Arduino client library if your code does some heavy processing. |
Beta Was this translation helpful? Give feedback.
-
I think re-implementing receiving and sending of mesh messages as a library would be the best achievable goal. Refactoring the current code base will be a huge effort, but it might be necessary at some point in the future for the project to have a long term future |
Beta Was this translation helpful? Give feedback.
-
This is a continuation of https://meshtastic.discourse.group/t/how-to-use-meshtastic-as-a-library/8294
I would also like to be able to use the meshtastic radio part independent of the rest of the meshtastic firmware.
If we find enough people interested in this, maybe we could think about an coordinated effort to untagle the firmware and separate the MeshService and RadioInterface? Or even extract / rewrite parts of that radio code as a library to serve as a stable future foundation for expansion of the Meshtastic ecosystem (both for the device firmware as well as other use cases)
The current firmware shows quite a lot of signs of organic growth over the past years and would probably benefit from bit of untangling.
Beta Was this translation helpful? Give feedback.
All reactions