02:52

C projects have thousands of lines of code divided into hundreds in some cases thousands of files. In order to access various function definitions within the source code repository effectively using a VIM editor, there is a great need of source browsing tools. ctags is one of the popular source browser tools. Though it has been around for many years, even many seasoned Linux developers are unaware of its abilities and usefulness.
ctags works by looking at all the source files for a piece of code and finding the lines which contain symbol definitions – that is, it locates the places where the functions, variables and so on are defined. It has two distinct advantages over a more general approach using something like grep: firstly ctags understands the syntax of many languages, which allows it to find the symbols very reliably. Secondly, its output is a file in a format which can be used by many of today’s more powerful text editors to jump straight to required symbol definitions. Even in a huge piece of code spread out over hundreds of source files, finding a function is never more than a couple of keystrokes away.

Installing ctags package

Almost all the Linux distributions ship ctags by default. if ctags is not already installed use the following commands
On Ubuntu Linux machines
$ sudo apt-get install exuberant-ctags

Generating tags for your source tree

ctags builds what is known as a “tags file” (also sometimes called a “tags table”). This is a plain text file which contains one line per symbol in the source code. Creating a tags file involves a parse over the entire source code tree. Each source file will be opened, its language ascertained, then examined for symbols of interest. A tags file is a static table and therefore requires rebuilding as the source code changes. Exactly how frequently this needs to happen depends on the piece of code and the nature of the changes which are happening to it. Fortunately, ctags parses code and builds tags files very quickly, so a tags file rebuild is rarely an inconvenience.
$ cd proj_source
$ ctags -R *
A tag is an index entry within a “tags file” of a programming language identifier. The tags indicate the locations (in terms of file/line number pairs) where the identifier is defined and referenced. Programming language identifiers include functions, structure and union names, type names, and variable names (essentially, anything that is entered into a compiler’s symbol table), as well as macros. The information from this tags file can be loaded into a suitably capable text editor. When the user wants to find the definition of a given function, class or another symbol, they just hit the right button, type in the name of the required symbol, and the text editor can jump straight to it, opening the file if necessary.

Using ctags with vim editor

We have 3 different ways to use ctags in VIM editor.
From Shell:
We can invoke directly the file or the files containing the definition for a particular function from the shell.
vim -t function_name
OR
VIM command line:
We can invoke from VIM command line (in command mode) the definition of a function.
:set tags=~/proj_source/tags
:tag function_name
or
:ta function_name
This will jump automatically from the current file to the file containing the function_name definition.
OR
By cursor position:
This option is more user-friendly as we use a key combination instead of giving commands.
ctrl + ]
Place the cursor on the first character of the function name and press ctrl-]. This will jump to the file containing the definition of function_name.
The following command will jump back to the previous location.
ctrl + t
use the following command to search and Jump to a tag name found by a search.
:tag /search-string
When multiple entries exist in the tags file, such as a function declaration in a header file and a function definition (the function itself), the operator can choose by issuing this command. The user will be presented with all the references to the function and the user will be prompted to enter the number associated with the appropriate one.
:tselect function-name
Following command to Jump to next matching tag.
:tnext
or
:tn
Jump to previous matching tag.
:tprevious
or
:tp
Jump to first matching tag.
:tfirst
or
:tf
or
:trewindor:tr
Jump to last matching tag.
:tlast
or
:tl
To traverse forward through the tag history.
ctrl + i
To traverse back through the tag history.
ctrl + o
To display the list of tags that we have traversed in past give the following command.
:tags

Finding global identifiers

when you are editing a C program and wonder if a variable is declared as “int” or “unsigned”. A quick way to find this is with the “[I” command. Suppose the cursor is on the word “column” then type
[ + shiftkey + i
Vim will list the matching lines it can find. Not only in the current file, but also in all included files (and files included in them, etc.). The result looks like this:
 structs.h 
  1:   29     unsigned     column;    /* column number */

LTE RACH procedre

05:13

LTE RACH Procedure with Call Flow


The Base station continuously broadcast MIB's and SIB's. When the UE powers on, it syncs up with the network and it looks for these messages.

Here on, the explanation is provided for the initial connectivity of the UE. i.e. when the UE is powered on:

1. First, the UE has to synchronize with the network at the frame and slot level.
  • The Primary Synchronization Signal is responsible for slot synchronization.
  • The Synchronization Signal are sent only on time slots (1st and 11th) of each frame.
  • PSS is send at the last OFDM symbol of the 1st and 11th slot of each frame.
Query_1: How does UE know to look for the PSS synchronization signal?
Well, UE doesn't need to worry much for this. As, the synchronization signal are always sent only on the center 62 sub carriers irrespective of the  channel bandwidth (1.25,3,5,10,20). Therefore, UE will look for the central sub carriers, i.e at the last OFDM symbol of the 1st time slot and again at the last OFDM symbol of the 11th slot. With this UE synchronizes at the slot level.
  • The Secondary Synchronization Signal is responsible for frame synchronization.
  • Using both these signals, the UE derives the Physical Cell ID of the corresponding cell.
Query_2: How does UE know to look for the SSS synchronization signal?
Once, when the PSS is identified, SSS is always send at the slot before the PSS is present. In other words, SSS immediately precedes the PSS. 

Let's see how the UE derives the Cell ID using these two signals:
From PSS: PHYSICAL LAYER CELL IDENTITY is derived. It carries the value of 0, 1 and 2.
From SSS: PHYSICAL LAYER CELL IDENTITY GROUP is derived. It can take the value to 0 to 167.

Formula: 
Cell ID= (3*PHYSICAL LAYER CELL IDENTITY GROUP) + PHYSICAL LAYER CELL IDENTITY

2. Once the UE synchronizes with the network, it proceeds to read MIB and then requires the following info for camping on a cell:
  • PLMN id
  • Tracking Area Id
  • Cell Id
  • Radio and Core n/w capabilities (for it's n/w selection)
3. The above information is being broadcast by the network in order to help the UE for it's selection process.
4.  This broadcast is known as SYSTEM INFORMATION which is MIB and SIB's.

The call flow for the UE to read the System information is mentioned below:

UE Cell Selection Procedure

Query_3: How does the UE read MIB?
  • The MIB is transmitted on physical channel (BCCH-BCH-PBCH) and it always occupies the central 72 sub carriers in the Frequency domain irrespective of the channel bandwidth.
  • The first transmission of the MIB is scheduled in sub-frame number 0 of radio frames for which the SFN mod 4 = 0
  • repetitions are scheduled in sub-frame 0 of all other radio frames
From the MIB, UE gets the following information:
  • Channel bandwidth in terms of Resource Blocks
  • SFN (System Frame Number)
  • PHICH configuration (used for HARQ ACK/NACK)
5. Till now, the UE has synchronized itself with the Cell with the help of PSS and SSS; followed by reading the MIB. Now, UE will proceed to read SIB1 and SIB2 which carriers important information for the UE to select a Cell. To know more about SIB's and it's working, click here

6. After the above process the UE is synchronized with the network in the Downlink direction and have read SIB1 and SIB 2. Now, it needs to synchronize in the Uplink direction
7. For this to happen, RAP (Random Access Procedure) is initiated

RACH is common in FDD and TDD

There are two types of RAP:
  • Contention based RAP
  • Non-contention based RAP
Contention based RAP
In contention based, multiple UE's attempt to connect to the network at the same time. The eNB is intelligent enough to tackle this situation because every UE should be unique to the network. 

The UE's can always send the same Preamble ID to the network, thereby resulting on collisions. This kind of collision is called "Contention" and is known as "Contention based" RACH Process. The network would go through additional process to resolve these contention and hence this process is called "Contention Resolution" step. 

The below mentioned call flow would explain elaborately:


Contention based RACH procedure

1. In the first message the UE provides an indication to the network about it's resource requirement. This carries the Preamble ID, RA-RNTI

Query_4: How does UE gets or selects these parameters:
a. Most of the information is passed on to the UE through SIB2 (click here, to know more about SIB2 parameters)
    i. UE MAC layer has to select the Preamble sequence (Group A or Group B)
    ii. UE will configure itself with the max retires it will try for sending RAP (if it doesn't receive RAR)
   iii. Also, after every retry, how much power level has to be increased for transmitting the RAP
   iv. UE MAC layer constructs the RAP message and passes it to the UE PHY layer. UE PHY layer will transmit this message through PRACH
   v. Once the UE has transmiited the RAP on PRACH, it will start looking for RAR immediately after 3 sub-frames. This number i.e. 3 sub-frame is specified by 3GPP.

Query_5: How long should UE monitor the frames for RAR?
This sub-frame number is again specified in SIB2 and is known as window length; so, after the 3 sub-frames as mentioned above, UE will start looking for RAR in the sub-frames as mentioned by the Window length. If by that time UE doesn't receive RAR, it will go back to transmit RAP 

2. The eNB conveys the resources reserved for this UE along with the Timing Advance (TA), Preamble ID and T-CRNTI (a number generated by eNB and asks the UE to send the RRC connection)
3. UE sends the RRC connection Request using resources given by the eNB. It also sends the identifier (CRI) to the eNB which is used to resolve the Contention.
4. The eNB runs an algorithm and generates C-RNTI which will be a permanent ID for the UE till the connection is alive. The eNB sends the UE identifier. In this step, the UE which has received the ID continues while other UE's will back off and try again.


Scenario:
Multiple UE's attempt to access the network:

1. So, the UEs initiates RACH with same Preamble sequence, RA-RNTI
2. Therefore, the UEs will receive the same T-C-RNTI and resource allocation from eNB
3. All UEs would send msg 3 (RRCconnectionRequest)  message through the same resource allocation to the Network
4. Once, when msg3 is transmitted, two Timers are started:
a. T300 : Transmission of RRCconnectionRequest
b. Contention Resolution Timer: broadcasted in SIB2. If the UE doesn't receive msg4 (Contention Resolution message) within this timer, then it go back to Step 1 i.e. transmitting RAP. If there is a HARQ NACK for msg3 (RRCconnectionRequest) and it has to be re-transmitted then this Contention Resolution Timer will be re-started

Query_6: Now the big question: How should the eNB behave?
1. One: The signals act as interference to each other and eNB decode neither of them. In this case, none of the UE would have any response (HARQ ACK) from eNB and all UE will go back to Step 1.
2. Second: The eNB would successfully decode the message from only one UE and fail to decode from others. The decoded UE will get HARQ ACK from eNB
3. Third: eNB receives msg3 (RRCconnectionRequest) from both the UE's. Here, eNB will send msg4 (Contention Resolution) with MAC CRI (Contention Resolution Identity) to both the UE's. This CRI will carry a reflection of the RRCconnectionRequest as generated by one of the UE. The MAC layer of the UE will match the CRI (as received from msg4) with the CRI embedded in the RRCconnectionRequest.If it matches, then the UE will proceed to decode RRCconnectionSetup and the other UE's will back off and return to Step1, i.e start the RA procedure again.

Contention Resolution process is again of two types:
1. MAC based Contention Resolution
=> C-RNTI on PDCCH 
=> uses the DCCH logical channel 
=> used in HO scenarios
==>The rule is: if the UE has a valid C-RNTI and is going for RA procedure then it will be a MAC based Contention Resolution procedure

2. L1 based Contention Resolution
=> CRI (Contention Resolution Identity) on DL-SCH based 
=> Contention Resolution is addressed to T-CRNTI
=> uses CCCH logical channel
==>The rule is: if the UE doesn't has a valid C-RNTI and is going for RA procedure then it will be L1 based Contention Resolution procedure


Non-contention based RAP
 
This procedure is always initiated from network in case of a handover. For this procedure, the eNB reserves a set of preamble sequence. When this type of scenario is encountered the eNB allocates the set from this reserved pool.

This entire procedure is controlled by the eNB. Hence. no question of collision.
The call flow is mentioned below:

Non Contention Based RAP


S1AP MME Configuration Update 

Some information like (MME name, part of GUTI [GUMMEI], MMEcapacity) is provided by MME through interface S1 in an S1AP MME Configuration Update message

5. This communication happens after the S1 interface establishment between the eNB and MME.
The call flow can be identified below:

S1AP Configuration Update Procedure
01:49

Useful Websites You Should Know and Use (updated!)


In the spring of 2007, Julius Wiedemann, editor in charge at Taschen GmbH, gave a legendary TED University talk: an ultra-fast-moving ride through the “100 websites you should know and use.” Six years later, it remains one of the most viewed TED blog posts ever. Time for an update? We think so. Below, the 2013 edition of the 100 websites to put on your radar and in your browser.
To see the original list, click here. While most of these sites are still going strong and remain wonderful resources, we’ve crossed out any that are no longer functioning. And because there are so many amazing resources out there, please add your own ideas in the comments. Happy surfing!
BUSINESS + E-COMMERCE
AUDIO + VISUAL
LITERATURE, MEDIA + CULTURE
POLITICS, NEWS + GLOBAL ISSUES
EDUCATION
SCIENCE + TECHNOLOGY
And now, the original list from 2007, created by Julius Wiedemann, editor in charge at Taschen GmbH. While most of these remaining thriving websites, we’ve crossed out defunct websites and added notes when possible:
CURIOSITY & KNOWLEDGE
GRAPHICS, MUSIC & ARTS
E-COMMERCE EXPERIENCE
SEARCHING & FINDING
ONLINE RESOURCES
TOP INTERACTIVE EXPERIENCE CREATORS
00:43

Moto G


It's finally here in india!.
Motorola Moto G has been finally launched in the country, with an interesting price tag.


According to several media reports, the 8GB variant of the Moto G has been priced at Rs 12,499 and the 16GB could sell at Rs 13,999.

Motorola's budget smartphone will be, however, available only on Flipkart exclusively for two weeks starting tomorrow, February 6.

The online giant has put up many offers to tag along with the launch with exclusive discounts.

Then there is the chance to get 100 percent cashback on the phone that's sure to get customers rolling on www.flipkart.com.




Specifications 


Operating system

Android 4.3 (Jelly Bean)
with guaranteed upgrade

Processor

Qualcomm Snapdragon 400 processor with 1.2 GHz quad-core CPU

Capacity

8 GB standard
16 GB version available
Two years 50 GB storage free on Google Drive

Dimensions and weight

Height 129.9 mm
Width 65.9 mm
Depth 6.0-11.6 mm (curve)
Weight 143 grams
Water repellent coating


Display


4.5 inches diagonal (11.3 cm)
1280 x 720 HD, 329 ppi
Corning® Gorilla® Glass

Connectivity

Micro USB
3.5 mm headset jack

Rear camera

5 MP at 4:3 and 3.8 MP at 16:9 (user-configurable)
LED flash
4X digital zoom
Slow motion video
Burst mode
Auto HDR
Panorama
Tap to Focus

Front camera

1.3 MP

Video capture and playback

720p HD video (front and rear)
Capture 30 fps (MPEG4, H.264)
Playback 30 fps (MPEG4, H.263, H.264, VP8)

Audio playback

AMR-NB, AMR-WB, AAC, AAC+, eAAC+, MP3, PCM, FLAC, MIDI, QCELP, EVRC, OGG/Vorbis

Networks

Global GSM Model:
GSM/GPRS/EDGE (850, 900, 1800, 1900 MHz) 
UMTS/HSPA+ up to 21 Mbps (850, 900, 1900, 2100 MHz)
US GSM Model:
GSM/GPRS/EDGE (850, 900, 1800, 1900 MHz)
UMTS/HSPA+ up to 21 Mbps (850, 1700 (AWS), 1900 MHz)
CDMA Model:
CDMA/EVDO Rev A (850, 1900 MHz)
Both GSM models require a micro SIM card.

WIFI:
802.11 b/g/n

Location Services:
GPS, GLONASS


Bluetooth® Technology: version 4.0

          Battery 


Built-in rechargeable lithium-ion, 2070 mAh
Mixed usage up to 24 hours













Dual-SIM Motorola Moto G now getting KitKat too...



Motorola is now seeding the official Android 4.4 KitKat firmware update to the dual-SIM version of Moto G. It is available over the air and weighs about 230MB.
Currently the update is seeding in Malaysia, but we expect other markets to get it very soon.
Just as on the other Moto G versions, the update brings Android 4.4.2 KitKat with Project Svelte optimizations, new Dialer app, updated Hangouts with SMS/MMS support, updated Google Now and the latest version of Google's Photo gallery with Auto Awesome feature, if not installed already.
The standard model of Motorola Moto G has been already brought to the KitKat bandwagon, while thenewly released dual-SIM Moto G is getting it just two weeks after its launch. It's nice to see Motorola is working hard to support its smartphones. Hopefully it will continue to do so once it becomes part of Lenovo.