Daily Archives: August 1, 2012

(Testing) Network Data collection – Demo Pt 5.3

I am going to work through my last article, where I explained how to generate the required files to run my Java code here 

SETUP

I connect my laptop and android phone to the same Wi-Fi network and get there private IP addresses:

  • The server (my laptop) –  192.168.14.245
  • The client (my android phone) – 192.168.14.47

IperfOutput.txt 

If ./adb shell returns error:device not found then wait a few seconds before trying again. This is because there can be a slight delay between plugging an android device and its being recognised.

Terminal 1
heidi@ubuntu:~$ cd Downloads/android-sdk-linux/platform-tools/
heidi@ubuntu:~/Downloads/android-sdk-linux/platform-tools$ ./adb shell
# iperf -u -c 192.168.14.245 -t 100
————————————————————
Client connecting to 192.168.14.245, UDP port 5001
Sending 1470 byte datagrams
UDP buffer size:  110 KByte (default)
————————————————————
[  3] local 192.168.14.47 port 52285 connected with 192.168.14.245 port 5001
[ ID] Interval       Transfer     Bandwidth
[  3]  0.0-100.0 sec  12.5 MBytes  1.05 Mbits/sec
[  3] Sent 8918 datagrams
[  3] Server Report:
[  3]  0.0-100.0 sec  12.5 MBytes  1.05 Mbits/sec   1.783 ms   10/ 8918 (0.11%)
[Ctrl-C]

Terminal 2
heidi@ubuntu:~$ cd TestingSignpostAppOutput/
heidi@ubuntu:~/TestingSignpostAppOutput$ iperf -s -u >> IperfOutput.txt
[Ctrl-C]

Data Collection for Latency, Goodput & Jitter – Demo Pt 5.2

Everyone who I have spoken to about my work since yesterday, has asked me the same question. Why are you writing this in Java ? The answer is that I am going on the Google European Android Development Camp in a few weeks so I am using Java were possible in my work so that I can get familiar with the basics again.

To ensure that the server (my laptop) and the client (my android phone) can address each other I ensure that they are behind the same NAT so that private IP addresses can be used. This ensures that both devices can initialize an connect with the other

My Java code for analyzing and comparing Signpost Diagnostic Application to the results generated by Iperf and Ping, requires the following files:

  • SignOutput.txt – this is generated by the Signpost Diagnostic Application, It can be generated by:
    • Hard coding the server IP address into the application code, found here
    • Uninstall previous versions of the application and connect the android phone via USB
    • Within eclipse, load the application onto the android phone
    • cd into Downloads/android-sdk-linux/platform-tools
    • In another terminal, cd into the location of the demo server and start server using ./server.native
    • use “./adb logcat-s SIGPST >> SignOutput.txt”
    • The location of the file SignOutput.txt is now Downloads/android-sdk-linux/platform-tools, copy the file to /TestingSignpostAppOutput
  • IperfOutput.txt – this is generated by a remote shell on the Android phone, it can be generated by:
    • (In terminal 1) cd into Downloads/android-sdk-linux/platform-tools
    • connect android phone via USB
    • use “./adb shell” to start a remote shell
    • in another terminal (terminal 2), cd into /TestingSignpostAppOutput so output file is loaded straight into correct directory
    • (In terminal 2) use  iperf -s -u >> IperfOutput.txt
    • (In terminal 1) use iperf -u -c {insert laptop IP}
  • PingDownstreamOutput.txt – this is generated by the server sending pings to the client (the android phone), it can be generated by:
    • cd into  /TestingSignpostAppOutput so output file is loaded straight into correct directory
    • Run a bash script containing the following:
    • #!/bin/bashfor i in {1..10}
      do
      ping {insert phone IP} -c 10 -n -q >>

      PingDownstreamOutput.txt;
      done

  • PingUpstreamOutput.txt – this is generated by the client (android phone) sending pings to the server, it can be generated by:
    • cd into Downloads/android-sdk-linux/platform-tools
    • Save a bash script (lets call it pingUp) containing the following
    • #!/bin/bashfor i in {1..10}
      do
      ping {insert laptop IP} -c 10 -n -q >>

      PingUpstreamOutput.txt;
      done

    • Connect android phone via USB and copy script to SD cards using  ./adb push pingUp / sdcard/   “
    •  use “./adb shell” to start a remote shell
    • In the remote shell cd into /sdcard
    • In the remote shell run the script using ./pingUp
    • exit the remote shell
    • cd into  /TestingSignpostAppOutput
    • copy the PingUpstreamOutput.txt file to the laptop from the android phone using “./adb pull /sdcard/PingUpstreamOutput.txt

Once you have generated all of these files then you can run my program SignpostOutputAnalysis.java found here which should output the average true and estimated latency, goodput and jitter.
The code in SignpostOutputAnalysis.java is still incomplete and untested, I also have not yet tested my instructions for generating the correct files at the correct locations for the java code to be ran. I will be doing this testing next…