Based on this forum post, it is possible to include precompiled scripts (in a modules directory at build time) in the flash image. This requires the config FROZEN_MPY_DIR.
It is also possible to cross-compile using mpy-cross, but it looks like this requires some micropython source code changes (#define MICROPY_PERSISTENT_CODE_LOAD (1)), and also what looks ...
Based on what we've seen in the comments and edits, I think it might be worth setting a lower MTU for the cellular link.
Try running something like the following:
nmcli con mod "user_apn" gsm.mtu 1300
This should cause the MQTT client (in combination with the network stack) to break packets up into smaller chunks which hopefully should be able to ...
The Paho Python library will work just fine via LTE. The library is built to interact with the OS's TCP/IP stack. It has no knowledge of the underlying hardware of how that TCP/IP stack talks to the outside world.
If you want it to work you need to have the LTE connection presented as a network device to the OS, not just a serial port.
I suggest you go ...
You should not be running long running (infinite loops) in the callbacks.
All the callbacks run on the client network thread's main loop (the one started by client.loop_forever()).
This means if the on_connect() thread never returns it will never get to handling the calls to client.publish() in the loop.
The individual client.publish() calls work because you ...
In most cases (that is, unless you have compiled/frozen the Python code), yes.
Depending on the exact environment you may be able to just retrieve the file via the usual file transfer tools.
Alternatively, you can just connect to the REPL (console) and read the file from the filesystem:
file = open("fileyouwanttoread", "r")
This will display ...
At the moment, perhaps you're not wanting to have your code reviewed as I suggested in the comment. So, if you actually want to go ahead and try to do the solution you proposed, here are some options for storing that string:
You can simply store an S3 object and access it from the zero. If there isnt any personal info, you can even just even expose that S3 ...