Thursday, January 15, 2009

The 13th hour !!

Praneeth's and my association with the TMRS lab dates back to the 2nd year summer of 2007. We were looking for some Prof to work under for the summer and one day we see a notice outside the mess, calling mechanical and electrical students with past experience to work on some railway project. Lot of people applied for it including Sankule and Prateek Agarwal. Then there was an interview conducted by Rahul Verma and T.V.K. Gupta Sir in the mission office. Finally four of us were selected. Rahul called us to his room and privately told us that we would be working on ABS and not railway project. It wasn't even 10 days working on it that we came to know that RSS and Jeevan Singh were also in the same project. By the end of two months we finally made a working IMU and a working lab prototype of Anti-lock Braking System for Indian cars. Sir gave us a grand treat. We went to Rave 3 by taxi, had pizza .... then went to Barista and even bought Barista Coffee mugs.
After the sem started we kept visiting the lab to install the ABS on car and soon realised that we would have to make reports after reports. We were pretty disappointed then but RSS kept working. Then came the interesting story:
THE UNMANNED RAILWAY CROSSING PROJECT
Vyas Sir had got a project sanctioned for making an alarm system for unmanned railway crossings in India. RSS got a prototype ready as well. It was nothing but a small metal sensor to be mounted 3 kms from the unmanned crossing with a wireless zigbee transmitter. There was a wireless receiver at the gate end with a powerful audio alarm. RSS had gone home during the Dussehra holidays and I was also in Lucknow. God knows what did Praneeth think and went to the lab one day where people were preparing to welcome the DG, RDSO and demonstrate the project to him. Next morning something went wrong with the circuit and it stopped working. Someone in the lab said that Praneeth was the last person to touch it and he was summoned immediately.
He tried analysing the circuit but not much hope. He called me up. Fortunately I was on my way back to IIT. I was obviously unaware of the urgency of the situation. I reached IIT at 6 in the evening and everything was hot there; someone calling RSS on phone..others convincing Sir . I saw the circuit and cried (dont ask me why). Anyway within half an hour we figured out the detached soldering and fixed it but in the process we had to modify the MCU firmware. The claims were that the circuit had a range of 3 kms. So we were planning to plant external antenna on the module and test it. It was then when the actual hell broke loose. By mistake I touched one of the input wires of the module to 12v and it died :|. That was the only module available which can be got only from Calcutta: I had lost all hopes. Praneeth chatted with their online technical support guide but of no help. Hardly 12 hours were left and the entire blame was to come on me. I cursed myself like hell - first professional presentation and I ruined it. Trivediji and Mohsin Sir were there who kept boosting our moral. If only they could understand the technical catastrophe I had created. We had a tea in the canteen and finally decided that it was useless to hope further with that module. Instead it would be better if we could show him something the next day or at least cook up a nice story. Mohsinji was pretty irritated by that time, "Everything in this lab is done in the 11th HOUR". Suddenly we were reminded that we had used short range zigbee module in the IMU which could be used here. Mohsinji gave us a pair of Zigbee with 700 metres range. I immediately made up a pcb for the circuit and within an hour the alarm began sounding. The good news was told to Sir, though only we knew the consequences. We decided to test the range practically. Trivediji sat with the transmitter at the nursery while we drove with the receiver. It worked till shopping centre - a range of 500 metres. Something was better than nothing. It was already 11 pm by that time. How to improve the range, Ramchanderji started suggesting ideas to put in antenna etc while Praneeth and myself were thinking the same thing: if we could get another zigbee which could be placed in the middle of the transmitter and receiver. It would just act like a dumb hopper which would transmit the data received from transmitter and pass over to receiver on the other side but I literally had no courage to make another pcb for it; which would also require lot of voltage conversion because of different levels of atmega and zigbee.
"What if we just short the RX and TX of a zigbee and power it up?? will it act as a hopper??"
We tried and it worked in the first shot.... wooooow !! Indian jugaad - the ultimate rescuer.
We went out to test the range. This time it worked till Kendriya Vidyalaya - around 1000 metres - cool !! "What if we put another hopper??" :) but we chucked greed and came back to lab.
We all relaxed and went for a peaceful night sleep.


(The picture shows Praneeth with the receiver and on the right is the IMU we made with our very own zigbee :P)
Next day we went to the Kanpur railway station and tested it out. It was giving good enough range. Finally DG came at 9.30 by which time we had played enough with a GPS module and watched a Korean movie on Praneeth's laptop. Vyas Sir, Praneeth and him went by car to the crossing with the receiver while we held the transmitter on the platform. No sooner had the car left than we sent Trivediji with the hopper to the middle of the track. Sir called one of us on cellphone saying " its not sounding...is everything running?" Then he handed the phone to Praneeth. It was ok at my end other than Trivediji's location. I asked him to move further towards them on the track. Within a minute I got call from Sir congratulating us. The DG was very happy. Its not difficult to fool even the most power people in India as far as technical field is concerned, is it ? :D . I forgot to mention that all this time I had my new camera with me. This was just a flavor of the 13th hour cooking; ingredients being common sense and Indian jugaad. They all went home while I stayed back to meet a friend who was passing by on a train.
Recently in August 08, once again we were supposed to demonstrate a derailment detection device to some RDSO officer (because RSS was at home) at a spring factory in Panki and 13th hour work helped again. Its hard to forget the food we had after that in the Orient Resort. It was real fun. Surya had also accompanied us there who was made to write a newspaper report on the entire demonstration.

This is not the end. Even today we are supposed to demonstrate a mobile phone based IMU data plotter through bluetooth. The demonstration is supposed to be given to some RDSO director. Although the basic data is being displayed on Deka's phone but Sir had promised to show him a graph on the phone. Its 5 in the morning and we have absolutely no clue to how is it going to work. Lets see what the thirteenth hour has in store for us this time.

Wednesday, December 31, 2008

Jailbreaking Iphone - Hacking the world's best phone


Since the time I planned to buy the Iphone, I had been following Zibri's blog. The software he had released for cracking the Iphone then costed 25$. But some others released a free version of the same. Praneeth downloaded the v2.2 firmware and an application "quickpawn" for cracking the phone. As soon as I reached his room we connected the phone to iTunes on his comp and pressed the restore button. It took some 20 minutes for the firmware to install and then the jailbreaking process. It flashed the ROM and what do we see ... "no service found". We again pressed the restore button but the connector being loose hung the process. The screen went blank - then a symbol saying connecting to iphone. We were afraid, it was not even restarting. Second thought : ..crap.. we had to use the right SIM not the AT&T one before cracking it. And then the entire process again with the BSNL sim and I had my fully functional Iphone in my hand.....
It was a really different experience using it - such smooth GUI and superfast response - it was simply amazing. I transferred my music an photos to it. Sound quality - simply mind blowing - this is THE phone I wanted. Next day I fiddled around with it for a while trying to install some apps but it required proxyless connection ! Next day I woke up at 12 and went to lab. Praneeth and Shubham were also there. Then we went to CC where Praneeth did some of his usual tricks and ran a proxy server on his comp to tunnel without authorization. Soon Cyndia - the third party installer started working through the CC wifi and we installed the SSH server and the Mplayer on it. Then transferred some videos to it. Tried running youtube but didnt work. Then the terminal and the OSX Finder.We stayed there till the entire battery drained out at 7 pm.
|Running the VNC service|
Then we went for food and came to my room. The 2nd session starts now. We connected to the iTunes and a huge bundle of apps awaited us. First the video recorder then the VNC client. Wow we connected to my laptop through VNC on phone - looked cool. Then Remote Itunes app to control my laptop's itunes through the phone. From virtual stethoscope to natural cures app to piano to flute to the amazing NES ROM games -- yes Mario and Contra ...we were simply under the phone's spell. Chess, car racing, dictionary, unit converter and graphic calculator and night stand - now it was not just a phone.. it proved to be a real Personal Digital Assisstant, rather a complete companion. We kept playing around till 12 before leaving for Hall 4 - a day fully dedicated to the world's best phone indeed.
Recently I also installed resistance value calculator, google talk, scientific calculator, photo editor, google earth, sudoku, chronograph watch and the best of all the dream IMU - it records the vibrations and sends them over via mail.

  

Friday, December 26, 2008

Iphone ...Yet another gadget in my box


After a long struggle - going through all hopes and despair IPHONE finally reached me - thanks to all the people involved in the transaction and transport.
The story goes like this :
During my stay at Sweden, I was going through the Ebay site and came across a 16GB Iphone which was priced at 100$. I made a bid for it and by the time the bid was over, the price had risen to 400$. It was the first bid of my life so I didn't want to loose it (stupid argument though but works since I was thousands of mile away from US and was not bound to pay) so I kept increasing my stake till I finally won it. Within a day I started getting mail from the seller forcing me to buy it. I consulted Praneeth and we decided not to buy it. I tried to avoid it but Ebay started forcing me (that they would discontinue my account bla bla) so I had to convince the seller that I was running low on money and apologized for it.
Within a week I bade again for another 8GB Iphone. This time I was strategic. I went through all the available ones on Ebay. All of them were priced high. But there was one which had a title PDA phone and was priced 50$; 5 hours left for the bid to get over - with no other bidder. I kept following it and finally won it at 248$. That was a cool deal but I was confused. I told my parents - my dad got very excited about it so I made my mind for it.
Next day itself I got a mail and a person named Jason (from California) added me onto his gtalk list. I talked to him about the condition of the phone and was satisfied. He was selling it as he wanted to buy the 3G one releasing that day (11th July) in US. I asked Ashish Bhatia who was then doing his intern in California for his address and gave it to him. Jason said that Bhatia's house is a few kms away from his so I was pretty satisfied and paid him on Paypal immediately. He said he would personally give it to him. He even called him up. Three days later, there was no news about the phone and Jason was unreachable on his phone. I was little scared. Then he told me on gtalk that Paypal has suspended his account as he had not submitted the postal tracking number with them so he had parceled the phone to Bhatia. I waited for two days. Then Bhatia told me that the address he had given was of his friend. The package did arrive there but they needed his signature so it could not be delivered. I asked him to leave a message on the door but it didn't work. Tried asking Jason to advise the Fedex people to not ask for signature. By the time it could be managed, 3 delivery attempts were done by fedex and now the only way was to go and collect it from the fedex office which according to Bhatia was 20 miles away. He said he would go on weekend. It was hardly 10 days left before he had to leave US. But he didn't get time. On the last day I even told him to take a taxi to the place I will pay for it. He said "You should have given me this idea before .There's hardly any time. Please samjha kar yaar" and he came to India without it. :|
That was just the beginning of a long journey. I was pretty hopeless and disheartened by then. It was 8 am here. I went to mess with Lord and cursed Ashish like hell. Then I started thinking "what next". I asked Jason to collect the phone and parcel to India for 100$. But he went off the town for a few days and fedex made 3 delivery attempts to him and failed. He said he would collect it and parcel it. Suddenly one day I came to know that Vibhor Jain was in California itself. I asked him and he agreed. I once again continued with the broken dream.It was already 25th July and he was coming on 13th August. On 9th I wanted to confirm about the status when I came to know that Vibhor was leaving US on 11th. I asked Jason. He said he had planned to dispatch it the day after and it wouldn't be possible for it to be delivered so fast. So here was the second bump.
In the meanwhile Anshu bhaiya came home and Papa discussed the issue. He said many of his friends were in US and I could get it shipped to them. He even gave me the addresses. I kept pursuing Jason and he kept saying that the fedex people were not replying properly - its lunch time etc etc. One day he finally told me that they are saying that the package had reached their warehouse in Utah and someone needs to file a claim. Then he again became dormant for quite a few days until he told me "Is there anyway you can manage it yourself". He gave me their phone no which was not accessible from here. I started pursuing them through mails. First I gave Anshu bhaiya's friends address but the matter required regular touch with the recipient. I called Fedex India. They said that Indian service is not related to the US one. "But Vibhor Jain would have reached back by now and will definitely come to India sometime", thought I. The situation was strange. The sender(Jason) was not very active - the recipient(Bhatia) of the package had left US and a third person (me) was claiming it from India to be delivered to a fourth person in US. This was the very question Fedex asked me. I tried convincing them and finally they asked me to file an online claim. I went to the page and filed a claim in the name of Vibhor. It asked for 3 documents - print of the claim page, airbill and the payment bill. I managed to find the pament bill from Paypal but airbill must be with Jason. He said that he might have it in his car and would scan fax me. After so many requests he never sent it.
Alas ...what a bad deal. Vibhor told me that he got a call from them and he asked them to deliver it to him. Ok! some hope again and again before I could imagine the phone in my hand I got a mail "We shall not process the claim without the 2 documents". One more request to Jason but no response. Then one day I return from lab and the gtalk flashed a new mail message with subject "Got the iphone :)" from Vibhor. I literally didn't believe it. I was surprised because the documents were not yet submitted. That was an offline message. I buzzed him next time he was online and no reply. No reply next time as well. Now what mystery was that..... for God's sake......!!
Finally he replied after 3 days saying that when he reached home it was lying outside. I took a great sigh of relief. I asked him if he was coming to India. He said there are many people coming to India in December so it wont be a problem. He handed over to Vaibhav. I sent him a mail with my phone number but he didnt contact me for next 5 days - Vibhor said it was exam time there. Around 20th I asked Vibhor again and he said he was in India for 3 days. I was leaving for home. I mailed him again and got a call from him saying that he would be in Kanpur the next day.
By the time I could reach here he had to leave. I was on the bus so I asked Surya to call him up and take it from him but he had no balance. Lord was also not here then. After hour i got a call from Lord that he was in campus. And he did the honours. I reached here around 7 pm and he was busy finding cracks for it. The entire journey was 10000 km and 5 months long....!!
The next post describes how it was cracked and what happened next.

Saturday, December 20, 2008

Web server on Atmega !!



After a long period of dormancy I make a re-entry into the AVR world with the tiny webserver. Thanks to tuxgraphics, Palash and obviously the one seeking it the most "The Lord" :P.
Weird and unusual as always was the way in which it worked. First of all I needed the RJ-45 connector (to connect to the lan) but I couldn't find it so I managed to take out one from an old LAN card along with the transformer. Then some hack into people's code and TCP stacks. After 4-5 days of effort , the yellow and green light on my board began to blink at ip 172.26.6.248 ( in TMRS lab) indicating that the link is up. At 4 a.m. Palash and me ran the webserver successfully on Atmega32 which takes a message from the user and displays it on my terminal along with sender's ip. If the message happens to be my signature it displays "Hey!!You appear to be my Friend".

Visit the server @ http://172.28.6.248 (set no proxy)
For more pics click here
By the way we were supposed to be making a project proposal as usual for Vyas Sir and Shantanu has already fallen asleep and I too have a long day ahead workig for Techkriti.

Further reading http://kshdeo.blogspot.com/2009/02/atmega-webserver-part-ii.html

Monday, December 15, 2008

TECHKRITI '09 - Preparation at peak at IITK


ECDC problem statement launched

Amidst the placement tension and market recession, Team-Techkriti remains unaltered - working hard day and night to add various tech flavors to the festival. While our Festival Coordi Deka is personally involved in designing the game software for ECDC problem statement the web team is trying hard to shed off kbs from the webpage to make it easily accessible to one and everyone equally.
After 1 week of dedicated work, Palash has finally succeeded in making the game GUI for ECDC - making it as microcontroller efficient as possible while at the same time making it user friendly for the novices.
Robotics workshop is once again being organised this year though with a close check on the materials and contents this time. Mr.Pradeep from Robosapien has agreed to conduct a 3 day lecture session on AVR based robotics. Although himself new to AVR mcus he is very much enthusiastic and learning it up fast. Visit Techkriti site for further details.