Streaming Client Network audio decoder firmware for MP3 streaming (HTTP, UDP, RTP) with automatic fail-over and USB playback Technical Documentation Firmware Released Supports : • • • • • V03.
Revision History Firmware Version Date Initials Notes Updated sections 1.2, 1.5, 4.1 Chapter 7 “Display interface” added Added relay support, B274 Added repeat function Added sleep function Described keyboard.html and added an image of the remote control Added error code 19 (Audio Format Not Supported) Added setup parameter B498 Added setup parameter i680 Updated FLASH layout Default value for URL1 is the Barix radio Removed messages.ini Added commands c=71 and c=72 update.
Firmware Version 3.08 3.10 Date 10.01.13 08.03.13 Initials Notes PK PK Setup parameter B250 – audio buffer size. Audio formats, RTP/AAC Added configurable parameters SNMP SysName and SysLocation to Setup and into remote configuration.
Table of Contents 1 Introduction............................................................................................................ 7 1.1 About the “Streaming Client” firmware......................................................................................... 7 1.2 Features........................................................................................................................................ 7 1.3 Installing the device..........................................................
.2 URL Variable Substitution............................................................................................................ 35 5.3 Triggered Message Playback....................................................................................................... 35 6 Audio Formats....................................................................................................... 37 6.1 RTP.......................................................................................................
SNMP trap sending....................................................................................................................... 57 SNMP querying............................................................................................................................. 57 File “BARIXAUDIOSNMP.MIB”........................................................................................................ 57 10.4 Error Code Listing..........................................................................
1 Introduction 1.1 About the “Streaming Client” firmware The “Streaming Client” firmware was designed for the professional field: audio bridging, audio distribution, in store and standalone applications. It is capable of playing MP3 files using various protocols. Up to three sources can be defined (both streaming over network and playing from a local USB storage) for streaming with automatic failover.
1.4 Additional documents Technical specifications can be found in the corresponding product sheet which can be downloaded from our site www.barix.com. For configuration information please download the “Streaming Client Manual” from our website. 1.5 Preloaded Firmware Barix preloads all Exstreamer family devices, except for the Exstreamer 110, with the “Standard” firmware version, which suits most home and consumer applications.
2 Memory organization 2.1 Serial Rescue Kit / Web Update Two different procedures exist to upload the “Streaming Client” firmware into the device: The “Serial Rescue Kit” using the serial cable will upload the firmware files, the boot loader and the “factory defaults configuration” which will erase the current configuration. The “Web update” using a browser will upload the firmware files and the “factory defaults configuration” but will not alter the current configuration.
advanced WEB upload method is used together with the remote firmware update, the individual pages must be loaded carefully because the firmware can be currently placed in the second partition (pages 15 to 30). 2.3 Configuration storage (EEPROM) The current configuration is stored in a non-volatile memory (EEPROM).
Parameter Byte Dynamic Len Name Default Short Description DNS 2 68 B68, 4 B69, B70, B71 0.0.0.0 Alternative DNS IP address. 0.0.0.0 here always disables secondary DNS IFMODE0 80 B80b0-1, 1 B80b2-3, B80b4-5, B80b6-7 or B80 0x4C Serial port 0 settings Definition of the bits in that byte for the serial port 0: Function 7 6 5 4 3 2 1 0 RS232-C 0 0 7 Bit 1 0 8 Bit 1 1 no parity 0 0 even 1 1 parity odd 0 1 parity 1 Stopbit 0 1 2 Stopbit 1 1 BAUDRATE 81 0 B81 1 2 Baudrate for the serial port 0.
Parameter Byte Dynamic Len Name DHCP Host 98 Name S98 16 Version Major 116 B116 1 1 Version Major value (do not change) Version Minor 117 B117 1 3 Version Minor value (do not change) Setupex Length 120 W120 2 894 Length of the extended setup (always 894) Password Level 0 122 S122 8 Password reserved for future use, stored as a MD5 hash (first 8 bytes), all 0 means no password Password Level 1 130 S130 8 Password used for viewing and changing the configuration, stored as a MD5
Parameter Byte Dynamic Len Name Default Short Description A/D Gain 249 B249 1 64 Attenuation of the line input signal on Exstreamer 205: 0 = mute 1 = -36dB 2 = -30dB 4 = -24dB 8 = -18dB 16 = -12dB 32 = -6dB 64 = 0dB Audio 250 buffer size B250 1 0 Logarithmic audio buffer size. Valid values are: 16 = high buffer size: 65536 bytes (default) 15 = medium buffer size: 32768 bytes 14 = low buffer size: 16384 bytes 0 or any other value are interpreted the same way as the value 16 (high buffer size).
Parameter Byte Dynamic Len Name Default Short Description Media 277 Configurat ion B277b0, B277b1, B277b2, B277b3, B277b4, B277b5, B277b6, B277b7 1 0x02 This values can be added (the function is activated by setting the bit): 0x01: 0 – shuffle off, 1 – shuffle on 0x02: 0 – USB Autoplay off, 1 – USB Autoplay on 0x04: 0 – USB streaming: finish file before switching back to higher priority stream, 1 – switch as soon as the stream is available 0x08: not used 0x10: not used 0x20: not used 0x40: not used 0
Parameter Byte Dynamic Len Name Default Short Description Bit Bit Bit Bit SNMP SysName 4: 5: 6: 7: unused unused unused unused 444 S444 18 SNMP System Name. Default is empty. SNMP 462 SysLocatio n S462 18 SNMP System Location. Default is empty. Target Page 480 S480 17 This is a software field used by setup.cgi. It contains the target page to be displayed after device reboot. I.e. in rebooting.html.
Parameter Byte Dynamic Len Name Default Short Description Triggered Playlist 570 S570 100 Volume Offset 677 B677 1 0 Output volume of the device can be offset to adjust the encoder-decoder path to 0dB. The Volume Offset is in dB units, stored in Setup as the value+128. E.g. +3dB offset is stored in Setup as 131. The Setup value 0 has a special meaning “auto”. "Auto" presets the gain automatically according to the hardware.
Parameter Byte Dynamic Len Name Default Short Description Stream 696 Max Check Period W696 2 30 URL1 700 S700 100 URL of first streaming source Default value: ”http://www.barix.com/radio.m3u” URL2 800 S800 100 URL of second streaming source URL3 900 S900 100 URL of third streaming source Default value: “playlist.m3u” 100 URL of HTTP proxy server. 100 Remote update URL. For further details see chapter 9 Remote Configuration and Update interface. 100 URL of BARIMON server.
3 Application Programming Interface (API) 3.1 Command interface Barix Streaming Client features a command processor with several interfaces: Serial, TCP, UDP, CGI (HTTP) and IR remote control. The serial, TCP and UDP command interfaces can be enabled or disabled, the CGI and IR command interfaces are always on. Commands are processed asynchronous to the audio stream. The available commands are listed in section below.
3.
Element Description CGI command CHANNELDEC Decrement channel number (see chapter 7 IR control interface). c=16 VOLUMEINC Increment volume by 2% c=19 VOLUMEDEC Decrement volume by 2% c=20 TOGGLESHUFF Toggle shuffle. LE c=30 CHANNELINC_2 Increment channel number in the range 0 to 99, used c=71 DIGIT internally with VSC panel CHANNELDEC_ Decrement channel number in the range 0 to 99, 2_DIGIT used internally with VSC panel c=72 TOGGLEREPEA Toggle repeat.
Element Description CGI command BALM10 BALM09 --BALP00 --BALP09 BALP10 Set balance to full left set balance to -9 b=-10 b=-9 --b=0 --b=9 b=10 TREBLEM10 TREBLEM09 --TREBLEP00 --TREBLEP09 TREBLEP10 Set minimum treble level set treble level to -9 VOLUME00 VOLUME01 --VOLUME20 Set minimal volume level (volume off). Set volume level 1.
4 WEB User interface 4.1 User Interface Development Kit With the “User Interface Development Kit” you can design your own web pages (skin) and modify the answers to your needs. The “UI Development Kit” is included in the “Streaming Client Update Kit” which is available on www.barix.com. Change to the contained folder uidevkit.
Type Filename.extension Description CSS vumeter.css Style for VU-meter on the home page Basic frameset HTML index.html Main page of the web server, frameset including the frames: menu, uifstatus, empty. “empty” is a hidden frame that receives the answer of the CGI commands HTML menu.html Horizontal menu and Streaming Client logo frame on the top of the page Image barix.png Barix logo “Home” page HTML uifstatus.html “Home” page: the frameset HTML uihstatus.
Type Filename.extension Description Image 4to0.gif Countdown while the device is rebooting HTML uirdefaults.html uirloader.html uirreboot.html uirupdate.html Shown after pressing “apply” or during reboot of the device HTML uirdefaults1.html uirreboot1.html Shown after the device is successfully rebooted Update HTML uifupdate.html uiupdate.html uihupdate.html Firmware update: frameset, content and help HTML update.html Forwarding page to hide the command for the update HTML uifloader.
Type Filename.extension Description Text mimetype.ini MIME type database for the WEB server, see section “The WEB Server“ below Text remote.ini lookup file for IR commands, see section File “remote.ini” Text SONICIPVERSION for the version number of SonicIP implementation Text STREAMAPPVERSION for the version number and the history of Streaming Client Text update.ini lookup file for names used in remote controlling, see section File “update.ini” Text ex110.ddf vsc.
mimetype.ini file (as described above) resides in the webuidevkit/streamapp/ directory. 4.3 Dynamic Web Pages Web pages can include dynamic values. Dynamic Web Pages are built in HTML or XML or in an other text file format that exclude the binary character 0x00, i.e. the dynamic page can be an HTML file. It's possible to use scripts or everything else allowed in the given document's file format.
List of Dynamic Mark IDs for &LSetup ID Type Description 1 Function Print setup value 3. [par]: Address (decimal) of the value in the setup 4. [par]: Type of the value (B for unsigned byte, W for word, D for double word, c for char/signed byte, b for bit numbered from 0 to 7, e.g. b3 for the fourth bit). If this parameter isn't available the type will be B. e.g. &LSetup(1,"%08lx",315,D); as hexadecimal value with 8 characters and leading zeros e.g.
ID Type Description 19 Byte reserved (integer) 20 Byte fs.bin (USB file system) year of the build (only decade), BCD coded, (integer) use %02x to print 21 Byte fs.bin (USB file system) month of the build, BCD coded, use %02x to (integer) print 22 Byte fs.bin (USB file system) day of the build, BCD coded, use %02x to (integer) print 23 Function Print “selected” on condition Compares a Setup entry with a value and outputs “selected” if the condition is true. Used in
Par Type Description 11 Integer Reconnection counter 12 String Device's MAC address (each byte separated by a colon e.g. 00:08:E1:00:3D:90) 13 String Current IP address (four numbers, dot separated, without leading zeroes) 14 Integer USB device vendor ID 15 Integer USB device product ID 16 Integer USB device class 17 Integer USB device subclass 18 Integer USB interface class 19 Integer USB interface subclass 20 Integer USB device's max.
Par Type Description 42 Integer Currently decoded audio format: 0 = MP3 1 = u-Law 2 = A-Law 3 = PCM 5 = WMA 6 = Ogg Vorbis 7 = AAC/AAC+ 45 Integer IPAM identification (module type) 46 Integer Flash memory size in kB 47 Boolean Remote firmware update: (Int.) 0 = not available (flash too small) 1 = available 49 Integer Left audio output channel quasi peak in dBFS 50 Integer Right audio output channel quasi peak in dBFS 51..6 Integer 6 Current state of the relay 1..
Examples The following example shows how to implement a form field for the configuration value of the highest byte in the 'own IP address'. The input element name is a defined string, which has to be handled with care. The type character B stands for an unsigned value. 0 is the address of the expected configuration parameter . The value is a dynamic mark. The string onChange=IPCheck(this)will call the Javascript util.js to check if the value entered is in the range of 0 to 255.
the new configuration. Passwords are hashed (MD5) and stored in memory and set using the name Px, where x stands for the password level. If the password is set already, the old password must also be supplied (with the name Px) together with the new password using the name Px.1 (P level dot one).
5 Streaming Settings 5.1 Streaming URLs This chapter gives an overview of the supported URL protocols. The general URL syntax is: protocol:// user : password @ address : port / path Protoco Description l Example file:// Local file playback (from USB storage or an SD card). Prefix is followed by a full path to a file or playlist. The “file://” prefix can be omitted. file:///music/backup .m3u http:// icy:// icyx:// HTTP or Shoutcast/Icecast protocol.
5.2 URL Variable Substitution URLs may contain variables which are processed and substituted by their values. Variables have syntax $NAME$, where name consists of printable upper case characters other than '$'. Following variable names are defined: Name Description Example MAC Device MAC address (12 digits in hexadecimal notation with no separators, A..F digits in capital letters) 0008E1002B0E IP Device IP address (four numbers, dot separated, without leading zeroes) 192.168.2.
NOTE 1: Please note that the triggered playback cannot be interrupted, therefore the files should be reasonably short. NOTE 2: Triggered playback and priority message work exclusively. If a priority message is being received then triggered playback is ignored and vice versa. NOTE 3: It is important that Streaming Client receives the Shoutcast trigger only once, otherwise the message will be repeated.
6 Audio Formats 6.1 RTP Audio format is automatically detected from payload type of the the incoming RTP stream (on both standard and priority stream). The following table provides an overview of the formats recognized by Streaming Client. Payload type Audio Format 0 μ-Law, 8bit, mono, 8kHz 8 A-Law, 8bit, mono, 8kHz 9 G.722, mono, 16kHz 10 PCM 16bit, MSB first, signed, 44.1kHz stereo, left channel first 11 PCM 16bit, MSB first, signed, 44.
7 IR control interface When using IR Remote Control, make sure there is line of sight between the IR Serial receiver and the IR Remote control. IR Buttons With the default factory configuration, following buttons can be used: +VOL/-VOL – Volume up/Volume down +SONG/-SONG – Next song/Previous song (for use with playlists) SHUFFLE – Toggles the Shuffle Play Mode The digit buttons (0..9) and the Play button () can be used to select channel number.
chapter 4.1 User Interface Development Kit. The remote.ini file in the sub folder webuidevkit/streamapp contains the commands for each button in a separate line. The file format is comma-separated and the values are case-sensitive. Don't write spaces between the separation, the only space needed is the one after the IR coding token (“NE: “ stands for NEC coding). Every line that doesn't contain an IR remote control command is handled as a comment.
Barix IR Remote Control Button Assignment Button IR code sequence Button IR code sequence 0 NE: 00FE30CF * NE: 00FED02F 1 NE: 00FE40BF # NE: 00FE8877 2 NE: 00FEC03F + VOL NE: 00FEA857 3 NE: 00FE20DF - VOL NE: 00FEC837 4 NE: 00FEA05F + SONG NE: 00FE48B7 5 NE: 00FE609F - SONG NE: 00FE6897 6 NE: 00FEE01F MUTE NE: 00FEF807 7 NE: 00FE10EF ON/OFF NE: 00FE807F 8 NE: 00FE906F PLIST + NE: 00FE00FF 9 NE: 00FE50AF PLIST - NE: 00FEB04F Play NE: 00FE7887 SHUFFLE NE: 00FEB8
8 Display interface On Barix devices featuring an LCD (Exstreamer 110), additional device status information is displayed, as follows: ● At startup: welcome message followed by device's IP address ● During normal operation: status, channel number, URL number, current bitrate, song name if available (see below) ● On user request: shuffle on/off, volume change, channel selection, factory defaults, reboot ● During remote update: status of the update, firmware update indication The display content and i
Example 2: only the name of channels 017, 020 and 021 is defined. channels.ini contains 17 empty lines, followed by the name of channel 017 on the next line, followed by two empty lines and channel names for 020 and 021 on the last two lines. By default, the channels.ini file is empty. 8.1 The DILL Language Introduction The purpose of the DILL interface is to define a generic interpreted language describing display content and events.
Function definition starts with capital 'F' (ASCII 0x46) followed by a decimal index of the function and the colon character (':', ASCII 0x3A). Then one or more commands follow (as described above). No spaces between commands are allowed. A function which is not found is not executed. This is not considered as an error (simply some functions don't do anything on some displays).
Only ASCII characters in the range 0x20-0x7F are allowed as printable characters. The following backslash sequences are accepted in string constants: \000 (octal character code), \\ (backslash), \" (quote), \n (new line). The cursor position and other features are controlled by printing standard ANSI escape sequences. Each control sequence starts with the “escape” character (ASCII code 27, hexadecimal 0x1B) followed by the '[' character (left square bracket, ASCII code 91, hexadecimal 0x5B).
• accepts an integer parameter • stops execution of the current function and starts executing the function number n H(x) - set display backlight • accepts an integer parameter • controls the display backlight • x can have the following values: • 0 - light off • 15 - light fully on • 1..
Boolean expressions A single boolean operators can be used in conditional execution (see the Test command above). A boolean operator has a name: a small letter, and its parameters enclosed in brackets. The parameters of a boolean operator are either integer or string constants or variables. Optionally, a boolean expression can be prefixed with the exclamation mark ('!', ASCII 0x21) for the logical NOT function.
ID Description i3 The current volume in 1% steps i4 The currently selected channel number i5 The channel number being currently played i6 1 if the current URL is channel based (contains $NUM$), otherwise 0 i7 The current URL number: 1, 2 or 3 i8 The current bitrate in kbps Function calls The below table lists all the display function calls of the Streaming Client application: Fn.
Fn. Description Number F91 Reset via the button: print the "reset" message and lock the display F92 Factory defaults and reset: print "factory defaults" message and lock the display F93 Entering the bootloader: print “Bootloader...
9 Remote Configuration and Update interface Please note that the Remote Firmware Update is supported only on devices with 2MB Flash memory. Remote Configuration Update as well as Remote Command Execution can be performed on devices with 1MB as well as 2MB Flash memory. 9.1 Configuration parameters Update URL For remote configuration and update the configuration field “Update URL” can be used to point to the web server (http) containing the “Configuration Meta File”.
in the following four steps: • control commands are executed and config values are stored in the configuration memory • the firmware is updated if the value of the keyword FW_URL is pointing to a valid firmware file (compound.
Content of the update.
Content of the update.
update_rescue into your HTTP directory, the URL will be http://www.myserver.net/streamingclient/update/compound.bin • create new text file http://www.myserver.net/streamingclient/update/update.txt containing : Content of the update.txt VERSION=1 FW_VERSION =0131 FW_URL=http://www.myserver.net/streamingclient/update/compound.bin • configure your devices “Update URL” field with http://www.myserver.net/streamingclient/update/update.txt • push the “Apply” button on the WEB interface.
Here is an example how to do it: • Configure both devices with following Update URL: http://www.myserver.net/streamingclient/update/update-$IP$.txt • Create the file http://www.myserver.net/streamingclient/update/update-192.168.2.100. txt with following content: Content of the update-192.168.2.100.txt VERSION=1 url1=http://www.barix.com/radio.m3u url2=file://backup.m3u • Create the file http://www.myserver.net/streamingclient/update/update-192.168.2.101.
10 Remote monitoring interface The “Streaming Client” firmware supports two different ways of remote monitoring: SNMP and Barimon. SNMP can send a trap on start-up and when switching the stream and can be requested at any time . Barimon sends periodic reporting as well as information on request. The features of these protocols are described in the following chapters. 10.1 Barimon Remote Monitoring The device can be monitored using Barimon technology. Please visit http://www.barimon.
Value Type Description Reconnects 16bit unsigned decimal number Amount of reconnects due to loss of the stream source SoftErrorCount 16bit unsigned decimal number Amount of stream drop-outs (missed more than 5 frames in a row) StreamNumber String (0,1,2,3 or Number of played stream “prio” for priority) UpTime 16bit unsigned decimal number Up time of the device in seconds (since last reboot) URL String URL of the currently played stream Volume 8bit unsigned decimal number Current volume le
http://[:@]/ (name and password can be omitted e.g. http://www.myserver.com/) The frequency of Barimon reporting can be set in the configuration field “BARIMON Report Period” in minutes. The complete report will be sent in this defined time interval. Example “submit.php” The submit PHP script can read the variables from the $_GET array e.g.
Content of the BARIXAUDIO.
Content of the BARIXAUDIO.
Content of the BARIXAUDIO.
Content of the BARIXAUDIO.
Error Code Name Description Resolution Problem 2 No TCP Response Host not responding to TCP SYN, connection can't be established, port closed or host not accessible 3 Reserved 4 No HTTP Response No answer to HTTP GET request or partial response received – timed out 5 Invalid Response Invalid HTTP response header received 6 Missing Path The selected protocol requires a path to be specified 7 Missing Port Number The selected protocol requires a port number to be specified 8 Missing Hostname The
11 Legal Information © 2007-2013 Barix AG, Zurich, Switzerland. All rights reserved. All information is subject to change without notice. All mentioned trademarks belong to their respective owners and are used for reference only. Barix, Annuncicom, Exstreamer, Instreamer, SonicIP and IPzator are trademarks of Barix AG, Switzerland and are registered in certain countries. For information about our devices and the latest version of this manual please visit www.barix.com.