Monday, May 20, 2013

XMBC - Tons of free Movies and TV shows at your Living room

It's been 2 years since I posted my last blog. I guess I found the spark again. I don't know when I am going to stop writing blogs again. I guess until I get better things to do. :P Let's see !!

So, today's topic is XBMC !!!, There are two reasons why I wanted to post an article in middle of this night, One: Its 2am and I coudln't sleep, Two: XMBC is an awesome open source project that I am really happy to know about. So, I decided to spread the awesomeness and if my time permits write a plugin to XBMC for the community. :) 

XMBC, originally, Xbox Media Center  - an open source media center was developed  for XBOX gaming console.  But later, it is no longer supported for XBOX console. However, there seems to be fork project called Xbmc4Xbox. You can find more information at XBMC wiki page

Though I knew about this project about 3 years ago, in recent days it grabbed my attention because XBMC is now developed and supported for Android Platforms as well. Yes, if you are owning an Android mobile phone with decent CPU and RAM, you can install XBMC on your mobile too. You can find more information on prerequisite at XBMC site. And, don't forget to connect to a WI-FI network if you have limited data usage plan. 

XBMC is supported on multiple hardware platforms. If you have an jailbroken Apple TV, you can install on it too. Download link lists all supported hardware platforms. 

My New Gadget - MK812: 

MK 812 from
I can install it on my Samsung S III, but I don't want to find buy an USB to HDMI adapter to watch it on my TV, more over I wanted something like Raspberry PI which is cheap and should be connected to my TV all the time. So, after some research, I came across Android Mini PCs.  Its Android-on-stick, based on ARM based processor, Mali-400 MP GPU, Wi-Fi 802.11 b/g/n, cable of displaying video upto 1080p, without a inbuilt display or battery. There are hundreds of manufacturers (no known manufacturers) producing this with various hardware configurations and so the tough part was to find a reliable one. I invested considerable amount of time reading forums and review comments for few famous brands among the internet community and I finalized on MK812 from It was $70 and I paid $5 for expedited shipping. The device works without any major concern however at times, HD videos are sluggish. I have been in touch with manufacturer to find a solution for this. I think the pros and cons can stand out as separate post by itself.

Back to XBMC !! 

I installed XBMC on my new MK812 and now I can watch tons of media without connecting my Laptop to my TV every time  I wanted to watch an online video on TV.

I also installed the following plugins in XBMC: 
  • Navi-x 
  • Einthusan
  • YouTube 
  • Dailymotion

Few of these plugins, almost all of them except YouTube and DailyMotion, are not developed and hosted in However, they are developed and hosted on community website So, you will have to install the developer's plugin repository in order to install the plugin itself. Example, to install Plugin, you need to install its repository and then install the plugin under Video menu on XBMC. You can also find the instruction on how to install the repository at Google Code site. And, few plugins like Navi-x can be downloaded as zip file and installed directly to XBMC from its System settings. - A great collection movies, TV Shows and music videos. Repository at Google Code - Another movies, TV shows and music vides collections, you will find most of the videos are Standard Definitions, but its vast movie collections compared to

Navi-X - Its a platform by itself which runs inside a XBMC (can also run standalone). Its a content aggregator  provides ability for users to create media playlists and share it with community. I use it mostly to stream Tamil channels. The supports site scrapper option to parse video sites and provide media playlists. Its user driven movie collections are HUGE that I will not be able to write about each of them here.

Einthusan - Indian movies and music videos. I like the video quality and its one of my favorite for watching Indian Movies. - Apart from Youtube, I depend on to watch Tamil TV Shows particularly  Vijay TV Shows. There is no good Plugin for it yet. There is a beta? version available at But I am also want to get my hands dirty developing / improving this plugin. 

Other major plugins like YouTube, DailyMotion, TED Videos are also available. 

With so many options and sources, XMBC is great option to stream online media in your living room with help of cheap hardware. 

Wednesday, March 10, 2010

How did I change my 2003 Honda Civic Stereo

My 2003 Honda Civic had factory made stereo, which don't have a provision to hook up my iPod using either Auxiliary or USB. I decided to replace that with an after market CD receiver (Sony XPlod). When I heard about hefty bill from service centers/dealers for changing a car stereo, I decided to do it myself. After all, it's not as tough as I thought. Here are my learning and mistakes.

Sony Xplod from
I bought a new Sony MEX-BT3800U from The unit looks good (front-panel) and the bluetooth and iPod controls are just awesome. The call sound quality is satisfying without an external mic. gave me instructions and master sheet for changing the car stereo. You might find same unit for lesser price in amazon, but the instructions are worth few extra bucks.

Research / References:
Crutchfield gives you instructions that are easy to follow with suggested tools. I had done some research before started doing the work. I found the following two links and the videos are very useful and gave me some clue.

My 2001 Honda Civic Car Stereo Removal

Ben Johnson's Weblog

Youtube Videos:
Part 1
Part 2

I found little hard to pry out 'gear shift panel', 'gear shift ring' and climate control unit. At some point, you might have to apply little extra pressure to pry few parts out. So, always look for any clips or clamps or even a screw holding up the parts, oversight might cost you fixing the broken parts.

I really don't have much to say besides the images below.

In above picture, The highlighted clamps holds up the gear shift rim. The clamps highlighted in white are the ones holding up the top cover and the red color pins from sides are holding the side cover. Remember, the side cover is a single part should be dismantled with "12V" outlet assembly.

This one shows the pin I broke (highlighted in RED) and green one shows an unbroken pin. I thought I put the panel tool in the gap and pry out the part and it broke the pin. So, don't use any tools near the pins. It will damage the pins.

Clamps holding your 12V dash. The center would the last one to come out. It was pretty tight.

Climate control unit with clamps highlighted.

Also, make sure you disconnect the car battery as instructed. Failure to do so, might cause short circuit and blown up fuse.  It happened in my friend car. 

So..  thats it!!! Leave your comments!

Tuesday, December 22, 2009

A Tamil Poem

I found this in one of my friend's Orkut profile. I wanted to proudly have it on my blog...

கனியிடை ஏறிய சுளையும் – முற்றல்
கழையிடை ஏறிய சாறும்
பனிமலர் ஏறிய தேனும் – காய்ச்சுப்
பாகிடை ஏறிய சுவையும்
நனிபசு பொழியும் பாலும் – தென்னை
நல்கிய குளிரிள நீரும்
இனிய என்பேன் எனினும் – தமிழை
என்னுயிர் என்பேன் கண்டீர்

Saturday, September 12, 2009

Hands on with SimpleFormController and DisplayTag

Recently, I got to work on SimpleFormController (Spring Framework class for handling web Form) with DisplayTag . It took me a while to get used to SimpleFormController. I should also mention that at first look it might seem lot of mess instead of trying to solve your problem, hey won't you get that feeling whenever you are trying to use any new technology??

I had to use debugger to understand the flow of control from various method. But you can follow this cheat sheet for complete flow diagram for SimpleFormController. You can inherit lot of methods based on your requirements, however following methods are the usual ones.

protected Object formBackingObject(HttpServletRequest request) throws ServletException;

public ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception;

protected boolean isFormSubmission(HttpServletRequest request);

protected Map referenceData(HttpServletRequest request) throws Exception;

formBackingObject : will be called by createCommand method from SimpleFormController. On form request, if sessionForm is set to true the model object created by formBackingObject is put in session. On form submit, the object is taken from session and not created once again.

Sample code:
protected Object formBackingObject(HttpServletRequest request) throws ServletException {
SearchForm command = new SearchForm();
return command;

onSubmit: All form submit logic have to go into this. I would suggest you to go through javadoc for all onSubmit() variant.

public ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response,
Object command, BindException errors) throws Exception {
SearchForm searchParam = (SearchForm) command;
System.out.println("your input is ... " + searchParam);

ModelAndView mv = null;
mv = showForm(request, errors, getSuccessView());
String pName = searchParam.getName();
if (pName == null || pName.length() == 0) {
pName = "Default_"; 
ProductSearch st = new ProductSearch();
st.setProducts(Util.getTableData(pName, 50));
HttpSession session = request.getSession();
session.setAttribute("TABLE_DATA", st.getAllProducts());
session.setAttribute("pageSize", searchParam.getPageSize());
System.out.println("done search ..... displaying results");
return mv;

Here, you can also include a check to see if the request is for DisplayTag pagination or actual form submission and you don't have to form submit logic for pagination requests.

isFormSubmission: Default implementation of this method returns true when request method is "POST". You can override this to change its behavior. You would have to do this when you want to use DisplayTag pagination. I have given the sample code below.

protected boolean isFormSubmission(HttpServletRequest request) {
return !request.getParameterMap().isEmpty();

referenceData: I didn't have to implement this method for my hands on.


DispalyTag provides lot of feature for high-level web presentation patterns like paging, cropping, sorting and exporting etc. The implementation with spring is pretty neat. All you have to do is add below dependency in your pom.xml


Or add displaytag-1.1.jar jar file into WEB-INF/lib. You are all set. For other configuration options, go through DisplayTag documentation.

I found this useful article on on Displaytag.

For my hands on , the JSP looks like the one below with DisplayTag code.

<form  name="product_search" action="formpage.html" method="POST">    
Name: <spring:bind path="">
<input type="text" name="${status.expression}" 
id="name" value="${status.value}" />

Type: <spring:bind path="command.type">
<input type="text" name="${status.expression}" 
id="address" value="${status.value}" />

<input type="submit" value="Submit"/>
<input type="hidden" value="${pageSize}" name="pageSize" />


<c:set var="searchResultPageSizeOptions" value="10,25,50" />
<c:set var="selectedValue" value="10" />
<spring:bind path="command.pageSize">

<c:if test="${!empty pageSize}">
<c:set var="selectedValue" value="${pageSize}" />
<select name="<c:out value="${status.expression}"/>" id="pageval" onchange="javascript:changePageSize();">
<c:forTokens items="${searchResultPageSizeOptions}" delims=","
var="localPageSize" varStatus="status">
<option value="${localPageSize}" <c:if test="${selectedValue == localPageSize }">
</c:if> >${localPageSize}

<display:table name="sessionScope.TABLE_DATA" pagesize="${pageSize}" requestURI="formpage.html" class="results-table">
<display:column property="id" title="ID" sortable="true" />
<display:column property="name" title="Name" sortable="true" />
<display:column property="type" title="Type" sortable="true" />


I hope this would be helpful. Please post your comments.

Saturday, August 29, 2009

Outlook crashing with "Cannot start microsoft office outlook" msg

My outlook was crashing with "Cannot start Microsoft Office Outlook. Cannot open the Outlook window." error message. I had no clue what went wrong, but I knew why it was barfing on me. I was in a hurry to force shutdown my laptop yesterday. And I forgot to close Outlook (I closed every other running applications) before that.

The solution is ---

Start->run..then type the following -> "Outlook.exe /resetnavpane"

It worked like a charm!

Wednesday, August 19, 2009

Git is Awesome!

I got introduced to a distributed version control system called "Git". Git is not like traditional version control systems like SVN or CVS, but which provides much more features a developer can imagine/ would need for those painful code merges.

I had gone through this wonderful presentation by Bart Trojanowski and you can find them here. Bart provides brief intro on how Git works and how the version is tracked in Git ("the close to perfect" SCM). Then he goes on explaining about major features a developer would need to start using Git.

This presentation have been highly helpful for me to get grasp of Git. I want to thank Bart for this wonderful presentation and Ian Ward for making this screen-casts available online.

I installed Git on my PC machine using Cygwin. The stack is pretty awesome and neat. I would recommend the same for any PC users. When installing Git packages for cygwin, make sure you also pull in GUI tools ( gitk and git gui). If you are a tortoiseSVN or tortoiseCVS user, these tools would of great help.

Git uses local repository and does not need a remote (central) repository to get started. However, if you'd like to use some public Git repo servers for your hands-on, you could use either GitHub or

Follow the below link for setting up an account in Github. This is a screencast provided by learningrails website.

Version control with git.

As a summary, Git is a great version control system among other systems out there. Which comes with lots and lots of documentation, online tutorials and FREE public Git repositories. All of these could help developers a hassle-free transition towards using Git.

Friday, July 25, 2008

: $'\r': command not found in Cygwin

If you happen to have this kind of error for no reason, please make sure you convert your shell script file to UNIX format using any text editor like Notepad++. Initially it seems like a weird error but yet another valid issue with Cygwin + XP editor.

Here is an example, If you create a script in Notepad++

# My Cygwin weird error

"Knowledge is Power"

When you run this script directly from Cygwin (by editing it from Notepad) you might forget to set the file format to Unix. This often result in following error.


./ line 1: $'\r': command not found
Knowledge is Power



You can convert them to UNIX format using shell utility dos2unix

So, Thats it! You are set!