[[PageOutline]] = Tutorial: Wireless experiments using the iMinds w-iLab.t testbed = == Live Stream Information == TBD == Schedule == Tuesday 10.30am - 12.30pm == Tutorial Instructors == {{{ #!html
Pieter Becue
iMinds
Brecht Vermeulen
iMinds
Thijs Walcarius
iMinds

}}} == Agenda Details == == Prerequisites == - A GENI account, if you don't have one [wiki:SignMeUp sign up!] ==== Please Arrive With: ==== A Laptop, preferable with the following tools pre-installed: * a recent Java7 version * a recent version of Chrome browser or Safari (if you want to use the Robot Control Dashboard) == How to get Help == * Always ask your tutors (tutorial helper/presenter/TA) first. They are the fastest way to solve the problem. * If you are using a specific aggregate or tool, you should consider registering in their [wiki:NikySandbox/GENIExperimenter/GENICommunity#Joinusermailinglists mailing list]. It is a great way to get connected with other GENI users and it is an excellent source of wisdom. * Send mail to the GENI help list: [mailto:help@geni.net] or the [https://groups.google.com/forum/#!forum/geni-users geni-users forum] * If you want to chat real-time with other GENI users and ask questions, [wiki:HowTo/ConnectToGENIChatRoom join us] in a GENI chatroom. ==== Results ==== == Tutorial materials == If you have not attended the session, please read the general introduction to the [http://doc.ilabt.iminds.be/ilabt-documentation/wilabfacility.html iMinds w-iLab.t testbed] before starting this tutorial. Tutorial outline: In this tutorial, we will show you how to set up one wireless access point and connect with 1 client. The access point will start an iPerf server instance, after which we will run an iPerf client instance on the second node. By using the correct IP addresses, we make sure that the iPerf traffic stream is routed over the wireless interfaces. In this tutorial, we will use a fixed wireless node for setting up the access point. The client will be running on a mobile node. After successfully setting up the iPerf stream, we will demonstrate how the mobile nodes can be configured to drive a pre-determined path. In a second part of the tutorial, we will demonstrate how to use OMF/OML & Labwiki to run wireless experiment on the w-iLab.t testbed, including mobile nodes. Using the graph plotting capabilities of Labwiki, you will be able to visualise the iPerf throughput. == Part 1: Wireless & mobile experimentation at w-iLab.t == === Join the ipv6proxy project === Login to the [https://portal.geni.net/ GENI portal], click on ''Use GENI'' and browse down to ''My Projects''. Now click ''Join a Project'' and type ''ipv6'' in the search box. Click the ''Join'' button next to the ''ipv6project'', browse down and click ''Send join request''. This step is needed to be able to connect to the iMinds testbed nodes, as they are fully IPv6 enabled. Once you get approved, your ''My projects'' page should look like this: {{{ #!html }}} === Download your GENI certificate === Login to the [https://portal.geni.net/ GENI portal] and browse to the [https://portal.geni.net/secure/profile.php profile page]. Now go to the [https://portal.geni.net/secure/profile.php#ssl ssl tab] and click on ''Download your SSL certificate and key''. {{{ #!html }}} Click ''Download Your Portal Generated Certificate and Private Key'' on the next page. Store the resulting .pem-file somewhere on your hard drive, you will need it in the next steps. {{{ #!html }}} === Generate a pkcs12 file and import it into your browser === This step is needed to be able to reserve nodes at the iMinds w-iLab.t testbed and access the Robot Control Dashboard. Fire up jFed by browsing to the [http://portal.geni.net GENI portal] and click on ''Use GENI''. Browse down to the tools and click ''jFed''. {{{ #!html }}} If all goes well, you should be prompted to provide your User certificate and Password. Browse to the location where you stored the .pem-file (see previous step), provide your password and click ''Login''. Once jFed is started, click on ''Preferences'', select ''User details'' and save your login as PKCS12. Store the resulting .p12-file somewhere on your hard drive. {{{ #!html }}} Windows users(Chrome): Browse to the location where you stored the .p12-file and double-click it. Follow the instructions on screen to add your credentials to the certificate store.[[BR]] Linux/MAC OSX users: Import your .p12 file in the certificate store of your browser. === Reserve some nodes at w-iLab.t === Browse to the [https://www.wilab2.ilabt.iminds.be:12369/reservation/sfareservation.php3 w-iLab.t reservation page]. If the previous step was successful, you should now be prompted to select your certificate. Once the page has loaded, please verify that the last part of the User URN matches your own user name. {{{ #!html }}} Don't touch the start and end time and click on 'Get Free Nodes'. Every group should reserve 3 wireless nodes for this tutorial. See the table below to see which nodes are available for your group number (you will receive your group sheet from the tutors). Select them in the list and click ''Reserve''. Refresh your page to see your reservation in the table. If everything worked out fine, you should see the following: {{{ #!html }}} ||Group||Channel||Mode||AP||Rcomm||Robot ||1||1||g||zotacB1||zotacB3||mobile1 ||2||6||g||zotacB2||zotacB4||mobile2 ||3||11||g||zotacC1||zotacC3||mobile3 ||4||36||a||zotacC2||zotacC4||mobile4 ||5||40||a||zotacD1||zotacD3||mobile5 ||6||44||a||zotacD2||zotacD4||mobile6 ||7||1||g||zotacE1||zotacE3||mobile7 ||8||6||g||zotacE2||zotacE4||mobile8 ||9||11||g||zotacF1||zotacF3||mobile9 ||10||36||a||zotacF2||zotacG3||mobile10 ||11||40||a||zotacG2||zotacH2||mobile11 ||12||44||a||zotacG1||zotacH1||mobile12 ||13||1||g||zotacI1||zotacI3||mobile13 ||14||6||g||zotacI2||zotacJ1||mobile14 === Activate your nodes using jFed === Follow these steps to activate your nodes using jFed: * Fire up jFed by browsing to the [http://portal.geni.net GENI portal], go down to the tools and select ''jFed''. If all goes well, you should be prompted to provide your User certificate and Password. Browse to the location where you stored the .pem-file (see previous steps), provide your password and click 'Login'. * If this is the first time you are using jFed to activate nodes in the iMinds w-iLab.t testbed, you have to enable the proxy first. Click on ''Preferences'', select the ''Proxy'' tab and click ''Run Proxy Test''. Select the ''Always'' option for both ''Proxy for jFed'' and ''Proxy for SSH connections''. {{{ #!html }}} * Click on ''New'' * Drag in 3 wireless nodes * Right click, ''Configure Node'' to change the properties (name/testbed/disk image/specific node) * Name your nodes as shown in the table above, or chose your own names (you will need the names later on for the Labwiki tutorial) * By default, the ''iMinds WiLab 2'' testbed should be selected (because we picked wireless nodes) * For every node, select a specific node from the list (see table above) {{{ #!html }}} * Click ''Run'' to start your slice (Green arrow on the top left) and fill in a unique name for your slice. {{{ #!html }}} When all nodes turn green, your experiment is succesfully activated. {{{ #!html }}} === Configuration of Access Point === SSH to your AP node (double click it in jFed). Become root: {{{ $ sudo su }}} Create a config file for the hostapd program: {{{ $ nano /root/hostapd.conf }}} Add the following content to the config file (X=group number, Y=channel, Z=mode ; lines should be left aligned ; check your group sheets): {{{ interface=wlan0 driver=nl80211 country_code=BE ssid=demoX hw_mode=Z channel=Y }}} Replace X with your demo number. Replace Y with your channel and Z with the WiFi mode (see table above). Start hostapd. The above config will setup an AP on wlan0 using 802.11a or g, channel Y, with SSID demoX: {{{ $ hostapd /root/hostapd.conf }}} 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: {{{ $ sudo su; ifconfig wlan0 192.168.X.1/24 }}} Running the ''ifconfig'' command should show a wlan0 and mon.wlan0 interface: {{{ #!html }}} === Configure the mobile node(robot) as client === Become root: {{{ $ sudo su }}} Put the wireless interface into managed mode and specify the SSID so it knows to which AP it should connect {{{ $ iwconfig wlan0 mode managed $ iwconfig wlan0 essid demoX }}} Specify an IP address and bring up the interface: {{{ $ ifconfig wlan0 192.168.X.10/24 up }}} Running ''iwconfig'' should show that wlan0 is connected to an access point with your ESSID: {{{ #!html }}} Check if you can ping the AP: {{{ $ ping 192.168.X.1 }}} === iPerf measurement === Start an iPerf server instance (UDP in this case) on the AP: {{{ $ iperf -s -u -i 1 }}} Configure the iPerf client (on the robot): {{{ $ iperf -u -c 192.168.X.1 -b 30M -i 1 -t 6000 & }}} On the server, you should see some output like below: {{{ #!html }}} By tweaking the transmit power (values of 0 to 17dBm) of the access point, you should be able to see a difference in throughput of the iPerf stream: {{{ $ iwconfig wlan0 txpower <0-17> }}} For this tutorial, leave the txpower set to default (17 or 20dBm) for the first experiment runs. If the effect of moving the mobile node is too limited, you can try lowering the txpower. Note that each antenna at the w-iLab.t is equipped with a 10dB attenuator (so 20dB attenuation per link). === Move the mobile node === Once everything works fine, you can start driving the mobile node and check the impact on the iPerf throutput. Note that you will lose your SSH connection to the robot when it is no longer in its docking station. The Robot Dashboard can be accessed at [http://robotcontrol.wilab2.ilabt.iminds.be robotcontrol.wilab2.ilabt.iminds.be]. If you imported your p12 certificate into your browser, you can login by clicking the red key (top right of the dashboard). Select the ''Fed4FIRE SFA'' tab and click ''Login''. If you now hover over the key (hopefully not red anymore), it should show your login name. You will only be able to move robots which are reserved by you. {{{ #!html }}} Now start drawing a path for your robot by selecting the robot ID on the top left of the Robot Dashboard. On the top left, you can also choose between straight paths and bezier curves. [[BR]] Always start your path by clicking on its ''Safe zone'' (the circle below the charging station with the ID of the robot in it) and dragging towards a location of your choice. Be sure that you don't cross any obstacles (marked in yellow or blue). If you do cross obstacles, the Robot Dashboard will tell you (and you will not be allowed to start driving that path). Add some more segments to your path and make sure that your robots returns somewhere near its safe zone (circle with ID of the robot) at the end of your scenario. {{{ #!html }}} If you are satisfied with your path, click the ''Live'' button, followed by ''Action''. Go to the ''User'' tab, select ''Auto Undock'' and hit the ''Send'' button. '''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.) {{{ #!html }}} Click on ''Initialize'' to taxi the robots to their starting position (check the top right of the robot dashboard for errors). If no errors occured, hit the ''Play'' button. You should now see the status of your robot changing to ''Active'' and see it moving around. {{{ #!html }}} At the end of your experiment, click on ''Actions'' again, go to the ''User'' tab, select ''Auto dock'' and hit ''Send'' to park the robot in its docking station. If the robot is too far away from its docking station, you should use the ''Safe Return'' option, which will automatically search for the shortest path towards its docking station. == Part 2: Mobile experimentation using Labwiki == 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. For more info on OMF, OML, Labwiki, please visit : * [http://omf.mytestbed.net OMF Home page] * [http://oml.mytestbed.net OML Home page] * [http://labwiki.mytestbed.net Labwiki Home page] === Prepare your mobile scenario === Go to [http://robotcontrol.wilab2.ilabt.iminds.be http://robotcontrol.wilab2.ilabt.iminds.be] and start drawing a scenario for your mobile node. If you are done, click the Save button and copy the list of coordinates. {{{ #!html }}} SSH to your robot communicator (Rcomm) node, create a file in the root directory and paste the csv coordinates in the file. {{{ $ sudo su $ nano /root/path.csv }}} === Prepare your experiment === Go to [http://labwiki.test.atlantis.ugent.be:4000 http://labwiki.test.atlantis.ugent.be:4000], click the prepare text field and type ''gec21Wilab''. You should see a drop down list with some files. Select the ''gec21WilabMobile.oedl'' file. {{{ #!html }}} 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 (or name) 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. {{{ #!html }}} Now paste (CTRL-V) the contents of the experiment in the field below and click the Save button.[[BR]] The presentation at the beginning of the session should have given enough explanation to understand this experiment description file. Be sure to issue the following command (on all 3 nodes(ap,rcomm,robot)) before running any labwiki experiment. This will start the OMF6 resource controller on your nodes, so labwiki can control them.[[BR]] You can easily use jFed for this: go to the ''Timeline Viewer'' and click on ''Instant''. Select all 3 nodes and type the following command: {{{ $ sudo /share/robots/startOMF.sh }}} {{{ #!html }}} Drag & drop the page-icon (with the crayon) over to the ''Execute'' field. Now change the properties with as value ''REPLACE ME'' so they reflect your setup. It is very important that the names of your slice and your nodes are exact matches to the names you chose in jFed. Be sure you type them in '''lower case''' !! {{{ #!html }}} Hit the ''Start Experiment'' button if you are finished. After some time, you should see some output like below: {{{ #!html }}} Slides: * [Powerpoint version] * [PDF version]