Thursday, December 03, 2015

Compile C programs in Ubuntu Linux using GCC

If you would like to compile your first C program on an Ubuntu Linux, it might not work out of the box. Needless to say, I was disappointed.

Versions I have:
GCC gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04)
Ubuntu 14.04 

To solve this, all you need to do is install "build-essential"
sudo apt-get install build-essential

Then you should be able to compile your code using gcc, (for example):
gcc bruteforce1.c -o bruteforce1  -std=c99

And of course, you will run the executable created:
./bruteforce1

Seems simple now, but I wish some things should work out of the box.

Monday, November 11, 2013

Does idle mode need relations?

Short Answer: No. Since the mobile device is not connected, there is no need to handover.

Sunday, November 10, 2013

Do I need an IRAT relation for CSFB

Short answer: No. There is no need for a handover relation to exist if you want to do circuit switched fallback in LTE.

Sunday, July 28, 2013

How to convert an XML file to DOM in Java

Create a org.w3c.dom.Document reference to the xml file, using this method:

public static Document filepathToDocument(final String filepath){
Document doc = null;
File file = new File(filepath);
DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder dBuilder;
try {
dBuilder = dbFactory.newDocumentBuilder();
doc = dBuilder.parse(file);  
} catch (ParserConfigurationException | SAXException | IOException e) {
e.printStackTrace();
}
return doc;
}


Then, you can pretty much do anything like use XPath to navigate or simply get the list of Nodes:

XPath xPath =  XPathFactory.newInstance().newXPath();
NodeList nodeList = (NodeList) xPath.compile("//"+elemName).evaluate(doc, XPathConstants.NODESET);

// or

 NodeList nodeList = doc.getElementsByTagName(elemName);

// see www.w3schools.com to learn how to write xpath syntax.

Friday, July 26, 2013

How much is one degree latitude in kilometers

111.189 kilometers
Distance between the poles (20,014 kms) divided by 180 degrees. 

Sunday, January 06, 2013

What is a Tracking Area in LTE?

Tracking area is a large area defined by the cellphone operator (say, Vodafone) to keep track of where approximately each phone is.

Imagine that the battery on your phone drained out and the phone switches off. You charged it and just turned it on. It is in the interest of Vodafone to know where are you in case someone wants to call you. Where should the operator look for you? Your town, your county/state, or the entire country?

This is an example of where it is nice for Vodafone to remember where you were before your phone switched off. This way, they don't have to look for you in the entire country.

You can be sneaky and turn off your phone, travel the length of your country and then turn on your phone at the other end :) In that case, Vodafone does not find you in your last known Tracking Area, and has to look in the entire country to find your new location.

Friday, November 30, 2012

What are PDPs?

PDP in telecom stands for Packet Data Protocol. Wikipedia has a nice entry for it.
http://en.wikipedia.org/wiki/Packet_Data_Protocol#PDP_Context

But what if someone uses PDP with a number; like, "Vodafone has an average of 1 million PDPs"? What they actually mean is 1 million PDP contexts; or in simple words: 1 million devices accessing data.