<< Chapter < Page Chapter >> Page >
You have seen that the strength of a link can not be easily predicted as a function of the distance between sender andreceiver, especially indoors. You will now discover the relationship between the RSSI of a link and its probability. Wedefine link probability as the portion of the messages sent by the sender which are successfully received at the receiver. You will see that link probability isstrongly correlated to the RSSI.

The experimental setup goes as follows. You will use to boards, a sender and a receiver. The sender continuously sends bursts of 100 messages, each containing a counter which increases from 1 to 100. Out of those 100 sent messages, the receiver may only receive 40. It will count the number of received messages until the counter reaches 100, or until the counter loops back to a smaller value. When this happens, the receiver outputs the number of received messages, i.e. the probability of the link.

At the same time as the receiver counts the number of the received messages, it calculates the average RSSI over those 100 messages, which it outputs togetherwith the link probability. Finally, to allow for the receiver to output these statistics (which takes some time), after each burst of 100 messages, the sender sends 20messages with counter set to 101.

To implement this:

  • Reprogram two boards with the code taken from the listing below Alternatively, this code is available in the downloadable source code . Open source_code/iar_v4.11/lab_ezwsn.eww with IAR. The project corresponding to this section is called txrx_probability . .
  • Attach one board to the host computer, and read the output from COMx using PuTTY;
  • Power the second board from the battery unit and press the button; this will cause that board to transmit the bursts of 100 messages. You can read the statistics using PuTTY.
  • Reprogram the sender node by changing line P1IFG&= ~0x04; by P1IFG |= 0x04; . This causes a continuous stream of messages. Power the newly programmed node on the battery pack and press the button; the red LED flashes.
  • On the receiver side, verify with PuTTY that you are receiving continuously. Close PuTTY.
  • Open Cygwin, and enter cat /dev/comx>probability.txt . This logs the output in a file.
  • Walk away with either node to record data for low RSSI values. Press (Ctrl+C) in Cygwin to stop the logging process.
  • Start XLaunch . In Cygwin, type export DISPLAY= .
  • In Cygwin, enter gnuplot , then plot "probability.txt" using 1:2 . This plots the probability as a function of the RSSI, make sure to obtain a graph similar to the one in the figure below.

#include "mrfi.h" uint8_t counter, num_received, bool_counting;int16_t cumulative_rssi; mrfiPacket_t packet;void print_probability(int16_t cumulative_rssi, uint8_t number) {char output[] = {" 000 0.00\n"};if (cumulative_rssi<0) { output[0]='-'; cumulative_rssi=-cumulative_rssi;} output[1]= '0'+((cumulative_rssi/100)%10); output[2]= '0'+((cumulative_rssi/10)%10); output[3]= '0'+ (cumulative_rssi%10); output[5]= '0'+((number/100)%10); output[7]= '0'+((number/10)%10); output[8]= '0'+ (number%10); TXString(output, (sizeof output)-1);} int main(void){ BSP_Init();P1REN |= 0x04; P1IE |= 0x04;MRFI_Init(); P3SEL |= 0x30;UCA0CTL1 = UCSSEL_2; UCA0BR0 = 0x41;UCA0BR1 = 0x3; UCA0MCTL = UCBRS_2;UCA0CTL1&= ~UCSWRST; MRFI_WakeUp();MRFI_RxOn(); __bis_SR_register(GIE+LPM4_bits);} void MRFI_RxCompleteISR(){ P1OUT ^= 0x02;MRFI_Receive(&packet); counter = packet.frame[9]; if (counter==101) {if (bool_counting == 1) { print_probability(cumulative_rssi/num_received,num_received);} bool_counting=0;num_received=0; cumulative_rssi=0;} else { bool_counting=1;num_received++; cumulative_rssi+=Mrfi_CalculateRssi(packet.rxMetrics[0]); }} #pragma vector=PORT1_VECTOR__interrupt void interrupt_button (void) {P1IFG&= ~0x04; P1OUT ^= 0x01;mrfiPacket_t packet; packet.frame[0]=8+3; for (counter=1;counter<101;counter++){ packet.frame[9]=counter; MRFI_Transmit(&packet, MRFI_TX_TYPE_FORCED); }for (counter=0;counter<20;counter++){ packet.frame[9]=101; MRFI_Transmit(&packet, MRFI_TX_TYPE_FORCED); }}

Some keys to understand the code:

  • Line 55. When the button is pressed, the board continuously sends bursts of 100 messages followed by 20 "guard" messages.
  • Line 61. The format of a packet is presented in 4.2. Simple Tx/Rx . packet.frame[0] is the length field, which sets the payload length at 3 bytes (minimum accepted value).
  • Line 63. packet.frame[9] is the first byte of the payload.
  • Line 43. bool_counting indicates whether the statistics have already been printed out (without this semaphore, as there are 20 guard messages, the statistics would be printed out 20 times)

As shown in hte figure below, link probability is closely correlated to RSSI. The theory tells us that, at very low RSSI, link probability is very close to 0; at very high RSSI it isclose to 1. Between those extremes, there is a linear slope, shown as an overlay in the figure below.


Questions & Answers

where we get a research paper on Nano chemistry....?
Maira Reply
what are the products of Nano chemistry?
Maira Reply
There are lots of products of nano chemistry... Like nano coatings.....carbon fiber.. And lots of others..
Even nanotechnology is pretty much all about chemistry... Its the chemistry on quantum or atomic level
no nanotechnology is also a part of physics and maths it requires angle formulas and some pressure regarding concepts
Preparation and Applications of Nanomaterial for Drug Delivery
Hafiz Reply
Application of nanotechnology in medicine
what is variations in raman spectra for nanomaterials
Jyoti Reply
I only see partial conversation and what's the question here!
Crow Reply
what about nanotechnology for water purification
RAW Reply
please someone correct me if I'm wrong but I think one can use nanoparticles, specially silver nanoparticles for water treatment.
yes that's correct
I think
Nasa has use it in the 60's, copper as water purification in the moon travel.
nanocopper obvius
what is the stm
Brian Reply
is there industrial application of fullrenes. What is the method to prepare fullrene on large scale.?
industrial application...? mmm I think on the medical side as drug carrier, but you should go deeper on your research, I may be wrong
How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
scanning tunneling microscope
how nano science is used for hydrophobicity
Do u think that Graphene and Fullrene fiber can be used to make Air Plane body structure the lightest and strongest. Rafiq
what is differents between GO and RGO?
what is simplest way to understand the applications of nano robots used to detect the cancer affected cell of human body.? How this robot is carried to required site of body cell.? what will be the carrier material and how can be detected that correct delivery of drug is done Rafiq
analytical skills graphene is prepared to kill any type viruses .
Any one who tell me about Preparation and application of Nanomaterial for drug Delivery
what is Nano technology ?
Bob Reply
write examples of Nano molecule?
The nanotechnology is as new science, to scale nanometric
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Is there any normative that regulates the use of silver nanoparticles?
Damian Reply
what king of growth are you checking .?
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
Stoney Reply
why we need to study biomolecules, molecular biology in nanotechnology?
Adin Reply
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
what school?
biomolecules are e building blocks of every organics and inorganic materials.
how did you get the value of 2000N.What calculations are needed to arrive at it
Smarajit Reply
Privacy Information Security Software Version 1.1a
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get the best Algebra and trigonometry course in your pocket!

Source:  OpenStax, Ezwsn: experimenting with wireless sensor networks using the ez430-rf2500. OpenStax CNX. Apr 26, 2009 Download for free at http://cnx.org/content/col10684/1.10
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Ezwsn: experimenting with wireless sensor networks using the ez430-rf2500' conversation and receive update notifications?