• Cedric Roux's avatar
    channel_simulator: ability to connect a real USRP device to the simulator · e793a677
    Cedric Roux authored
    This commit introduces the ability to connect a real hardware device to
    the channel simulator.
    
    It is possible to run an eNB with the libchannel_simulator.so as
    liboai_device.so and the "usrp" program and have both connected
    as if the eNB was directly talking to the USRP device.
    
    For that, a channel can now have a "sample_advance". (The USRP receives
    data from the air for subframe N and sends data for subframe N+x in the
    future. In this commit x = 2 subframes.)
    
    The following commands can be run to connect an eNB and the "usrp"
    program in FDD mode with 25 RBs.
    
    First, run the the channel simulator. In the directory channel_simulator:
    
        ./channel_simulator
    
    To run usrp, as root, in the directory channel_simulator/usrp:
    
        ./usrp
    
    To run the eNB, as root:
    
        CHANNEL_SIMULATOR_RX_FREQUENCY=2 CHANNEL_SIMULATOR_TX_FREQUENCY=1 CHANNEL_SIMULATOR_TX_SAMPLE_ADVANCE=15360 ./lte-softmodem -O [config file]
    
    Then it is possible to connect a COTS UE.
    
    It is also possible to connect openair UE which uses libchannel_simulator.so
    as liboai_device.so. For that, run, as root:
    
        CHANNEL_SIMULATOR_RX_FREQUENCY=1 CHANNEL_SIMULATOR_TX_FREQUENCY=2 CHANNEL_SIMULATOR_RX_SAMPLE_ADVANCE=15360 ./lte-uesoftmodem -C 2680000000 -r 25 --ue-rxgain 140 --nokrnmod
    
    Connecting both the openair UE and a COTS UE, it is possible to send traffic
    between the two.
    
    Note: performances need to be improved.
    
    Note 2: the program "channel_simulator" now requires AVX2 instruction set.
    e793a677
channel_simulator.c 12.4 KB