MASTERARBEIT. Embedded Web Radio. Ausgeführt am Institut für Computertechnik Institutsnummer: 384 der Technischen Universität Wien - PDF

Description
MASTERARBEIT Embedded Web Radio Ausgeführt am Institut für Computertechnik Institutsnummer: 384 der Technischen Universität Wien unter der Anleitung von O. Univ. Prof. Dipl.-Ing. Dr.techn. Dietmar Dietrich

Please download to get full document.

View again

of 115
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Information
Category:

Genealogy

Publish on:

Views: 15 | Pages: 115

Extension: PDF | Download: 0

Share
Transcript
MASTERARBEIT Embedded Web Radio Ausgeführt am Institut für Computertechnik Institutsnummer: 384 der Technischen Universität Wien unter der Anleitung von O. Univ. Prof. Dipl.-Ing. Dr.techn. Dietmar Dietrich und Univ.Ass. Dipl.-Ing. Dr.techn. Stefan Mahlknecht als verantwortlich mitwirkendem Universitätsassistenten durch Bakk.techn. Harald Krapfenbauer Matr.Nr Waldrandsiedlung 126, 3910 Zwettl April 2007 Kurzfassung Ein embedded web radio ist ein autonomes Gerät, das es ermöglicht, Radiosender aus dem Internet ähnlich wie mit einem herkömmlichen terrestrischen Radioempfänger zu hören. Internetradio bezeichnet eine Technik, die über das Internet fortlaufende Datenströme mit Audiosignalen überträgt. Verglichen mit traditionellem Rundfunk, sind dabei die zwei wesentlichen Vorteile, dass Internetradiosender überall in der Welt empfangen werden können und die Anzahl der Sender nicht von vornherein begrenzt ist. Das Ziel dieser Arbeit ist es, ein vielseitiges Gerät zu entwickeln: Außer seiner Hauptfunktion dem Abspielen von Radiosendern aus dem Internet soll es die Wiedergabe von Audiodateien sowohl im lokalen Netzwerk als auch von einem Massenspeicher ermöglichen. Die Unterstützung all dieser Funktionen unterscheidet das Webradio von anderen kommerziell erhältlichen Produkten. Der Fokus der Arbeit liegt dabei rein auf der Funktionalität, das Design des Geräts wird nicht berücksichtigt. Die für das Webradio ausgewählte Hardwareplattform basiert auf dem Blackfin-Prozessor ADSP-BF537 von Analog Devices und besteht aus mehreren Entwicklungsplatinen, die am Institut für Computertechnik entworfen wurden. Das Betriebssystem uclinux, das für die Blackfin-Architektur verfügbar ist, wird auf der Zielhardware eingesetzt. Diese Linux-Distribution enthält den für eingebettete Prozessoren angepassten Linux-Kernel und darüber hinaus eine Fülle an bereits vorhandenen Werkzeugen und Anwendungen. Für das Webradio bietet es viele Softwarekomponenten wie Gerätetreiber für Audio und Netzwerk, Audiodecoder und Unterstützung für Netzwerk-Dateisysteme. Die folgenden Softwarekomponenten wurden neu implementiert: ein Gerätetreiber für ein farbiges TFT-Display, welches zur Anzeige der grafischen Benutzeroberfläche dient, die zentrale Anwendung für die Steuerung und eine Webanwendung zur einfachen Konfiguration des Geräts. Weiters wurden der vorhandene Gerätetreiber für Secure-Digital-Speicherkarten sowie der Audiospieler verbessert. Das Ergebnis dieser Arbeit ist ein voll funktionsfähiges Webradio. Abstract An embedded web radio is a stand-alone device that is capable of playing web radio stations from the Internet. It is similar to a traditional radio receiver. Web radio is a technique that broadcasts continuous audio streams over the Internet. The main advantages compared to terrestrial radio are that web radio stations are accessible from anywhere in the world and the number of stations is not limited. The aim of this work is to develop a versatile product: Apart from its main function the playback of web radio stations listening to audio files from the local network as well as from some mass storage shall be enabled. Supporting these functions differentiates the embedded web radio from available commercial products. The focus thereby solely lies on the functionality, design issues are neglected. The target hardware platform that is chosen for the embedded web radio is based on the Blackfin processor ADSP-BF537 from Analog Devices and is comprised of several development boards developed at the Institute of Computer Technology. The uclinux operating system which is available for the Blackfin architecture is employed onto the target. The uclinux distribution contains a Linux kernel that is adapted to the needs of embedded processors and a great many tools and applications. It provides a lot of necessary software components for the embedded web radio, like device drivers for audio and network, an audio player and support for network file systems. The following software components are implemented from scratch: A device driver for a color TFT-LCD which provides a graphical user interface, the main control application, and a web application for easy configuration of the embedded web radio. Furthermore, an available device driver for secure digital (SD) memory cards is enhanced as well as the audio player. The result of this work is a full-functional embedded web radio device. Acknowledgements Special thanks go to my parents who supported me in all respects during my studies in Vienna. I want to thank my supervisor Dipl.-Ing. Dr.techn. Stefan Mahlknecht as well as Dipl.-Ing. Dr.techn. Gregor Novak for their helpful pieces of advice. Furthermore, I m grateful to the Blackfin expert Dipl.-Ing. Martin Hausner for his hardware support. Roland Oberhammer and Contents 1 Introduction Web radios Problem description Structure of this document Requirements analysis and system architecture Brainstorming Requirements engineering Functional requirements Non-functional requirements System architecture Architectural design Use cases Target platform composition Hardware components Core module CM-BF537E V Blackfin Evaluation Board EVAL-BF5xx V Blackfin Extender Board EXT-BF5xx-Camera V Hitachi color display TX09D70VM1CDA Blackfin Extender Board EXT-BF5xx-Audio V Input buttons Composition Hardware configuration Software issues Starting with uclinux Introduction Development environment Toolchain Bootloader Das U-Boot Overview Building U-Boot from source Bringing U-Boot onto the target Important routines uclinux distribution Building uclinux Adding own drivers and applications I 4.5.3 Debugging Software components configuration Audio Ethernet Flash memory Network applications Programmable Flags driver Software development Hitachi TFT-LCD device driver Frame buffer and memory mapping Implementation Troubles SD card device driver Configuration Debugging and driver improvement Modifications to available software Kernel page allocation patch MP3 audio player SMB mount tool Web radio application Configuration Graphics library Button inputs Main application Troubles Web service The common gateway interface Managing web radio stations Managing network shares Password protection Modifications to the hardware Display Audio chip Buttons Testing and final work Software testing SD card device driver Web radio application Environmental error scenarios Network security Final work Conclusion 100 A Hardware pins assignment 104 II B Screenshot of the web configuration interface 106 C Complete uclinux configuration 107 III Abbreviations ADI ADC ALU BFLT CFI CGI CVS DAC DIP DMA DSP ELF FTP GCC GNU GPIO HTML IDE LAN LCD MMC MMU MPEG PCM PPI PWM RAM ROM SD SDRAM Analog Devices, Inc. Analog-to-Digital Converter Arithmetic Logic Unit Binary Flat Common Flash Interface Common Gateway Interface Concurrent Versioning System Digital-to-Analog Converter Dual In-line Package Direct Memory Transfer Digital Signal Processor Executable and Linking Format File Transfer Protocol GNU Compiler Collection GNU s Not Unix General Purpose Input/Output Hypertext Markup Language Integrated Development Environment Local Area Network Liquid Crystal Display MultiMedia Card Memory Management Unit Motion Picture Expect Group Pulse-Code Modulation Parallel Peripheral Interface Pulse-Width Modulation Random Access Memory Read-Only Memory Secure Digital Synchronous Dynamic Random Access Memory IV SPI TFT TFTP UART URL USB Serial Peripheral Interface Thin Film Transistor Trivial File Transfer Protocol Universal Asynchronous Receiver/Transmitter Uniform Resource Locator Universal Serial Bus V Chapter 1 Introduction 1.1 Web radios Web radio, also referred to as Internet radio, denotes a technique that broadcasts continuous audio streams over the Internet, much like traditional terrestrial radio. So the purpose and the use of traditional radio and web radio are nearly identical. Since the number of users that have broadband access to the Internet available increases, the web radio technique becomes more and more attractive as alternative to terrestrial radio. Although it is not widespread today, an increase of popularity can be forseen due to a couple of essential advantages which will be discussed later. There are some major attributes common to web radio, terrestrial radio and satellite radio as well: A continuous audio stream is delivered to the listener. Listeners have no control over this audio stream as opposite to on demand services. The concept of stations is applied to all techniques: A radio station of terrestrial or satellite radio corresponds to a dedicated channel that is denoted by a frequency. With web radio, the term web radio station will be used throughout this document. Such a station is uniquely described by its Internet address, commonly known as URL [Ber94]. There are web radio stations that correspond to terrestrial radio stations to reach more listeners. However, most web radio stations broadcast by means of the Internet only. In the following, the differences between web radio and traditional radio shall be specified, together with advantages of the former: It was already mentioned that the medium of transmission is different: Terrestrial radio is broadcasted via radio waves through open space, whereas web radio is transported by means of the Internet. Traditional terrestrial radio is transported with analogue technique, though digital terrestrial radio will take over in the future. Web radios can only be transported in a digital form due to the inherent nature of data transfers in the Internet. 1 Chapter 1 Introduction Whereas terrestrial radio stations may only be received locally within their transmission range, web radio stations are accessible from anywhere in the world, provided that Internet access is available. This makes the latter a very popular service for travelers and people who spend a length of time abroad and want to tune in to radio stations from home. With conventional radio, the amount of stations that can be broadcasted simultaneous is limited. This is not true for web radio, where theoretically an infinite number of stations spread over the Internet may exist. The previous point leads to the advantage that every listener is likely to find web radio stations that suit one s taste exactly, because there is simply a much greater supply available. Hence web radio is popular for listeners who s interests are not adequately served by local radio stations provided by terrestrial or satellite radio. Finding a radio station is traditionally accomplished by means of a manual or automatic channel search. However, this cannot be applied to web radio stations because that would require scanning the whole Internet. The task of channel searching is undertaken by special search engines. Popular ones are SHOUTcast (http://www.shoutcast.com), Live365 (http://www.live365.com) and Icecast (http://www.icecast.org) [WWIb]. The technique that is used for web radio is called audio streaming or audio broadcasting. To be able to transmit such streams with a reasonable data rate, audio signals are encoded by means of an audio codec. The MP3 codec is most popular, followed by Ogg Vorbis, Windows Media Audio and Real Audio [WWIb]. The digital stream containing audio data is mostly transferred over the network by means of HTTP 1 which is the most common one used in the Internet. To be able to listen to web radio stations, software or hardware is needed that is capable of receiving HTTP data streams and decoding the audio signal for playback. Examples of software players that run on a personal computer are Winamp (http://www.winamp.com) for Microsoft Windows, itunes (http://www.apple.com/itunes) for Macintosh and Windows PCs, and XMMS (http://www.xmms.org) for Unix/Linux operating systems. 1.2 Problem description Today, listening to web radio stations is mostly done by means of a personal computer with a connection to the Internet and appropriate software. Furthermore, loudspeakers must be attached to the computer. While this is a convenient way for web radio playback if the listener anyway works at the PC, the need of a PC to be able to listen to web radio stations is a big drawback in general. It should be as easy as listening to traditional radio stations with a radio receiver present in every household. The aim of this project is to fill this gap by creating a stand-alone device that is independent from a PC and allows playing web radio stations by means of an Internet connection. This is the most important function of the proposed device. However, to develop an interesting and versatile product, additional features shall be integrated: Playback of music stored on 1 HyperText Transfer Protocol 2 Chapter 1 Introduction other devices in the local network shall be possible. To make the product portable, some mass storage containing audio files shall be able to be connected to the device. This allows employment even if Internet access is not available. Actually, this idea is not completely new. There are a few vendors that already sell such products. The intended use of these devices vary. Some are part of complete systems that aim for professional use in restaurants or companies where the same music shall be transferred to many different locations. Others are consumer products and hence target the same class as the embedded web radio which will be developed here. In the following, 3 of these devices are picked out and shortly introduced: Squeezebox is a product from the company Slim Devices [WSL]. It primarily aims at listening to music from the local network. Therefore it requires a proprietary software installed on each PC to function as a source for audio files. It also supports playback of web radio stations. Therefore it connects to the SqueezeNetwork web service to get a list of channels. Connecting a mass storage device is not supported. LUKAS-EV is sold by the company Streamit [WST]. It is aimed for professional use in large buildings and optimized for autonomous operation. Configuration with a PC over a USB cable is necessary prior employment. It has two simple operation modes: Either a fixed web radio station is programmed that is played or a special web server delivers a list of stations, whereof the first is chosen and played. Playback of music files from the local network is not supported, neither is the connection of some mass storage. Acoustic Energy Wi-Fi Radio was developed by the company Reciva [WREb]. It supports several audio codecs. Streaming of web radio stations is supported, whereby the list of available stations is downloaded automatically from the manufacturer s homepage. Playback of audio files from the local network is also possible. No mass storage can be connected to the device. The embedded web radio that shall be developed in this project differentiates from the above ones by the following features: As already mentioned earlier in this section, the device shall be versatile by offering playback of web radio stations, audio files from the local network, and audio files from some mass storage, e.g. a memory card. The list of available web radio stations is not downloaded from a central server, but is totally configurable by the user. For data exchange within the LAN, common protocols shall be supported. There must be no need for additional software on a PC to transfer audio data to the embedded web radio. The aim of this work is to create a fully-functional stand-alone device which typically consists of hardware and software. Questions of design, which would be inevitable to make a sellable end product, are totally neglected. As an example, such a question would be whether loudspeakers are integrated into the case or the device is connected to an external audio system. The focus of this project lies solely on the functionality. 3 Chapter 1 Introduction 1.3 Structure of this document This section will give an overview about the work that was done. The chapters this document is divided into correspond to phases of development. Chapter 2 deals with requirements analysis and system architecture for the embedded web radio. Basic inputs and outputs are determined, functional and non-functional requirements are worked out, and a list of required hardware and software components is made. The chapter ends with detailed use cases for the device. Chapter 3 describes the composition of the target platform. The hardware components are introduced and configured. The selected hardware builds upon a Blackfin processor from ADI 2. Afterwards, software issues are treated. Thereby, uclinux comes out as best suited operating system for the purpose of this project, because lots of required software components are already included. Chapter 4 gives an introduction to the uclinux operating system for the Blackfin processor. The exercised development environment is described and the 3 main software packages are explained that are needed for uclinux: The toolchain for cross-compiling, the bootloader Das U-Boot, and the uclinux distribution itself containing the Linux kernel and user space applications. Chapter 5 deals with configuration of available software components, notably audio, Ethernet and flash memory device drivers and network applications. Chapter 6 builds the main chapter of this document because it describes the software development phase. Device drivers are implemented first: For an LCD (liquid crystal display) one has to be implemented for the uclinux kernel. Furthermore, the available SD card device driver needs to be enhanced regarding stability to be usable for the embedded web radio. Thereafter, 2 user space applications are developed: The main control application and the web application for configuration of the device. Furthermore, the audio player is slightly modified. Chapter 7 describes hardware modifications that are necessary for proper collaboration of all components. Chapter 8 deals with testing and final work. Accurate testing is conducted with the main application. Finally, the work is completed by deploying the software onto the target. Chapter 9 includes a summary of the work. Problems are pointed out and a list of imaginable future enhancements of the embedded web radio is presented. 2 Analog Devices, Inc. 4 Chapter 2 Requirements analysis and system architecture This chapter presents various sections about the planning phase of the embedded web radio device. To support effectiveness, some techniques from the field of software engineering are applied and adopted to this project s specific needs. The requirements elicitation process starts with a brainstorming where a general idea about the capabilities of the system is found. Afterwards, functional and non-functional requirements are determined. During the system architecture phase a hardware/software component analysis is accomplished and a detailed use cases document is worked out. 2.1 Brainstorming Brainstorming is a technique to generate new ideas and possible solutions [Mac05] and can be used for requirements elicitation at the beginning of system design. Since an embedded web radio per se implies nothing than being able to play audio broadcasts from the Internet, in this phase additional features are found and a basic concept of the device is created. Two questions are important during this phase: 1. What features should be supported by the system? 2. What are the inputs and outputs of the system? The brainstorming process leads to the following unordered set of features which should be supported by this device: The web radio device should be a stand-alone device similar to a traditional radio. Web radio stations (audio streams) from the Internet should be able to be played. This is the main functionality of the device. Since there exist various audio stream encodings, it has to be analyzed which encodings should be supported. Furthermore, the type of network connection
Related Search
Similar documents
View more...
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks