Changes between Version 1 and Version 2 of Architecture/Deployment/Measurements


Ignore:
Timestamp:
Mar 26, 2021, 7:11:26 PM (3 years ago)
Author:
mpk2138
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Architecture/Deployment/Measurements

    v1 v2  
    44
    55* [[/s3-lg1]]
     6* [[/md2]]
    67
    7 ==== Measurement Procedure
    8 A uniform procedure is used to measure each node. The procedure utilizes the [https://wiki.cosmos-lab.org/wiki/Hardware/sdr/usrp2974#USRP2974 USRP 2974] in each node to transmit 802.11g data packets at regular 100ms intervals with fixed power on channel 1 (2412 MHz). A laptop computer is then used to receive and decode these packets in different locations, with the output provided by the {{{tcpdump}}} command. Each decoded packet reports its received power.
    9  
     8==== Measurement Overview
     9A uniform procedure is used to measure each node. The procedure utilizes the [https://wiki.cosmos-lab.org/wiki/Hardware/sdr/usrp2974#USRP2974 USRP 2974] in each node to transmit 802.11g data packets at regular 100ms intervals with fixed power on channel 1 (2412 MHz). The 802.11g packets are generated in GNU Radio, using an 802.11 out-of-tree (OOT) framework [ 1 ], and transmitted through the node's [https://wiki.cosmos-lab.org/wiki/Hardware/rf-front-end#RFFrontEnd RF Front End], as shown in Figure 1. A Dell XPS 13 laptop computer with an Intel 8265 !WiFi card [ 2 ] is then used to receive and decode these packets in different locations, with the output provided by the {{{tcpdump}}} command. Each decoded packet reports its received power.
     10
     11 || [[Image(COSMOS Node Measurements Overview.png, 600px)]]
     12 || Figure 1: Overview of node measurement procedure.
     13
    1014Each measurement location is measured for 20 seconds, allowing both an average received power and packet reception ratio (PRR) to be computed over 200 packets.
     15
     16==== Detailed Measurement Procedure
     17The specific procedure for setting up a node for measurements is outlined in this section.
     18
     19'''Setting up the Node'''
     20As an example, node {{{s3-lg1}}} is used, but the following commands may be used on any node in the testbed.
     21
     221. Load the correct image onto the USRP 2974 in {{{s3-lg1}}}
     23{{{
     24console~$ omf load -i mpk2138-cosmos-node-measurements-2021-03-26.ndz -t sdr2-s3-lg1
     25}}}
     26
     272. Set up the RF front end of the node to transmit at 2.412 GHz.
     28{{{
     29console~$ curl "am1.cosmos-lab.org:5054/rf_control/set_tx_path?node=sdr2-md2.bed.cosmos-lab.org&rf_port=0,1&power_amp=on&f_lower=2400&f_upper=2460"
     30}}}
     31
     323. Turn on the USRP 2974. Wait one minute for the radio to turn on after issuing this command.
     33{{{
     34console~$ omf tell -a on -t sdr2-md2.bed.cosmos-lab.org
     35}}}
     36
     374. Login to the USRP 2974 and set it up for transmitting the !WiFi packets. The prompt will say {{{sdr2-s3-lg1}}} no matter what node you use.
     38{{{
     39console~$ ssh -X root@sdr2-md2
     40sdr2-s3-lg1~# /usr/local/bin/niusrprio_pcie start
     41sdr2-s3-lg1~# sudo sysctl -w net.core.wmem_max=625000000
     42sdr2-s3-lg1~# sudo sysctl -w net.core.rmem_max=625000000
     43sdr2-s3-lg1~# cd cosmos_measurements
     44}}}
     45
     46'''Setting up the Laptop'''
     47
     48The instructions here are specific to the Dell XPS 13 laptop with Intel 8265 [ 2 ] !WiFi card running Ubuntu 18.10. Performance with other !WiFi cards may vary, and setup may also be different.
     49
     501. Restart the laptop.
     512. Setup the !WiFi card to monitor all incoming packets on 2.412 GHz. Please note, the {{{wlp2s0}}} !WiFi card interface may be named differently - use the {{{ifconfig -a}}} command to find the name of the !WiFi card interface.
     52{{{
     53$ sudo su
     54$ iw dev
     55$ iw phy phy0 info
     56$ iw phy phy0 interface add mon0 type monitor
     57$ ip link
     58$ iw dev wlp2s0 del
     59$ rfkill unblock wifi
     60$ ip link set mon0 up
     61$ iw dev mon0 info
     62$ iw dev mon0 set freq 2412
     63$ exit
     64$ cd ~/COSMOS\ Measurements
     65}}}
     66
     67'''Taking Measurements'''
     68
     69Measurements are taken by placing the laptop at various locations around the node and recording the !WiFi packets as the USRP 2974 in the node transmits them. The node image loaded onto the USRP 2974 provides a Python script that will start the packet transmissions from the USRP 2974. To transmit packets for roughly 45 seconds, run the following on the node SSH terminal:
     70{{{
     71sdr2-s3-lg1~/cosmos_measurements# timeout 45s python wifi_tx_nogui.py
     72}}}
     73
     74Once the command line shows the radio has started transmitting (usually the presence of {{{U}}} showing up confirms this), the following script can be run on the Dell laptop to collect a 20 second packet measurement:
     75
     76{{{
     77COSMOS Measurements$ sudo python measure.py 20 <filename> <measurement number>
     78}}}
     79
     80The filename can be anything but it is recommended to be descriptive including a date and the node being measured. The measurement number starts at 001 and increments with every measurement. Therefore an example measurement command would be:
     81
     82{{{
     83COSMOS Measurements$ sudo python measure.py 20 2050-01-01-s3lg1Measurement 001
     84}}}
     85
     86After the 20 second measurement has concluded, the GPS coordinates of the current laptop position can be recorded using an app such as one on iOS and Android called "Coordinates" [ 3 ]. The Dell laptop can then be moved to the next location, and the next measurement can be performed.
     87
     88==== References
     89[ 1 ] - [https://github.com/bastibl/gr-ieee802-11 IEEE 802.11 a/g/p transceiver for GNU Radio]
     90
     91[ 2 ] - [https://ark.intel.com/content/www/us/en/ark/products/94150/intel-dual-band-wireless-ac-8265.html Intel 8265 Dual Band WiFi Card]
     92
     93[ 3 ] - [https://apps.apple.com/us/app/coordinates-gps-formatter/id494286614 Coordinates App]