AnaVANET

Simple discription about the usage of Anavanet

Last update : $Date: 2014-05-12 21:05:44 +0900 (Mon, 12 May 2014) $
$Author: tsukada $

Tested environment and Softwares

I'm using following software versions. AnaVANET may be not dependent on specific version of softwares.

OS:
MAC OSX 10.8.2 (Mountain Lion)
JAVA:
java version "1.6.0_37"
Netbeans IDE:
7.2.1
Perl:
v5.12.4 (darwin-thread-multi-2level)
Blowsers:
Chrome Version 23.0.1271.64
Safari Version 6.0.2 (8536.26.17)
Firefox 16.0.2
Opera 12.10

Downloads

2011-handover-data-sample

The data of the experiments that was taken using GeoNetworking and NEMO in 2011. GPS and TCPDUMP log were recorded in all of OBU4, RSU and RSU2. The UDP iperf log were taken in Receiver side.

packet-processor
A Java program to process the GPS and TCPDUMP log taken in the experiments. The source code is developped with netbeans.
web-viewer-v0.2
The web viewer to show the experiments data with Google maps.
  AnaVANET/  (recommend to create this directory)
  ├── 2011-handover-data-sample/
  │   ├── memo.txt
  │   ├── OBU4/
  │   ├── Receiver/
  │   ├── RSU/
  │   ├── RSU2/
  │   └── Sender/
  ├── packet-processor/
  │   ├── build.xml
  │   ├── manifest.mf
  │   ├── nbproject/
  │   └── src/
  └── web-viewer-v0.2/
      ├── index.cgi
      ├── tool/
      ├── convert_old_anavanet_xml_and_save_json.pl
      │   └── convert_old_anavanet_xml.pl
      └── (Others)/

Usage

AnaVANET-processor

  1. Downloads packet-processor.zip and unzip it.
  2. Install Netbeans and open packet-processor
  3. Build the AnaVANET netbeans project (Shortcut key is F11).
  4. The built program is found in packet-processor/dist/AnaVANET.jar
  5. The help message can be shown by the following commend.
  6. $ java -jar packet-processor/dist/AnaVANET.jar -help
                    
    Usage:    [-help] [  ...] (-UDP | -TCP | -PING)  -C2CNET -GN6 -NEMOSIG
    
  7. Downloads 2011-handover-data-sample.zip and unzip it.
  8. Go 2011-handover-data-sample/ and type the following command
  9. $ sh memo.txt
  10. The following figure is the simple usage of AnaVANET-processor. AnaVANET-basic-command
  11. NEMOSigtraces.log, UDPtraces.log, UDPtraces_position.xml and distances.log are generated. processor new files
  12. NEMOSigtraces.log
    Trace file of NEMO signaling (Binding Upate (BU), Binding Acknowlegement(BA)). The first two lines of the following example shows that the binding update is successfully registered in the HA (Time 19:51:37.978 and 19:51:48.979). In contrast, the binding updates sent from MR3 to RSU2 is dropped in the last two lines of the example (Time 19:51:59.979 and 19:52:0.982). The number of hops the packet relayed is recorded after the time.
      19:51:37.978 3 MR3(RSU2) RSU2(MR3x) MR3x(MR3)
      19:51:48.979 3 MR3(RSU2) RSU2(MR3x) MR3x(MR3)
      19:51:59.979 1 MR3(RSU2)
      19:52:0.982 1 MR3(RSU2)
    
    UDPtraces.log
    The Trace file if UDP packets. The first two lines of the following example shows that the packets sent from MR3 is received in RSU2. The two rest lines shows that the packets sent from MR3 is received in RSU1. In other words, handover is triggered between time of 19:53:16 and 19:53:24.
      19:53:16.941 2 MR3(RSU2) RSU2(RSU2)
      19:53:16.945 2 MR3(RSU2) RSU2(RSU2)
      19:53:24.23 2 MR3(RSU1) RSU1(RSU1)
      19:53:24.23 2 MR3(RSU1) RSU1(RSU1)
    
    UDPtraces_position.xml
    This file is the one second statistics used in the Google Maps viewer.
    <marker date="3/2/2011" time="18:51:34" dateL="3/2/2011" timeL="19:51:13" lat_MR3="48.83783435821533" lng_MR3="2.099832110106945" speed_MR3="0.09260000000000002" lat_RSU1="48.83770191669464" lng_RSU1="2.101257346570492" speed_RSU1="0.0" lat_RSU2="48.83815002441406" lng_RSU2="2.0986740216612816" speed_RSU2="0.0" distance_MR3_RSU1="105.47162577420258" distance_RSU1_RSU2="195.7590989206364" PDRlink_MR3_RSU2="0" PDRlink_RSU2_RSU2="0" PDRlink_MR3_RSU1="0" PDRlink_RSU1_RSU1="0" PDR="0" bytes="0" bandwidth="0.0" jitter="0" rtt="0" NEMO_status="0" />
    
    distances.log
    A temporary file. Do not care.

AnaVANET-processor parameters to process your own data

  1. Open packet-processor/src/anavanet/packettrace/PacketTracer.java and check the time zone of hardware time. If it uses UTC, keep DIFF_UTC_TIME = 0, otherwise specify the gap between used time zone.
        // Difference between Madrid/Paris time and UTC time, in hours // Summer time =-1, Winter =-2 
        private static final int DIFF_UTC_TIME = 0;
    
  2. When you process UDP packets, open packet-processor/src/anavanet/packettrace/PacketTracer.java and check the total packet size of the UDP packets. AnaVANET ignores the packets except for the packets with the specified size.
        // When iperf with 1300 Bites, it will be 1442 by adding 142 bits of C2C NET header
        // GN6 == 1444 (old) // new == 1432
        private static final int IPERF_PACKET_SIZE = 1432;
    

AnaVANET-viewer

  1. Downloads web-viewer-v0.2.zip and unzip it.
  2. Change the permission of index.cgi as executable.
  3. $ chmod +x index.cgi
  4. Change the permission of data directory as readable and writable.
  5. $ chmod 777 data/ data/json data/upload
  6. Edit the first line of index.cgi with the correct path of perl. You can check the path of perl in your environment by the following command.
      $ which perl
      /opt/local/bin/perl
    
    In this case, please edit the first line of index.cgi as follow.
      #!/opt/local/bin/perl
    
  7. Execute index.cgi with command line. This command returns error anyway.
  8.  $ perl index.cgi
      Can't locate FindBin/Real.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.14.2 /usr/local/share/perl/5.14.2 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.14 /usr/share/perl/5.14 /usr/local/lib/site_perl .) at index.cgi line 4.
      BEGIN failed--compilation aborted at index.cgi line 4.
    
  9. If the error says lack of the perl modules, Install the necessary modules like the following commands. If the type of errors are not like above, but like bellow, you already have all necessary perl modules. Please skip installing perl modules.
  10.  $ sudo cpan
      cpan[1]> install FindBin::Real
      cpan[2]> install Try::Tiny
      cpan[3]> install JSON::XS
      cpan[4]> install Text::Xslate
    
  11. Continue above installation untill the error message gives following error.
  12.   $ perl index.cgi
      [Sun Nov 11 16:33:03 2012] index.cgi: Use of uninitialized value $req_method in hash element at index.cgi line 32.
      [Sun Nov 11 16:33:03 2012] index.cgi: Use of uninitialized value in subroutine entry at index.cgi line 41.
      <h1>Software error:</h1>
      <pre>Can't use string (&quot;&quot;) as a subroutine ref while &quot;strict refs&quot; in use at index.cgi line 41.
      </pre>
      <p>
      For help, please send mail to this site's webmaster, giving this error message
      and the time and date of the error.
      
      </p>
      [Sun Nov 11 16:33:03 2012] index.cgi: Can't use string ("") as a subroutine ref while "strict refs" in use at index.cgi line 41.
    
  13. Access web-viewer-v0.2/ directory with your browser (example: http://localhost/~username/AnaVANET/web-viewer-v0.2/). If your localhost runs apache2 webserver, you will see the screen like this. Drag and drop the UDPtraces_position.xml file that you have generated with the packet-processor program as in the following figure. For MAC users, see Install and configure Apache, MySQL, PHP on OSX 10.8 Mountain Lion.
  14. (If you could not see the page, check apache2 setting. Here is mine.)
  15.   <Directory "/Users/tsukada/Sites/">
        AddHandler cgi-script .cgi
        Options Indexes MultiViews ExecCGI
        DirectoryIndex index.html index.cgi
        #AllowOverride All
        #Order allow,deny
        Allow from all
      </Directory>
    web-viewer-v0.2
  16. Click the new green line. Convert is success if "SUCCESS: convert" appears.
  17. convert-success
  18. Click the "Link" in the newly created table line. You will see the following page. Congratulations!!
  19. anavanet-screenshot
  20. Press space key to play. 'n' key to next step. 'p' key to previous step. Click the button on the top right corner of the screen.
  21. Playback control and the other functions are removed from the core functions of AnaVANET in order to keep the core functionality as simple as possible. See the AnaVANET demonstration for more advanced features in web-viewer. All the HTML and javascripts are accessible via the browser. The HTML and javascript is based on Twitter bootstrap.

Experiments

About Scripts in experiment

If you read until this place, you already download the scripts used in the past experiment, because 2011-handover-data-sample.zip is the complete backup of the experiment took place in 2011. All the scripts and the configuration files are thus in it.

  2011-handover-data-sample/
  ├── OBU4/
  │   ├── startOBU.sh
  │   ├── itsnet.conf
  │   ├── radvd.conf
  │   └── mip6d.conf
  ├── RSU/
  │   ├── startRSU.sh
  │   ├── radvd.conf
  │   └── imara-bt7.txt
  ├── RSU2/
  │   ├── startRSU.sh
  │   ├── radvd.conf
  │   └── imara-bt20.txt
  ├── Receiver/
  │   └── outdoor-recv.sh
  └── Sender/
      └── outdoor-sender.sh

Usage of the scripts

Edit the script and configuration and then, launch the scripts (startOBU.sh and startRSU.sh) in both OBU and RSU like follows

  OBU4 # ./startOBU.sh
  RSU1 # ./startRSU.sh
  RSU2 # ./startRSU.sh

Now the routing setup and AnaVANET setup is ready. Generate the UDP or ICMPv6 traffic by following commands.

In the case of UDP, the commands of receiver side is:

  UDP_Receiver # ./outdoor-recv.sh  --UDP
  or
  UDP_Receiver # iperf -s --format b -i .5 -V >> log.txt
The commands of sender side is:
  UDP_Sender # ./outdoor-sender.sh --UDP
  or
  UDP_Sender # iperf --client $DST --udp --format b -i .5 -V --time 900 --bandwidth 1000000 --len 1250 >>  log.txt

In the case of ICMPv6, only sender side needs a command as follows:

  ICMPv6_Sender # ./outdoor-sender.sh --UDP
  or
  ICMPv6_Sender # ping6 -i 0.5  $DST >> log.txt

About data

The TCPDUMP log taken in the experiments are converted to text file with the following commends.

$ tcpdump -r (dump_file) -xx -nn -s1500 > tcpdump.txt

The GPS log taken in the experiments are renamed. For example,

$ cp gps_MR_20110203-19-50-768999717.log gps.txt 

RSSI Heat Map

Downloads

2012-09-18-RSSI-test

The data of the experiments that was taken between fixed an access router and a moving vehicle in 2012. The sender access router sent UDP packet using Iperf and the receiver vehicle recorded the log of GPS and TCPDUMP. (14.5 MB)

sync_geo_rssi
A set of perl programs to process the GPS and TCPDUMP log taken in the experiments.
  AnaVANET/  (recommend to create this directory)
  ├── 2012-09-18-RSSI-test/
  │     ├── gps.txt
  │     └── moni.pcap
  └── sync_geo_rssi/
        ├── lib/
        ├── nmea.pl
        ├── readme.txt
        ├── rssi.pl
        ├── sync_gps_rssi.pl
        └── t/

Usage

  1. Downloads 2012-09-18-RSSI-test.zip and sync_geo_rssi.zip. And unzip them in the same directory.
  2. Go sync_geo_rssi/ and type the following command in order to generate a json format file from the GPS log and the TCPDUMP log. See "readme.txt" in sync_geo_rssi/ more detail about the usage of sync_gps_rssi.pl
  3.   $ ./sync_gps_rssi.pl > ../web-viewer-v0.2/data/rssi/20120918150814_sync_rssi_gps.json
    
  4. (Install perl module of JSON::XS and Class::Accessor::Lite, if necessary in the previous step.)
  5. Access RSSI Heat map page with specifying your json file name (example: http://localhost/~username/AnaVANET/web-viewer-v0.2/?rssi=20120918150814). You will see the following page. Congratulations!!
  6. rssi_heatmap-screenshot
  7. See the AnaVANET demonstration for more advanced features in web-viewer. All the HTML and javascripts are accessible via the browser. The HTML and javascript is based on Twitter bootstrap.

Development

under constraction