Portable C libraries which provide APIs to build applications with u-blox products and services. Delivered as add-on to existing microcontroller and RTOS SDKs.
Portable C libraries which provide APIs to build applications with u-blox products and services. Delivered as add-on to existing microcontroller and RTOS SDKs.
Dear ubxlib community,
After careful consideration, we have decided to discontinue the ubxlib project. This decision was not made lightly, and we want to thank everyone who has contributed, used, and supported this project over the years.
The repository will be archived on 2024-11-08. This means it will become read-only, but you will still be able to fork and clone it. Open issues will be closed till end of 2024. Afterwards no more support for ubxlib is available. For any questions please use our support portal.
Thank you for your understanding.
Best regards, The ubxlib team
Note: if you are reading this from a package-file created by a third-party [e.g. PlatformIO] and the links do not work, please try reading it at the original ubxlib Github site instead.
ubxlibThis repository contains an add-on to microcontroller and RTOS SDKs for building embedded applications with u-blox products and services. It provides portable C libraries which expose APIs with examples. ubxlib supports u-blox modules with cellular (2G/3G/4G), short-range (Bluetooth and Wi-Fi) and positioning (GNSS) functionality. The ubxlib libraries present high level C APIs for use in customer applications (e.g. connect to a network, open a TCP socket, establish location, etc.) and implements these APIs on selected popular MCUs, also available inside u-blox modules.
The goal of ubxlib is to deliver a single tested solution, with examples, which provides uniform easy-to-use APIs across several u-blox products. Releases of ubxlib are tested automatically for all configurations on multiple boards in a test farm.
The easiest way to quickly explore ubxlib is to start with a board listed in the test farm. u-blox EVKs (evaluation kits) or application boards can be found here or at major electronics distributors and code examples which run on the u-blox XPLR-IOT-1 platform can be found here. If you've heard enough and want to get started with the XPLR-IOT-1 platform, or maybe with PlatformIO, jump straight to How To Use This Repo below.
ubxlib runs on a host microcontroller and has a peripheral attached. This setup is very common in embedded applications. An example of such a host-peripheral configuration with EVK-NINA-B301 (Bluetooth 5.0) and EVK-R4 (SARA-R4 with 2G/3G/4G) in which the ubxlib host sets up a TCP connection is shown in the following figure. Many other combinations can be achieved, with the supported hosts and peripherals in the tables in the next section.
The key APIs provided by this repo, and their relationships with each other, are shown in the picture below.
ubxlib needs in the form that ubxlib needs it.All APIs are documented with Doxygen compatible comments: simply download the latest Doxygen and either run it from the ubxlib directory at a command prompt or open Doxyfile in the Doxygen GUI and run it to obtain the output.
ubxlib host platforms and APIsHosts run ubxlib and interact with an attached periperal. A host platform contains an MCU, toolchain and RTOS/SDK as listed in the table below. Hosts are typically u-blox open CPU (standalone) modules or other MCUs. To use a host you need a development board or an EVK. Currently ubxlib supports and tests the following purchasable boards out-of-the box.
If your MCU is on the list but your board is not:
If your MCU is not on the list:
ubxlib, just follow the instructions here to bring ubxlib into your existing PlatformIO environment,ubxlib to a new host platform follow the DIY instructions for the port API.|ubxlib hosts |NINA-W10|NINA-B40 series
NINA-B30 series
NINA-B1 series
ANNA-B1 series
|NORA-B1 series|C030 board|PC|PC| |-----------|-----------|--------------|-----|-----|------|------| |MCU|Espressif ESP32|Nordic nRF52|Nordic nRF53|ST-Micro STM32F4|x86/64 (Linux)|x86 (Win32)1| |Toolchain|ESP-IDF Arduino-ESP32|GCC nRF Connect|nRF Connect|Cube|GCC|MSVC| |RTOS/SDK|FreeRTOS|FreeRTOS Zephyr|Zephyr|FreeRTOS|Posix|Windows| |APIs provided by host with peripheral attached2|wifi ble device network sock|ble device network|ble device network | cell device network sock location3 TLS security | N/A | N/A |
1: For development/test purposes only. 2: Only SPS API provided for native (on-chip) BLE interface, other APIs for native (on-chip) access, e.g. WiFi support, are a work in progress.
ubxlib peripherals and APIsPeripherals are u-blox modules which accept commands (e.g. AT-commands) over a serial interface and have no open MCU environment. To run the APIs they need to be attached to a host which runs ubxlib. For example in the test farm combinations of hosts and peripherals are listed.
|ubxlib peripherals |NINA-B41 series
NINA-B31 series
NINA-B1 series
ANNA-B1|NINA-W13|NINA-W15
NORA-W364|SARA-U2 series|LENA-R8 series|LEXI-R10 series
LEXI-R4 series
LEXI-R5 series
SARA-R4 series
SARA-R5 series
LARA-R6 series
|SARA-R510M8S
SARA-R520M10S
SARA-R422M8S
SARA-R422M10S|M8/M9/M10 series| |-----------|-----------|--------------|-----|-----|-----|------|------|------| |APIs provided by host with peripheral attached|ble device network|wifi device network sock TLS security mqtt_client http_client|wifi ble device network sock TLS security mqtt_client http_client|cell device network sock location3 TLS security http_client|cell device network sock location3 TLS security mqtt_client|cell device network sock location3 security5 mqtt_client http_client|All APIs of SARA-R4, SARA-R5 series + gnss location|gnss location|
3: Through the u-blox CellLocate mobile network-based location service.
4: Beta support: please add short_range_gen2 to the UBXLIB_FEATURES variable in your make or CMake file when building ubxlib for NORA-W36; NORA-W36 comes with a second generation u-connectExpress, please see the release notes for NORA-W36 for the supported features.
5: Except SARA-R422 (non-S), which supports no form of security, and LEXI-R5/LEXI-R4/LEXI-R10/SARA-R52, which support only TLS security.
ubxlibThe APIs for each type of u-blox module can be found in the relevant directory (e.g. cell for cellular modules and ble/wifi for BLE/Wi-Fi modules). The common directory contains APIs and 'he
No open issues yet, or sync has not completed.