| 1 | == MacSwitch == |
| 2 | |
| 3 | |
| 4 | This tutorial is to show an interesting application on GNU Radio in Orbit Testbed. The considerable flexibility provided by GNU Radio gives us an idea to implement the MAC protocols adaption -- TDMA/CSMA Switch. With dual-radio structure of each Orbit node, we implement control channel on WiFi radio to distribute control messages and data channel on GNU Radio to transmit data packets only. |
| 5 | |
| 6 | |
| 7 | == Prerequisites == |
| 8 | |
| 9 | |
| 10 | Before you jump into this tutorial, you should have a clear picture on what GNU Radio is and how Orbit testbed works. A recommended document is GNU Radio Document in Orbit http://www.orbit-lab.org/wiki/Documentation/GNURadio. Besides, GNU Radio nodes in Orbit have different types of daughter boards which operate at different frequency ranges. Be aware of the nodes' configurations (http://www.winlab.rutgers.edu/~therom/research.htm) before starting your experiments. |
| 11 | |
| 12 | |
| 13 | == Start Mac Switch == |
| 14 | |
| 15 | |
| 16 | Step 1: Image the nodes |
| 17 | |
| 18 | imageNodes [[1,19],[1,2],[20,19],[20,2],[10,11]] therom_gnu_demo3.ndz |
| 19 | |
| 20 | Step 2: Power up and log in to the nodes |
| 21 | |
| 22 | Step 3: Setup control channel wireless interface |
| 23 | |
| 24 | If Atheros wireless card: |
| 25 | wlanconfig athx destroy (Destroy the VAP, athx) |
| 26 | |
| 27 | wlanconfig athx create wlandev wifi0 wlanmode adhoc (Create an adhoc VAP) |
| 28 | |
| 29 | iwconfig athx essid test |
| 30 | |
| 31 | iwconfig athx freq 2.412G rate 11M |
| 32 | |
| 33 | ifconfig athx 192.168.200.x |
| 34 | |
| 35 | If Intel wireless card: |
| 36 | iwconfig ethx mode ad-hoc |
| 37 | |
| 38 | iwconfig ethx essid test |
| 39 | |
| 40 | iwconfig athx freq 2.412G rate 11M |
| 41 | |
| 42 | ifconfig athx 192.168.200.x |
| 43 | |
| 44 | Make sure the control interfaces are setting up correctly by pinging each other |
| 45 | |
| 46 | Step 4: Setup TDMA time synchronization server at node (10,11) by executing |
| 47 | |
| 48 | python TDMA_server.py |
| 49 | |
| 50 | Step 5: Execute the file |
| 51 | |
| 52 | python ctrlplane_switch3_UDP_pkt500.py |
| 53 | |
| 54 | (1). Please Input Network Interface: |
| 55 | |
| 56 | Please enter the related control wireless interface to this node |
| 57 | |
| 58 | (2). If join the network, please press 1: |
| 59 | |
| 60 | If you want to let this node join the network, press 1 and then the node will start to send beacons |
| 61 | |
| 62 | (3). If sending packet, please press 1: (Define the transmitter by pressing 1) |
| 63 | |
| 64 | Please Input destination address: (Define the receiver's control plane IP address) |
| 65 | |
| 66 | The data transmission starts and the transmitter will do MAC switch if the throughput drops 20% in the 3 seconds interval. |