Framework for Embedded BLE-App Communication

Mobile devices like tablets and smartphones are constantly present in our everyday lives and have become our permanent companions. Thus, they have also become increasingly important for embedded applications.

Thanks to their high performance, high-resolution displays and convenient development environments for App development, mobile devices make it much easier to design comfortable graphical user interfaces than with built-in touch displays.

Typical application examples:

  • Operator interfaces for service technicians to parameterize embedded applications
  • Functional enhancements of the user interface. In some applications, device's built-in displays can be completely replaced with a smartphone App.

And via their steady connection to the Internet, the mobile devices can act as a communication gateway for the embedded application, so for instance the following features can be implemented:

  • convenient firmware update via App
  • reading and transfer of diagnostic data to the manufacturer in case of malfunction of the embedded application
  • live data transmission of measurement data to the (company) cloud (for example, in industrial measuring devices)

In most cases, Bluetooth Low Energy (BLE) is used to transfer data between the embedded application and the mobile device. The redlogix GmbH has developed a software framework that allows to implement the following application setup very easily and efficiently:

Often the microcontroller of the embedded hardware target that executes the embedded software application (called "Main μC" in the figure below) is extended by another microcontroller which takes care of the BLE communication (called "BLE μC" in the figure below). Candidates for this "BLE μC" are for instance the ESP32 or a chip of the Nordic nRF52 series or a module based on it. The two microcontrollers are usually connected via UART or SPI interface.

RX.BApp Overview

With the solution developed by redlogix, the data to be exchanged via BLE with the App on the smartphone / tablet can be conveniently transmitted and received via a simple C-API available on the "Main μC". The actual embedded software application on the "Main μC" can remain unchanged.

The following figure shows the involved software modules. All modules that are printed in red exist as readily available software components. The yellow ones are developed application-specific.

RX.BApp Software Stack

In detail these are:

  • "Main µC":
    • The embedded software application exchanges all data with the App (for example, measured values, parameter values, commands for actions that are started by the App) via a C-API specific to the application.
    • The application-specific C-API uses a generic remote C-API of the BLE firmware in order to define the required services and characteristics, initiate pairing and coupling, etc.
    • The remote BLE firmware C-API is a portable C source code library, which can be integrated into virtually any microcontroller and does not need to be customized for the application. It is only required to integrate a driver for data communication via UART or SPI.
  • "BLE µC":
    • The firmware used on the "BLE μC" was developed as a generic product by redlogix and can be licensed either in binary form or in source code.
    • It is available as an out-of-the-box solution for the BLE chips ESP32 and Nordic nRF52 (as well as BLE modules from different manufacturers based on these chips).
  • "Smartphone / Tablet App":
    • The App builds on redlogix’s ready-to-use "BLE framework" for data exchange with the "BLE μC". Thus, only the application-specific App functionality (e.g. data processing and the GUI) needs to be developed according to the individual application requirements.
    • The "BLE Framework" is available for various development platforms, so it can be used to efficiently develop Apps for Android as well as iOS devices.

Why is redlogix the right partner for this task?

  • We offer much more to our customers than just the implementation of the App for the smartphone or tablet: In addition to the App development, we can also implement and integrate a convenient C-API for data exchange between the embedded software and the App. This allows your developers to focus on the actual application functionality of the "Main μC" without having to deal with details about data transfer via BLE (with Services and Characteristics).
  • Since the BLE data communication with the App is completely abstracted by the C-API, a clean programming interface is defined. Thus, the two parts (the embedded software application and BLE / App functionality) can be developed and tested completely independently from each other.
  • With our ready-to-use software modules for the BLE communication, we are able to implement prototypes in an extremely short time. Long before the embedded software application becomes available on the "Main μC".
  • Unlike the solution of many BLE module vendors, the firmware used on the "BLE μC" is not commanded by AT commands, but by an extremely efficient remote procedure call (RPC) protocol for embedded software. This saves runtime and code memory and allows a much more efficient implementation than if ASCII AT commands need to be generated / parsed.
  • With the frameworks Flutter and Xamarin, which we prefer to use for App development, Android and iOS devices can be supported with little effort. Still there are no limits to the graphic implementation.
  • We have many years of experience in the development of hardware-related embedded software applications. Unlike pure App developers, our employees therefore understand the special challenges in the field of embedded software development and can also support the software teams of our customers beyond the implementation of the smartphone / tablet App.

If you want to know more about this solution, please do not hesitate to contact us. We will be happy to discuss your requirements - completely free of charge and without any obligation.