Last version: 0.6.5 (May 1th 2013) (full Changelog history)

Report issues, get support and leave feedback in this XDA forums thread.


What is BubbleUPnP Server ?



BubbleUPnP Server provides new services on top of your existing UPnP/DLNA devices: BUBBLEUPNP SERVER IS NOT AN UPNP AV MEDIA SERVER
It requires at least one working UPnP AV Media Server (Windows Media Player, Twonky, Asset UPnP, ...) or Media Renderer to do something useful.

At this time, the following features are supported:

Internet streaming and downloading

BubbleUPnP Server makes your LAN Media Servers available to BubbleUPnP for Android, for streaming over mobile (3G/4G) and WiFi connections, with the following advantages: This functionality can also be used on a regular LAN, for example to bypass regular UPnP SSDP device discovery in the rare cases it is not available for whatever reason (blocked by a firewall, UDP multicast disabled at the router level, ...).

Internet UPnP tethering

Using BubbleUPnP for Android, you can make your Media Servers from your home local network visible on another LAN to any UPnP AV devices of this LAN (TV, Control Points, ...).

To illustrate this functionality consider this scenario:

Suppose you have a Twonky server at home (replace Twonky with your favorite Media Server) and you go visit a friend who has a brand new UPnP/DLNA device connected to his stereo and a Windows 7 PC with Window Media Player. Using your Android device and BubbleUPnP you can push music from your Twonky Server to his stereo.

With UPnP tethering you can do the same using the "Play to" functionality of Windows Media Player. In short, your Android device makes your home Twonky server visible to Windows Media Player on your friend's network. This is UPnP tethering.

LAN Media Server proxying

Many Media Servers have bugs and sometimes return incorrect data which can prevent them from working fully with some UPnP Software. BubbleUPnP Server can create a "proxy" Media Server (associated to a real Media Server on your LAN), that will attempt to convert incorrect data into correct data. Data is always reformatted in a more compact format with the benefit of speeding up browsing on slower devices. Except for this difference, the proxy Media Server acts exactly as the real Media Server it is linked to.

Another possible use of proxying is to solve potential Media Servers discovery issues in your network with some UPnP software. As long as BubbleUPnP Server is able to discover your Media Server, it can create a proxy Media Server which in turn has more chance to be discovered by UPnP software.

Persistent and shared playlist for UPnP AV Renderers (OpenHome)

Video showing that feature (courtesy of Stephen Philips)

When operating an UPnP AV Renderer, the playlist of audio tracks resides on the Control Point which must remain running for playlist track advance to happen. It has 2 main drawbacks:

To tackle these issues, the OpenHome Playlist specification addresses the deficiencies of UPnP AV, adding the ability for an OpenHome Renderer to store and manage its playlist. It can advance playback by itself without requiring a Control Point to be running. Several OpenHome enabled Control Points can be connected to the renderer, sharing the same playlist. Any playlist change on one Control Point is immediately reflected on the others.

BubbleUPnP Server makes it easy to create an OpenHome renderer from any exisiting UPnP AV Renderer (WMP for example). Refer to this section for more information on how to create and control an OpenHome Renderer with BubbleUPnP for Android or other OpenHome Control Points.

Download and installation

Requirements

BubbleUPnP Server can run on any platform where Java 1.6 or higher is available. This includes:

IMPORTANT: if after install you cannot connect to the web interface, refer to the troubleshooting section.

Windows XP/Vista/Seven

On Windows, the easiest way to get started is to download the installer below.

Download the Windows Installer

Run the installer. If Java 1.6 32 bits or higher is not installed on your system, the installer will launch the Java 1.7 32 bits installer before installing BubbleUPnP Server. At the end of the installation process, BubbleUPnP Server should be running as a Windows service. The installer will launch your Web Browser to configure it. You can also connect to it pointing your Web Browser to http://localhost:58050 or launch the Desktop shortcut. If the Web Browser cannot connect to BubbleUPnP Server, refer to the troubleshooting section.

You will find shortcuts in the Windows Start menu to stop/start the service and launch the configuration interface in your web browser.

If you do not want to run BubbleUPnP Server as a Windows service you can download the archive for other platforms.

Ubuntu Linux

Ubuntu packages are provided in a PPA repository for easy updates. The server is managed as a regular upstart job.

First you must ensure that Java 6 or 7 is installed:

$java -version
java version "1.7.0_07"
Java(TM) SE Runtime Environment (build 1.7.0_07-b10)
Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)
If Java is not installed, the easiest way is to install the Oracle Java 7 JRE:
$sudo add-apt-repository ppa:webupd8team/java
$sudo apt-get update
$sudo apt-get install oracle-java7-installer
Although the Oracle JRE is preferred, the OpenJDK 6 or 7 should also work:
$sudo apt-get install openjdk-7-jre-headless

Once Java is available, enter theses comands to install the BubbleUPnP Server Ubuntu package from the BubbleUPnP Server PPA:

$sudo add-apt-repository ppa:bubbleguuum/bubbleupnpserver
$sudo apt-get update
$sudo apt-get install bubbleupnpserver

After install the server should be running. Connect to it with your web browser: http://localhost:58050 (from your Ubuntu machine) or http://<server LAN ip>:58050 (from another machine on the LAN).

NOTES:

Redhat Linux

Download RPM package

To install:

$rpm -i <rpm file>

NOTES:

If you need to adapt or rebuild the package you will need this file and this one.

Arch Linux

Download the package from the AUR and extract it to a temporary directory. Alternatively, use a tool such as cower to download and extract the package automatically:
$cower -d bubbleupnpserver
Change to the temporary directory:
$cd /tmp/bubbleupnpserver
Run makepkg to download, build, and install the package:
$makepkg -si
Follow the prompts and onscreen instructions to begin using BubbleUPnP Server.

NOTE: the source of the package is available on github

QNAP NAS

You can install one of these packages and read detailed instructions here You can find additional instruction to compile ffmpeg (if needed) here.

Alternatively you can follow the "Other Java platforms" section below for manual install.

Synology NAS

Alternatively you can follow the "Other Java platforms" section below for manual install.

Other Java platforms (Linux, MacOS X, Raspberry Pi, NAS, ...)

Download BubbleUPnP Server

BubbleUPnP Server is distributed as an archive containing a jar file.

  1. unpack the archive in a directory
  2. on unix platforms make launch.sh executable: chmod +x launch.sh
  3. on unix platforms run launch.sh, on Windows run launch.bat. Java 1.6 must be installed and the "java" executable must be in your PATH
  4. point your Web Browser to http://localhost:58050 to show the configuration interface
  5. for Internet access with Android BubbleUPnP, configure your firewall / Router NAT to allow access to TCP port 58050 (see server configuration below)
If you want transcoding support you will need to install ffmpeg on your system.

Alternatively you can run the server with:

java -jar BubbleUPnPServer.jar

IMPORTANT: There is a known JRE crash with some versions of OpenJDK on the ARM platform. It can be workarounded starting the server with:

java -XX:+PrintCommandLineFlags -jar BubbleUPnPServer.jar

Configuration

The core of BubbleUPnP Server is Web Server running on port 58050 by default for HTTP and on port 58051 for HTTPS.

The server must be accessible from the Internet on this port (LAN proxying functionality does not require this). The Windows Installer will try to auto-detect network settings so the server is usable straight away adding the required firewall and NAT rules, but this might not work in all network setups.

The configuration front-end is divided into 6 tabs:


Status

This page displays a summary of the server operational status and has all information required to configure BubbleUPnP for Android:

If "Server is reachable from Internet" is displayed, everything is fine and BubbleUPnP Server is ready to use for remote access.

Otherwise something is preventing the Internet to connect on the HTTP or HTTPS port. This will likely be a NAT or firewall issue. For example, if the public HTTP port is 58050 and the LAN IP Address displayed is 192.168.1.10

IMPORTANT: if you use HTTPS access, the HTTP port must still be open as it is still used for media streaming requests only.

Network and Security


In this page you can set the login and password that you will use to connect to the server:

If you are using a dynamic DNS service because your ISP changes your IP address at regular interval, you can change the public hostname to your stable dynamic DNS hostname.

If option "Allow to access server from the Internet" is disabled, the server will deny all Internet connections. If you plan to use BubbleUPnP Server with BubbleUPnP for Android, you must enable this setting.

If option "Allow to configure the server from the Internet" is enabled, these credentials are also used to connect to the configuration web interface from the Internet. By default this option is disabled and the configuration web interface is only accessible on the LAN.

If option "Enable media access log file" is enabled, all media streaming connections will be logged to the access_log.txt file found in the installation directory.

Media Servers

This page displays the list of Media Servers detected on your local network. For each Media Server you can configure:

When a proxy Media Server is created, a new Media Server with the same name will appear on your LAN with "[proxy]" appended to the name. For example if you have a Media Server named "Awesome" then a new one called "Awesome [proxy]" will appear. You can connect to it with any UPnP software like you would connect to "Awesome".

Media Renderers

This page displays the list of UPnP AV Media Renderers detected on your local network.

Creating OpenHome renderers

For each UPnP AV Renderer you can create a playlist aware OpenHome Renderer that you can control with either BubbleUPnP for Android (requires 1.3.3+) or other OpenHome Control Points.

An OpenHome Renderer has the following advantages over a regular UPnP AV renderer:

For example, consider this scenario:

To create an OpenHome Renderer from the selected UPnP AV Renderer just check "Create an OpenHome renderer". A new UPnP Device will appear on the network named after the UPnP AV Renderer's name with "(OpenHome)" appended. For example if you select a Windows Media Player Renderer called "bob (MYPCNAME: Windows Media Player)", then the newly created OpenHome Renderer will appear as "bob (MYPCNAME: Windows Media Player) (OpenHome)" in BubbleUPnP for Android. An OpenHome renderer has two optional parameters that you can modify:

Room and Name are ignored by BubbleUPnP for Android. However they are used by other OpenHome Control Points such as Linn Kinsky to get the full name of the renderer which will usually be "Room: Name".

To control an OpenHome renderer you cannot use a regular UPnP AV Control Point. You need an OpenHome Control Point:

Untested Control Points: ChorusDS (iOS, MAC), Konductor (iOS), PlugPlayer (iOS), SongBook DS (iOS), SongBook Mac.

Here are screenshots of both Linn Kinsky (left, PC) and BubbleUPnP for Android showing the same playlist for the Windows Media Player renderer as an OpenHome Renderer:

Help

This page. The FAQ section will be updated over time.

Connecting with BubbleUPnP for Android

Once BubbleUPnP Server is up and running you can configure BubbleUPnP to connect to it and start streaming music.

Remote UPnP Network configuration

In BubbleUPnP:

Name

This is the name used to identify the remote BubbleUPnP Server network. You can choose any name you want. It is used to identify Media Servers from different networks. For example if your home Media Server is named "My Media Server" and you set Name to "Home", this Media Server will be listed as "My Media Server [Home]" in the Library tab (as shown in the right screenshot).

Server address

This is the public connection URL to BubbleUPnP Server. The information used to set this field is displayed in the Status tab of BubbleUPnP Server.

For example if the Status tab shows:

Public IP Address:  1.2.3.4
Public HTTP Port: 58050
Public HTTPS Port: 58051
Public host name: my.host.org

To connect through HTTP, you must set "Server Address" to either http://1.2.3.4:58050 or http://my.host.org:58050
To connect through HTTPS, you must set "Server Address" to either https://1.2.3.4:58051 or https://my.host.org:58051

Login

Use the login that you defined in the Security tab.

Password

Use the password that you defined in the Security tab.

Active on connection

This setting allow you to set when BubbleUPnP should automatically connect to this remote network to make the associated Media Servers available in the Devices tab of the app.

For example you may want to connect to this network only when your Android device uses a Mobile data connection. In that case you would set this setting to "Mobile". Now every time your Android device switches to a mobile connection, BubbleUPnP will connect to BubbleUPnP server to make your Media Server available in the Devices tab. And if you switch from a mobile connection to WiFi, it will disconnect and remove them from the Devices tab.

The possible choices are:

Advertise on LAN

This setting if enabled will make all Media Servers of this remote network (those listed in the right screenshot) visible on the target LAN on which your Android device is currently connected. This only work if your Android device uses a WiFi or Ethernet connection. It means that your UPnP devices on the target LAN (a PS3, a DNLA TV, etc) should be able to see and browse your remote Media Servers. This is UPnP tethering.

For example a PS3 accessing to your home Media Server follows this path when issuing commands (browsing, searching, etc):

PS3 -> Android device (BubbleUPnP) -> Internet -> BubbleUPnP Server -> Your Media Server.

For streaming audio or retrieving album art the PS3 talks directly to BubbleUPnP Server without Android BubbleUPnP in the middle:

PS3 -> Internet -> BubbleUPnP Server -> Your Media Server.

Audio, video and image transcoding settings

BubbleUPnP Server can optionnaly transcode audio (to MP3) and video (to H264/MP3) for playback on the Android device itself (using the local renderer).
No transcoding is ever performed if streaming to an external renderer, as it may have a faster connection to BubbleUPnP Server than your Android device.

Separate transcode settings are also available for downloaded files.

For transcoding to work, BubbleUPnP Server must report that audio and/or video transcoding are supported in its Status tab.

In BubbleUPnP for Android, you can configure how BubbleUPnP Server should perform the transcoding in Settings > Networks and settings.
There are separate settings for Audio, Video, Images, and for each connection type.

Music playback transcoding

Video playback transcoding

Here you can specify which profile should be used for video transcoding: All profiles will transcode to H264 for video and MP3 for audio, into an MPEG-TS container (for technical reasons it cannot be MP4). Aspect ratio is preserved. The transcoded video may not be playable by the standard Android video player and requires a third party video player app such as MX Player or BS Player and probably many others. The recommended player is MX Player.

Image transcoding

Downloads transcoding

Here you will find specific transcode settings applied to downloaded files:

Music and video Internet streaming with foobar2000 on Windows (or Wine)

This feature allows you for example to stream to your work PC your music and videos from your home Media Server. Playing videos requires foo_upnp 0.99.45+.

NOTE: foobar2000 is a Windows program but it can run on other plaftorms through Wine. On Mac OS X, the easiest way to install foobar2000 is through Wineskin.

Connecting with foobar2000

First you must make sure the status page of BubbleUPnP Server shows that it is accessible from the Internet.

You can access your Media Server from the Internet for streaming music and videos on Windows, using the foobar2000 music player as the client.

After installation, in the View menu of foobar2000 select "UPnP Browser". The UPnP Browser window displays all your discovered LAN Media Server allowing browsing an playing music as shown in the left screenshot. In the view Menu, select "Add remote Internet UPnP Server..." and enter BubbleUPnP Server connection settings (left screenshot):

TIP: If you are on a corporate network only allowing outgoing HTTP traffic on port 80, you can setup BubbleUPnP Server to run on port 80 (provided you have no other web server using this port). For HTTPS, use port 443.

After clicking OK and if the connection to BubbleUPnP Server is successful, the UPnP Browser tree will show a new Media Server named "BubbleUPnP Server (<Remote PC Network name>) [Internet]", as shown in the right screenshot.

This "Super" Media Server lists all your Media Servers on your remote LAN for which the setting "Make this Media Server available in BubbleUPnP for Android and foobar2000 for Internet access" is enabled in BubbleUPnP Server (in the Media Servers tab).

To disconnect or remove the BubbleUPnP Server "Super" Media Server from the UPnP Browser, right click its root node and select "Remove server" in the context menu.

Note that you can integrate the "UPnP Browser" as a panel in the main foobar2000 window to avoid having a separate floating window. Here are basic instructions to do so:

Transcoding audio to mp3


As with BubbleUPnP for Android as a client, it is possible to transcode audio on the fly when accessing your Media Servers with foobar2000. Unlike BubbleUPnP for Android, the transcoding settings are configured in BubbleUPnP Server, in the "Settings / foobar2000 remote access" tab.

Transcoded files will not be seekable in foobar2000.

Changing these settings will only take effect in foobar2000 when browsing folders that were not previously browsed. To apply changes on browsed folders, you must disconnect/reconnect the BubbleUPnP Server "Super" Media Server.

NEW: Since foo_upnp 0.99.45 it is possible to override server transcode settings (only lossless audio) in foobar2000, in Files -> Preferences > Tools > UPnP > Browser > Remote Internet Servers:

Playing videos

foo_upnp 0.99.45 also now makes it possible to play videos from BubbleUPnP Server. To play a video:

FAQ

Where do I report issues, get support or leave feedback ?

You can leave a message in the XDA forums thread.

How do I change the default HTTP or HTTPS port ?

To change the HTTP or HTTPS port used by the server you must edit the configuration file and restart the server.

The configuration file is named configuration.xml. It is located in the installation directory. Open it with your favorite editor and modify the field httpPort (or httpsPort). If you set a port < 1024 on unix you will need to start the server as root otherwise you will get a permission error on startup.

To restart the server:

How is security handled ?

You can connect to BubbleUPnP Server using either HTTP or HTTPS.
HTTP/HTTPS requests from outside the LAN (Internet) are authenticated using Digest Authentication.

Note that for technical reasons, media stream requests are neither authenticated nor use HTTPS.
That's why even if you connect through HTTPS, the HTTP port must still be available.

However, theses HTTP stream URLs are constructed in a way that they cannot be "guessed" or "forged". They can only be obtained by browsing the server, whose access is always authenticated.

The HTTPS connection test fails while the HTTP test succeeds

If the HTTPS connection test fails while the HTTP test is successful on the Status page:

How can I connect through a VPN ?

Connecting through a VPN is not really necessary in most cases, as connecting through HTTPS over the Internet is more flexible.

If you want to connect through a VPN you can still do it, with the following limitations due to UPnP device discovery not being available on VPNs:

To connect to a VPN in either Android BubbleUPnP or foobar2000, simply connect to BubbleUPnP Server using its LAN ip address instead of its public IP address, the same as if you were connecting to it on a LAN only.

I'm hearing gaps when streaming audio on my Android device

This is the symptom of the network bandwidth being insufficient, especially over a mobile connection. Try lowering the max bitrate setting in the Remote Network settings.

How do I enable MP3 audio transcoding support ?

On Windows, ffmpeg is bundled in the Windows Installer so transcoding will work out of the box. Transcoding support is enabled if the ffmpeg executable can be found in the PATH. ffmpeg must be compiled with libmp3lame support.

To check that libmp3lame is supported the command below should return this output:

$ffmpeg -codecs | grep libmp3lame
  EA    libmp3lame      libmp3lame MP3 (MPEG audio layer 3)
If ffmpeg doesn't recognize the -codecs option then ffmpeg is too old and cannot be used. Make sure you are using ffmpeg 0.6 or later (0.7+ recommended).

On other platforms, ffmpeg must be installed:

How do I enable H264 video transcoding support ?

On Windows, ffmpeg bundled in the Windows Installer supports video transcoding out of the box.

A prerequesite for video transcoding is that MP3 audio transcoding is working (see paragraph above).

Additionaly you will need ffmpeg with libx264 present as well and the scale filter.

To check if libx264 is supported the command below should return this output:

$ffmpeg -codecs | grep libx264
  EV    libx264         libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
To check if the scale filter is available the command below should return this output:

$ffmpeg -filters | grep scale
scale            Scale the input video to width:height size and/or convert the image format.

How do I tweak H264 video transcoding parameters ?

BubbleUPnP Server uses a preset file named libx264-current.ffpreset in the installation directory, containing common H264 encoding parameters. These parameters are used for all video profiles that you can set in BubbleUPnP for Android (these profiles only change video size and audio quality).

You can tweak this file provided that you do not set parameters that change video size or audio codec. Some presets are included in the ffpresets subfolder. On NASes with less CPU power it can be interesting to use an alternate preset file which favours encoding speed over image quality.

How do I compile ffmpeg on a QNAP NAS ?

Tested on QNAP TS-419p+ with ARM CPU, but should work the same way for others.

Install “Optware (IPKG)” qpkg from http://www.qnap.com/qpkg.asp

In case the “ipkg update” fails, try to adjust the following two config files:

[/opt/etc/ipkg] # more tsx19-kmod.conf
src/gz cs08q1armel http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable
[/opt/etc/ipkg] # more tsx19.conf
src/gz cs08q1armel http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/unstable

ipkg update
ipkg install optware-devel
ipkg install git
ipkg install yasm
ipkg install lame

mkdir /opt/compile
cd /opt/compile
git clone git://git.videolan.org/ffmpeg.git

cd ffmpeg
./configure --enable-ssse3 --prefix=/opt --extra-cflags='-I/opt/include' --extra-ldflags='-L/opt/lib' --enable-static --disable-shared --disable-ffplay --disable-ffserver --enable-libmp3lame
make
make install

replace built-in ffmpeg with link to new version

rm /usr/bin/ffmpeg
ln -s /opt/bin/ffmpeg /usr/bin

Troubleshooting server startup

A number of issues may prevent BubbleUPnP Server to start. Most of them are network related.

First, make sure the version of Java is 1.6 or higher. BubbleUPnP Server will not work with older versions.

You can find the execution log file named BubbleUPnPServer.log.0 in the installation directory (by default on Windows: C:\Program Files (x86)\BubbleUPnP Server). You can check this file for startup error messages:

org.teleal.cling.transport.spi.InitializationException: Could not discover any bindable network interfaces and/or addresses

On startup, usable network interfaces are enumerated. This error happens if none is found. A network interface is usable if: Furthermore, at least one network interface must have an IPv4 address that is neither a loopback address (127.0.0.1) nor a link-local address (169.254.xxx.xxx).

MultiException[java.net.BindException: Address already in use, java.net.BindException: Address already in use]

The port (58050 by default) used by BubbleUPnP Server is currently used by another application (or BubbleUPnP Server is already running). You can check which ports are used with the netstat command. Configure a different port or kill the application using the current port.

org.teleal.cling.transport.spi.InitializationException: Could not initialize MulticastReceiverImpl: java.net.BindException: Address already in use

Some other program is bound to SSDP port 1900. You can check which ports are used with the netstat command.

org.teleal.cling.transport.spi.InitializationException: Could not initialize StreamServerImpl: java.net.SocketException: Permission denied: listen

Check that your firewall or other security software is not blocking Java

MultiException[java.net.BindException: Permission denied, java.net.BindException: Permission denied]

If you set a HTTP port < 1024, make sure you are running BubbleUPnP Server as root (on unix).

java.lang.RuntimeException: java.io.IOException: No route to host at org.fourthline.cling.transport.impl.DatagramIOImpl.send(SourceFile:159)

If you get this error on MacOS X and you are using a software called "Peer Guardian", go into Peer Guardian's settings and select the "Disable Filters" option.

Could not initialize StreamServerImpl: java.io.IOException: Unable to establish loopback connection

It seems this error is related to the Comodo firewall. Try disabling Comodo or adding a rule to allow BubbleUPnPServer.exe.

java.io.IOException: Cannot run program "netstat": error=2, No such file or directory

On non-Windows machines, the netstat command must be available and in the PATH.

[info] vmarg.3=-Djava.class.path=C:\Program Files (x86)\BubbleUPnP Server\BubbleUPnPServer.jar [info] Main Class: com/bubblesoft/bubbleupnpserver/server/Main Error occurred during initialization of VM java/lang/NoClassDefFoundError: java/lang/Object

This error may happen only on Windows when running BubbleUPnP Server as a service, if the Java JRE is not correclty installed or incomplete. Generally, reinstalling the latest version or the 32 bits Windows JRE (x86) fixes it:

Oracle JRE Download page

I/O exception (java.net.SocketException) caught when processing request: java.security.NoSuchAlgorithmException: Error constructing implementation (algorithm: Default, provider: SunJSSE, class: sun.security.ssl.DefaultSSLContextImpl)

This error may happen in the log and will cause the HTTPS connectivity test to fail. See this faq entry

Changelog

0.6.5 (May 1th 2013)

0.6.4 (January 18th 2013)

0.6.3 (November 15th 2012)

0.6.2 (September 12th 2012)

0.6.1 (August 19th 2012)

0.6 (August 13th 2012)

0.5.5.1 (June 9th 2012)

0.5.4 (April 15th 2012)

0.5.3 (April 6th 2012)

0.5.2 (Mar 22th 2012)

0.5.1 (Mar 1th 2012)

0.4 (Feb 1th 2012)

0.3.2 (Jan 8th 2012)

0.3 (Dec 2th 2011)

0.2 (Nov 24th 2011)

0.1.1

0.1