Design and Prospects for Developing a Modular GSM Library for MicroPython with NB-IoT Support
Abstract
Relevance. In the context of the growing popularity of the Internet of Things (IoT), the development of software compatible with limited hardware resources is becoming increasingly relevant. NB-IoT technology provides energy-efficient communication for autonomous devices; however, its integration within the MicroPython environment remains insufficiently addressed due to the limitations of existing GSM libraries. The issue of effective interaction between microcontrollers and GSM modules necessitates the development of adapted tools.
Purpose. The aim of this work is to analyze current libraries for interaction with GSM modules, with an emphasis on NB-IoT projects, and to formulate the requirements for a new library optimized for the MicroPython environment.
Research Methods. A comparative analysis was conducted of the functional capabilities, architecture, and compatibility of five common libraries: pySerial, GSMComm, Adafruit FONA, TinyGSM, and GSM (Arduino). The research was carried out according to criteria such as AT command support, energy efficiency, extensibility, error handling, and suitability for MicroPython.
Results. It was found that none of the analyzed libraries provide full support for the MicroPython environment without limitations. The main drawbacks include the lack of modularity, low adaptability to NB-IoT, and limited error handling. Based on the analysis, the concept of a new library with a modular architecture adapted to MicroPython was formulated, including separate modules for AT commands, network handling, error processing, and integration with IoT protocols (MQTT, HTTP). A structural model of the library and UML diagrams of its components were proposed.
Conclusions. The study confirms the need to create a new specialized GSM library that would combine flexibility, energy efficiency, and ease of integration with MicroPython for use in NB-IoT devices. The proposed architectural solutions aim to reduce the load on hardware, ensure stable communication, and simplify the development of IoT projects.
Downloads
References
PySerial 3.0 Documentation, PySerial, 2024. [Online]. Available: https://pythonhosted.org/pyserial. [Accessed: Mar. 26, 2025].
GSMComm for .NET 2.0, Apponic, 2024. [Online]. Available: https://gsmcomm-for-net-2-0.apponic.com. [Accessed: Mar. 28, 2025].
Adafruit FONA Library 1.0 Documentation, Arduino, 2024. [Online]. Available: https://docs.arduino.cc/libraries/adafruit-fona-library/. [Accessed: May 5, 2025].
TinyGSM Documentation, Arduino, 2024. [Online]. Available: https://docs.arduino.cc/libraries/tinygsm/. [Accessed: May 15, 2025].
GSM Documentation, Arduino, 2024. [Online]. Available: https://docs.arduino.cc/libraries/gsm/. [Accessed: May 17, 2025].
MicroPython Documentation, MicroPython, 2024. [Online]. Available: https://docs.micropython.org/en/latest/. [Accessed: May 21, 2025].