Raspberry Pi webserver, even if its behind NAT

You have a Raspberry Pi and the way it connects to the internet is through an ISP that doesn’t provide you a static IP, instead some private IP address like 10.x.x.x or 192.168.x.x? Don’t worry, you can still connect to it from outside and have it handle all webservice requests through a very easy configuration.

The concept is called “reverse SSH tunneling”, which I just discovered today. The idea is that the Raspberry Pi is connected to a server, which behaves as a proxy between the user and the Raspberry Pi. This proxy server could well be a free micro instance of an EC2 server, or some other VPS like Linode.

I found the instructions here: Alex on Linux. Here is the final deployment diagram for me, followed by a lovely picture of my credit card sized webserver.

Raspberry Pi: First boot

After a long while, this turned out to be a productive weekend. I got my Raspberry Pi to bootup finally. For this, I had to unbox Mitali’s TV, find a video out cable and a MicroSD card adapter. Turns out she has a pretty slick TV, and how better to utilize it other than to run linux on it? Poor TV, it has turned geek after mistress’ marriage.

First bootup of my Raspberry Pi

Anyway, started out with Fedora 18 RPi Remix. Didn’t have an HDMI cable to enjoy full resolution display, didn’t have the wireless keyboard, mouse so as to get a free USB port for the WiFi adapter. Hope to set them all up in the coming week.

 

Great Memories Relived Part II

On December 22nd, we had an awesome trip to Gurgaon and Qutab Minar; Anshul, Manas and I relived our good old days of carefree roaming around.

Choropleth of GeoTweets from India, Neighbours

In an attempt to understand the average Indian tech consumer and his/her relationship with location based services, I decided to start off with the Twitter stream. Looking at geotagged tweets (tweets that contain the user’s current location, possibly from the GPS of the device used for tweeting) of about 3 weeks, it is clear that the big cities are where the majority of geotweets are coming from.

Here is a statewise choropleth map of geotweets. It also contains statistics for Nepal, Bhutan, Bangladesh and Sri Lanka:

http://ishan.chattopadhyaya.com/geotweets

A whopping 28% of all Indian geotweets are from Maharashtra (mainly from Mumbai). Karnataka and Tamil Nadu are runners up with close to 12% and 9% respectively. Credits for visualization go to OpenStreetMap and Leaflet.

Met cool people, had new experiences

Firstly, let me congratulate myself and the awesome Multimedia Search team at Yahoo! for winning a team excellence award today. Though sad to leave Vertical Intent Search team, the new problems and challenges at the new team has been creatively engaging.

That brings me to the most awesome person at Y! among those I had never met before. Sydney Lewis was a revelation for me; great chess player, a wonderful leader, and a humble and responsible person. Learning chess from him is an honour. I would really spend a fortune to be coached by him, and by grace of God he has accepted me as a student!

Another guy I met whom I could learn something about RC helis from was Anirudh Sanjeev. But, alas, his internship ended. That brings me to Karthik who promised to mentor me on cubing. Exciting times ahead!

Simple, brilliant. Nokia Pureview 808

While I can (and probably should) go over all the tech stuff and the geek details behind the new Nokia Pureview 808, I would just stick to a user’s point of view. And share with you why I think this phone is brilliant from a user viewpoint!

Beyond the obvious camera features, here are a list of features I love:
1. Nightlamp, bedtime clock: The phone features a clock display on the standby screen which is optimized such that battery utilization is negligible in the standby mode and yet provides sufficient illumination to double up the phone as a night lamp. Simply brilliant! No other phone has this technology (except the fabulous Nokia N9).

2. Just play music on the car sound system: NFC, Bluetooth, Wifi? Nahh, no jargon, nothing complicated here. Just long tap the songs and “play via radio”. And tune your car radio on the corresponding FM channel that you see on your phone. So easy, for everyone! Internal magic is via an FM transmitter, which non-Nokia phone users are unaware of.

3. Unlimited Nokia Music Store access for 1 year (this is a gift from Nokia India): Yes, no need to buy CDs or attempt downloading pirated music now. You have unlimited access to almost all songs you would like to hear. And yes, you can download them on your device and copy them on your computer to play them. Simply brilliant! Almost all English and Hindi songs I knew of are there on the Nokia Music Store.

4. Dolby Surround Sound: Okay, no jargon here. One liner, the sound experience is same as a movie theatre, even using your ordinary earphones! There is a sample video on the phone (“Dolby Channel Test”, http://www.youtube.com/watch?v=Mnm6ZYw6oH0) that plays sound samples through 6 channels one after the other. The key difference between Nokia Pureview 808 and other phones is that for the Dolby channel test video (or any other movie with HD audio), the 6th channel (for the heart stopping sound samples you find played in the theatres during horor/thriller scenes) plays flawlessly on the 808 but doesn’t produce the effect on others.

5. Excellent noise cancellation: The noise cancellation is splendid, works brilliantly even in a noisy market place.

6. Good button placements: The lock switch and camera buttons are so suitably placed that time from pocket to shoot is excellent. Just pull out from the pocket, long press the camera button and click the shot. Took me about 4-5 seconds.

7. Easy to invoke inbuilt flashlight: Just slide and hold the slider switch to activate the brightest ever LED flashlight seen on a phone.

8. Fast preloaded offline maps for India: Even if you don’t have a data connection, you are not left at the mercy of tile based maps like Google Maps. On the Nokia Pureview 808, the Nokia Maps has all the map data preloaded for every city in India, and just open the Nokia Maps app and hit the road. Even the GPS fix speed is very fast.

9. Big Screen (HDMI) and DLNA support: Haven’t experienced it myself, but the builtin DLNA support and the Big Screen app (for viewing on TV via HDMI) are two promising and distinguishing features of the phone, found rarely on other phones.

Rest of the features are all comparable with other smartphones. All the commonly used applications and support for social networking services are preinstalled (or can be installed from Nokia Store): Mail, Calendar, Twitter, Facebook, Microsoft Office, QuickOffice, Dropbox/Skydrive client, Shazam, BBC, CNN, Weather, Adobe Reader, Music Player etc. etc. Oh, and did I say the camera on the Nokia Pureview 808 is a 41 megapixel one, more than 4 times that of cameras found on most smartphones?

Learning new languages

The weekend was pretty nice. Spain beat France 2-0 (vamos sirpicha, sorry spendy). Then Fernando Alonso won The Grand Prix of Europe (Valencia), despite starting from 11th on the grid. Kimi Raikkonen got 2nd and Michael Schumacher 3rd (starting 12th on the grid). And now Alonso leads the drivers’ championship with 111 agaisnt Webber’s 91.

Other than that, had good time learning Spanish and Clojure. Reached Skill 5 in DuoLingo and did some initial 30 odd problems at 4Clojure.com. Learning both Clojure and Spanish seems addictive. Once the rhythm settles in, it becomes hard to stop pushing harder.

On the shopping front, just purchased my first ever e-book, “Functional Programming for Object Oriented Programmers”, purchased a cool toy that has been shipped and should be arriving shortly as well as a book from Infibeam to help me make best use of the toy. Among other activities, trying to chase down a few bugs with the Python support in Anjuta. Also, in recent days, I’ve run into excellent form with the Pirc Defence as black. So long as it doesn’t transpose into a King’s Indian, I seem to be doing great in the opening and middlegame. As white, trying out some Smith-Morra stuff and King’s Gambit with reasonable success.

EXIF is so 2002, we need new standards

Exchangeable Image File Format, or EXIF as we popularly know it, is a specification for file formats of images, video, audio etc. files. The images and video that we see around us and click on our digital cameras or mobile phones contain EXIF tags that specify various information about the shooting conditions of the image, geolocation etc.

Unfortunately, the latest specifications, EXIF 2.2, were defined with almost no extensibility in mind. Common frustrations, from an open data lover or a community mappers’ point of view, are that it is not possible to (a) associate geolocation with each frame of a video, (b) associate accelerometer/gyroscope readings with the images/videos, (c) capture timezone information along with the timestamps, (d) associate additional data such as temperature, digital compass, wifi, cell tower data with images/videos. The whole list is far more than these few, but these are most glaring shortcomings from my point of view.

It is the collective responsibility of all online services like WIkimedia Commons, Flickr, Pinterest, Picasa, Facebook, Youtube etc. as well as camera and phone manufacturers to push for and collectively formulate a new version of the standard, so as to make sure the future generations don’t miss out on the conditions under which we shot, what we shot..