STM32Cube Software Libraries: Two Powerful Updates For Applications Using Bluetooth or 6LoWPAN

Internet of Things, Our products, Smart Home & City Leave a Comment

ST has upgraded two of their STM32Cube Expansion Software with RF libraries: the X-CUBE-SUBG1, and X-CUBE-BLE1. ST always strives to go beyond what typical manufacturer’s offer, to enable engineers to create better products faster, and STM32Cube is a big part of that experience. There are two major offerings: STM32CubeMX and STM32Cube software libraries. The former facilitates the configuration of a microcontroller (MCU) and generates the necessary code in C to start building applications. It is so popular that the concept was recently extended to 8-bit MCUs with the STM8CubeMX software. On the other hand, the latter is a series of software libraries that help engineers take advantage of certain features available on a component or platform.

STM32Cube software libraries can be quite comprehensive, even including Hardware Abstraction Layers (HAL), low-level APIs, Real-Time Operating Systems, drivers, file systems, TCP/IP stacks, touch-sensing or graphical libraries, and even application examples with their source code. They are similar to the ODE Function Packs we recently reviewed in that both build on the STM32Cube architecture to show what can be done, while offering the tools to reproduce the demos. Hence, as we prepare for ST’s Developer Conference 2017, on September 6 in Santa Clara, California, we continue to go over the latest improvements in ST’s software offerings.


The X-NUCLEO-IDS01A4/X-NUCLEO-IDS01A5 board (click to enlarge)

Any team seriously considering adding a sub-gigahertz network must look at the X-CUBE-SUBG1 expansion software. Its drivers will allow designers to quickly work with the SPSGRF module equipped with the SPIRIT1 transceivers, which we already saw in our tutorial covering 6LoWPAN network creation. Furthermore, because products don’t exist in a vacuum, ST even provides different communication protocols like point-to-point or wM-bus, and 6LoWPAN, so applications can quickly communicate with the outside world, and manage a series of nodes. To use the pre-compiled binaries, one may use the following stack (the first board on top):

Creating a Mesh Network

The upgrade received last May was pretty substantial because it added, among other things, a Contiki 6LoWPAN Middleware that has proven invaluable in building applications for wireless sensor nodes networked using a mesh topology. Such structures are increasingly popular in smart and consumer devices because connecting to the Internet becomes a lot easier. Instead of having all nodes aiming at an access point, which can flood a network, and accentuate certain range issues, a mesh network only needs one node connected to the router. All the other nodes then talk to each other to disseminate the necessary information. Since the data transmitted is almost always very small, bandwidth is never an issue, and the entire system becomes much more manageable and practical.


The X-NUCLEO-IDB04A1/IDB05A1 board (click to enlarge)

When an application, like the Snuza Pico we just reviewed, requires a fail-proof Bluetooth stack to work with ST’s BlueNRG and BlueNRG-MS, the X-CUBE-BLE1 becomes the ultimate tool in the engineers’ arsenal. On top of the necessary drivers, it comes with all the assets to take advantage of the network processor, and the middleware to quickly use certain features, like notification management. Furthermore, as is the case for many ST software offerings, the package contains folders for the major toolchains: Keil’s MDK-ARM, IAR-EWARM, and the free SW4STM32 (System Workbench for STM32). Contrary to competing solutions that would require engineers to port everything manually to their development environment, ST offers folders for each IDE with all the necessary files, so imports remain a breeze. The pre-compiled binaries use the following boards (listed in their stacking order, the first one being on top):

Programming for iOS

The latest revision was especially important for developers of mobile applications because it added a profile in the middleware for the Apple Notification Center Service (ANCS), and updated documentation on the BLUE_ANCS demo, an application that enables a Bluetooth device to access notifications generated by iOS. The beauty of the provided code is that it manages all the necessary setup and authentication operations so the BlueNRG-MS module can quickly receive notifications. This could be extremely valuable to projects where the Bluetooth device needs to react to an event happening on the mobile device. Finally, the documentation received new sections on Human Interface Device (HID), such as its services and management.

To know more about the other STM32 software libraries, please visit ST’s website.

Register also for the Developers Conference 2017 before it’s too late.