Audio 4-Channel¶
Description¶
This application uses the Wireless Protocol Stack (WPS) to implement a 4-channel audio stream. Audio data is recorded at the source device and played back by up to four devices.
Behavior¶
The first device in this application is called the Coordinator and it sends uncompressed 48 kHz mono audio to up to four other devices called the Nodes.
The wireless transmissions are divided into four timeslots. The Coordinator sends a unidirectional audio stream to a single Node at each timeslot. This allows the system to have 1 to 4 Nodes playing the same audio stream. If one or more Nodes is closed or its link is broken, the other Nodes will still be able to play.
The following diagram illustrates the general structure of the schedule used in this application.
Five different frequency bands are used in the 4-channel audio application. While cycling through the timeslots, it also cycles through the frequency bands as well. Since there are 4 timeslots and 5 frequency bands, a timeslot will not be assigned to a specific frequency band. This prevents a Node from not receiving the payloads if a specific band is not functional due to interferences.
Output volume level can be adjusted on all Nodes using SW1 (volume up) and SW2 (volume down). By default, the volume is at the maximum level.
On the Coordinator board, the LED0 blinks quickly every time a packet is successfully transmitted (which implies a successful ACK has been received following the transmission).
Once the application is started, the Coordinator records the audio signal from an audio source on its Line-In jack (blue) and sends it over-the-air to the other Node devices to be played back on a speaker or headphones connected to their Headphones jack (black).
Configuration¶
Setting a compile option is required on the Node devices since more than one can be used. The following table shows the possible value associated with each Node. Note that this is done automatically with the provided build configurations in the STM32CubeIDE project.
Role |
Value |
|---|---|
Node 1 |
NODE1 |
Node 2 |
NODE2 |
Node 3 |
NODE3 |
Node 4 |
NODE4 |