send email from console or cmd using telnet

A simple way of verifying the connectivity and right functionality of your mail server. This is done in ubuntu. The same should work for windows also.

The commands are highlighted

pandian@Kannan:~$ telnet 25
Connected to
Escape character is ‘^]’.
250 ok
250 ok
354 go ahead

test body content.
250 ok 1335470983 qp 3750
Connection closed by foreign host.

Hello World Application in android

I have given some code snippets for some of the simple android applications under the same tag. Unfortunately, I couldn’t continue developing it further. Let me start once again now. I hope this hello world application be a good starter!

So the above diagram shows the components of Application development. Please have a look at the Android Fundamentals

Please install the Android SDK an ADT plugin for Eclipse as explained in

Once you are ready with the setup, create a new Android application as given in the screenshots below.

Once the project is created, You can see the default code stub have been created as above. This is a sub class of Activity. We will add a text and show it in the UI. You can see the code changes below.

package org.grassfield.helloandroid;
import android.os.Bundle;
import android.widget.TextView;
public class HelloAndroidActivity extends Activity {
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
TextView textView = new TextView(this);
textView.setText("Hello, Android");


Now Run the project, we can see Android emulator is getting opened. Give some time to do the loading process. You can see the output as below.


have fun 🙂

How to disable firewalls in Ubuntu, RedHat, CentOS

RedHat and other RedHat flavours

First login as the root user.

Next enter the following three commands to disable firewall.

# service iptables save
# service iptables stop
# chkconfig iptables off

If you are using IPv6 firewall, enter:

# service ip6tables save
# service ip6tables stop
# chkconfig ip6tables off


$ sudo iptables -X
$ sudo iptables -t nat -F
$ sudo iptables -t nat -X
$ sudo iptables -t mangle -F
$ sudo iptables -t mangle -X
$ sudo iptables -P INPUT ACCEPT
$ sudo iptables -P FORWARD ACCEPT
$ sudo iptables -P OUTPUT ACCEPT

sudo ufw disable

A simple RSS Parsing Android application

Adding further more changes to my code given in my earlier post, I am adding the source code as well as the APK file for a simple RSS SAX parser.

This will parse the feed and show the content on the screen. More finetuning required, will be added later.

Source file (eclipse project archive) –

APK file –

Android version required 2.3.1; Tested with my HTC

Feedparser (c) –

HTTPURLConnection in Android

A Code snippet that reads a URL and print the HTML content on the screen, as raw text.
You may need to refer my earlier post to enable the necessary permissionpackage org.grassfield;

package org.grassfield;
import android.os.Bundle;
import android.widget.TextView;
public class HellodroidActivity extends Activity {
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
try {
URL url = new URL("");
HttpURLConnection openConnection = (HttpURLConnection) url.openConnection();
InputStream inputStream = openConnection.getInputStream();
StringBuffer sb = new StringBuffer();
int c=-1;
while ((!=-1){
TextView textView = new TextView(this);
textView.setText("Google Output ==>"+sb.toString());
} catch (MalformedURLException e) {
TextView textView = new TextView(this);
} catch (IOException e) {
TextView textView = new TextView(this);

UnknownHostException while accessing Internet – Android

I am creating a new HelloWorld application for HTTP URL Connection demo. While accessing, I am getting UnknownHostException

Obvious, we need to grant the permission for internet access. Hence add the android.permission.INTERNET permission in the manifest file as given below.

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android=""
<uses-sdk android:minSdkVersion="9" />
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".HellodroidActivity"
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />





Android tablet war – a review

For the past few months, I tried many times to purchase a tablet for my personal needs. Unfortunately no attemt was fruitful because I am not quiet convinced with the models I have seen.
Motorola xoom, samsung galaxy tab, acer iconia, HTC flyer etc etc. In addition, Indian market is heat because of low end tablets (midlets) like Beetel magiq, techberry techpad etc.

Motorola Xoom

Motorola Xoom

First of all let me tell you my requirement – lot of text typing (emails, wordpress, facebook, and instant messaging), youtube every night! Mostly productivity gadget. If you compare the highend models which I told above, almost all of them have android as such (with their own apps for the name sake). You will decide based on the processor, memory, and other hardware related specs like HDMI port, tv out etc. Low end models – you should be happy with what they give.

Samsung galaxy tab 10.1

Samsung galaxy tab 10.1

In the high end models, I have evaluated samsung galaxy tab, motorola xoom and HTC Flyer. Galaxy tab almost = moto xoom, but moto has a HDMI out and extendible SD card option. So still I give less marks to the Ipad competitor – samsung galaxy tab 10.1. But HTC Flyer has many drawbacks as below.
* Android v2.3 – others v3.0 or v3.1
* 7 inch screen – others 10.x inches
* costly – others are cheaper.

But still I will vote for Flyer because of the HTC Scribe technology – because of its unique way of sophistication to handwriting. I am damn sure, this will be very helpful when you get into half-a-day or full day customer visits or meetings. HTC starts working on this scribing, I hope they will make this as good as HTC sense. This is what the way phone or tablet vendors need to impress their customer. Better hardware and recent version of android alone won’t win your customer hearts.

HTC Flyer

HTC Flyer

Here is a video that can explain you the HTC scribe!

Another decision by Apple at the war-end makes me to postpone the purchase of a high end tablet (also I can’t afford that much amount now :D) the new release from Apple has a powerful CPU to compare with others for more computing. I am sure this will add unavoidable traffic in the market. I expect all the vendors will try to copy or cross this limit. So you can find better android tablets in the near future.

Let me conclude this post with a note on low end model – techberry techpad. It costs around 8500 INR, Chinese make and distributed by a Chennai based distributor of Techberry mobiles. I have purchased this tab as a interim solution till I find my dream tablet. The drawbacks of this model are
1. Low end processor – the tablet is sluggish than the other low end model Beetel Magiq
2. Not fully google – Not that much google friendly like other devices. Coundn’t map google and get alerts at real time.
3. Android market is missing and all the links are android market is failing. It has a Chinese application manager called appstore which is a ‘dhrabai’. The popular applications like meebo, google talk, plus… everything needed to be downloaded as .apk files and install it.
4. No bluetooth
5. No inbuilt 3G. You need USB modem

Techberry Techpad

Techberry Techpad

But still one convincing reason I got with this is its support to USB. USB keyboard and USB mouse is given with this midlet which makes my text typing so easier. I don’t know why high end models are not giving much support to this – or they sell these items for extra cost. I am damn sure, no one can type much with the onscreen virtual keyboard. I really got excited when I saw my USB mouse too started working. The keyboard comes with a leather like casing, which makes the carrying much simpler.

(I din’t talk about IPAD – Somehow I hesitate myself to be tied to a particular technology or particular vendor!!!)

There are many innovations coming up! See this! Solar Powered Android Tablet by Bharat Electronics – Priced at $72

Have a wonderful week ahead!

Error in Android SDK installation : Failed to fetch URL https

Failed to fetch URL, reason: HTTPS SSL error. You might want to force download through HTTP in the settings.

Not sure why this occurs, while the same URL is loading fine in the browser. Goto Settings and select http option. Then goto Installed packages once again, and press Update all,
The installation will resume!

USB tethering between Ubuntu and Android phone

This post is the continuation of my previous post on tethering. This post is a step by step to connect your Ubuntu (AMD 64) with internet using easytether and android phone. You can get EasyTether in Android shop.

1. Goto and download your driver.

2. Install the driver

Easytether installation in Ubuntu

Easytether installation in Ubuntu

3. Make sure USB debug is enabled. Easytether says that is very important. In my Xperia X10 mini, I have the menu flow like Settings>Applications>Development and connect the phone to PC via USB.

4. Connect the phone in USB

5. Open the terminal and issue the following commands

bhavani@bhavani:~$ sudo easytether enumerate
[sudo] password for bhavani:
bhavani@bhavani:~$ sudo easytether connect
connection established
run ‘sudo dhclient easytether0’ to configure the network interface
press Ctrl-C to disconnect

I tried to configure easytether0 network interface. So I kept the persent console open and issued the following command in a new console window.

bhavani@bhavani:~$ sudo dhclient easytether0
[sudo] password for bhavani:
Internet Systems Consortium DHCP Client V3.1.3
Copyright 2004-2009 Internet Systems Consortium.
All rights reserved.
For info, please visit

Listening on LPF/easytether0/02:00:54:74:68:72
Sending on   LPF/easytether0/02:00:54:74:68:72
Sending on   Socket/fallback
DHCPDISCOVER on easytether0 to port 67 interval 8
DHCPREQUEST of on easytether0 to port 67
DHCPACK of from
bound to — renewal in 2147483648 seconds.

6. What else, open the browser and start browsing!! when you are completed, press Ctrl +c in the first terminal where easytether application is still running.

Happy tethering! Happy tuxing!

3G speed measurement

3G speed measurement

Story of my Android Migration – Thanks to Windows 6.1!

Last week, one of the frustrating weeks of this year for me.  I got numerous problems with my windows based biz phone. I got excellent review for that product, which made me to buy that. After buying and installing some apps, I got into several troubles. Installation of some applications failing with permission issue. Googling directed me to change some registry value, for that they told me an application similar to regedit. Installation of that apps also getting failed because of same permission issue. 🙂

whenever I used to browse, the head-ache starts. The phone will hang for ever. you will see key pad lights glowing, display switched off. No other option except pulling the battery out and reboot it.

Both booting and shut down option is too long. after very few apps installation, the phone becomes sluggish. aahhh

Last few days became nightmare for me. even after hard resetting, it keeps on hanging. Clearing temp files, cookies din’t help me much.

Consultation at service point is discouraging. They can work on this reboot issue. But nothing to do it with speed because, all windows phones are like that only 😦

I cant keep this growing. I looked for alternative options. If you ask me the OS, I have no choices other than Android. Regarding the brand, I am much interested to test HTC this time. after reading the reviews, specs finally I had three options before me

HTC wildfire – Full Touch – Android 2.1 – 528 MHz

HTC legend – Full Touch – Android 2.1 – 600 Mhz

Sony Ericsson Xperia X10 mini pro – Semi Touch & Qwerty – Android 1.6 upgradable – 600 MHz

I left with no option for Qwerty with Android in HTC. I am not looking for more fun. The features of media player or FM radio may not convince me. My main concerns were speed, apps, mails & IMs while moving.

Finally it’s Xperia X10 mini!

Is this a success story or failure story? 😦

528 MHz