FP-AUD-BVLINKWB1
Application
STM32 WPAN USB Device PDM Lib
OPUS
Middleware
STM32Cube Hardware Abstraction Layer (HAL)
Hardware
Abstraction
Hardware
STM32 Nucleo development board
Discovery board
STM32 Nucleo expansion boards
X-NUCLEO-CCA02M1 (Sense)
Features
Complete firmware to implement full-duplex audio streaming over Bluetooth 5.0
using Opus codec for both encoding and decoding
A BlueVoiceOPUS customized profile for audio over BLE, including an easy-to-
use set of APIs to exploit advanced Opus functionality (source code available)
Third-party Opus v1.3 (downloadable from https://www.opus-codec.org)
middleware: an open, royalty-free and highly versatile audio codec that is
standardized by the Internet Engineering Task Force (IETF) as RFC 6716
Digital audio signal acquisition and processing
Audio out playback through USB
Sample implementation available for X-NUCLEO-CCA02M1 connected to a P-
NUCLEO-WB55
Compatibility with STBLESensor app (v 4.2.0 or higher) for Android, to perform
audio streaming at 16 kHz and speech-to-text
Free, user-friendly license terms
Description
FP-AUD-BVLINKWB1 is an STM32Cube function pack that performs voice streaming
over BLE in a full-duplex configuration using the advanced Opus compression
algorithm.
The application runs on P-NUCLEO-WB55 and includes drivers and middleware for
BLE and digital MEMS microphones. It also includes the complete Opus audio codec
(v 1.3) as third-party middleware.
The peripheral module can also stream audio to an Android device running the
STBLESensor app v 4.2.0 or higher.
The software with the suggested combination of STM32WB and ST devices can be
used, for example, to develop wireless audio communication systems for smart home
or wearable applications.
The Opus algorithm provides the flexibility to achieve high voice quality even at low
bitrates, and the STM32WB has the low power capabilities to allow the development
of applications featuring very low consumption.
The same audio codec can be used to implement high quality stereo music
streaming, depending on the available resources.
Product summary
STM32Cube function
pack for STM32WB
MCU featuring full-
duplex audio streaming
over Bluetooth 5.0
using Opus codec
FP-AUD-
BVLINKWB1
Digital MEMS
microphone expansion
board based on
MP34DT01-M for
STM32 Nucleo
X-NUCLEO-
CCA02M1
Bluetooth 5 and
802.15.4 Nucleo pack
including USB dongle
and Nucleo-68 with
STM32WB55 MCUs
P-NUCLEO-
WB55
BLE sensor application
for Android and iOS
STBLESensor
STM32Cube function pack for STM32WB MCU featuring full-duplex audio
streaming over Bluetooth 5.0 using Opus codec
FP-AUD-BVLINKWB1
Data brief
DB3973 - Rev 1 - July 2019
For further information contact your local STMicroelectronics sales office.
www.st.com
1 Detailed description
1.1 What can you do with STM32Cube function packs?
STM32Cube function packs leverage the modularity and interoperability of STM32 Nucleo and X-NUCLEO
boards together with STM32Cube and X-CUBE software to create function examples for some of the most
common use cases of different application technologies.
These software function packs are designed to exploit the underlying STM32 ODE hardware and software
components as much as possible to best satisfy the requirements of final user applications.
Moreover, function packs may include additional libraries and frameworks that are not present in the original X-
CUBE packages, thus enabling new functionalities allowing real and usable system for developers.
1.2 What is STM32Cube?
STM32Cube is a combination of a full set of PC software tools and embedded software blocks running on STM32
microcontrollers and microprocessors:
STM32CubeMX configuration tool for any STM32 device; it generates initialization C code for Cortex-M
cores and the Linux device tree source for Cortex-A cores
STM32CubeIDE integrated development environment based on open-source solutions like Eclipse or the
GNU C/C++ toolchain, including compilation reporting features and advanced debug features
STM32CubeProgrammer programming tool that provides an easy-to-use and efficient environment for
reading, writing and verifying devices and external memories via a wide variety of available communication
media (JTAG, SWD, UART, USB DFU, I2C, SPI, CAN, etc.)
STM32CubeMonitor family of tools (STM32CubeMonRF, STM32CubeMonUCPD, STM32CubeMonPwr) to
help developers customize their applications in real-time
STM32Cube MCU and MPU packages specific to each STM32 series with drivers (HAL, low-layer, etc.),
middleware, and lots of example code used in a wide variety of real-world use cases
STM32Cube expansion packages for application-oriented solutions
1.2.1 How does this STM32Cube function pack complement STM32Cube?
This software is based on the STM32CubeHAL hardware abstraction layer for the STM32 microcontroller. The
package extends STM32Cube by providing a board support package (BSP) for the MEMS microphone expansion
board and STM32WB Nucleo board, as well as middleware components for audio acquisition, communication
with other BLE devices, USB streaming of recorded signals and a dedicated profile for full-duplex speech
transmission over BLE (bvopus_service_stm).
The third party Opus (v1.3) middleware is included in the function pack.
The BlueVoiceOPUS profile defines a BLE service which includes one characteristic for audio transmission and
one for optional control messages. In a full-duplex system, both sides of the communication (central and
peripheral) can act as a server of information. Periodic notifications containing compressed audio data are sent
from the central node acting as a server to the peripheral node acting as a client, and vice versa.
The BlueVoiceOPUS service is responsible for audio encoding and periodic data transmission on the server side
and for received data decoding on the client side.
The drivers abstract low-level hardware details and allow the middleware components and applications to access
the devices in a hardware-independent fashion.
The package includes a sample application that developers can use to start experimenting with the code. It
enables audio acquisition, compression and transmission over BLE from the module acting as a transmitter to the
module acting as a receiver, which is responsible for audio decompression and USB streaming of audio data to a
PC.
The system is recognized by the PC as a standard microphone, and any freeware or commercial audio recording
software can be used to interface with it. Both the central and the peripheral modules can act as a transmitter and
a receiver at the same time, enabling full-duplex voice streaming.
The peripheral module can also stream audio at 16kHz to an Android device running the STBLESensor app (v
4.2.0 or higher).
FP-AUD-BVLINKWB1
Detailed description
DB3973 - Rev 1
page 2/4