61 | | Instructions will follow soon... |
| 61 | Instructions below are not final yet... |
| 62 | |
| 63 | == Part 1: Wireless & mobile experimentation at w-iLab.t == |
| 64 | |
| 65 | === Reserve 3 wireless nodes using jFed === |
| 66 | |
| 67 | All of the w-iLab.t nodes have been previously reserved for the "GEC21" project. You should join this project prior to running the tutorial. |
| 68 | |
| 69 | Every group has 3 wireless nodes (2 fixed and 1 mobile) which you have to activate using jFed. You should choose specific nodes in jFed by right clicking the node. |
| 70 | Name them: ap, client and backup. See the table on the group sheets to see which nodes you can use. |
| 71 | |
| 72 | === Configure the access point (on the mobile node) === |
| 73 | |
| 74 | Before running the experiment, we will use the shell script option in the RSpec to install hostapd. |
| 75 | Go to the Raw RSpec view and add the following in the node part of the ap (first line is already there): |
| 76 | |
| 77 | {{{ |
| 78 | <sliver_type name="raw-pc"/> |
| 79 | <services> |
| 80 | <execute shell="sh" command="sudo apt-get update ; sudo apt-get install hostapd ; "/> |
| 81 | </services> |
| 82 | }}} |
| 83 | |
| 84 | === Configuration of Access Point (on your mobile node) === |
| 85 | |
| 86 | SSH to your mobile node (from jFed). Become root: |
| 87 | {{{ |
| 88 | $ sudo su |
| 89 | }}} |
| 90 | |
| 91 | Create a config file for the hostapd program: |
| 92 | {{{ |
| 93 | $ nano /root/hostapd.conf |
| 94 | }}} |
| 95 | |
| 96 | Add the following content to the config file (X=group number, Y=channel, Z=mode lines should be left aligned): |
| 97 | {{{ |
| 98 | interface=wlan0 |
| 99 | driver=nl80211 |
| 100 | country_code=BE |
| 101 | ssid=demoX |
| 102 | hw_mode=Z |
| 103 | channel=Y |
| 104 | }}} |
| 105 | |
| 106 | Replace X with your demo number. Replace Y with your channel and Z with the WiFi mode. |
| 107 | Start hostapd. The above config will setup an AP on wlan0 using 802.11a or g, channel Y, with SSID demoX: |
| 108 | {{{ |
| 109 | $ hostapd /root/hostapd.conf |
| 110 | }}} |
| 111 | |
| 112 | Open a second ssh terminal and give an IP address to the wlan0 interface so we can test the connection to the clients (in the next steps). Be sure to replace X with your group nummber: |
| 113 | {{{ |
| 114 | $ sudo su; ifconfig wlan0 192.168.X.1/24 |
| 115 | }}} |
| 116 | |
| 117 | === Configure the client (on one of the fixed nodes) === |
| 118 | |
| 119 | Become root: |
| 120 | {{{ |
| 121 | $ sudo su |
| 122 | }}} |
| 123 | |
| 124 | Put the wireless interface into managed mode and specify the SSID so it knows to which AP it should connect |
| 125 | {{{ |
| 126 | $ iwconfig wlan0 mode managed |
| 127 | $ iwconfig wlan0 essid demoX |
| 128 | }}} |
| 129 | |
| 130 | Specify an IP address and bring up the interface: |
| 131 | {{{ |
| 132 | $ ifconfig wlan0 192.168.X.10/24 up |
| 133 | }}} |
| 134 | |
| 135 | Check if you can ping the AP: |
| 136 | {{{ |
| 137 | $ ping 192.168.X.1 |
| 138 | }}} |
| 139 | |
| 140 | === iPerf measurement === |
| 141 | |
| 142 | Start an iPerf server instance (UDP in this case) on the mobile node (AP): |
| 143 | {{{ |
| 144 | $ iperf -s -u -i 1 & |
| 145 | }}} |
| 146 | |
| 147 | Configure the iPerf client: |
| 148 | {{{ |
| 149 | $ iperf -u -c 192.168.X.1 -b 40M -i 1 -t 6000 |
| 150 | }}} |
| 151 | |
| 152 | If the iperf reports an actual 40Mbit/sec throughput, you probably lost the connection. |
| 153 | By tweaking the transmit power (values of 0 to 20dBm) of the access point, you should be able to see a difference in throughput of the iPerf stream: |
| 154 | {{{ |
| 155 | $ iwconfig wlan0 txpower <0-20> |
| 156 | }}} |
| 157 | |
| 158 | For this tutorial, leave the txpower to 20 for the first experiment runs. If the effect of moving the mobile node is too limited, you can try lowering the txpower. |
| 159 | Note that each antenna at the w-iLab.t is equipped with a 10dB attenuator (so 20dB attenuation per link). |
| 160 | |
| 161 | === Move the mobile node === |
| 162 | Once everything works fine, you can start driving the mobile node and check the impact on the iPerf throutput. |
| 163 | The robot control software can be accessed at [http://robotcontrol.wilab2.ilabt.iminds.be robotcontrol.wilab2.ilabt.iminds.be]. |
| 164 | You can log in with the demoX accounts. For example, the demo5 account will give you the rights to move mobile5. |
| 165 | Instructions on how to use the framework: [http://ilabt.iminds.be/wilabt/use/mobilitytoolkit http://ilabt.iminds.be/wilabt/use/mobilitytoolkit] , scroll down to “Setting up paths”. |
| 166 | VERY IMPORTANT : You will only be able to SSH to the mobile node while it is docked. (If you want an SSH connection during your experiment, you will have to set up a wireless connection to a fixed node and SSH over the wireless.) |
| 167 | |
| 168 | |
| 169 | == Part 2: Mobile experimentation using Labwiki == |
| 170 | |
| 171 | In this part, you will learn how to run experiments using the Labwiki tool. This tool uses the OMF framework in combination with the OML measurement library. |
| 172 | |
| 173 | === Prepare your experiment === |
| 174 | Go to [http://labwiki.test.atlantis.ugent.be http://labwiki.test.atlantis.ugent.be], click the prepare text field and type "gec21iperf". You should see a drop down list with some files. Select the gec21iperf.oedl file. |
| 175 | Since this version of labwiki only has one user account at the moment, you should copy the contents of this experiment file and create a file with your group number in the file name. Click CTRL-A, followed by CTRL-C and then click the wheel icon. Choose a name for your file (without the .oedl extension), select OEDL and click Create. |
| 176 | Now paste (CTRL-V) the contents of the experiment in the field below and click the Save button. |
| 177 | |
| 178 | The presentation at the beginning of the session should have given enough explanation to understand this experiment description file. |
| 179 | |
| 180 | Change the properties "sender" and "receiver" so they reflect the hostnames of your resources. |
| 181 | |
| 182 | === Prepare your mobile scenario === |
| 183 | Go to [http://robotcontrol.wilab2.ilabt.iminds.be http://robotcontrol.wilab2.ilabt.iminds.be] and start drawing a scenario for your mobile node. |
| 184 | If you are done, click the Save button and copy the list of coordinates. |
| 185 | |
| 186 | |
| 187 | |
| 188 | Be sure to issue the following command when you dock the robot again, otherwise you will not be able to run more experiments. |
| 189 | {{{ |
| 190 | $ /usr/bin/killall ruby ; /etc/init.d/omf_rc start |
| 191 | }}} |
| 192 | |