Stellaris Multimedia streaming client
Some of you might already have seen and read about the Multimedia streaming client project we posted as a video a couple of weeks ago. Though for you who haven’t here comes a description.
Back in May we were kindly given some of MikroElektronika’s latest ARM development tools and decided that we would make a big and time consuming project with it.
As we started planning the project we had no ideas at all but all of a sudden the idea of a Multimedia streaming client struck my head. Why not use the on board VS1053 Audio codec chip for music playback and then use the Ethernet port to add a streaming functionality.
This project would require some server side software and we decided to use Visual Basic .NET for this program.
The communication between the EasyMx PRO™ v7 for Stellaris® ARM® and the PC would be thru the Ethernet port and a UDP connection. Therefor we had to plan a high-level protocol for these UDP packages where the Clients (Stellaris board) would be given an ID so the server would actually be able to stream music to multiple clients on the same connection (IP address).
This protocol planning ended up in the following Excel design.
Now that the protocol had been planned the server side software was about to be made. As mentioned the program ended up being made in Visual Basic .NET but was developed in parallel with the Stellaris embedded software.
The most recent .NET source code of the server side application can be found at our Github repository for this project: https://github.com/TKJElectronics/Multimedia_Streaming_Client/tree/master/Multimedia_Server-VisualBasic.NET
Next task was the layout design for the menu system to be displayed on the 320×240 pixel TFT display. We decided that the joystick would be used instead of the touch screen and this eased the navigation task a bit.
As we were also given the MikroElektronika VisualTFT software for easy Graphical User Interface (GUI) design, we used that. VisualTFT is very similar to the GUI design in Visual Studio so it was an easy task to place the required objects such as text, images and buttons on the form.
The final decision was to have a loading screen with our logo where the initialization of the periphirals and the connection to the server would be made. Afterwards the primary menu form would be loaded where a list of audio files, image files and folders would be displayed. The final design can be seen in the image above and the VisualTFT files can be found at our Github: https://github.com/TKJElectronics/Multimedia_Streaming_Client/tree/master/Client_UI-VisualTFT
So now as the GUI design had been planned the rest but largest task to do was to develop the embedded software for the Stellaris processor within the mikroC environment.
This was definitely not an easy task as the client software had to be divided into several processes:
- Keeping server connection alive and making sure we still have a ClientID (recognized on the server)
- Fetching file and folder names
- Receive audio file content from server by use of divided packages saved into a buffer (~1480 bytes)
- Playback of Audio file by transferring file content to VS1053 chip
- Receive and display of RAW image files (converted on the fly by the Server)
So it was a huge task to develop the firmware as the project included several parallel running processes.
But we succeeded in first getting the firmware to fetch a ClientID and later on to receive file and folder names together with the navigation part and finally also to play audio files and display images.
The mikroC source code and binary HEX file can also be found on our Github: https://github.com/TKJElectronics/Multimedia_Streaming_Client/tree/master/Multimedia_Client-MikroC
The complete project can be seen in the video demonstration below.
So to sum up this project is a Multimedia streaming application for transfering audio and/or image data content to the MikroElektronika EasyMX Pro for Stellaris ARM board.
The transferring was done thru Ethernet as the board connects to our own server application (on Windows). The board is then able to play back mp3, wav or wma files by the use of the on board VS1053 Audio Codec chip.
Images, both JPG, BMP and PNG files, can also be transfered and displayed on the 320×240 TFT display as the server will convert the files on the fly to RAW image data ready for displaying on the QVGA display.
Finally the project can also be found at mikroElektronika’s LibStock place where different projects for mikroElektronika tools can be found: http://www.libstock.com/projects/view/366/multimedia-streaming-client