= ALOE OFDM Transmitter Demo = We describe in this page how to download the OFDM transmitter demo we presented at COST-Terra Summer School 2012. Main Features: * Bandwidth 2-20 MHz * FFT size 128-2048 points * Turbo-encoding * Cyclic-Prefix * Run-time reconfiguration * '''E2E Latency: 4 ms''' (constant and non-random) * Distributed processing (tested with 2 processors and Gigabit Ethernet) * GUI: signal visualization, execution time monitoring, etc. This version is unstable. Therefore, please don't hesitate to send your questions or comments to our [http://groups.google.com/group/flexnets Maillist]. == Download and install == 1) Prerequisites: * Linux operating (tested on Ubuntu) * Only the [http://www.gnu.org/software/readline/ readline] library is required to install ALOE. The [http://www.fftw.org/ FFTW] library is required by the OFDM waveform. Both libraries should be installed before installing the ALOE OFDM Demo package. If you want to use the USRP, make sure you have the [http://ettus-apps.sourcerepo.com/redmine/ettus/projects/uhd/wiki/ UHD] drivers is installed before installing ALOE. 2) Download the latest ALOE unstable version from http://flexnets.upc.edu/downloads/aloe-ctss-demo-1.5.0.tar.gz 3) Untar, uncompress and cd into created directory 4) Configure, compile and install {{{ ./configure make sudo make install }}} 5) Add the following lines to /etc/sysctl.conf file {{{ kernel.msgmnb=1048576 kernel.msgmax=10485760 kernel.msgmni=1024 }}} and run {{{ sudo sysctl -p }}} 6) Run the MAC-TEST to obtain your processor performance: {{{ sudo runcf -t NOFCORES 1000000 }}} replacing NOFCORES with the number of cores in your processor (the second parameter tells the MAC-TEST to run one million MAC operations). For example, in a quad-core, type {{{ sudo runcf -t 4 1000000 }}} and you may obtain something like this: {{{ child 2: 1344192127:118 -> 1344192127:1561 diff: 0:1443 693 MMACS child 3: 1344192127:117 -> 1344192127:1561 diff: 0:1444 692 MMACS child 1: 1344192127:214 -> 1344192127:1597 diff: 0:1383 723 MMACS child 0: 1344192127:214 -> 1344192127:1597 diff: 0:1383 723 MMACS parent: 1344192126:183204->1344192127:3329 diff: 0:820125 }}} Now change the ''mops'' field in /usr/local/etc/platform.conf to contain the number of MMACS of child 0 as otained in the test. == Running the Demo application == 1) Run core framework from the '''downloaded directory''' (i.e. aloe-ctss-1.5.0/). Requires root privileges to set real-time scheduler {{{ sudo runcf }}} 2) In the command prompt, run {{{ load ofdm128 init ofdm128 run ofdm128 }}} to load, initialize and run the OFDM-128 application. Now you can check the waveform is running with the command {{{ execinfo ofdm128 }}} 3) The OFDM bandwidth can be modified at run-time with: {{{ statset ofdm128 source fftsize 256 statset ofdm128 source fftsize 512 }}} to change the fft size to 256 and 512, respectively (4 and 8 MHz bandwidth). By default, the framework will use one processor only from your computer. If you have a multi-core processor, edit the 'nof_cores' option in /usr/local/etc/platform.conf file. The OFDM application should runs perfectly on a 2.5 GHz Intel Dual-core processor using one core only. The 512 mode produces frequent real-time faults (printed stdout). This mode works correctly on a Dual-core environment. == USRP == If the [http://ettus-apps.sourcerepo.com/redmine/ettus/projects/uhd/wiki/ UHD] driver is installed before running ALOE's configure script, the OFDM waveform will send the samples to the USRP. In the configuration file '''/usr/local/etc/platform.conf''' (need root privileges) you'll see something like this: {{{ ## DAC SELECT. Use dac_tx/dac_rx modules to send/recv samples to dac's. # Available dacs: # x5-400: use the pci-e x5-400 daughterboard from innovation logic # soundcard: use jack libraries to access soundcard's dac # udh: use Universal Hardware Driver to access USRP # none: disable dac dac { name=none dac_drives_clock=no #Select dac configuration file. Read dac's documentation. cfg_dac=usrp.conf } }}} Just change the field '''name=none''' by {{{ name=uhd }}} Now you need to choose the transmit center frequency, which depends on your device. Edit the file '''/usr/local/etc/usrp.conf''' and look for the section {{{ tx { samp_freq=1777778 freq=2400000000 gain=30.0 bw=0.0 blocksize=960 } }}} Only the '''freq''' and '''gain''' options needs to be configured. The rest of the parameters define the initial working mode. The OFDM application, however, modifies the sampling frequency and blocksize at runtime, depending on the transmission mode. Now run again the core framework (''sudo runcf'' command) and from the command prompt, load, init and run the OFDM application as described in the previous section. Try again to change the fftsize and you should observe in an spectrum analyser that the transmitter is using more or less bandwidth. == Distributed Processing == In a distributed environment, one of the processors acts as the MASTER. The MASTER node runs the so called Manager Daemons. The aloe-ctss package already provides the configuration for running the demo with two computers connected by an Ethernet. 1) Download and install ALOE in two computers 2) Setup your network, making sure you have full TCP and UDP connectivity between both computers. 3) In the SLAVE node, edit file /usr/local/etc/xitf1.conf and replace 192.168.1.1 by the ip address of your MASTER node. 4) In the MASTER node, run the core framework {{{ sudo runcf }}} 5) In the SLAVE node, run the core framework indicating that the configuration file is platform1.conf: {{{ sudo runcf -c hw_api/lnx/cfg/platform1.conf }}} 6) In the MASTER node, you should see messages indicating that the new processor has been detected. 7) In the MASTER node, enter the load/init/run command sequence to begin start the waveform. Use {{{ execinfo ofdm128 }}} command to check whether the waveform modules have been mapped to the two processors or not. If the waveform only uses one processor, try loading the '''ofdm512''' application (which requires more computing resources).