How to protect your own MicroPython code residing on the XBee module.
When you implement MicroPython code on the XBee Cellular module, there are a couple of things you can do to protect your code from being viewed or copied.
1.Compile your code down to .mpy files. This is reversible, so it is not entirely the best protection, but better than leaving as a .py.
2. Upload the files with the xput command. This makes the file unreadable except by the Python engine.
We recommend doing both on any source code that you would want to protect.
* Note: #2 only works on the XBee and XBee 3 Cellular products.
The non-cellular XBee 3 ZB, XBee 3 DM, XBee 3 802.15 do not yet have secure file support as of the published date of this article. If you have questions, please check with Digi Technical Support for the latest information.
Oct 02, 2020