WebRadioApp  0.1
TUM Education - Web Radio Application
Concise System Architecture of the Web Radio Application

Welcome to the Web Radio Application documentation for the STM32H747I-DISCO.

This application:

  1. allows the user to control the volume of the music currently playing.
  2. connects to a radio station via the internet.
  3. supports HTTP protocol.
  4. supports HTTP protocol with Transport Layer Security (TLS), i.e. HTTPS.
  5. supports IPv4 and IPv6 connections.
  6. allows a smooth interaction with the user via a graphical interface.
  7. allows the user to select different radio stations via a graphical interface.
  8. allows the information of the current radio station program to be displayed.
  9. displays the Fast-Fourier Transformation (FFT) of voice data information of the radio station program.
  10. displays the Volume Unit (VU) of voice data information of the radio station program.
  11. displays status information of the application via a graphical interface.
  12. displays status information of the application via a serial interface (hardware port)

This application is composed of three main modules:

  • Web Radio Framework
  • Embedded Wizard Graphical User Interface.
  • Network Package modules.

Web Radio Framework

This framework is composed of several components:

  • Radio (Radio.cpp): This is the component that is related with every other component. It contains the structural object of the entire application.
  • TcpClient (tcp_client.cpp): This is the component created with the LwIP RAW API which contains a client that connects to a server to pull all the audio data and radio information. It is mainly related with the mp3player, radio component and Network Package module.
  • Stations (stations.cpp): This component contains information of the radio stations in the format of a grid.
  • ntpudp.c: This component allows the time to be pulled. It is mainly related with the Network Package module.
  • Mp3Player (mp3player.cpp): This component allows audio of mp3 format to be played. It is mainly related with the radio, tcp_client and Graphical Interface module.
  • Http_ssi.cpp: This represents the Server Side Includes for HTTP. It is mainly related with the Network Package module.
  • calend.c: This represents the calendar information. It is mainly related with the radio component.
  • hardware_rng.c: This represents the Entropy poll callback for the RNG module.
  • web_radio_config.h: This component sets configurations of the entire application.

Embedded Wizard Graphical User Interface

This graphical interface is composed of several folders:

  1. Generated Code: This is one of the most important folders, together with theDevice Driver (src folder) and the TargetSpecifc folder. All the generated code in C of the GUI which is ready to be integrated in a development environment is found here. EW Studio does this automatically.
  2. Platform Package: This contains the different drivers used for graphical development in EW, e.g. the EW run-time environment, pixel formatting for the respective LDC and similar components. These drivers are provided by the EW package.
  3. Device Driver (src folder): This folder contains an interface generated by EW for the UI application and the STM32H747I-DISCO device. This is where (almost all) the functions created in EW Studio are defined in order to provide the connection between the device and the GUI.
  4. TargetSpecifc: This folder also contains an interface (or glue layer as of TARA system calls it) between an EW generated UI application and the Board Support Package (BSP) of the STM32H747I-DISCO.

Network Package Modules

This graphical interface is composed of:

  1. LWIP: a small independent implementation of the TCP/IP protocol suite.
  2. MBEDTLS Library: a TLS library that handles the complexities of the Transport Layer Security (TLS)protocol for an application.

Follow the example server proposed here to find out more.

Quick Start

  1. Import the project into STMCubeIDE. Clean and build the project.
  2. Test HTTPS server connection (IPv4 + IPv6) by setting
    #define HTTPS_ACTIVE 1

    in web_radio_config.h.
  3. Test HTTP server connection (IPv4 + IPv6) by setting
    #define HTTPS_ACTIVE 0

    in web_radio_config.h.

(optional) Open the terminal and connect to the device to see debug information.

Note
The board implements DHCP by default. Therefore it is better to test the application with the PC host in the same network. Also in the case that the MAC address should be modified, this can be done here stm32h7xx_hal_conf.h.

Test