ZeroMQ, nanomsg or nng ported to MicroPython (or any good message encapsulation library)?
Posted: Sun Jul 18, 2021 10:11 pm
Has anybody successfully ported ZeroMQ, nanomessage or nanomessage-ng to MicroPython?
The idea is to use it for efficient RPC communication via network, with a node running MicroPython (e.g., controlling certain sensors or actuators).
I have prepared a version based on MessagePack+ZeroMQ, that may be used with standard Python running on embedded Linux systems - https://gitlab.com/WZab/python-versatil ... ck-zmq/src . Currently it allows access from C++, Lua, Octave (probably also Matlab?) and of course Python.
When porting it to MicroPython, I have finally managed to get the reasonable subset of MessagePack working - viewtopic.php?f=15&t=10827 , but up to now I was not able to get the ZeroMQ, nanomessage or pynng running on the MicroPython. Unfortunately, the MessagePack that I could use does not support incremental feeding of the unpacker (which I used in the very first implementation - https://ftp.funet.fi/pub/archive/alt.sources/2722.gz ).
Thence, only the JSON-based version, using EOL as a separator is available (which results in seriously increased network occupancy). It is available at https://gitlab.com/WZab/python-versatil ... on-eol/src .
As soon as the a good portable and MicroPython-compatible library for encapsulation of messages is available, we may implement the RPC for communication with µP-based nodes.
The idea is to use it for efficient RPC communication via network, with a node running MicroPython (e.g., controlling certain sensors or actuators).
I have prepared a version based on MessagePack+ZeroMQ, that may be used with standard Python running on embedded Linux systems - https://gitlab.com/WZab/python-versatil ... ck-zmq/src . Currently it allows access from C++, Lua, Octave (probably also Matlab?) and of course Python.
When porting it to MicroPython, I have finally managed to get the reasonable subset of MessagePack working - viewtopic.php?f=15&t=10827 , but up to now I was not able to get the ZeroMQ, nanomessage or pynng running on the MicroPython. Unfortunately, the MessagePack that I could use does not support incremental feeding of the unpacker (which I used in the very first implementation - https://ftp.funet.fi/pub/archive/alt.sources/2722.gz ).
Thence, only the JSON-based version, using EOL as a separator is available (which results in seriously increased network occupancy). It is available at https://gitlab.com/WZab/python-versatil ... on-eol/src .
As soon as the a good portable and MicroPython-compatible library for encapsulation of messages is available, we may implement the RPC for communication with µP-based nodes.