Minidlna patch for LG TVs

One year ago I wrote about using the ushare DLNA server for watching 3D stereo mpo images. In the meanwhile minidlna evolved and is now also capable of displaying the mpo file format. This led me to switching to minidlna as DLNA server, since it is the better DLNA-server for general use. In example it supports features like fast forward and fast rewind, which ushare does not support.  Unfortunately there are problems with minidlna in conjunction with some LG TVs. These TVs spam the DLNA-servers in the network with search requests, which leads to full CPU-load on the DLNA-server and unresponsiveness of the TVs user interface.¹ This even occurs when watching TV. I also experienced problems with harddisk recordings like the timeshift feature of the TV when network is connected. One may find out that the user interface of the TV is much smoother without network connection on these TVs. In the following I will show how to patch minidlna for not responding to these requests.

First of all download my patch against mindlna-1.1.5:

minidlna_lg_nosearch.patch.gz (753)

The patch is based upon falk0069s older minidlna patch.² In case a LG device sends a search request, the minidlna-server just responds with 0. This removes load from both, the TV and the server and therefore leads to a better responsiveness. The patch should also work with current head.

Second download the minidlna-sources from:

Afterwards extract the minidlna-sources, change into the source directory and patch the sources:

cat minidlna_lg_nosearch.patch.gz | gunzip| patch -p1

Then build the sources by running ./configure and make.

Users of Debian-based arm-distributions like bananian might try out my prebuilt binary. One can download it from here: minidlnad.gz (681). After downloading unzip the binary and replace the binary of your existing minidlna installation with it.





1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

devolo-dlan-cockpit-4.2.3 with gentoo

Recently I have started using Devolo dlan 1200 PowerLAN adapters. With these one can get a network with up to 1Gbps without having to install additional wires by using the power lines. Of course the 1Gbps are optimum values under perfect conditions. Practically one gets 100 Mbps to 600 Mbps, but this is enough for most purposes.

Devolo offers the application devolo-dlan-cockpit for download. The main purposes of devolo-dlan-cockpit are:

  • Firmware upgrades for the network adapters
  • Monitoring the performance
  • Configuring the network adapters

Firmware upgrades are more or less plug and play. One has to click to click the Updates-Button and everything else happens automagically. Monitoring the network performance with devolo-dlan-cockpit  is of major interest, since it allows one to try out different wall sockets for better performance with nearly zero efforts. If one gets poor performance it can be of major impact just to use another wall socket in the same room.

Dlan-cockpit is available for most common operating systems. However, the only Linux distribution, they support right now is Ubuntu Linux. Most probably, the package will also work with Debian. Allthough these are binary packages, the application can also be used with Gentoo Linux. For this two binaries have to be executed /usr/bin/devolonetsvc, the service daemon and /opt/devolo/dlancockpit/bin/dlancockpit, the frontend application which depends on the service. Usually devolonetsvc is being started by an initrd script, but the one included in the package is not going to work with gentoo, so start just start it manually as root user. If one really needs it that often, an own startup script or systemd configuration can be written. Below you can see a screenshot of the application.


Screenshot of devolo dlan-cockpit

The Gentoo way

For gentoo users here is my overlay including the devolo-dlan-cockpit ebuild: devolo-dlan-cockpit-4.2.3_overlay.tar.gz (1210). It also includes an adobe-air-runtime ebuild as necessary dependency. The adobe-air-runtime ebuild has been taken from steam-overlay. Download the overlay and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:


Then emerge devolo-dlan-cockpit and monitor your network nodes using your gentoo box.


1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

watching 3D stereo mpo images with ushare

Some months ago I got my brand new LG 55LA6608 3D TV. Of course I wanted to watch the 3d photos taken with the Fujifilm Finepix Real 3D camera with it. The images taken by the camera are being stored using the MPO file format. These images consist of two jpeg images and some metadata inside the exif header inside the MPO container. According to the specification the television is capable of playing this file format, which works fine when using in example an USB-stick. However, it is desireable to watch the images using a network connection, for example when the files are stored on a linux server.

For displaying videos or images from a server this and other television devices use the DLNA protocol, which is implemented by by various linux services like minidlna or ushare. None of the tested ones was capable to present the MPO files to the TV. The solution to enable ushare to do this is quite simple. The MPO mime type has to be added to ushares supported file formats. This can be done by adding the line

{ “mpo”,  UPNP_PHOTO, “http-get:*:image/mpo:”},

to the MIME_TYPE_LIST array in mime.c. This has been verified to work with the ushare-1.1a. For convenience one can download the patch for this from here:

ushare-mpo.patch (1138)

One can download the ushare sources from SourceForge. After downloading patch the ushare sources with the mpo-patch and build it. Build and usage instructions can be found in the readme file included in the ushare download from SourceForge. Do not forget to run ./configure –enable-dlna before running make for use with recent devices like the mentioned LG TV.

As usually, for gentoo users there is a more easy way: Create the directory


and place the patch file in it. Make sure that the dlna USE-flag is set in /etc/make.conf or /etc/portage/package.use. Afterwards emerge ushare again and enjoy watching your 3D MPO images stored on your linux box using your TV.



1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

iptables mirror target for linux kernel 3.6

After my last kernel upgrade I tried to build the iptables mirror target published the last time here. The iptables mirror target takes the packet sent to your machine and returns the same packet to the machine the packet came from. Thus, let’s say someone tries to scan your machine or tries an attack he would scan his own machine or even attack his own machine. When I tried it with kernel version 3.6 , it did not build anymore with the current linux kernel. This time some functions have got removed from the kernel. Thus I had to update the ip_direct_send function. You can download the newer release for kernel version 3.6 and probably future kernels here:

MIRROR.3.6.0.tar.gz (1981) gplv3-127x51

The kernel module has been tested with kernel version 3.7.0-vs2.3.5.1. To build the module, boot the kernel you want to use the module with. Afterwards unpack the archive and run the script to build the module. Then run the script for installing the compiled module into the /lib/modules directory for your kernel.

Now you may use the mirror target in place of the REJECT or DROP target in the INPUT, FORWARD and PREROUTING chains, like this in your firewall script:


Beware: The use of the mirror target may lead to strange results, in example if you want to connect to an iptables protected machine which uses the mirror target, you may end up connecting to the local machine without recognizing it. It also may use much bandwith. The worst case occurs if you have two machines using the module. These machines may end up playing ping pong. So you have been warned, use with caution and at your own risk. For more information see: MIRROR target.

Downloads for older kernel versions are below. Notice the version numbering 2.6.25 works for kernels up to 2.6.27. 2.6.28 also works for 2.6.29 and 2.6.30 kernels. The 2.6.13 version of the module should work up to kernel version 2.6.16.

MIRROR.2.6.13.tar.gz (3097)
MIRROR.2.6.24.tar.gz (3545)
MIRROR.2.6.25.tar.gz (3262)
MIRROR.2.6.28.tar.gz (3310)
MIRROR.2.6.31 (3138)
MIRROR.2.6.35.tar.gz (3063)
MIRROR.2.6.36.tar.gz (3150)
MIRROR.2.6.37.tar.gz (2896)
MIRROR.3.0.7.tar.gz (2577)
MIRROR.3.1.0.tar.gz (2273)
MIRROR.3.3.0.tar.gz (2301)




1 Star2 Stars3 Stars4 Stars5 Stars (2 votes, average: 5.00 out of 5)

stereoscopic mplayer-1.1-r1

Recently the new mplayer-1.1-r1 ebuild appeared in portage. In the article stereoscopic mplayer-1.0_rc4_p20110322 I provided a modified patch for stereoscopic support in mplayer-1.0_rc4_p20110322. This patch does not work with the current version anymore. However, only a minor fix has been required. To use the new patch, just download it from here: mplayer-stereoscopic-1.1-r1.patch (1601) and copy it to:


Afterwards emerge mplayer and play stereoscopic movies with:

mplayer -vo gl2:stereo some_movie_file.avi


1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Flightgear-2.8.0 with quad buffered stereo

In the article Flightgear with quad buffered stereo I have written about how to get quad buffered stereo to work with the famous flight simulator FlightGear. Recently FlightGear-2.8.0 has been released. The problem with quad buffered stereo still persists with FlightGear-2.8.0 .

One expects to enable stereoscopic mode in FlightGear starting it with the following line:


When starting flightgear this way, one gets the following console output and no stereoscopic view:

Warning: detected OpenGL error ‘invalid operation’ after RenderBin::draw(,)

Getting FlightGear to work with quad-buffered stereo

The reason for the above error message and the resulting broken stereo mode is, that the stereo context does not get initialized properly. The details are described here: Flightgear with quad buffered stereo. Unfortunately the patch I proposed in the mentioned post does not work for flightgear-2.8.0. However, the good news is, it only required a slight modification, the WindowBuilder.cxx file no longer is in src/Main, but in the src/Viewer directory. You can download the new patch from here: flightgear-2.8.0-stereoscopic.patch (2083)

Hopefully the patch finds its way into the next flightgear release.

As usual for quad buffered stereo, you have to use a professional graphics board that supports quad buffered stereo, like a NVIDIA Quadro FX or a Ati FireGL and proper display hardware, like shutter glasses, a HMD or a stereoscopic projection system, to benefit from it. To use the quad buffered stereo mode start flightgear with the environment variables mentioned above. Afterwards you probably have to enable quad buffered stereo mode by selecting the Stereoscopic View Options Item in the the View menu.

The Gentoo way

For gentoo users I have created an overlay. Like the previous one it contains patches and modified ebuilds for flightgear with working quad buffer support. You may get the overlay from here: flightgear-2.8.0 overlay (2130) Download the overlay and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:


Then emerge flightgear and enjoy it in three dimensions.

Have fun


1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Fixing location awareness of N900 IM

Nokias N900 cellular phone is a location aware device. Usually it has been able to display your location in the  status message of instant messaging services like Jabber or Skype. This function has stopped working completely some time ago. This article describes the underlying problem and presents a fix to restore the function again.

Usually one can enable the N900 phone to display the current location in the status message by tapping the status bar and selecting “Availability”. Afterwards the availability window opens, where the button “my location” can be tapped. Then one can select the precision of the position from street level to town level. Afterwards the current location is being published to contacts. Currently enabling this function does not publish any location to ones contacts. After installing sysklogd, the syslog gives a first hint, where the problem is located:

Aug 31 18:37:33 Nokia-N900 nm-nav-provider[11138]: GLIB WARNING **
default – Could not connect to
Aug 31 18:37:33 Nokia-N900 [1621]: GLIB WARNING ** rtcom-presence-ui –
null pointer passed to the navigation_provider_location_to_address callback

After killing the nm-nav-provider process and restarting /usr/lib/nokiamaps-navigation-provider/nm-nav-provider from an xterm  a more detailed error message can be seen:

^ parser error : Document is empty
^ parser error : Start tag expected, ‘<‘ not found

Thus there is a problem with the request sent to Nokias web service. Most probably Nokia has changed the web service in the meanwhile. However, using the same request without the token leads to the desired result. This can be easily tried out by entering the requests URL in a web browser. Unfortunately nm-nav-provider is closed source, so it cannot easily be modified. A hex editor can be used to search for the token string and then the request can be zero terminated in front of  it.

Hexedit view of nm-nav-provider token location for webservice

Figure: hexedit view of nm-nav-provider token location for webservice

There are two positions with a matching request in the 0.109-3+0m5 version of nm-nav-provider, one at position 0x73F7 and one at 0x7689. The latter is the relevant one for the problem. Replacing the byte at this address by a zero terminates the request string and leads to a request that can be understood by Nokias web service. One has to kill the nm-nav-provider process before being able to write to the file.

Unfortunately the modified binary cannot be published here, because of license restrictions, but an easy way to patch the file can be provided. First of all, enhanced busybox needs to be installed on the N900. Then execute the following line as root user  inside an xterm:

cd /usr/lib/nokiamaps-navigation-provider/; cp nm-nav-provider nm-nav-provider.bak; killall nm-nav-provider;dd conv=notrunc bs=1 count=1 seek=30345 if=/dev/zero of=nm-nav-provider

This line works for nokiamaps-navigation-provider-0.109-3+0m5. After execution, the location can be published to contacts again. The only problem remaining is up to you. Do you really want that all your contacts know your location?

best regards


1 Star2 Stars3 Stars4 Stars5 Stars (5 votes, average: 5.00 out of 5)