Skip to main content

Python library for U-blox cellular modules.

Project description


Python library for U-blox cellular modules.


Python version supported: 3.6+

.. code-block::

pip install ublox


The ublox library gives a python interface to AT Commands via serial interface
to Ublox modules. This can used for testing and profiling of modules and
technologies or you might want to hook up a small python program on an embedded
device to send data over, for example, NB-IoT.

Supported Modules

* SARA-N211
* SARA-R412
* SARA-R410

Example Use:

.. code-block::

module = SaraR4Module(serial_port='/dev/tty.usbmodem14111')
module.send_udp_data('', 7, 'Message To Echo Server')


The library is currently used for testing infrastructure in Sweden and are somewhat
hardcoded to that. We will make an effort to remove hardcoded values and have a
more unified API around the control of the modules.

If you have special need there is always the possibility to used the lower
level API for AT Commands.

If you have use-cases that could be solved with more options on functions, make
the change yourself and open a pull request or open an issue.


The format is based on `Keep a Changelog:`,
and this project adheres to `Semantic Versioning:`








v.0.1.0 (2018-10-24)

* Arg to specify if the module is roaming or when connecting specify if roaming so that we know what to expect in the connection status.
* capture_urc flag to _at_command(). So that it is possible to collect the URCs before the OK response.
* Added the UbloxSocket and UDPSocket classes to be able to handle sockets independent from module.

* Removed operators name and map. Now you need to specify the operator with its MNO_ID. Swedish Telia is for example 24001.
* Renamed eps_reg_status to registration_status. Even if it does not follow the naming in the ublox manual it is clearer in the code what it is.
* create_socket now returns a UbloxSocket subclass.


* Better support for R412.
* errors for AT commands and module errors will throw python exceptions.
* setting bands on r4 modules.

* Renamed function to set up the module from init to setup to have a clearer API.
* Improvement of api and made methods common.

First version. Support for SARA-N211 and initial support for SARA-R412

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ublox-0.1.0.tar.gz (7.9 kB view hashes)

Uploaded source

Built Distribution

ublox-0.1.0-py3-none-any.whl (9.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page