Search This Blog

20 April, 2011

Difference between RSSI and RSS or RSS vs RSSI

Lot of people mix the term RSSI and RSS in the RF industry, the  Field engineers, developers, testers.

RSSI - Received Signal Strength Indicator
RSS  - Received Signal Strength

RSSI is an indicator and RSS is the real value. Ok, now what do you mean by indicator, indicator mean it can be a relative value and RSSI is  always a positive value and there is no unit for the RSSI.

We can say RSSI is for common man to understand. RF values are always told in dBm and the values are negative values most of the time. To make it easy for the people to understand these negative values are converted to positive values through scaling.

Say for example, if the maximum signal strength is 0dBm and minimum is -100dBm. we can scale it like as explained. We can put 0 dBm and more (RSS) as 100 RSSI(ie maximum RSSI) and -100  dBm(or less) as 0 RSSI(minimum RSS).

RSS is the actual signal strength received at the receiver and the unit of measurement can be in dBm, dB, milli Watt, Watt. So RSS will always have a unit.

17 November, 2009

VIM editor tips for file/source code editing

VIM Tips for file or source code editing

Hi all i will be updating this post with the vim usage for file editing or C source code editing which i found useful

1. To open two or more files in the same window
vim file1 file2
or
after opening the first file with vim file1 , type(command mode) :sp file2. This will open file2. Like this you can open more than two files.

2. Scrolling two files together

This is very useful for comparing two source codes.

Open two files as mentioned in tip no.1 , then type :set scrollbind in the first file's command and then type the same command for the second file. After that if you scroll the lines both the files lines will be scrolled together.

3. vim changing background color
:highlight Normal ctermbg=white ctermfg=black

4. vim status line with information's about the file opened

Type :set laststatus=2  vim wil display a basic status line.

If you want more information in the satus line read the below points.
  • Name of the file that is being edit
  • Format of the file that I am editing (DOS, Unix)
  • File type as recognized by Vim for the current file
  • ASCII and hex value of the character under the cursor
  • Position in the document as row and column number
  • Length of the file (line count)
The following command will turn your status line into a true information bar with all the above information:
:set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]

To make these settings permanent every time you open vim

In the ~/.vimrc  file inserts the below two lines. So if you want it in very user,
you have to edit the vimrc file in the /home/username/.vimrc .  
If the vimrc file is not there you can create one 
 
set statusline=%F%m%r%h%w\ [FORMAT=%{&ff}]\ [TYPE=%Y]\ [ASCII=\%03.3b]\ [HEX=\%02.2B]\ [POS=%04l,%04v][%p%%]\ [LEN=%L]
set laststatus=2 
 
 


5. Highlighting search matches in vim 
 set hlsearch , also add it in the ~/.vimrc file 
set incsearch . If you set the 'incsearch' option, Vim will show the first 
    match for the pattern, while you are still typing it. 
   
6. Indenting for C style
    Type the below comamnd or save it in the ~/.vimrc file

set autoindent
set cindent

To indent two spaces (instead of one tab of eight spaces, the vim default):
set shiftwidth=2









06 November, 2009

Deleting skype chat history

Deleting skype chat history

For deleting skype ( tested in version 4.1.0.166) chat history go to Tools->Options

Click on Privacy on the left pane, you can see as shown below

















Then click on the Show advanced options button on the right side you can see the expanded as showed below. Click on the Clear History to clear you char history

10 July, 2009

Using Timers in Linux kernel module

Linux kernel timer tutorial
This is a tutorial for using timer in linux kernel module. we all need one function to be called periodically say 500ms,1s to do so some task periodically(like GPIO polling, sending some message to user space etc)

As any system/OS, we need to initialize the timer module before we can use it. We need to give a name for the timer(for us to configure and restart the timer), timer function handler(ie.when timer expires this function will be called). One important thing to be noted is after timer expires it wont restart the timer automatically, it has to be restarted manually to get the next timer expiry.

The timer implementation resides in and kernel/timer.c

The timer study program is as shown below. In the module init we are initializing the timer with the the timer expiry routine(timer1_routine), data to be passed when the routing is called(in my example 1) , the timer expiry in jiffies. these are the minimum initialization we need to do with the timer struct. After calling the add_timer function the timer starts and the expiray routine will be called after the specifies time, in our case 1 second Dont forget to stop the timer del_timer_sync(&timer1); in the module unload. If we want to execute the timer1_routine every 1 second we need to restart the timer with mod_timer(&timer1, jiffies + HZ);

Any feedback welcome ! You can read the below book

Linux Device Drivers, 3rd Edition


/********************************** timerStudy.c *************************************************
#include
#include
#include

MODULE_LICENSE("Dual BSD/GPL");

struct timer_list timer1;

int i;

void timer1_routine(unsigned long data)
{

printk(KERN_ALERT"Inside Timer Routine count-> %d data passed %ld\n",i++,data);
mod_timer(&timer1, jiffies + HZ); /* restarting timer */
}


static int timer_module_init(void)
{


init_timer(&timer1);

timer1.function = timer1_routine;
timer1.data = 1;
timer1.expires = jiffies + HZ; /* 1 second */
add_timer(&timer1); /* Starting the timer */

printk(KERN_ALERT"Timer Module loaded\n");
return 0;
}

static void timer_module_exit(void)
{
del_timer_sync(&timer1); /* Deleting the timer */

printk(KERN_ALERT "Timer module unloaded \n");
}

module_init(timer_module_init);
module_exit(timer_module_exit);

********************************** timerStudy.c *************************************************/



Make file to compile the above timer module.

/********************************** Makefile *************************************************



obj-m +=timerStudy.o

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

********************************** Makefile *************************************************/

Dino Joseph Mycle

18 June, 2007

Monitor flickering problem - Linux (Redhat 9)

Monitor flickering problem in Linux (Redhat 9)

I installed Redhat 9, i was having intel chipset (865). when the window screen comes(X window)the monitor was flickering . i tried changing the horizontal scan freq. in the X11/XF86Config file, but no use. Then at last only i got the idea of why don't i try installing the graphics driver for the board. Then i went through intel website and downloaded the graphics driver for Linux. After installing the graphics driver the monitor flickering problem is solved.
i think this will work for all flickering problem in Linux better try first installing the graphics driver and then try for scanning freq.

04 October, 2006

Making the VxWorks Tornado project independent of absolute path

Please Follow the steps below
Assuming the project name is trnado_prj and it is stored at D:\src_trnado_prj\src

1) Close Tornado Application
2) Open the trnado_prj.wpj in NOTEPAD
3) Replace D:/src_trnado_prj/src with $(PRJ_DIR)/../../../../../.. using the notepad replace all the occurences in the trnado_prj.wpj file
4) Save and close it
5) After doing this delete the makefile in the then compile it

Note: Only once you have to do it. After that if the source code is the directory which contains the above mentioned trnado_prj.wpj file, and if you are renaming it again the base folder name, just delete the make file and Build it

tmux enabling mouse interaction

Add the below line to the ~/.tmux.conf setw -g mouse on save the file and exit from the tmux shell, you should be able to use your mouse to ...