NetTuneProxy v1.02

1. Description

NetTuneProxy is a free java application that simulates a HTTP-proxy server for Net-Tune™ devices. It allows you to configure your own internet radio stations, and not depend on Xiva predefined list.
The source code of this application is totally free.

The configuration of your radio stations is stored in the file iRadio.txt, see the section "Configure your stations" for more information).

2. Running the proxy

2.1. Requirements

- The computer on which this program will run must have access to internet.
- A JRE (Java runtime environment) version 1.5 must be installed on your system. To check your java version, enter the following command in a console:

java -version

The output will look somethink like:

java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)

If you have no java installed or if your version is older than 1.5, install the latest JRE from Sun. Note: java 1.5 is sometime referred to as java 5.0, don't bother it's all the same.

2.2. How to run it

1. Unzip the archive.
2. Edit the configuration file iRadio.txt (see the section "Configure your stations").
3. Execute "run.bat" for Windows user or execute the command "java -jar NetTuneProxy.jar".

The proxy will then wait forever for input connections until you enter the "exit" command. The default listening port is 8000. If the configuration file is valid, no error should be displayed.

Testing if it works
The easiest way to check if the NetTuneProxy is operationnal is to do a test with your favorite web browser: go in the connection parameters and enable proxy. For the proxy address choose the address of the computer on which you started NetTuneProxy, and for the port use 8000 if you didn't specified a different port on the command line.
Try to access a simple web page (different of www.xiva-net.com of course :) ). You should see the site you requested as usual. The test is successful, you can now disable the proxy settings of your browser.

If you did not received the page, look in the NetTuneProxy window if there are errors.

4. You have to configure your Net-Tune receiver to use that proxy server: go in the network configuration of the receiver, enable proxy and fills IP and port as you do when testing with your web browser.

5. Now select the source "Internet radio" on the receiver and enjoy. Remember to use the "Genre" menu only !

2.3. Command line options

Usage: java -jar NetTuneProxy.jar [-disable] [-h] [-port x] [-nometadata]

2.3.1. Displaying help

java -jar NetTuneProxy.jar -h

2.3.2. Selecting the listening port

java -jar NetTuneProxy.jar -port x

Force NetTuneProxy to listen on port x. Default listening port is 8000.

2.3.3. Disabling filtering

java -jar NetTuneProxy.jar -disable

This setting will disable any URL interception and protocol filtering. The proxy is then totally 'transparent'. It's mainly for debbuging purpose. By default, filtering is enabled.

2.3.4. Disbaling mp3 metadata

java -jar NetTuneProxy.jar -nometadata

If set, this setting will remove metadata encountered in mp3 streams.

Metadata is sent at regular interval and contain the name of the current song or radio. You may enable this option if you hear glitches in the sound at regular interval.

3. Configure your stations

The configuration of the radio stations is stored in the file iRadio.txt.
The format is: one radio description by line. A line is composed of 4 or 5 fields, field separator is semicolon:

genre ; [subgenre] ; displayed name ; url [; stream type]

Fields between square brackets are optional.
A line starting with '#' is a comment line.

At the moment, only genres are configurable, that means that you can only access your stations using the "Genre" menu in the receiver.

Fields description:
  • genre: genre name that will be displayed in the main menu "Genre" of your receiver.

  • subgenre: if set, this menu will be placed inside the previous menu. You are not required to fill it, in this case the station will be listed in the submenu "Miscellaneous". Note: there is always a default subgenre named "Miscellaneous".

  • displayed name: the name of the radio that will be displayed on the receiver.

  • url: the URL of the file or stream.

  • stream type: this field is optional, possible values are:
    - "pls" for .pls playlist file.
    - "mpeg" for raw mp3 stream.
    - "ms-asf" for Microsoft streams.
    - "m3u" for .m3u playlist file.
    If this field is not present, the program will try to determine the type of the stream from the URL. Recognized extentions are: asf, asx, mp3, pls, mp3, m3u. If the program cannot determine the stream type, it will assume it is a mpeg stream.
    If this field is present, the stream type will be forced, whatever the URL contains.

There is no need to stop and restart the proxy if you modify the configuration file: NetTuneProxy checks the last modification date and reloads it only if necessary. But the receiver I have caches each request (see section "Known limitations").

There is a sample configuration file included.

4. Known limitations

- My receiver caches all requests made to Xiva web site (or NetTuneProxy). A request is generated each time you select a genre (or subgenre) you have never browsed before. That means that most the time, if you modify the configuration file, you have to switch off the receiver. When the receiver restarts, it will access Xiva web site (or NetTuneProxy) and get a fresh copy of the menus.

- This proxy is not meant to take the place of any real proxy server: it does not handle HTTP connections very well, just enough for simple Net-Tune clients.

5. History

v1.02 - 2006-10-01:
  • Special characters are now correctly handled in the URLs of the configuration file.
  • Support for .m3u files. The factory firmware of the TX-NR801E only support the simple m3u file format (not the extended format). The firmware 02.00.03 does support the m3u extended file format.
  • Simplified configuration file. Stream type is now deduced from the URL.
v1.01 - 2006-09-13:
  • First public release.

Olivier Garrouste
Last edited 2006-10-01.