Posts

Showing posts from April, 2013

ssh: connect to host 10.242.10.223 port 22: Connection refused

ssh: connect to host 10.242.10.223 port 22: Connection refused if you get an error saying this then check this command $:pgrep sshd if you get any number(PID) like 7293 any number then it means sshd is working If you dont get any PID or number then it means sshd is not installed ..go to synaptic package manager and check whether the packages are installed or not openssh-server(it is required if you want to send a file from other system to ur system) openssh-client(it is required when you want to send a file from your system to others system) ssh

PERL program which takes input from the user

#!/usr/bin/perl print("enter the name please"); $name=<STDIN>; print("Mr $name \r\bthanks for entering your name "); When the perl interpreter sees a statement , it breaks the statement down into smaller units of information. In this example $name,=,<STDIN>,; are the smaller units of information...these smaller units of information are known as tokens. The first token $name is an example of scalar variable.in perl, a scalar variable can store one piece of information.. The = token called the assignment operator tells the perl interpreter to store the item specified by the token to #the right of the = in  the place specified by the token to the left of the = The <STDIN> represents a line of input from the standard input file...The STDIN contains everything you enter when running a program..The <STDIN> tells the perl interpreter to read one line from the standard input file. The ; token at the end of the statement is a special

Routing in 6LoWPAN

Image
Transmission of IPV6 packets over LoWPAN devices was considered nearly impossible once because the MTU of IPV6 packets is 1280 bytes which is much larger than the MTU of IEEE 802.15.4 data link layer (127 bytes). So 6LoWPAN implements an adaptation layer between data link layer and network layer to support transmission of IPV6 packets over 802.15.4 . Main purpose of the adaptation layer is to fragment and reassemble the IPV6 packets. Routing in 6LOWPAN can be divided into two categories based on the decision taken either on adaptation layer or on the network layer. If the routing decision is taken under the adaptation layer it is Mesh Under. If the routing decision is taken on the network layer it is Route Over. Mesh Under:           In mesh under scheme, routing and forwarding are performed at link layer . To send a packet to a particular destination,the EUI 64 bit address or the 16 bit address is used and sent to the neighbour node  so that it can reach to the desti

Steps in Running an 8051 program

Steps in Running an 8051 program Step1: Use an editor to type a program.The program or the source file may have an extension .asm or .src it depends upon which assembly you are using Step2: The asm source file is fed to an 8051 assembler which converts instructions into machine code. The output is object file(.obj) and list file(.lst) Step3: The linker takes one or more object files and produce an absolute object file with extension abs Step4: Next the abs file is fed into a OH program(object to Hex converter) which creates a Hex file that can be burnt into the ROM.

How to run a .jar file in Linux(ubuntu)

To run a .jar file first make sure that latest version of java is installed. To check the version of java type java -version in command line To run a jar file type in command line java -jar filename.jar

LINK ESTIMATION EXCHANGE PROTOCOL: (LEEP)

In-bound link quality:In-bound link quality is a value in the range of 0 to 255 that descries the quality of link from A to B estimated by B by counting the packets which are successfully receuved among all the transmitted packets. For calculating the bidirectional link quality ,the in-bound link should be exchanged among the neighbours.LEEP frame includes a sequence number that will be incremented for every outbound.It will be incremented even when it is retransmitted. Nodes receiving the frames use those sequence numbers and a small cache to determine the quality of in-bound link. Each frame also includes inbound link quality for each of the sender's neighbours. Receiving nodes may use that (outbound quality) combined with the inbound quality that they have calculated from the neighbour's sequence numbers to determine the bidirectional quality.

TinyOS code to set a Node as Root

According to a collection protocol a node has four roles : producer,consumer,snooper and in-network processor.Consumer is the root. To set the node as the root the TinyOS code is Node_RootC.nc module Node_RootC { uses interface Boot; uses interface Leds; uses interface RootControl; } implementation { event void Boot.booted() { call RootControl.setRoot(); if(call RootControl.isRoot()==TRUE) call Leds.led0On(); } } Node_RootAppC .nc configuration Node_RootAppC { } implementation { components MainC,LedsC,CollectionC,Node_RootC; Node_RootC.Boot->MainC; Node_RootC.Leds->LedsC; Node_RootC.RootControl->CollectionC; } Here RootControl.setRoot() command is used to set the node as Root and RootControl.isRoot() commands returns a boolean value. It returns TRUE when the node is root . It returns FALSE when the node is non-root.

HOW CTP WORKS?

Image
The Collection Tree Protocol is a routing protocol used by wireless sensor networks.It is used for transferring data from sensors to the root node.The protocol tree creates a collection tree shown below: The bottom node is called the root,or sink node,which means that all the data is sent downwards in the tree to the root. The nodes N1 to N7 can simply forward packets or can creates their own data. The most important part is that all the information is sent towards the root,no matter which node sends it. Each node has a name and an expected transmission coefficient(ETX) to the sink. Each node will give the link quality value to its neighbour nodes.ETX is established by estimating the quality of links between the nodes and assigning a value to it.Adding the values of links between the sink and node gives the ETX of the node. Since each node calculates its own ETX a node only needs to know the link quality to the parent and the ETX of the parent in order to

Single-ended v/s Differential inputs

Most data acquisition systems provides two types of input connections:single ended and a differential input connection. Lets see what is the difference between the both. Single-ended inputs In single ended inputs we connect one wire from each signal source to the data acquistion interface.The measurement is the difference between the signal and ground at that interface. Advantage: Less number of wires required. Disadvantage:It suffers from noise injection.Noise can be introduced into the signal. Differential-ended In differential input,two wires from each signal source is connected to the data acquistion interface. One goes to a + input and one goes to a -input.The measurement is the voltage between two individual inputs within a common mode range. Advantage: Noise is removed. DisAdvantage: More number of wires are required.

What is Payload? in Networking

We often hear the word payload most commonly in networking... Packet  consists the data and header..Payload is the essential data that is carried by the packet after ignoring the overhead...In other words payload is the actual data that is sent to the destination....

Error in IRIS Mote -solved

If you get any error like when you are installing blink program on iris avrdude: safemode: efuse changed! Was ff, and is now f7 Would you like this fuse to be changed back? [y/n] y solution: vi /opt/tinyos-main/support/make/iris.target add in this : ifeq ($(PROGRAMMER),avrdude) PROGRAMMER_PART ?= -pm1281 -U efuse:w:0xff:m endif afterwards: ifeq ($(PROGRAMMER),avrdude) PROGRAMMER_PART ?= -pm1281 -U efuse:w:0xf7:m #PROGRAMMER_PART ?= -pm1281 -U efuse:w:0xff:m endif 

Creating a New Platform in TInyOS

What is aTinyOS Platform?     A physical platform is comprised of a set of chips. Similarly a TinyOS platform is nothing but  collection of components representing these chips(drivers of the chips).. How to create a New Platform?   If the chips of the new platform are already present in the exixsting platform then implementing a new platform simply means wiring existing components. If the chips of the new platform are not present in any existing platforms then implementing the new platform consists of implementing components (drivers) for those chips and then wiring them. Things Required For a New Platform:     A new platform definition requires three things: Defintion of chips that creates the platform Definition of the Platform(Combining chips to platform) and Tool Chain or make definition Chips Defintions:(tos/chips/chipX)     Each chip will be assigned a specific directory under tos/chips.    Each of the chips that provide software accessible fu

Booting Process in TinyOS

In our programs we always be wiring in our configuration file Boot interface to MainC component.Boot->MainC.Boot; So from this MainC is the component which is providing the Boot Interface. But when you look at the code in the MainC component. You will find that Boot=RealMainP. It means whenever you call MainC.Boot it automatically goes to RealMainP.Boot.. It means that RealMainP  signals the event booted() of the Boot interface. Now we will see what are the steps before it signals the booted() event of Boot interface. Step1: Platform_bootstrap();           call Scheduler.init(); Here he is initializing the scheduler so that any components can posts tasks and initializing all the other hardware related stuff. Step2: call PlatformInit.init();        while(call Scheduler.runNextTask()); Initializing the platform. Then spinning on the scheduler to check whether all the tasks are completed. If all the  tasks are completed runNextTask() will return FALSE . Step3: call Sof

Difference between Maskable and NonMaskable Interrupts

Maskable Interrupt:  An Interrupt that can be disabled or ignored by the instructions of CPU are called as Maskable Interrupt. Eg: RST6.5,RST7.5,RST5.5 OF 8085 are maskable Interrupts. Non-Maskable Interrupt: An interrupt that cannot be disabled or ignored by the instructions of CPU are called as Non-Maskable Interrupt. Eg:Trap of 8085

Princeton Architecture v/s Harvard Architecture

There are two fundamental architectures to access memory..Princeton and Harvard. Princeton Architecture: It has a single memory which has to be shared by data and code(program). Processor requires two clock cycles,one for fetching the code and another for fetching the data. Simpler Design.. Harvard Architecture: It has separate memories for code and data. Processor requires only one clock cycle as it has separate buses to access both data and code. Complex Design. If speed is required we will go for Harvard,otherwise it is better to go for Princeton Architecture.

How to change folder icon in ubuntu

How to change the folder icon in ubuntu?? Step1: Right Click on the folder whose icon you want to change. Step2:Click on the properties Step3:Under the Basic Tab click on the folder icon's image.Now it will open you select custom icon window. Step4: Go to the /usr/share/icons and select the icon which you want Step5:close the properties folder

Routing Methodologies in Networking

Routing methodologies commonly used in networking are unicast addressing,anycast addressing,multicast addressing and broadcast addressing.... Unicast: It is assigned to a single network interface..Packets sent to a unicast address are to that specific interface only.... Anycast : It is assigned to a group of interfaces. Packets sent to a Anycast address are sent to the nearest interface in that group... Multicast: It is also assigned to a group of interfaces..Packets sent to a Multicast address are sent to all the interfaces of that group.. Broadcast : Packets sent to a Broadcast address are sent to all the interfaces in that link...

TinyOS Syntax Highlighting with gedit

If  you want the gedit to show some colours when you are writing a TinyOS/NesC program follow these steps Download the nesc.lang file from the site http://sourceforge.net/projects/nescplugin/files/ and copy it to /usr/share/gtksourceview-3.0/language-specs/