Bridging IPTV over wireless using two Linksys WRT54GL routers and DD-WRT firmware

by Miha Markič 14. January 2010 22:20

The motivation

I had a need to bridge IPTV using a wireless connection. Immediately I faced several problems which I finally managed to overcome and since not much information is available on internet I’ve decided to write my recipe down.

Note that there is a simple albeit expensive solution: use Ruckus wireless bridge (it is supposed to work pretty much out of the box). Since spending something like 200€ is a bit too much for this stunt I’ve decided to go with two Linksys WRT54GL routers instead. They are much cheaper and there is a challenge, who doesn’t like a challenge? And sending a bunch of network packets back and forth shouldn’t be that hard, should it? Ehm.

Current state

My ISP/IPTV provider is SIOL whose major stockholder is government. I have their modem/router that broadcasts IPTV UDP multicast stream on one of its LAN ports. And then I have a set top box (a lousy Sagem IAD81, doesn’t have any wireless capability whatsoever) connected with network cable to the router on the one end and to the (not yet LCD) TV set on the other end. This combinations works albeit picture quality isn’t good, but that’s due to the too-slow stream from the IPTV provider issue (it is a 4Mbps MPEG2 stream, not enough when there is a lot of dynamics on the screen).

image

The goal

Instead of the LAN cable change to wireless using two Linksys WRT54GL routers, like this

image

The hardware

As stated, two Linksys WRT54GL v1.1 (evergreen) routers.

The firmware

Finally I settled with DD-WRT BrainSlayer version 13525. I’ve tried many other versions and Tomato 1.27 as well, but more about it later.

The trial and error process

Knowing correct IPs

First thing one needs to know is what IP can and should be assigned to both routers – each one requires its own IP. Since IPs are assigned from provider based on MAC address of the STB (provider doesn’t care about anything else besides STB) it is not exactly known what additional IPs can/should one assign. So far every (unofficial) post about watching TV on computer suggested to use STB’s IP increased by 1. i.e. if your STB has an IP of 10.150.80.4 you’ll want to use 10.150.80.5. This isn’t documented officially anywhere and worse, I needed two additional IPs, not one. Hence I decided to ask about it on provider’s support forum. I’ve got no official answer, just the usual +1 answer from a peer.

Then I tried mail support only to get a person who doesn’t know what is an IP and how to get them. First he sent me link to unofficial posts about +1 (how to watch IPTV on computer by assigning IP manually) and to expensive Ruckus alternative being sold by them. I wasn’t happy about it and insisted on what IPs exactly can I use if I need two additional IPs, not only one. Since provider assigns them they should know, shouldn’t they? At the end his final answer was: it won’t work if you assign IPs manually. Never. (he clearly contradicted himself showing total lack of any clue). After that provider’s mail support didn’t respond to me anymore. So, thanks SIOL, my dear provider, for being dumb. Somehow they didn’t surprise me with that attitude.

In the lack of any official response I’ve decided to assign IP+1 to host side WRT54GL (one being close to provider’s router, left on my picture) and IP+2 to client side WRT54GL.

Oh, and how do I know the STB’s IP? If you have Sagem IAD81 STB you can press Menu, Blue, Yellow buttons. Or is it Menu, Yellow, Blue, who knows – try it and a diagnostics screen appears sooner or later including the assigned IP.

Installing and configuring correct firmware

Warning

Before flashing your router do read how-to. Such as this from DD-WRT website. If you don’t do it correctly you might “brick” your router for good.

DD-WRT recommended build 13064

WRT54GL out of the box comes with Linksys firmware which isn’t exactly rocket science and doesn’t support what I was looking for. This doesn’t matter since GL model is meant to be flashed and its firmware developed from community. Hence I first tried DD-WRT currently recommend build 13064. (go to DD-WRT router database and type in your router model to find the recommended build). I flashed both routers and configured them to Client Bridge mode. Only to find that it does work for electronic program guide (html pages) but not for multicast, resulting in no picture or sound. When asking in (very friendly and useful) DD-WRT forum for Broadcom devices (WRT54GL uses Broadcom hardware) I was redirected to use WDS mode instead (here is the comparison between various bridge modes) . Apparently WDS is much better in terms of compatibility but you need administrative access to both routers, which was not a problem for me.

I configured both routers in WDS mode without any security, DHCP or WLAN and tried. This time I’ve got picture and sound but they were somewhat distorted. Soon I found out that the stream that client side router provided was just ~700Kbps instead of 4Mbps. The stream quality on the host side router was fine. Eeeek. After trying a ton of different settings (I didn’t even know what to look for) I gave up. Stream was slow no matter what I did.

Now, looking back I am not sure whether I did manually assign the transfer fixed rate. There are posts on the internet that one has to limit the WDS transmission rate to a some value (I saw different reports saying 6, 9, 12, 18, … Mbps).

Tomato 1.27

Next firmware I’ve tried was Tomato 1.27. The same “small, lean and simple” firmware I am using for my internet router. Again I’ve set both routers in WDS mode (after re-flashing). From the start it didn’t work but then I’ve manually assigned transmission rate to something like 18Mbps and the picture and sound appeared in all their glory (read: as good as it gets – which is not good – due to my provider’s settings). But there was a serious problem which I’ve discovered after 1 minute. Provider’s router stopped providing IPTV stream for some obscure reason. Its IPTV section was froozen, other parts were still working. Only a hard reset on provider’s router fixed that, but only for another minute. Again, no setting I’ve changed helped. And resetting the main router every minute didn’t look as a viable solution to me. Call me strange, if you wish.

I asked both my provider (they are the admins of their router placed in my house, the one with the problems) about it and the guy behind Tomato. The first one couldn’t help (no big surprise) while the other didn’t respond.

So I was stuck with two solutions that didn’t work for one or the another reason. And I was so close.

DD-WRT experimental BrainSlayer build 12874

With no “official” DD-WRT or Tomato firmwares available I’ve went with experimental builds. I’ve tried “DD-WRT BrainSlayer build 12874” build with same results. I like the name though. You’ll find it here. Before using DD-WRT experimental builds make sure you read this page.

The solution that works: DD-WRT BrainSlayer build 13525

Finally this is the build that worked for me. Find it here. I’ve flashed both routers with this build. Reset both to WDS and nothing else (per wireless settings I’ve used Network Mode=G only, Channel=2 and SSID=tv on both) In addition I’ve set wireless transmission fixed rate to 36Mbps on both and enabled Frame Burst check box (below Transmission Fixed Rate settings on Wireless/Advanced Settings). And a miracle happened – the stream begin to flow to the STB in full speed.

Beware that while this solution works for me it might not work for you or you might even brick your router(s). Consider yourself warned. I merely described my solution.

The drawbacks of twin routers/WDS solution

The only drawback is that stream sometimes, like a hickup, looses some quality and artifacts in form of squares appear for a brief moment. I am not sure whether this is a feature of wireless connection or of non exactly stream oriented router firmware. This is the only drawback I’ve found so far.

Credits

  • The guys in the DD-WRT forums for responding to my noob questions.
  • Luka Manojlovič, a fellow MVP for providing support

Anti credits

  • To my IPTV provider SIOL for being really clueless and not helpful at all.


Tags: , , , , ,

IPTV

SIOL (IPTV provider) managed to upset its customers once more

by Miha Markič 14. November 2008 16:28

I have an IPTV provided by biggest national IPTV/IS provider. The current service is poor at best. We have FTTH (the slowest is 20Mb - that's awesome) but really lousy (~4Mb at best) MPEG2(!) encoded streams. The most obvious consequence of such encoding is pixelation when there is a faster change on the picture and poor quality in general. To make things worse there is a crappy, yet somewhat functional UI that lets you select channels and read EPG. It mostly works (except for occasional ASP.NET 1.1 server too busy error) and its speed is decent. IMO it mostly lacks two features:

  • one can't browse other channel's EPG (electronic program guide) without actually changing channel (IOW watch a channel and read other channel's EPG). I once asked SIOL about this and the response was: "Check out the teletext - you can't perform this stunt in teletext either". So much about understanding the technology progress.
  • one can't mark favorite shows and have an option of notification before the show

Now, both features are minor, yet SIOL isn't capable of implementing them. Since the UI is built around ASP.NET 1.1 (as seen on occasional errors) it shouldn't take more than a week to implement the two features. But they didn't change the UI for years now. Except for upgrading the progress icon to an animated gif.

Then, one day, they started a SIOL TV+ UI. (note the + char). It features a newly organized and richer UI, plus VOD and a recorder through UI (storage is provided on SIOL's server). Sounds great, right? Not at all. Here is the list of consequences:

  1. You have to buy a newer STB (or get one for free if you sign with SIOL for 2 years)
  2. UI is slow as hell. I mean really really slow at the point where it is unusable.
  3. UI is cluttered as hell - it is really bad and a total mess.
  4. It doesn't have favorite channels group.
  5. Recorder doesn't work and even when it will it will be useless: it is enabled only for a couple of Slovene channels (due to legal issues) and those shows will be persisted only for at most 2 days (the total place for storage per user is 6 hrs in total) . It won't be free as well since it uses SIOL's storage. There are other problems with recorder not listed but the question is why they bother at all with such crap service?
  6. VOD: after you pay for the movie you have 24 hours to watch it. The library is poor, at least the last time I've checked it.

True, I didn't check it lately. But for a reason. There were reports that lately people who checked out the new UI couldn't go back to the old, functional, one. The two UIs could coexist until recently.

And now, actually 10 days from now, SIOL is disabling the old UI for good and forcing everybody to new great new one - with or without the new STB. That's indeed a great move, kill the customer's will to watch TV, way to go! On the other side I'll watch less TV and spend more time with other activities I guess.



Tags:

ASP.Net | Slovenia | IPTV | .net

Miha Markič

About me
Righthand
 
Microsoft MVP
 
Developer Express' DXSquad
INETA Country Leader for Slovenia
INETA Country Leader for Slovenia

Slovene Developer Users Group Lead
Friends of Red-Gate
LLBLGenPro Partner

Miha currently works as a free lance consultant and software developer specialized in .net area.
He graduated in Computer and information science at the University of Ljubljana, Slovenia. He has accumulated experience in various programming languages such as Java, Visual Basic 3-6 (MCP), Visual C++, Delphi, C# and VB.Net through years.
He has experience in practically all (technical) stages of project development, including planning, framework development, user interface, business processes, as well as testing and documenting. He has worked on big and small projects in Slovenia and abroad (e.g. participated in completing level 3 IS for the Nucor steel plant, Hertford, USA).
Currently he enjoys programming in .net environment using C#. Since 2000 he has been active in Developer Express' DX Squad and has been ECDL trainer and tester. He also gives lectures on conferences and other events in Slovenia.

Shortcuts

Add to Technorati Favorites

Social networking

Most comments

Brakxel Brakxel
1 comments
us United States
business cards business cards
1 comments
au Australia
Brandon Brandon
1 comments
us United States
BV BV
1 comments
si Slovenia
Igor Brejc Igor Brejc
1 comments
si Slovenia

Google friends

Recent Comments

Comment RSS