Glamočanin.net

About

Stuff i did

UDPXY + RaspberryPi - rp_filter = TV bridge
24.12.2012

My internet/tv provider uses multicast UDP to bring me my TV signal and usually has some shitty set top box connected with a variety of scart, video and whatever connectors. 

No TVs in my house just monitors, so I decided to use VLC. Downloaded a playlist with the IPs and everything worked nicely but i found that my switches are not smart enough to route multicast traffic and they just pollute the whole network with the IGMP data. (and a 700k+ bandwidth waste on wireless kinda kills it)

Finally i found a nice little utility called udpxy, which creates a TCP server from the multicast UDP data. And being connected via VDSL1, the TV network was separate from the internet network (and also its DHCP server broadcasted shit to my internal network before this solution), so i decided to make a bridge using the RaspberryPi.

I adjusted the playlist from udp://@111.222.33.44:5000 to tcp://[address of the rpi]:4022/udp/111.222.33.44:5000 and the player was set.

Bought a usb->ethernet dongle, which was a lovely case of plug and play (man i love linux, just the next day i plugged a mouse into a windows notebook and was confronted with a driver dialog... yay:D) and the thing was ready to go!!

But not really:) This project was on hold for a couple of months, because the data just wasn't coming through. After a lot of experimenting i found that the "rp_filter" functionality of the kernel is causing problems.

It is meant to keep the packets that obviously don't belong on your network, out. The problem is that the multicast traffic is such an example of a "martian", because the data received is from a different subnet than what the TVs dhcp server assigns you.

So after disabling the rp_filter (echo '0' > to the relevant interfaces in /proc/sys/net/ipv4/conf/*/rp_filter), the traffic started flowing and the system was ready!

I used gentoo as a base image (yes i know i'm a ricer:), so i just installed udpxy, configured the kernel and set everything up as an appliance... after power-on everything is automagically configured.

So here is the little thing between my router and the VDSL modem. In a hastily cut cardboard box:)