Audio User Data

Description

This application uses the Wireless Protocol Stack (WPS) to send data in addition the audio stream. It uses the “User Data” feature of the audio core to enable sending data inside the audio packet. Communication is between a Coordinator device and a Node device.

Behavior

Pressing SW1 on the Coordinator device, will cause LED1 on the Node device to light up. Pressing SW2 on the Coordinator device will cause it to turn off. The exchange of information is made possible by the Audio Core user data processing stage. On the Coordinator side, this processing stage appends 1 byte of custom data to the audio samples generated reflecting which state the Node’s LED1 should be. On the Node side, this processing stage decapsulates this byte of data and triggers a callback function which sets its LED1 state. Output volume level can be adjusted on the Node using SW1 (volume up) and SW2 (volume down). By default, the volume is at the maximum level. You will notice LED0 blinking very quickly when communication is successful; this is because LED0 blinks every time a packet is successfully transmitted (which implies a successful ACK has been received following the transmission). The following diagram illustrates the general structure of the schedule used in this application.

Audio User Data schedule

Configuration

This application does not require specific configurations.