<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shantanu's Technophilic Musings &#187; Programming</title>
	<atom:link href="http://tech.shantanugoel.com/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://tech.shantanugoel.com</link>
	<description>Shantanu's Gadgets, Gizmos, Hacks, Tips, Tricks, Technology...and your kitchen sink</description>
	<lastBuildDate>Wed, 05 Oct 2011 20:23:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Adding Lyrics to SharkZapper for Grooveshark</title>
		<link>http://tech.shantanugoel.com/2011/09/23/adding-lyrics-to-sharkzapper-for-grooveshark.html</link>
		<comments>http://tech.shantanugoel.com/2011/09/23/adding-lyrics-to-sharkzapper-for-grooveshark.html#comments</comments>
		<pubDate>Fri, 23 Sep 2011 09:12:06 +0000</pubDate>
		<dc:creator>Shantanu Goel</dc:creator>
				<category><![CDATA[Hack]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[chrome extension]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google chrome]]></category>
		<category><![CDATA[grooveshark]]></category>
		<category><![CDATA[lyrics]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[sharkzapper]]></category>

		<guid isPermaLink="false">http://tech.shantanugoel.com/?p=357</guid>
		<description><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>I bet all of you know about grooveshark, the awesome music service. And sharkzapper is a cool chrome extension that puts the control and information about anything playing in your grooveshark chrome tab into a little button on the address bar. It is a very good extension but I felt that what it was missing <p>Continue reading <a href="http://tech.shantanugoel.com/2011/09/23/adding-lyrics-to-sharkzapper-for-grooveshark.html">Adding Lyrics to SharkZapper for Grooveshark</a></p>]]></description>
			<content:encoded><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>I bet all of you know about grooveshark, the awesome music service. And sharkzapper is a cool chrome extension that puts the control and information about anything playing in your grooveshark chrome tab into a little button on the address bar. It is a very good extension but I felt that what it was missing was lyrics. Before I could comment on the extension&#8217;s chrome market page, I noticed that it has a github repository. &#8220;Open Source&#8221;, oh joy. So, I forked the repository and after some hacking around, I&#8217;ve now added support for automatic searching and fetching of the currently playing song into the sharkzapper popup window and it updates itself whenever the song changes.</p><!--test --><script type="text/javascript"><!--
google_ad_client = "ca-pub-7364296987674978";
/* 468x60, created 10/6/08 */
google_ad_slot = "0345781418";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<p>What was even cooler that I learnt a bit about using YQL in the process <img src='http://tech.shantanugoel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I&#8217;ve sent in a pull request to the author of the extension to the original author of the extension to merge this code. In the meanwhile, if you would like to try this out, you can hit up my <strong><a title="Shantanu's repository for sharkzapper with lyrics" href="https://github.com/shantanugoel/sharkzapper">github repository</a></strong>, download the code and install into chrome by enabling developer mode and choosing &#8220;Load unpacked extension&#8221;.</p>
<p>Happy listening <img src='http://tech.shantanugoel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style='border:thin dotted black; padding:3mm;'><a href="http://tech.shantanugoel.com/terms-of-use">©</a> <a href="http://tech.shantanugoel.com/">Shantanu Goel</a> | This article, titled <strong><a href="http://tech.shantanugoel.com/2011/09/23/adding-lyrics-to-sharkzapper-for-grooveshark.html">Adding Lyrics to SharkZapper for Grooveshark</a></strong>, was originally published on <a href="http://tech.shantanugoel.com/">Shantanu's Technophilic Musings</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.shantanugoel.com/2011/09/23/adding-lyrics-to-sharkzapper-for-grooveshark.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making Kinect Work With PS3</title>
		<link>http://tech.shantanugoel.com/2011/03/20/making-kinect-work-with-ps3.html</link>
		<comments>http://tech.shantanugoel.com/2011/03/20/making-kinect-work-with-ps3.html#comments</comments>
		<pubDate>Sun, 20 Mar 2011 15:36:51 +0000</pubDate>
		<dc:creator>Shantanu Goel</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Gaming]]></category>
		<category><![CDATA[Hack]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[kinect]]></category>
		<category><![CDATA[kinect ps3]]></category>
		<category><![CDATA[PS3]]></category>
		<category><![CDATA[xbox360]]></category>

		<guid isPermaLink="false">http://tech.shantanugoel.com/?p=335</guid>
		<description><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>This post describes my first attempt at making Kinect work with a PS3. Microsoft&#8217;s new XBOX 360 accessory, kinect has made a powerful entry into the market, becoming the fastest selling gadget of all time. Looks like their &#8220;You are the controller&#8221; tagline is working. Of course, Sony&#8217;s &#8220;similar&#8221; accessory Move is selling well too <p>Continue reading <a href="http://tech.shantanugoel.com/2011/03/20/making-kinect-work-with-ps3.html">Making Kinect Work With PS3</a></p>]]></description>
			<content:encoded><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>This post describes my first attempt at making Kinect work with a PS3. Microsoft&#8217;s new XBOX 360 accessory, kinect has made a powerful entry into the market, becoming the fastest selling gadget of all time. Looks like their &#8220;You are the controller&#8221; tagline is working. Of course, Sony&#8217;s &#8220;similar&#8221; accessory Move is selling well too but is far behind kinect adoption probably because nothing beats the lure of making something work with just &#8220;The Force&#8221; <img src='http://tech.shantanugoel.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p><!--test --><script type="text/javascript"><!--
google_ad_client = "ca-pub-7364296987674978";
/* 468x60, created 10/6/08 */
google_ad_slot = "0345781418";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<p>Now, of course, kinect doesn&#8217;t work with PS3 obviously but then if we can&#8217;t break the rules, we can at least bend them a little towards our way. I&#8217;ve  created a mashup that allows you to use kinect as an input controller for the PS3.</p>
<p><span id="more-335"></span><br />
<strong>Please note that this is pre-alpha quality software currently</strong>. I haven&#8217;t updated to a lot of recent code for the below libraries and also haven&#8217;t done most of the performance/feature improvements yet. The axis performance specially needs lot of tweaking and it works well only while sitting. Putting this out purely as a proof of concept. For the things that I plan to add soon, please see the Todo section below. Follow me at <strong><a href="http://twitter.com/shantanugoel">@shantanugoel</a></strong> for latest updates.</p>
<p><strong>VIDEO IN ACTION</strong><br />
<object style="height: 390px; width: 640px;" width="640" height="390"><param name="movie" value="http://www.youtube.com/v/4QnWDRF9w7k?version=3" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><embed type="application/x-shockwave-flash" width="640" height="390" src="http://www.youtube.com/v/4QnWDRF9w7k?version=3" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<p>The program makes use of several other programs in order to provide this functionality. To compile/use it, you also need the following programs:</p>
<p>1. <a rel="external nofollow" href="https://github.com/OpenNI/OpenNI" target="_blank">OpenNI Libraries</a> &#8211; To get data from kinect</p>
<p>2. <a rel="external nofollow" href="http://www.openni.org/downloadfiles/" target="_blank">NITE Libraries</a> (Choose &#8220;Middleware&#8221; on the page) &#8211; Builds on top of OpenNI to provide gesture detection etc</p>
<p>3. <a rel="external nofollow" href="https://github.com/boilerbots/Sensor" target="_blank">PrimeSense Libraries for kinect</a> &#8211; Kinect drivers to get raw data</p>
<p>4. <a rel="external nofollow" href="http://code.google.com/p/diyps3controller/" target="_blank">DIYPS3Controller</a> &#8211; The main component for PS3 connection and also known as sixaxis emulator. This emulates a DS3 on the PC and send the inputs to PS3 through bluetooth.</p>
<p><strong>Installation/Compilation/Usage</strong></p>
<p>1. Make sure that the above 4 things are installed on your machine and working fine.</p>
<p>2. Download the source of this project to the NITE Samples directory. You can even place it anywhere else but you would need to tweak the makefile to account for the changed paths.</p>
<p>3. Make any changes to the source that you need.</p>
<p>4. Change the included ps3 controller config xml file and place it in one of the locations where diyps3controller can find it.</p>
<p>5. Run make -f kinect-ps3.mak</p>
<p>6. The executable will be available in Samples/Bin directory of NITE.</p>
<p>7. Run kinect-ps3 (without any arguments)</p>
<p>8. Run emuclient (from ps3 controller software) and choose the new xml config file</p>
<p>9. &#8220;Become the controller&#8221; <img src='http://tech.shantanugoel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<strong>Default Config</strong>:</p>
<p>Menu Profile &#8211; This is the default profile that kinect-ps3 starts with and allows to operate the PS3 menus. Moving hand in any direction will move the ps3 menus as if you were using the DPAD with those directions keys pressed. If you run out of the kinect&#8217;s watched space, then just do a backward push with your hand, bring your hand to center and then again do the backward push and continue scrolling. This is like you lift your finger up and then start dragging from edges of a laptop&#8217;s touchpad.For selecting any item, make two successive push movements with your hand without changing any x-y direction.<br />
Game Profile &#8211; This profile can be switched to by doing 3 successive backward movements of the hand while in Menu profile. Right now I&#8217;ve implemented only directional controls in game profile because I&#8217;m still struggling with multiple hands detections and skeletal tracking. A full profile will be activated soon enough. Currently, the your hand&#8217;s x/y movements and directly translated to right stick x/y movements (e.g. this is looking in different directions in various FPS games). Moving the hand towards or away from kinect (z-axis) translate to left stick y movements (e.g. this is moving fowards or backwards in most FPS games).<br />
<strong>Issues/Queries/Suggestions</strong></p>
<p>Please direct them to me by commenting here or emailing me at shantanu AT shantanugoel DOT com</p>
<p><strong>Coming Soon/ToDo</strong></p>
<p>-Full Menu and Game profiles</p>
<p>- Skeletal tracking for better game profiles</p>
<p>- Switching back to menu profiles from game profiles</p>
<p>- Easier way to specify user custom profiles instead of changing code for the same</p>
<p>- Performance improvement for game profiles</p>
<p>Full source code of the project has been released at <a href="https://github.com/shantanugoel/Kinect-PS3">https://github.com/shantanugoel/Kinect-PS3</a> under GNU GPL v2.</p>
<p style='border:thin dotted black; padding:3mm;'><a href="http://tech.shantanugoel.com/terms-of-use">©</a> <a href="http://tech.shantanugoel.com/">Shantanu Goel</a> | This article, titled <strong><a href="http://tech.shantanugoel.com/2011/03/20/making-kinect-work-with-ps3.html">Making Kinect Work With PS3</a></strong>, was originally published on <a href="http://tech.shantanugoel.com/">Shantanu's Technophilic Musings</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.shantanugoel.com/2011/03/20/making-kinect-work-with-ps3.html/feed</wfw:commentRss>
		<slash:comments>211</slash:comments>
		</item>
		<item>
		<title>Ubuntu Maverick uinput Problem Solved</title>
		<link>http://tech.shantanugoel.com/2011/02/22/ubuntu-maverick-uinput-problem-solved.html</link>
		<comments>http://tech.shantanugoel.com/2011/02/22/ubuntu-maverick-uinput-problem-solved.html#comments</comments>
		<pubDate>Mon, 21 Feb 2011 19:33:37 +0000</pubDate>
		<dc:creator>Shantanu Goel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[sudo]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu maverick uinput]]></category>
		<category><![CDATA[uinput]]></category>

		<guid isPermaLink="false">http://tech.shantanugoel.com/?p=327</guid>
		<description><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>I&#8217;ve been playing around with linux uinput infrastructure for one of my ideas (Details coming soon ). &#8220;uinput&#8221; is basically a mechanism in linux that allows user space applications to inject input events (mouse/keyboard or anything else) into the system. But the problem I faced was that my programs were compiling and running without any <p>Continue reading <a href="http://tech.shantanugoel.com/2011/02/22/ubuntu-maverick-uinput-problem-solved.html">Ubuntu Maverick uinput Problem Solved</a></p>]]></description>
			<content:encoded><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>I&#8217;ve been playing around with linux uinput infrastructure for one of my ideas (Details coming soon <img src='http://tech.shantanugoel.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ). &#8220;uinput&#8221; is basically a mechanism in linux that allows user space applications to inject input events (mouse/keyboard or anything else) into the system. But the problem I faced was that my programs were compiling and running without any errors but I just couldn&#8217;t see the effect happening, i.e., the events weren&#8217;t getting injected into the system. I am using Ubuntu Maverick Meerkat (10.10) and when I searched on the net, I saw various other folks are facing the same issue. I finally got it working and here is how.</p><!--test --><script type="text/javascript"><!--
google_ad_client = "ca-pub-7364296987674978";
/* 468x60, created 10/6/08 */
google_ad_slot = "0345781418";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<p>First problem I came across was that I was using &#8220;/dev/input/uinput&#8221; path in my programs but it seems it is changed to &#8220;/dev/uinput&#8221; in Ubuntu. Changing this got me past some runtime errors I was getting.</p>
<p>Then I thought that the issue was because uinput module wasn&#8217;t getting loaded because even after specifically doing a modprobe, I still couldn&#8217;t see it loaded when I did lsmod. This was strange because the /dev/uinput node was present. On looking under /lib, I couldn&#8217;t even find the uinput.ko file. But then I found that the reason for this is that in Ubuntu Maverick, uinput is not a module anymore. It is built into the kernel now. (See this <a title="uinput built into kernel" rel="external nofollow" href="https://bugs.launchpad.net/ubuntu/+source/bluez/+bug/584812" target="_blank">launchpad bug</a>.)</p>
<p>So, having figured that the above was a false alarm, I was at a loss how to explain this. But then I tried just changing the permissions of the uinput node to 0666 (i.e. writable by all users) and ran my program without sudo and it worked like a charm. Searching for sudo along with uinput lead me to <a rel="external nofollow" href="https://bugs.launchpad.net/ubuntu/+source/sudo/+bug/609645" target="_blank">these</a> <a rel="external nofollow" href="http://www.sudo.ws/bugs/show_bug.cgi?id=388" target="_blank">bugs</a> which confirms that the problem is because of this only. So, if you are facing this issue, you can either change the uinput node permissions or install the sudo patch described in the bug discussion page.</p>
<p>Let me know if this worked for you as well <img src='http://tech.shantanugoel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style='border:thin dotted black; padding:3mm;'><a href="http://tech.shantanugoel.com/terms-of-use">©</a> <a href="http://tech.shantanugoel.com/">Shantanu Goel</a> | This article, titled <strong><a href="http://tech.shantanugoel.com/2011/02/22/ubuntu-maverick-uinput-problem-solved.html">Ubuntu Maverick uinput Problem Solved</a></strong>, was originally published on <a href="http://tech.shantanugoel.com/">Shantanu's Technophilic Musings</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.shantanugoel.com/2011/02/22/ubuntu-maverick-uinput-problem-solved.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Android Dev Tip: App Not Showing on X10 Mini Marketplace</title>
		<link>http://tech.shantanugoel.com/2010/08/08/android-dev-tip-app-not-showing-on-x10-mini-marketplace.html</link>
		<comments>http://tech.shantanugoel.com/2010/08/08/android-dev-tip-app-not-showing-on-x10-mini-marketplace.html#comments</comments>
		<pubDate>Sat, 07 Aug 2010 21:18:06 +0000</pubDate>
		<dc:creator>Shantanu Goel</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[android apps]]></category>
		<category><![CDATA[android development]]></category>
		<category><![CDATA[Android Manifest]]></category>
		<category><![CDATA[Android Marketplace]]></category>
		<category><![CDATA[android programming]]></category>
		<category><![CDATA[android tips]]></category>
		<category><![CDATA[Wi-Fi Keep Alive]]></category>
		<category><![CDATA[Xperia X10 Mini]]></category>

		<guid isPermaLink="false">http://tech.shantanugoel.com/?p=295</guid>
		<description><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>Many Android Developers (and users) get confused that why a certain app isn&#8217;t showing up on the new Xperia X10 Mini (and few other) phones. This happens even if they support all android versions and have published their apps for all countries, so that shouldn&#8217;t be the issue. I came across this as well when <p>Continue reading <a href="http://tech.shantanugoel.com/2010/08/08/android-dev-tip-app-not-showing-on-x10-mini-marketplace.html">Android Dev Tip: App Not Showing on X10 Mini Marketplace</a></p>]]></description>
			<content:encoded><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>Many Android Developers (and users) get confused that why a certain app isn&#8217;t showing up on the new Xperia X10 Mini (and few other) phones. This happens even if they support all android versions and have published their apps for all countries, so that shouldn&#8217;t be the issue. I came across this as well when few people mentioned that they couldn&#8217;t find my app <a title="Android Wi-Fi Keep Alive" href="http://tech.shantanugoel.com/projects/android/wi-fi-keep-alive" target="_blank">Wi-Fi Keep Alive</a> in the X10 mini marketplace. On some digging into the android docs and the X10 mini specs, I found the issue.</p><!--test --><script type="text/javascript"><!--
google_ad_client = "ca-pub-7364296987674978";
/* 468x60, created 10/6/08 */
google_ad_slot = "0345781418";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<p>The problem is that the X10 mini has a very small screen with only a QVGA resolution. This screen size/resolution wasn&#8217;t supported by Android until recently and the Android system might not be able to scale resources and layouts designed for other screen sizes well enough to suit the X10 mini. Hence, the Android system designers have chosen that any app which does not declare explicit support for small screens (i.e., the app dev has tested his app on small screens and made any changes, if needed, and then declared that everything works fine in the Android Manifest) then it is considered not compatible by default and hence, the Android marketplace will filter your app out.</p>
<p>Now, this is a big loss. A lot of X10 minis were sold and there are lot of new low-tier and cheap Android smartphones coming out with this resolution, so it is a significant market share that you can&#8217;t afford to lose. The solution is simple. If the app does indeed work fine on small screens (or you have fixed it to work), then all you got to do is add the below mentioned line in your AndroidManifest.xml:</p>
<blockquote><p>&lt;supports-screens android:smallScreens=&#8221;true&#8221; /&gt;</p></blockquote>
<p>That&#8217;s it. Your app should now show up fine in all screen sizes markets. Note that for all other screen sizes and resolutions, Android considers the default support as true and your app will show in those markets even if you don&#8217;t make any explicit declarations for them. You can read more about this here: <a rel="external nofollow" href="http://developer.android.com/guide/practices/screens_support.html" target="_blank"title="Android Multiple Screen Support">Supporting Multiple Screens in Android</a></p>
<p><strong>Update: </strong><a rel="external nofollow" href="http://www.blundell-apps.com/" target="_blank">Blundell</a> pointed out in the comments that <a rel="external nofollow" href="http://developer.android.com/guide/practices/screens_support.html%23defaults" target="_blank">Android documentation</a> says</p>
<blockquote><p>If android:minSdkVersion or android:targetSdkVersion is &#8220;4&#8243; (Android 1.6) or higher, the default value for everything is true. If your application requires Android 1.6 features, but does not support these densities and/or screen sizes, you need to set the appropriate attributes to false.</p></blockquote>
<p>This should mean that small screens should be set as supported by default if you have your minSdk <strong>or</strong> targetSdk  set to anything above or equal to 4. However, in my case, my apps had minSdk as 3 but targetSdk as 7 or 8 but still they didn&#8217;t show up in X10 mini marketplace till I added the smallScreens support to true in my manifest file. If anyone has any ideas about as to why it was like this, please let me know.</p>
<p style='border:thin dotted black; padding:3mm;'><a href="http://tech.shantanugoel.com/terms-of-use">©</a> <a href="http://tech.shantanugoel.com/">Shantanu Goel</a> | This article, titled <strong><a href="http://tech.shantanugoel.com/2010/08/08/android-dev-tip-app-not-showing-on-x10-mini-marketplace.html">Android Dev Tip: App Not Showing on X10 Mini Marketplace</a></strong>, was originally published on <a href="http://tech.shantanugoel.com/">Shantanu's Technophilic Musings</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.shantanugoel.com/2010/08/08/android-dev-tip-app-not-showing-on-x10-mini-marketplace.html/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Android App Wi-Fi Keep Alive updated to 1.4.1</title>
		<link>http://tech.shantanugoel.com/2010/07/22/android-app-wi-fi-keep-alive-updated-1-4-0.html</link>
		<comments>http://tech.shantanugoel.com/2010/07/22/android-app-wi-fi-keep-alive-updated-1-4-0.html#comments</comments>
		<pubDate>Thu, 22 Jul 2010 16:58:07 +0000</pubDate>
		<dc:creator>Shantanu Goel</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[android apps]]></category>
		<category><![CDATA[android wi-fi sleep policy]]></category>
		<category><![CDATA[Pandora stops on sleep android]]></category>
		<category><![CDATA[Wi-Fi Keep Alive]]></category>

		<guid isPermaLink="false">http://tech.shantanugoel.com/?p=289</guid>
		<description><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>Update: Made a minor update for a small bug that can make wi-fi keep reconnecting in quick succession.</p> <p>Pushed out a new update to my Android App Wi-Fi Keep Alive today. This update brings in another work around for the issue where the wi-fi is alive on the phone and it is also connected to <p>Continue reading <a href="http://tech.shantanugoel.com/2010/07/22/android-app-wi-fi-keep-alive-updated-1-4-0.html">Android App Wi-Fi Keep Alive updated to 1.4.1</a></p>]]></description>
			<content:encoded><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p><strong>Update:</strong> Made a minor update for a small bug that can make wi-fi keep reconnecting in quick succession.</p>
<p>Pushed out a new update to my Android App <a title="Android App Wi-Fi Keep Alive" href="http://tech.shantanugoel.com/projects/android/wi-fi-keep-alive" target="_self">Wi-Fi Keep Alive</a> today. This update brings in another work around for the issue where the wi-fi is alive on the phone and it is also connected to the network but is somehow unable to send/receive any packets to the network. The new work around will automatically re-associate your phone with the wi-fi router if it detects such a situation. This seems to make it work properly again for sometime. When it fails again, the workaround kicks in automatically again. This is not an ideal &#8220;fix&#8221; as such because streaming apps like Pandora radio etc might have a hiccup because of this but it is unavoidable as of now and atleast the notifications for mails and other things etc will work fine because this state stops even the mobile data network from taking over since the phone perceives that wi-fi is connected but is not working actually.</p><!--test --><script type="text/javascript"><!--
google_ad_client = "ca-pub-7364296987674978";
/* 468x60, created 10/6/08 */
google_ad_slot = "0345781418";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<p>The other things include support for small screen devices like Xperia X10 mini, some optimizations for size and speed, some icon sizes and UI tweaks for compatibility with different screen sizes and android versions. Please try it out from the market as usual and let me know how it goes. You can find the details and QR code for downloading etc here: <a title="Android App Wi-Fi Keep Alive" href="http://tech.shantanugoel.com/projects/android/wi-fi-keep-alive" target="_self"><strong>Wi-Fi Keep Alive</strong></a></p>
<p style='border:thin dotted black; padding:3mm;'><a href="http://tech.shantanugoel.com/terms-of-use">©</a> <a href="http://tech.shantanugoel.com/">Shantanu Goel</a> | This article, titled <strong><a href="http://tech.shantanugoel.com/2010/07/22/android-app-wi-fi-keep-alive-updated-1-4-0.html">Android App Wi-Fi Keep Alive updated to 1.4.1</a></strong>, was originally published on <a href="http://tech.shantanugoel.com/">Shantanu's Technophilic Musings</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.shantanugoel.com/2010/07/22/android-app-wi-fi-keep-alive-updated-1-4-0.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BadTokenException Error In Android Dialog</title>
		<link>http://tech.shantanugoel.com/2010/07/08/badtokenexception-android-dialog-getapplicationcontext.html</link>
		<comments>http://tech.shantanugoel.com/2010/07/08/badtokenexception-android-dialog-getapplicationcontext.html#comments</comments>
		<pubDate>Thu, 08 Jul 2010 11:24:14 +0000</pubDate>
		<dc:creator>Shantanu Goel</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Android Dialogs]]></category>
		<category><![CDATA[BadTokenException Android]]></category>
		<category><![CDATA[getApplicationContext Android]]></category>

		<guid isPermaLink="false">http://tech.shantanugoel.com/2010/07/08/badtokenexception-android-dialog-getapplicationcontext.html</guid>
		<description><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>If you are creating a custom Dialog for Android, and following the Android Developers’ Creating Dialogs tutorial, then most likely you would have faced a Force Close with this exception showing up in logcat. I did too. Although I figured it out quickly, it might not be easy to find out for many, so posting <p>Continue reading <a href="http://tech.shantanugoel.com/2010/07/08/badtokenexception-android-dialog-getapplicationcontext.html">BadTokenException Error In Android Dialog</a></p>]]></description>
			<content:encoded><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>If you are creating a custom Dialog for Android, and following the <a title="Creating Android Dialogs" href="http://developer.android.com/guide/topics/ui/dialogs.html" rel="external nofollow" target="_blank">Android Developers’ Creating Dialogs</a> tutorial, then most likely you would have faced a Force Close with this exception showing up in logcat. I did too. Although I figured it out quickly, it might not be easy to find out for many, so posting it here for reference. Basically, the code given in the tutorial goes something like this:</p><!--test --><script type="text/javascript"><!--
google_ad_client = "ca-pub-7364296987674978";
/* 468x60, created 10/6/08 */
google_ad_slot = "0345781418";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<blockquote><p>Context mContext = getApplicationContext();     <br />Dialog dialog = new Dialog(mContext); </p>
<p>dialog.setContentView(R.layout.custom_dialog);     <br />dialog.setTitle(&quot;Custom Dialog&quot;); </p>
<p>TextView text = (TextView) dialog.findViewById(R.id.text);     <br />text.setText(&quot;Hello, this is a custom dialog!&quot;);      <br />ImageView image = (ImageView) dialog.findViewById(R.id.image);      <br />image.setImageResource(R.drawable.android);</p>
</blockquote>
<p>All looks well, but when you execute it, you will get a Force Close. The error appearing in logcat would be something like this:</p>
<blockquote><p>Uncaught handler: thread main exiting due to uncaught exception     <br />android.view.WindowManager$BadTokenException: Unable to add window &#8212; token null is not for an application</p>
</blockquote>
<p>It isn’t apparent immediately that what is causing this error. The very first line in the code “Context mContext = getApplicationContext();” is the culprit.</p>
<p><strong>Solution:</strong> Just replace “getApplicationContext()” with “this” (i.e. “Context mContext = this;” ) and it will work fine.</p>
<p><strong>Explanation:</strong> As to why this is exactly an issue, I’m a bit fuzzy about it myself but this much I’m sure that the contexts that you get with getApplicationContext and this are different. On reading about this function from Android SDK help:</p>
<blockquote><p>Return the context of the single, global Application object of the current process. This generally should only be used if you need a Context whose lifecycle is separate from the current context, that is tied to the lifetime of the process rather than the current component.</p>
</blockquote>
<p>I think this would mean is that getApplicationContext returns a context which is for the application itself and not the activity, while “this” would give you the context of the activity in which you are creating the dialog. I think since it is the activity which is associated with the UI (and for whom the window has been created), using the application context would have caused the crash here.</p>
<p style='border:thin dotted black; padding:3mm;'><a href="http://tech.shantanugoel.com/terms-of-use">©</a> <a href="http://tech.shantanugoel.com/">Shantanu Goel</a> | This article, titled <strong><a href="http://tech.shantanugoel.com/2010/07/08/badtokenexception-android-dialog-getapplicationcontext.html">BadTokenException Error In Android Dialog</a></strong>, was originally published on <a href="http://tech.shantanugoel.com/">Shantanu's Technophilic Musings</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.shantanugoel.com/2010/07/08/badtokenexception-android-dialog-getapplicationcontext.html/feed</wfw:commentRss>
		<slash:comments>33</slash:comments>
		</item>
		<item>
		<title>How To Debug Android Widgets</title>
		<link>http://tech.shantanugoel.com/2010/06/14/how-to-debug-android-widgets.html</link>
		<comments>http://tech.shantanugoel.com/2010/06/14/how-to-debug-android-widgets.html#comments</comments>
		<pubDate>Sun, 13 Jun 2010 18:42:42 +0000</pubDate>
		<dc:creator>Shantanu Goel</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Phones]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[android coding]]></category>
		<category><![CDATA[android programming]]></category>
		<category><![CDATA[android widget breakpoint]]></category>
		<category><![CDATA[DDMS]]></category>
		<category><![CDATA[debug android widgets]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[widgets]]></category>

		<guid isPermaLink="false">http://tech.shantanugoel.com/?p=276</guid>
		<description><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>For most new android app developers (like me), it is a bit puzzling how to debug the android widgets or how to put a breakpoint in an android widget code. For normal applications, it is quite simple as when you press &#8220;debug&#8221; on the eclipse toolbar, it launches the emulator (or connects to existing emulator/device), <p>Continue reading <a href="http://tech.shantanugoel.com/2010/06/14/how-to-debug-android-widgets.html">How To Debug Android Widgets</a></p>]]></description>
			<content:encoded><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>For most new android app developers (like me), it is a bit puzzling how to debug the android widgets or how to put a breakpoint in an android widget code. For normal applications, it is quite simple as when you press &#8220;debug&#8221; on the eclipse toolbar, it launches the emulator (or connects to existing emulator/device), syncs your application and launches its main activity and puts the control in your hands if you have put a breakpoint. For widgets, it seems a bit tricky because there is no activity to be launched, so eclipse just syncs your widget&#8217;s apk and installs it and that&#8217;s it. So, is it possible or not to debug widget code? and if yes, then is it very difficult? Fortunately, it is possible and very easy to do but just slightly less intuitive and I couldn&#8217;t find any information about it at Android developers website and learnt it by just fumbling around for a few minutes so thought of posting here for the benefit of other newbies like me.</p><!--test --><script type="text/javascript"><!--
google_ad_client = "ca-pub-7364296987674978";
/* 468x60, created 10/6/08 */
google_ad_slot = "0345781418";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<p>So, all you need to debug your widget code is almost same as what you do for normal applications. Just follow the below steps:</p>
<p>1. Press &#8220;debug&#8221; on the eclipse menu (or &#8220;run&#8221; it doesn&#8217;t seem to matter)</p>
<p>2. Once the widget apk is sync&#8217;ed and installed onto your emulator/device, switch your eclipse workspace to DDMS mode. You can either do this by pressing the &#8220;DDMS&#8221; labeled button on your top right corner or if you can&#8217;t find it, then do it by going to &#8220;Window-&gt;Open Perspective-&gt;DDMS&#8221;.</p>
<p>3. Select the process name of your widget from the list of processes shown. By default, this list appears at top left of DDMS window. (See screenshot below). If you can&#8217;t see your widget&#8217;s process name in the list, it is possible that the widget is not added to the home screen yet. So, do so.</p>
<p>4. Press the green debug button above the process list (See screenshot below)</p>
<p>5. And that&#8217;s it. Now, if you had put a breakpoint in the code, do something that executes that piece of the code.</p>
<div class="wp-caption aligncenter" style="width: 330px"><a href="http://tech.shantanugoel.com/uploads/debug-android-widget-eclipse.png"><img class=" " title="Debug Android Widgets in Eclipse" src="http://tech.shantanugoel.com/uploads/debug-android-widget-eclipse-thumb.png" alt="Screenshot to show how to debug android widgets in eclipse" width="320" height="200" /></a><p class="wp-caption-text">Click To Enlarge</p></div>
<p>Let me know if this helped you out or if you see anything that I missed out. Happy coding <img src='http://tech.shantanugoel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style='border:thin dotted black; padding:3mm;'><a href="http://tech.shantanugoel.com/terms-of-use">©</a> <a href="http://tech.shantanugoel.com/">Shantanu Goel</a> | This article, titled <strong><a href="http://tech.shantanugoel.com/2010/06/14/how-to-debug-android-widgets.html">How To Debug Android Widgets</a></strong>, was originally published on <a href="http://tech.shantanugoel.com/">Shantanu's Technophilic Musings</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.shantanugoel.com/2010/06/14/how-to-debug-android-widgets.html/feed</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>Real Time Data Plotting with GNUPlot</title>
		<link>http://tech.shantanugoel.com/2009/12/29/real-time-plot-gnuplot.html</link>
		<comments>http://tech.shantanugoel.com/2009/12/29/real-time-plot-gnuplot.html#comments</comments>
		<pubDate>Tue, 29 Dec 2009 11:15:51 +0000</pubDate>
		<dc:creator>Shantanu Goel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[gnuplot]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[real time data]]></category>
		<category><![CDATA[real time gnuplot]]></category>
		<category><![CDATA[real time plot]]></category>
		<category><![CDATA[rt-gnuplot-ter]]></category>
		<category><![CDATA[rtgnuplotter]]></category>
		<category><![CDATA[streaming data plot]]></category>

		<guid isPermaLink="false">http://tech.shantanugoel.com/2009/12/29/real-time-plot-gnuplot.html</guid>
		<description><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>I wrote this script a few days ago to plot real-time / streaming data with gnuplot. The motivation was that I needed to test a piece of code for a touchscreen driver that I had written at work. The issue was that the UI wasn’t quite ready yet, so I wanted to test just the <p>Continue reading <a href="http://tech.shantanugoel.com/2009/12/29/real-time-plot-gnuplot.html">Real Time Data Plotting with GNUPlot</a></p>]]></description>
			<content:encoded><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>I wrote this script a few days ago to plot real-time / streaming data with gnuplot. The motivation was that I needed to test a piece of code for a touchscreen driver that I had written at work. The issue was that the UI wasn’t quite ready yet, so I wanted to test just the driver to be working fine. Now, the very first thought for the software to use that came to me was “gnuplot” but I found that it can’t really do this in an easy way. A colleague suggested me to use “replot” command with gnuplot. I whipped out my perl hat and a few hours later, voila!! my very own real time data plotter was ready. Now, I can stream data from any program to this script or provide the data on STDIN and can see the data being plotted continuously. BTW, it was awesome to see all the shapes that I drew on my target board’s&#160; LCD touchscreen to come alive on my PC monitor almost instantaneously.</p><!--test --><script type="text/javascript"><!--
google_ad_client = "ca-pub-7364296987674978";
/* 468x60, created 10/6/08 */
google_ad_slot = "0345781418";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<p>I call it “rtgnuplotter”. A weird name I know <img src='http://tech.shantanugoel.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> , but I just wanted to refer to it as a real time data plotter based on gnuplot. Please check it out at <a title="Real Time Streaming Data Plotting with gnuplot" href="http://tech.shantanugoel.com/projects/misc-stuff/real-time-streaming-data-plot-gnuplot" target="_blank" rel="me"><strong>Home Page of RTGNUPlotter</strong></a>. </p>
<p>I’d love to hear from you if you found it useful. Please send in your bug reports and feature requests and I’d be glad if you could spread a word about it amongst your data-loving friends <img src='http://tech.shantanugoel.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style='border:thin dotted black; padding:3mm;'><a href="http://tech.shantanugoel.com/terms-of-use">©</a> <a href="http://tech.shantanugoel.com/">Shantanu Goel</a> | This article, titled <strong><a href="http://tech.shantanugoel.com/2009/12/29/real-time-plot-gnuplot.html">Real Time Data Plotting with GNUPlot</a></strong>, was originally published on <a href="http://tech.shantanugoel.com/">Shantanu's Technophilic Musings</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.shantanugoel.com/2009/12/29/real-time-plot-gnuplot.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Continuous Monitoring With Tail Fails</title>
		<link>http://tech.shantanugoel.com/2009/12/23/continuous-monitor-tail-fails.html</link>
		<comments>http://tech.shantanugoel.com/2009/12/23/continuous-monitor-tail-fails.html#comments</comments>
		<pubDate>Wed, 23 Dec 2009 18:10:44 +0000</pubDate>
		<dc:creator>Shantanu Goel</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[continuous monitoring files]]></category>
		<category><![CDATA[monitor file]]></category>
		<category><![CDATA[tail]]></category>
		<category><![CDATA[tail -f]]></category>

		<guid isPermaLink="false">http://tech.shantanugoel.com/2009/12/23/continuous-monitor-tail-fails.html</guid>
		<description><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>If you can&#8217;t get tail command to continuously monitor a file, then read on. I was working on a script yesterday, a part of which depended on continuous monitoring of a text file. I had used our trusty old &#8220;tail&#8221; command for this but while testing by manually putting in some data into the file, <p>Continue reading <a href="http://tech.shantanugoel.com/2009/12/23/continuous-monitor-tail-fails.html">Continuous Monitoring With Tail Fails</a></p>]]></description>
			<content:encoded><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>If you can&#8217;t get tail command to continuously monitor a file, then read on. I was working on a script yesterday, a part of which depended on continuous monitoring of a text file. I had used our trusty old &#8220;tail&#8221; command for this but while testing by manually putting in some data into the file, it was failing but curiously it was working fine when used in actual scenario. Befuddled, I did a simple test. I created a simple text file &#8220;a.txt&#8221; with a few lines of data and then ran the following command. </p><!--test --><script type="text/javascript"><!--
google_ad_client = "ca-pub-7364296987674978";
/* 468x60, created 10/6/08 */
google_ad_slot = "0345781418";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<blockquote><p>tail -f a.txt</p>
</blockquote>
<p>It showed the last few lines of the file and kept waiting. So far so good. Then I opened the file in vim editor, wrote a few more lines, saved the file and then waited but nothing in the window that was running the tail command. Thinking that the data might be buffered and not flushed to the disc yet, I ran the sync command but still nothing. </p>
<p><span id="more-261"></span>
<p>Then I got a hint that when I used the &#8220;-F&#8221; or &#8220;&#8211;follow=name&#8221; option instead of &#8220;-f&#8221;, the tail command was able to detect the change just fine, the only problem being that in this mode, it prints the last few lines again, not just the newly added line. The main difference in these new options is that tail command tracks the file for changes by its name and not by the file descriptor, and then it dawned on me. The problem is not in the tail command but my testing method itself. When I save the file opened in vim, it creates a new file with a new inode while the one opened by tail is still the old one (which is now a temporary file which has actually been deleted). When I quit tail, then the kernel deletes the file automatically. This is also confirmed by running &#8220;lsof | grep a.txt&#8221; (lsof lists the open files and then we find the ones related to a.txt). The output shown is;</p>
<blockquote><p>tail      11966   shantanu    3r      REG                8,6        8     224954 /home/shantanu/dev/perl/plot/a.txt~ (deleted)</p>
</blockquote>
<blockquote><p>vim       12576   shantanu    9u      REG                8,6    12288     210918 /home/shantanu/dev/perl/plot/.a.txt.swp</p>
</blockquote>
<p>which shows what we had discussed above. This gets worked around when I use the -F option because then tail periodically reopens the file by name and reads it again, thus bypassing the above issue. Then I simply tried running tail again on the same file and doing something like &#8220;echo abc &gt;&gt; a.txt&#8221; and I could see the behaviour as expected with tail immediately detecting the change and displaying it in its window. Hope this helps if you have been pulling out your hair thinking you have gone crazy as your favourite little tool that you have been using for so many years has suddenly stopped working and no one else apart from you is even complaining <img src='http://tech.shantanugoel.com/wp-includes/images/smilies/icon_razz.gif' alt=':P' class='wp-smiley' /> </p>
<p style='border:thin dotted black; padding:3mm;'><a href="http://tech.shantanugoel.com/terms-of-use">©</a> <a href="http://tech.shantanugoel.com/">Shantanu Goel</a> | This article, titled <strong><a href="http://tech.shantanugoel.com/2009/12/23/continuous-monitor-tail-fails.html">Continuous Monitoring With Tail Fails</a></strong>, was originally published on <a href="http://tech.shantanugoel.com/">Shantanu's Technophilic Musings</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.shantanugoel.com/2009/12/23/continuous-monitor-tail-fails.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Compiling Latest FireFly (mt-daapd) for ASUS WL-500W</title>
		<link>http://tech.shantanugoel.com/2009/07/03/compiling-latest-firefly-mt-daapd-asus-wl-500w.html</link>
		<comments>http://tech.shantanugoel.com/2009/07/03/compiling-latest-firefly-mt-daapd-asus-wl-500w.html#comments</comments>
		<pubDate>Fri, 03 Jul 2009 10:28:32 +0000</pubDate>
		<dc:creator>Shantanu Goel</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Asus WL-500g]]></category>
		<category><![CDATA[Asus WL-500W]]></category>
		<category><![CDATA[buildroot]]></category>
		<category><![CDATA[daap]]></category>
		<category><![CDATA[firefly]]></category>
		<category><![CDATA[ipkg]]></category>
		<category><![CDATA[itunes daap media server]]></category>
		<category><![CDATA[media server]]></category>
		<category><![CDATA[mt-daapd]]></category>
		<category><![CDATA[NAS]]></category>
		<category><![CDATA[optware-devel]]></category>
		<category><![CDATA[patches]]></category>
		<category><![CDATA[RhythmBox]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[routers]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[winamp]]></category>

		<guid isPermaLink="false">http://tech.shantanugoel.com/?p=252</guid>
		<description><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>FireFly is a nice DAAP based media server that allows you to listen to your music collection anywhere using any DAAP based client like iTunes, with other players (like Winamp, Rhythmbox, VLC, etc) using plugins, or it even has its own dedicated php/flash/java based clients that can be fired up on any platform any computer <p>Continue reading <a href="http://tech.shantanugoel.com/2009/07/03/compiling-latest-firefly-mt-daapd-asus-wl-500w.html">Compiling Latest FireFly (mt-daapd) for ASUS WL-500W</a></p>]]></description>
			<content:encoded><![CDATA[<!-- Powered by Shantz WP Prefix Suffix. Tech Blog: http://tech.shantanugoel.com/ Secure Programming Blog: http://www.safercode.com/blog/ Blog: http://blog.shantanugoel.com/ --><p>FireFly is a nice DAAP based media server that allows you to listen to your music collection anywhere using any DAAP based client like iTunes, with other players (like Winamp, Rhythmbox, VLC, etc) using plugins, or it even has its own dedicated php/flash/java based clients that can be fired up on any platform any computer giving you instant nirvana.</p>
<p>Many people, like me, use it on their Routers or NAS boxes to access their music anywhere without having to keep their home PC running or lugging around external drives. However, development on this gem stopped some time ago. The last stable build released (2.4.2) was good but it doesn&#8217;t have a lot of features provided by the nightly builds in svn (subversion). And the last nightly build released (svn-1696) had a lot of broken things. It was rebuilding the database everytime, crashed around quite a bit, had a lot of security holes. So, I decided to get the latest version (trunk) of the FireFly code, as it had a lot of fixes for above issues, put in whatever was missing, and try to build it for my use.</p><!--test --><script type="text/javascript"><!--
google_ad_client = "ca-pub-7364296987674978";
/* 468x60, created 10/6/08 */
google_ad_slot = "0345781418";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
<p>After a day&#8217;s worth of efforts, here it is. This latest build is the most rich in features as compared to the stable one, and is just as stable as the 2.4.2 release if not better, and also fixes all the issues shown by the svn-1696 build. The downloadable source and complete install package are attached with this post. But I&#8217;m also listing down the steps that I took to achieve this so that if anyone wants to recompile it with their own options (e.g. I haven’t included ogg/flac support in my build), they are able to do so. You can find the steps below. Please let me know if you have any queries. Also, if you want to submit any patches, I’ll be happy to incorporate them and recompile. I’m also trying to get this source and package into the unslung/optware repositories for wider distribution.</p>
<p><strong>Note: Although I’ve compiled this for Asus WL-500W, it should work for most devices with a mipsel architecture (which includes all the Asus routers in this family). Also, the compilation process should work for most other architectures barring one or two steps. I’d be happy to help if you want to do so and face any issues.</strong></p>
<p><span id="more-252"></span></p>
<p>Changes and Build Steps:</p>
<ul>
<li>ipkg install optware-devel</li>
<li>ipkg install buildroot</li>
<li>Edit /opt/share/aclocal/audiofile.m4 and change AC_DEFUN(AM_PATH_AUDIOFILE, to AC_DEFUN([AM_PATH_AUDIOFILE],</li>
<li>ipkg install gettext (for some missing m4 macros, libr_rpath etc)</li>
<li>Comment out AC_USE_SYSTEM_EXTENSIONS in configure.in (using dnl)</li>
<li>aclocal -I &lt;path of mt-daapd&#8217;s local m4 dir&gt;</li>
<li>run “autoheader” to generate config.h.in</li>
<li>touch config.rpath (somehow this file is not provided with gettext for us)</li>
<li>change configure.in line 95, remove the ; at the end</li>
<li>remove -g flag and add -O2 in configure.in for optimization purpose</li>
<li>run “automake &#8211;add-missing”</li>
<li>run “autoconf” &#8211; to generate configure</li>
<li>ipkg install grep (for egrep)</li>
<li>change /bin/sh to /opt/bin/bash in configure and install-sh</li>
<li>run “./configure &#8211;enable-sqlite3 &#8211;prefix=/opt CPFLAGS=”-D_LIBC” ” (You can also use &#8211;enable-oggvorbis and/or &#8211;enableflac)</li>
<li>After this step, I had to make numerous changes to the source code to put in the missing functionality for database handling, removing some compilation errors, etc. You can diff the svn 1715 code with mine to see the changes.</li>
<li>run “make”</li>
<li>run “make install”</li>
</ul>
<p>And you are done. The modified source and compiled bianries can be downloaded from below.</p>
<p><strong><a title="mt-daapd firefly for asus routers" href="http://tech.shantanugoel.com/resources/downloads/shantz-mt-daapd.zip">DOWNLOAD: Updated MT-DAAPD for Asus WL-500W router</a></strong></p>
<p>Let me know if you have any queries or face any issues.</p>
<p style='border:thin dotted black; padding:3mm;'><a href="http://tech.shantanugoel.com/terms-of-use">©</a> <a href="http://tech.shantanugoel.com/">Shantanu Goel</a> | This article, titled <strong><a href="http://tech.shantanugoel.com/2009/07/03/compiling-latest-firefly-mt-daapd-asus-wl-500w.html">Compiling Latest FireFly (mt-daapd) for ASUS WL-500W</a></strong>, was originally published on <a href="http://tech.shantanugoel.com/">Shantanu's Technophilic Musings</a></p>
]]></content:encoded>
			<wfw:commentRss>http://tech.shantanugoel.com/2009/07/03/compiling-latest-firefly-mt-daapd-asus-wl-500w.html/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

