Saturday, September 27, 2014

Problems and their solutions: VSF5011 Finger Print Reader Installation Dell Vostro 3550 and others.


It's really easy to install this library.
1. Install al needed packages: (list may be changed)
:~$ sudo apt-get install libperl-dev libgtk2.0-dev libusb-1.0-0-dev libnss3-dev
2. Download full source tree archive: https://github.com/ars3niy/fprint_vfs5011/archive/master.zip:
3. Unzip archive:
:~$ unzip ./master.zip
4. Open unziped folder:
:~$ cd ./fprint_vfs5011-master
5. Configure
:~$ ./configure
6. Make package
:~$ make
7. Install package
:~$ sudo make install
8. Install fprint demo
:~$ sudo apt-get install fprint-demo fprintd fprintd-doc libfprint0
9. Invoke fprint demo with root privileges
:~$ sudo fprint_demo

On following the steps many errors were encountered. Such encounters and the counter measures are listed below.

Problem: ./configure: command not found
Solution: bash autogen.sh

P: libtoolize: command not found
S: sudo apt-get install libtool

P: aclocal:command not found
S: apt-get install automake

P: configure: error: XV is required for X11 examples
S: sudo apt-get install xorg-dev

P: make error:  underfined reference to variable g_str_equal
downlaod the .patch and then run it using the command
patch < /home/karthik/Downloads/link-against-glib.patch


Finally installing the Fingerprint GUI

if “could not open fingerprint device permission problem”
then $ sudo fingeprint-gui

To add fingerprint verficatio to login screen
sudo add-apt-repository ppa:fingerprint/fprint
sudo apt-get install libpam-fprintd

$ grep fprint /etc/pam.d/common-auth
The needed lines in common-auth should now be present.
Result:
auth    [success=2 default=ignore]      pam_fprintd.so
Run:
fprintd-enroll
To eliminate fingerprint authentication from the display manager login do the following.
sudo cp /etc/pam.d/common-auth /etc/pam.d/common-auth-nofinger
sudo gedit /etc/pam.d/common-auth
and comment out the line
“auth [success=3 default=ignore] pam_fprintd.so"
Save and Quit

At last, after a gruelling 4Hrs of key clicking, it’s done. Authentication to all ‘sudo’ commands now possible through a simple finger print scan. Linux, you just made by day. Good for me. Now let the world enjoy this.


Saturday, March 15, 2014

Scraping website for Notifications using Python (Attempt made on VITEEE 2014 slot booking page)


Scraping websites where in the actual information is not published before a stipulated time, is necessary. For example a recent attempt to book time slots for an examination that my sister was yet to take brought forward some insights and needs. Tasks such as Tatkal ticket booking, exam slot booking, trying to open the Results page of some exam ...etc are all time critical jobs . Since these are all First-Come-First-Serve based tasks, being the first one to open the website is crucial. I was met with a similar challenge today wherein the time slot booking for VITEEE 2014 was to start today at 10:30PM. However, the website link pointed to the same webpage with some instructions even after 11:00PM. As I said, these are time critical applications and this particular one wasn't a case of the webpage not opening but more of a case of the webpage getting updated. So pinging the website won't serve the purpose. So a quick 5min script in python using the BeautifulSoup module solved the problem. The code is simple and obvious for most python hobbyists but the exposed possibilities are many. The Beep API via pywin32 was used to alert me when the webpage gets updated by playing a beep. The cue that hinted the update of the webpage was a change in the text part of the page. As it was coded in a very short time not a much attention was paid to the exceptions that might arise. Just wanted to get the work done. Only thing to keep in mind is that one must be reasonable in setting the ping time. Setting it too low might overload the server which I need not tell you. This isn't something big but was something that works and also definitely worth sharing.

 

How far has GMail come? How clever has GMail become?

Me and also most born after in the early 90's have all had their first experience with email on Yahoo!. Email has undergone a lot of improvements since the early 2000's. However, there were few such occasions wherein I noticed the rapid pace at which all of it had been happening. One such moment had recently occurred and I wanted to share it. I was supposed to send an important mail with an attachment. It had non empty Subject and To: fields and all seemed fine and dandy, at least to my eyes. The mail read,"Please find attached....". Now, an unmindful me, hit the send button seeing that all the fields were filled. Remember I mentioned this was an important mail and shouldn't be resent. I was oblivious to the task at hand but GMail wasn't. Immediately an alert box popped up alerting me of the missing attachment which it inferred from the body of the email. I know it isn't such a big deal to write a code which does that, could've very well been the work of an intern; but the improvement it shows in user experience is very significant. It is also worth noting that GMail reads your email, only time can tell how dangerous it is or could be. Research in Natural Language Processing could have contributed to this application. In conclusion, it helps to take a step back from time-to-time and gaze in awe at the rapid changes that the world of internet is undergoing. This is exactly what I did and hence shared what I saw through this post.

Wednesday, March 12, 2014

DSK6713 has been a pain in the head .But why ?

The project required the implementation of OFDM transmitter and receiver and an attempt at estimating the channel. To keep things simple the implementation was done using  Simulink and then the Matlab coder was used to port the implementation to a TMS320C6713.  Now here's the problem, CCS v4 requires Matlab 2011b and above. Now to observe live data 'Real Time Data Exchange' (RTDX) mechanism can be used.Problem with using RTDX is that it's not supported by CCS v4, only v3 and then it skips a version supporting v5 all of a sudden. Now Matlab 2011b doesn't support CCS v5 ,or at least that what was proved by 5 hours of futile attempts at making it work. So whats left to do, going back to v3.3. This damn  version doesn't support Matlab 2011b. Had to travel back in time and switch to XP having Matlab 7.0 installed. At last, things seemed to be look positive only to be shattered when an attempt to build the simulink model spat out an ugly error So problem with the compiler I suppose. It wanted VC++ 2010 compiler which again had to be downloaded and installed. What a day !

Thursday, March 6, 2014

Camera as a Joy Stick using Color detection and Tracking (very simple approach)


Just to pass some time and learn stuff I decided to play a vintage Flight Simulation game "YS Flight Simulation". Back in 2006 I used to enjoy this game a lot on my 512MB P4 machine running XP. Makes me nostalgic when I start playing this game. Anyhow, the problem at hand was to control the flight, which has mouse based control by default, using my webcam as a Joystick. Why? Why not. The Logitech webcam I had fit snugly in my palm and I didn't mind straining my wrist a bit. Python and OpenCV was my logical choice (so is every hobbyist's). 
      
           I went ahead and stuck a red marker on the wall. Color based thresholding was done and the red region corresponding to the marker's image was extracted. I kept things simple by removing any other objects adding to the background clutter that have been resting on my table (for an embarrassingly long time)  from corrupting my clean segmentation. I read the screen resolution using functions provided in the win32api module. Once done, I mapped the coordinates of the camera with that of the screen and rescaled the centroid of the marker mask. Executed it. It Didn't work (was far my expectation ). Problem was that the coordinates were mapped improperly in the reverse order. So remapped them and then also used  squared coordinates as against the centroid coordinates directly to make the system more sensitive to motion. You my also use exponential or other non-linear function of the coordinates to achieve faster rates of motion.

Monday, October 28, 2013

A Cheat to Solve any 2-D Maze.

Euler suggested that any solvable maze can be solved by going along the wall of the maze(citation needed). Now he doesn't make such a suggestion out of the blue right.There has to be a proof. So it got me wondering if something can be so simple and if I can synthesize a proof. Then I went along and started thinking as I rode back home. Even though this was a long time back , the idea still  is very fresh in my mind thanks to its simplicity. Now, the idea  may be obvious once I present to you the essence of the proof. But a mathematical proof is necessary, just to put an end to any further discussions.

Now the first assumption is that the maze is solvable. So, going against the obvious, let us construct a simple solvable maze. Two non intersecting lines from region A to region B ( not necessarily straight) with a path leading from region A to B. Once this  is done we are twist and turn these two lines like a thread to make many topologically similar shapes. Here these two lines can be stretched indefinitely and compressed indefinitely . The many topologically similar structures are nothing but the mazes that we see in the newspapers every day. Traversing the wall amounts to tracing one of the morphed yet topologically similar lines from A to B. Since the such a line is bound to reach B, traversing along it results in arriving a the destination no matter what.

Will soon come forward with a java applet to describe the post visually so don't be disappointed if you aren't convinced. Have a great day.

Never shy away from questioning the impossible,

It brings 'possibility' a little closer - Karthik


Sunday, April 7, 2013

facebook Home: Goes for a free ride on Google

Facebook recently came up with a new application for the android platform called  "Facebook Home", a home screen based social experience app. 

This application sits right on top of the android platform hiding the  conventional home screen that you are used to and replaces it with your most recent Facebook notifications. This comes as a big blow to Google and why you ask, well you do spend a lot of time on Facebook right which is always in the best interests of the Facebook inc. Having this app is like having a endless supply of chocolates you can snack on all day long. 

Now coming to actual point , why on earth didn't  Google come up with this idea. Their strategy in promoting their social platform,Google Plus especially on the mobile platform seems very obvious now that Facebook has come up with the Home app. Moreover from what Mark Zuckerberg  had to say, its Goolge's "Openness" that one would eventually blame for it slow down. Facebook is, in a way, taking a free ride towards global domination thanks to Android's Open nature. Androids open platform allows anyone to put up an app on the Google Play without much restrictions. Like adding fuel to fire, android's huge user base will leave facebook's stock price only one direction  to follow- Up.

I think I've seen this kind of a social experience on a mobile  somewhere.Oh, was it one the new Windows Phone OS ? Wonder why it didn't catchup. But it definitely gave facebook the much needed kick in the head. Coming to Google,it definitely provided it with the land to build its Billion dollar mall through Android platform; all of this at no cost at all.

This app will be available only on selected models for now like the Samsung Galaxy SIII and Note II from 12th April 2013.