
Figure 16.
BLE packets for 16 Hz audio
1.2.9
STSW-BLUEMIC-1 application description
The
STSW-BLUEMIC-1
software package is a complete example of audio and inertial data streaming over
Bluetooth
®
Low Energy to an Android™ and iOS™ mobile device running the ST BlueMS app or to an STM32
platform.
Figure 17.
STSW-BLUEMIC-1 software package architecture
The main loop continuously calls the
BTLE_StackTick
function needed for the RF management and the
APP_T
ick
that contains all the functions implemented by the user.
As soon as the application starts, the
APP_STATUS_ADVERTISEMENT
state is set, BlueNRG-1 acts as a
peripheral and sends advertisement messages until a central node requests a connection.
When the connection is estabilished, the app status is set to
APP_STATUS_CONNECTED
and two different demos
can be activated from the ST BlueMS app running on the central node.
If BlueVoice is enabled (firmware status set to
APP_BLUEVOICE_ENABLED
) audio acquisition from the on-board
digital microphone starts and drives the voice streaming. PCM samples are compressed and sent.
The audio streaming can be stopped or restarted by pressing the
STEVAL-BLUEMIC-1
evaluation board button.
The user can switch to the inertial demo (firmware status set to
APP_INERTIAL_ENABLE
) via the BlueMS app.
A timer is set and every 30 ms raw data are acquired from the 3-axis accelerometer and gyroscope and sent to
the mobile device together with a timestamp increased by one every 10 ms.
UM2257
Software description
UM2257
-
Rev 2
page 12/35