OpenAirInterface Gnu/OCTAVE Interface
All code for the Gnu/OCTAVE interface is found in:
targets/ARCH/EXMIMO/USERSPACE/OCTAVE
ExpressMIMO interface
Compilation
The OCTAVE scripts can be compiled using the ./build_oai script located in the directory cmake_targets by typing:
./build_oai -w EXMIMO
They are also automatically compiled when you compile the lte-softmodem for the ExpressMIMO target.
In case your compiler complains about missing SSE instructions you need to add the corresponding flags directly in the scrip /usr/bin/mkoctfile at line 83 it should look like this:
${XTRA_CXXFLAGS="-mieee-fp -msse2"}
You can also make the OCTAVE interface scripts using the old Makefile in $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OCTAVE:
make oarf
Usage
This section explains basic information regarding the use of OpenAirInterface Hardware in Gnu/OCTAVE.
Before using any of the following commands, the kernel module and firmware needs to loaded (see ExpressMIMO).
The Gnu/OCTAVE Interface provides:
- Configuration command:
oarf_config_exmimo(see online help for parameters) - Signal acquisition:
sig = oarf_get_frame(card) - Signal generation:
oarf_send_frame(card,sig,nbits) - Stop signal generation:
oarf_stop(card)
Example codes are given in the following scripts:
rx_spec.m: configures the cards, grabs a frame, plots spectrumtx_sig.m: generates a signal and sends it to the card
-- @florian.kaltenberger - 22 Apr 2013
GPIB Interface
This section explains how to use the National Instruments GPIB-USB-B interface to remotely controll the Rhode&Schwarz signal generator.
Installation
-
install
fxload(using Ubuntusynapticorapt-get install) -
download the Linux GPIB driver sourcecode from http://linux-gpib.sourceforge.net/. The tarball should also include the firmware for the National Instruments GPIB-USB-B hardware. For the GPIB-USB-HS no additional firmware is needed.
-
untar, move to
/usr/local/share -
./configure,make,make install -
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/ -
copy the configuration file
gpib.confattached below to/etc/ -
For GPIB-USB-B
- add hotplug rule to
/etc/udev/rulesto load firmware automatically when the GPIB-USB-B is connected (if this does not work out it can also be done manually) - if the hotplug does not work, the script
launch_gpib.sh(attached below, also in repository) can be used to start up the GPIB-USB-B device- connect the GPIB-USB-B device
- use
lsusbto find out the bus and device number of the device - enter bus and device number in the
launch_gpib.shscript - execute the script
- add hotplug rule to
-
For GPIB-USB-HS
-
just execute the last two lines of the script
launch_gpib.sh:gpib_config chmod a+rw /dev/gpib0
-
-
To compile the GPIB OCTAVE interface type
make gpib_send.oct
Usage Example
gpib_card=0; % first GPIB PCI card in the computer
gpib_device=28; % this is configured in the signal generator Utilities->System->GPIB->Address menu
gpib_send(gpib_card,gpib_device,'*RST;*CLS'); % reset and configure the signal generator
gpib_send(gpib_card,gpib_device,'POW -70dBm'); % set output signal power
gpib_send(gpib_card,gpib_device,'FREQ 1.91860'); % set frequency
gpib_send(gpib_card,gpib_device,'OUTP:STAT ON'); % activate output
Automatic Signal Generator (SMBV) Configuration Over Sockets
It is possible to configure the R&S SMBV signal generator automatically from both downlink link-level simulation (dlsim) and system-level simulation (oaisim).
More precisely, the simulation generates a config-file containing the configuration commands, which then can be used to remotely configure the E-UTRA DOWNLINK of the SMBV.
Usage
To generate a config-file, both dlsim and oaisim have to be compiled with the option SMBV=1. To run the simulations, no further options are required.
However, if the SMBV is to be configured automatically after the simulation, the option -W<ip-adress> is provided,
where -W0 sends the commands to the default IP adress.
In oaisim, it is possible to "record" up to 4 frames, i.e., in the file oaisim.c one can specify a maximum of 4
frames for which all control information (PDCCH) and data (PDSCH) will be used to configure the SMBV.
Examples
dlsim:
./dlsim -x1 -S7 -R1 -m8will configure subframe 7, i.e., program a UE-specific DCI that allocates all 25 RBs for a PDSCH with MCS=8../dlsim -x1 -S5 -R1 -r6 -m18 -W192.168.1.23will configure subframe 5, program a UE-specific DCI that allocates 6 RBs for a PDSCH with MCS=16 AND send the commands to the SMBV with IP adress 192.168.1.23.
In both examples, when programming the SMBV a data list will be created containing the payload bits from the simulation. That is, the SMBV will encode the same payload as in the simulation.
oaisim:
-
In
oaisim.c, set the variableconfig_frames[4] = {2,9,10,11}then run./oaisim -x1 -AAWGN -s30 -n20 -W0. This will configure 4 frames in the SMBV corresponding to frames 2,9,10 and 11 in the simulation.These frames contain SI, Random-Access Response and the RRCConnectionSetup. This configuration can be used to test the connection procedure with the real-time hardware. For the connection setup to succeed the lte-softmodem has to be compiled with SMBV=1 as well. This ensures that both the PRACH preamble and the contention resolution message are fixed.
Known Limitations
- PHICH is not recorded
- Only for 4 frames are recorded, could be made more flexible by allowing two or more frames in the simulation to merge into one frame in the SMBV
- Only Downlink configuration is available
- After configuration, when switching from K55 mode "Auto" to "Manual" in order to add DCIs and then switch back, turns on all PDCCH, which are configured with P-RNTI to avoid accidental decoding by user
- Parameters like Frequency, Level etc are left at their default values. Attention when connecting the SMBV to the hardware, the default output level of -30dBm might be to high
-- @florian.kaltenberger - 22 Apr 2013