== !MacSwitch (Obsolete) == [[TOC(Tutorials/k0SDR*)]] 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. === Prerequisites === 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. === Start Mac Switch === Step 1: Image the nodes {{{ imageNodes [[1,19],[1,2],[20,19],[20,2],[10,11]] therom_gnu_demo3.ndz }}} Step 2: Power up and log in to the nodes Step 3: Setup control channel wireless interface If Atheros wireless card: {{{ wlanconfig athx destroy (Destroy the VAP, athx) wlanconfig athx create wlandev wifi0 wlanmode adhoc (Create an adhoc VAP) iwconfig athx essid test iwconfig athx freq 2.412G rate 11M ifconfig athx 192.168.200.x }}} If Intel wireless card: {{{ iwconfig ethx mode ad-hoc iwconfig ethx essid test iwconfig athx freq 2.412G rate 11M ifconfig athx 192.168.200.x }}} Make sure the control interfaces are setting up correctly by pinging each other Step 4: Setup TDMA time synchronization server at node (10,11) by executing {{{ python TDMA_server.py }}} Step 5: Execute the file {{{ python ctrlplane_switch3_UDP_pkt500.py }}} (1). Please Input Network Interface: Please enter the related control wireless interface to this node (2). If join the network, please press 1: If you want to let this node join the network, press 1 and then the node will start to send beacons (3). If sending packet, please press 1: (Define the transmitter by pressing 1) Please Input destination address: (Define the receiver's control plane IP address) The data transmission starts and the transmitter will do MAC switch if the throughput drops 20% in the 3 seconds interval.