ISP related issues. Reliance Communications WiMax problems solved

Recently a lot of issues have turned up with my ISP provider, Reliance Communications in this case. I happen to use multiple laptops and a router. They lock a system based on MAC address or a long duration dhcp lease file. There are various ways to get rid of this situation. A few which I could figure out and seem to work are

– Do neatly logout of their web application, before switching machines. As they keep the records, which would not let you login using a different machine till a session timeout which ranges from 0.5 to 6 hours.

– Spoof Your MAC Address, if you are using multiple laptops/desktops

use ifconfig utility:

MAC address can be changed very easily using ifconfig. Run the following command as root user.

#ifconfig eth0 down hw ether address

eth0 is the name of the interface/NIC which address is to be changed.

down means the NIC is to be shutdown before changing address.

hw ether means hardware address class is ether(which indicates ethernet).

address is the address which will used as the new mac.

After the successful execution of the command. start the NIC again using the command:

# /sbin/ifconfig eth0 up

– Release your IP after successful log out

# dhclient -r -pf  < path to the current dhclient pid file >

The path of current dhclient pid file can be found using

# ps -eaf  | grep dhclient

Path is usually /var/run/dhclient-eth0.pid or /var/run/dhclient-wlan0.pid



Tags : , ,

Obsession – How much is too much ?

Obsession: an unhealthy and compulsive preoccupation with something or someone

Everyone or say most of us or may be some of us would have definitely gone through the periods of intense obsession. It could be of diverse nature viz. career, love life, passion, religious sentiments etc.  Obessions in a way can be a boon as they tend to keep you focussed and energised, if related to career/work etc. Although, if there is a result associated with that obsession, consequences may not always be pleasant.The human mind tends to believe the positive outcome of the obsession. You tend to seeing things fall in place in a way to fulfill        your obsession. And offcourse, the famous quote from Paulo Coelho catches up more meaning and essence.

“When you want something, all the universe conspires in helping you to achieve it.”

Obsession can grip your mind so intensely, that those school of thoughts keep on running in mind while you are eating, sleeping, driving or even taking bath.  Some people regard obsession as a quantity to measure seriousness and willingness on that obsession. It may not always be true. Obsession is usually coupled with retrospection. We may try to relate it to some unaccomplished tasks of the past. It can also be accentuated by superstitious beliefs, astrology etc. There are various factors that may trigger or enhance obsession like friends, family, society or even music.

Is obsession good? Well it’s a difficult one to answer. It all depends on what you are obsessed with, its feasibility, relevance and practicality to your life etc. A positive obsession is always good and a negative can have a bad impact on your life. It is good to be obsessed, but in a moderation. Sharing your obsession with loved ones, close friends etc can help to overcome or drive it in a new positive direction.



Tags : ,

2012 – The Movie impact – Worth Sharing

Case 1 : One fine morning in Bangalore, I had to hire an auto to some place. Apparently, the name of the road was uncommon. Barely any autowala was ready to go. I managed to convince one autowala. His chatty nature throughout the way kept me quite engrossed as well.

This is the MG Road, this one goes to Indian Express Bus stop .. bla bla etc. At one junction, the auto stopped under semi-constructed namma metro flyover.  He started enriching my knowlege with some stats. Construction of these metro tracks started way back in Dec. 2006 and its 2009, they have not achieved anything concrete yet. They are spoiling the garden city by erasing all the gardens. What’s the point, 2012 is near, nothing is gonna survive.

Gosh !! I was amazed. The movie 2012, seems to have made a real impact even on the autowalas.

Case 2: Weekly shopping at Reliance Fresh for the vegetables. At the vegetable counter, the reliance guy, Bhaiyya 2012 dekhi kya? Ekdum mast movie hai .. jarur dekhiye … kya mast effects hai …

Looks like the movie has made an impact in different segments and sectors of the Indian Population. What’s your take on this ? Bunch of my friends liked it and appreciated. I am yet to watch it :)

Tags : , ,

Video in ASCII using VLC, SSH and refine with ffmpeg

This is how a video looks in ASCII.



How did we achieve it ?

- Login to a remote machine using ssh

- play a video using cvlc ( command line vlc )

- record the video using istanbul session recorder ( if u are in linux )

- convert it to mp4 format using ffmpeg

ffmpeg -i file.ogg -sameq  file.mp4

- Overlay the sound using ffmpeg and .mp3 of the same video. As in the sound would have played on remote machine and hence istanbul session recorder would not capture it.

ffmpeg -i file.mp4 -map 0.0 -i file.mp3 -map 1.0 -acodec copy -vcodec copy -ab 128k -ar 44100 file.mp4

- Crop the video, if you want to remove stuffs of your desktop before upload

ffmpeg -i output.mp4 -croptop 50 -cropbottom 50 output1.mp4

Tags : , , ,

Huntplace – The idea, reason and future

Travelling, excursions, adventures who doesn’t like them . A vast chunk of population likes to freak out on  small adventurous trips on weekends. The reason for this drive is to get rid of the mundane and mechanical cycle of office-home-offce and destress oneself. But the major question that arises is where to go? why this one and why not that one ? what kind of place is it ( historic, nature, modern etc).   How do we decide on this, googling and talking to colleagues. After all this exercise of mining tonnes of pages and talking to bunch of friends, the decision becomes more difficult. Differences of opinion starts among the group.

Huntplace as the name suggests let’s you hunt for the place where you want to go . It basically aggregates/mines the data from resourceful and rich web applications like Flickr, Youtube, Wiki, etc. and makes your life easier. Instead of stumbling upon those stale and old sites, get the data from the popular and reliable sources. It is a mashup that calls the pulic APIs and let’s u explore your travel destination based on the content received.

The whole idea is in a very early phase and has been implemented. There are bunch of enhancements and ramifications that can be done.

Tags :

Solution to the 23 pages puzzle.

Hi,

Just came across this awesome 23 pages puzzle via a forward chain mail.

http://www.freestuffhotdeals.com/hacker/1.html

I could crack it .

Give it a try before looking at the solution.

Pages in sequence are

http://www.freestuffhotdeals.com/hacker/1.html
http://www.freestuffhotdeals.com/hacker/2.html
http://www.freestuffhotdeals.com/hacker/three.html
http://www.freestuffhotdeals.com/hacker/iv.html
http://www.freestuffhotdeals.com/hacker/evif.html
http://www.freestuffhotdeals.com/hacker/ssiixx.html
http://www.freestuffhotdeals.com/hacker/7777777.html
http://www.freestuffhotdeals.com/hacker/neptune.html
http://www.freestuffhotdeals.com/hacker/neun.html
http://www.freestuffhotdeals.com/hacker/oct.html
http://www.freestuffhotdeals.com/hacker/jack.html
http://www.freestuffhotdeals.com/hacker/tWeLvE.html
http://www.freestuffhotdeals.com/hacker/169.html
http://www.freestuffhotdeals.com/hacker/number14.html
http://www.freestuffhotdeals.com/hacker/quince.html
http://www.freestuffhotdeals.com/hacker/lincoln.html
http://www.freestuffhotdeals.com/hacker/septendecim.html
http://www.freestuffhotdeals.com/hacker/10010.html
http://www.freestuffhotdeals.com/hacker/potassium.html
http://www.freestuffhotdeals.com/hacker/uxfouz.html
http://www.freestuffhotdeals.com/hacker/icosihenagon.html
http://www.freestuffhotdeals.com/hacker/17711.html
http://www.freestuffhotdeals.com/hacker/Woody.html

Tags :

Navigation made easy

With the advent of web, location base searching and driving directions have been of key importance as these form one of the integral needs of the time. There have been many key players viz. Google, Yahoo, Everyscape etc providing driving directions, routes on map, rich image experience etc. 

The latest addition to the field is video based direction, which is new and unique in its kind. Video Maps is the new terminology coined by the Bangalore based startup Vidteq . The key features include video for the complete route, location based services images etc.  Video based experience is beneficial for people on the move and who are new to  the city.

Vidteq on NEWS9



Tags :

How to crash a DELL laptop in seconds and unscrew it (with a video)

P.S. The whole video/literature etc. is not targeted to malign the manufacturer and is rather based on writer’s personal experience. No offense meant.

A brief intro on how it happened

It all started with my adamant attitude to have a dual partition on my Dell Vostro 1510. Fedora, my obvious choice led to multiple crash of the lappy’s motherboard. The reason sounds strange, but is the concrete reason, as it happened not once but rather twice. Burnt the ISO image of Fedora Core 10 on a DVD and began to boot the lappy. It started normal, but before the UI asking for Fedora installation could load, the laptop hung with nothing shown on the LCD. Forceful shutdown and subsequent reboot led to weird behavior, caps lock, num lock and scroll LEDs glowing indefinitely, without anything up on the LCD. The usual methods of removing the RAM, resetting the static electricity failed to work and it turned out that it was a motherboard failure. Hence a replace for the same was done by the manufacturer.

Video

The video below is shootout of the replacement of the motherboard. ( Done by manufacturer’s engineer). But you may give a try on your old laptop or if your eagerness could not be held anymore.
Part 1

Part 2

Part 3

Part 4

Part5

Part 6

Part 7

How did we capture and process the video

The video capture was done using a Sony Ericsson phone and which resulted in multiple 3gp files. It was essential to merger these multiple files and convert them into flv format for upload using some tool. ffmpeg was the ideal option and worked like a wonder. Key steps were …

-> Converting indiviual 3GP files to flv with all the parameters viz. bitrate, frame etc

ffmpeg -i file.3gp -s 320×240 -vcodec h263 -r 25000 -b 200 -ab 64 -acodec amr -ac 1 -ar 8000 file.flv

-> Merge all files into single. This method somehow did not work with flv files, hence they were converted to mpg format and back to flv for upload to youtube.

converting to mpg with same parameters

ffmpeg -i file.flv -sameq -y file.mpg

Merging into single file

cat 76.mpg 77.mpg 78.mpg 79.mpg 80.mpg >final_mpg.mpg(This method somehow did not work with flv files)

And finally, back to flv file

ffmpeg -i final_mpg.mpg -sameq final.flv

Tags : , , ,

A strikingly odd web application exposure

Without having to expose your backend stuff to the internet, how do you service a WAP/WEB request. The blog below discusses a typical method of achieving the same. Assuming that whole web system is being developed in a intranet and not hosted outside. Let us call the internal unexposed server as A. We need a server hosted on internet to fetch the WAP/WEB requests from the mobile or computer. This server is called as B. The request is being fired on the server B, the request is written to a flat file called request file. Server A runs a shell program viz fetchrequest.sh which reads the request file every second for any new requests coming  using the curl unix utility. Meanwhile, the server B sleeps off and waits for a response from server A. Server A will read the request and if its new (newness of a request is determined by saving the previous  request number in a global shell environment variable) server A processes it and shoots back the response to server B in the form of a file via FTP. Server B, in its sleeping state waits for the this FTP response file. Once recieved, it pushes back the response to the user. The whole wait process is scheduled for a fixed period of time, after which a dummy response is send like server is down, request failed, bla bla etc . Let us see how the same is achieved in fetchreques.sh running on server A.

File fetchrequest.sh

#!/bin/bash
while [ 10 -eq 10 ]

#Runs in a infinite loop checking request file at server B every second
do
if [ `env | grep -c lastCounter` = 1 ];then
newCounter=`curl -s http://serverB/requestFile.txt | tail -1 | cut -d: -f1`

#Reading request file at server B
param=`curl -s serverB/requestFile.txt | tail -1 | cut -d: -f2` #Extracting the request parameters
echo newCounter : $newCounter lastCounter : $lastCounter

#If there is a new request, sending a response back to the server B
if [ "$newCounter" != "$lastCounter" ]; then
echo "Need to send a response"
echo "Response URL : http://serverA/something.pl?action=something&param1&param2"

#Trimming of the response that needs to be send to serverB and storing it in a variable
output=`curl -s "http://serverA/something.pl?action=something&param1&param2" | grep 'cap\\|img' |
sed \ 's/<src>.*<\/src>//g;s/<cap>/\:/g;s/<\/cap>//g;s/<img>/\:/g;s/<\/img>//g'`
echo "Response received : $output"

#writing the response to a flat file to be FTPed to server B
`echo $output>"rp_$newCounter.txt"`
`export filename==rp_$newCounter.txt`
`echo ls -l "rp_$newCounter.txt"`
typeset -i responseSize=`wc -c rp_$newCounter.txt | cut -d" " -f1`
echo "Response size $responseSize"

#If the process response is garbled, small or null, sending a dummy error in FTP file
if [ $responseSize = 1 ];then
`echo "We are working , try later" > "rp_$newCounter.txt"`
fi

#making an FTP connection to serverB and launching the response file
`curl -s -T "rp_$newCounter.txt" -u username:password"ftp://serverB/rp_$newCounter.txt"`
echo "Uploaded the FTP file for $newCounter request"
`rm -f rp_$newCounter.txt`
echo "Deleting rp_$newCounter.txt after upload"

#Updating the request environment variable
lastCounter=$newCounter
export lastCounter
fi
else
lastCounter=`curl -s http://serverB/mobRequests.txt | tail -1 | cut -d: -f1`
export lastCounter
fi
done

The whole system works very well, and the requests are processed and response send to user. There are however limitations to this model.

Tags : , , , , ,

Upgrade Fedora without burning the DVD/CDs

An upgrade of Fedora Core version normally requires burning the new version’s image in a DVD or CDs.  An alternate approach to the same is upgrading by copying the same to a hard drive or a pen drive. The approach mentioned below worked very well from me for an upgrade of FC9 to FC10.

Download the new version’s (say FC 10)  iso(DVD) image and save it to a disk drive partition. I used a pen drive for the same. It works very well for filesystems viz. FAT32,ext2 and not NTFS. Copy the image file to any directory say for example /mnt/FedoraCoreDVD.iso( Assuming, that pen drive is mounted at /mnt) . Mount the iso image in a directory(any) to extract the isolinux folder.

#mount -o loop /mnt/FedoraCoreDVD.iso /home/user/Fedora/

Copy the isolinux folder and paste it inside the boot folder.

#cp -r /home/user/Fedora/isolinux /boot

Now we need to make an entry in the grub file to boot the copied isolinux folder’s install.img

# cat /etc/grub.conf

______________________________

title Fedora Upgrade
root (hd0,8)
———–> should be your  partition containing the current linux installation (0->First Hard Drive,8-> Partition number on this drive )
kernel /isolinux/vmlinuz
initrd /isolinux/initrd.img

______________________________

Copy the isolinux folder also to the pen drive(/dev/sdb, mounted at /mnt in this case) and reboot the system. Select the ” Fedora Upgrade” option in grub and the normal installation/upgrade demon anaconda will start. It will ask for the option of disk partition and folder containing the iso image and iso linux folder, which is /dev/sdb1 in this case. Select the same and the upgradation works like a charm.

Tags : ,