Wireless stereo speaker software development
Client
A European company, specialized in the development of professional audio equipment.
Â
Challenge
The client contracted us to delegate several tasks from the wireless WiFi speaker development project. We were to develop software components for a professional audio system. The system combines several audio speakers into a group for centralized configuration and playback of the audio stream over a wireless channel.
Our tasks were the following:
- Linux- and OpenWRT-based firmware development.
- Application software development for automatic adding/removing a speaker from a WiFi network.
Technical and system requirements are:
- Compatibility with Apple AirPlay;
- Timer activation via Wi-Fi and BLE;
- Audio streaming from a smartphone (iOS and Android) as well as from the Internet music services;
- Configuration via the mobile app.
The system includes up to four Wi-Fi-speakers that work in a group under OpenWrt control. In each group, one speaker is the central speaker, and the others are sub-speakers. An unlimited number of speaker groups can work in a wireless network. They are controlled by the client program (iOS-application / computer / remote control BLE). The central speaker in each group receives and transmits data to all clients in its group.
The user regulates the volume from the mobile app or by pushing the buttons on any speaker in the group (in this case, the sub-speaker will send the upstream control command to the central speaker to send this command to the whole group). Only the main speaker connects to the Internet via the base station to receive the audio stream from music servers.
Â
Solution
1. Hardware development
We received prototypes of the first version and a developer kit from the chip vendor. The Promwad team checked the circuitry and carried out PCB design to improve the antenna and radio performance.
The main components of the system:
- Wi-Fi/Bluetooth 4.0 TI WiLink 8 module
- WiFi 802.11 a/b/g/n interfaces, Bluetooth Low Energy (BLE)
- TI Sitara Cortex-A8 AM33xx microprocessor
- DDR3 128 MB
- NAND Flash 128 MB
- Class D audio amplifier
2. Software development
We have developed firmware based on the latest Linux and OpenWRT kernel versions.
We have also created a "smart" WiFi-configurator that connects to the network. In case the necessary WiFi network is not available, the speaker becomes an access point to which other speakers connect.
The main software modules:
- Wi-Fi kernel modules: wl18xx kernel modules for WiLink8 hardware (embedded in the kernel or compiled as kernel modules).
- Netifd: OpenWRT network manager. It controls basic network functions such as turning on/off the network, connecting to AP/ad-hoc, creating APs (can be controlled via the U-BUS interface).
- UCI (unified configuration interface): OpenWRT subsystem for configuration control. It stores and controls all configuration files for system components.
- Network Manager A software module that monitors the wireless functions of a device. It configures the WiFi network, selects the main speaker, sends packets of data between devices over the wireless network, initiates and closes the mDNS connection, and provides a D-BUS interface for top-level user software.
- User software: software modules that provide audio stream selection and transmission, user-side system configuration, etc.
- TEST Module: a basic user application to test the top level functionality. It emulates audio streaming, button presses, etc.
Â
Business value
The customer received the tested firmware for the wireless stereo speaker with the following features:
- AirPlay audio streaming (MAC, iPhone, iPad and Apple TV)
- Spotify audio streaming
- Audio streaming via Bluetooth
- Timer activation via mobile application