Commit d0f0e5e7 authored by gauthier's avatar gauthier

Merge branch 'develop' into bugfix-33-RRCConnectionRequest_with_STMSI

parents c383e50b 1d390bd4
......@@ -133,9 +133,6 @@ else (CMAKE_SYSTEM_PROCESSOR STREQUAL "armv7l")
if (CPUINFO MATCHES "avx2")
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -mavx2")
endif()
if (CPUINFO MATCHES "sse4_2")
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -msse4.2")
endif()
if (CPUINFO MATCHES "sse4_1")
set(C_FLAGS_PROCESSOR "${C_FLAGS_PROCESSOR} -msse4.1")
endif()
......@@ -149,8 +146,8 @@ set(C_FLAGS_PROCESSOR " ${C_FLAGS_PROCESSOR} ${CFLAGS_PROCESSOR_USER}")
Message("C_FLAGS_PROCESSOR is ${C_FLAGS_PROCESSOR}")
if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86")
if ( (NOT( C_FLAGS_PROCESSOR MATCHES "ssse3")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.1")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.2")) )
Message(FATAL_ERROR "For x86 Architecture, you must have following flags: -mssse3 -msse4.1 -msse4.2. The current detected flags are: ${C_FLAGS_PROCESSOR}. You can pass the flags manually in build script, for example: ./build_oai --cflags_processor \"-mssse3 -msse4.1 -msse4.2\" ")
if ( (NOT( C_FLAGS_PROCESSOR MATCHES "ssse3")) OR (NOT( C_FLAGS_PROCESSOR MATCHES "msse4.1")) )
Message(FATAL_ERROR "For x86 Architecture, you must have following flags: -mssse3 -msse4.1. The current detected flags are: ${C_FLAGS_PROCESSOR}. You can pass the flags manually in build script, for example: ./build_oai --cflags_processor \"-mssse3 -msse4.1\" ")
endif()
endif()
......@@ -462,6 +459,7 @@ add_boolean_option(ENABLE_SECURITY True "Enable LTE integrity and ciphe
add_boolean_option(ENABLE_USE_MME True "eNB connected to MME (INTERFACE S1-C), not standalone eNB")
add_boolean_option(NO_RRM True "DO WE HAVE A RADIO RESSOURCE MANAGER: NO")
add_boolean_option(USER_MODE True "????")
add_boolean_option(RRC_DEFAULT_RAB_IS_AM False "set the RLC mode to AM for the default bearer")
add_boolean_option(OAI_NW_DRIVER_TYPE_ETHERNET False "????")
add_boolean_option(DISABLE_USE_NAS False "???")
......@@ -1649,7 +1647,7 @@ foreach(myExe s1ap
${OPENAIR3_DIR}/TEST/test_${myExe}.c
)
target_link_libraries (test_${myExe}
-Wl,--start-group SECU_CN UTIL LFDS -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES} fdproto fdcore
-Wl,--start-group SECU_CN UTIL LFDS -Wl,--end-group m rt crypt ${CRYPTO_LIBRARIES} ${OPENSSL_LIBRARIES} ${NETTLE_LIBRARIES} ${CONFIG_LIBRARIES}
)
endforeach(myExe)
......
cmake_minimum_required(VERSION 2.8)
set(OAI_NW_DRIVER_TYPE_ETHERNET True)
set(OAI_NW_DRIVER_USE_NETLINK True)
set(NAS_NETLINK True)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set(ADDR_CONF False)
set(DEBUG_OMG False)
set(DISABLE_XER_PRINT False)
set(DRIVER2013 False)
set(ENABLE_FXP True)
set(ENABLE_ITTI True)
set(ENABLE_NAS_UE_LOGGING False)
set(ENABLE_NEW_MULTICAST True)
set(ENABLE_PGM_TRANSPORT True)
set(ENABLE_RAL False)
set(ENABLE_SECURITY False)
set(ENABLE_USE_CPU_EXECUTION_TIME True)
set(ENABLE_USE_MME False)
set(ENABLE_VCD_FIFO True)
set(HARD_RT False)
set(JUMBO_FRAME True)
set(LARGE_SCALE False)
set(LINK_ENB_PDCP_TO_GTPV1U False)
set(LINUX_LIST False)
set(LINUX True)
set(LOCALIZATION False)
set(LOG_NO_THREAD True)
set(LOWLATENCY False)
set(MAC_CONTEXT 1)
set(MAX_NUM_CCs 1)
set(MIH_C_MEDIEVAL_EXTENSIONS False)
set(MSG_PRINT False)
set(MU_RECEIVER False)
set(NAS_ADDRESS_FIX true)
set(NAS_NETLINK True)
set(NAS_UE True)
set(NEW_FFT True)
set(NO_RRM True)
set(OAI_EMU True)
set(OAI_EMU True)
set(OAI_NW_DRIVER_TYPE_ETHERNET True)
set(OPENAIR1 False)
set(OPENAIR2 True)
set(OPENAIR_EMU True)
set(OPENAIR_LTE True)
set (PACKAGE_NAME "oaisim")
set(PACKAGE_NAME "oaisim")
set(PBS_SIM False)
set(PC_DSP False)
set(PC_TARGET False)
set(PDCP_MSG_PRINT False)
set(PERFECT_CE False)
set(PHY_ABSTRACTION True)
set(PHY_ABSTRACTION True)
set(PHY_EMUL False)
set(PHYSIM False)
set(PUCCH True)
set(RANDOM_BF False)
set(RF_BOARD "NoBoard")
set(RLC_STOP_ON_LOST_PDU True)
set(RRC_ASN1_VERSION Rel8)
set(RRC_ASN1_VERSION "Rel8")
set(RRC_MSG_PRINT False)
set(RTAI False)
set(SECU False)
set(SMBV False)
set(SPECTRA False)
set(TEST_OMG False)
set(USE_3GPP_ADDR_AS_LINK_ADDR False)
set(USE_MME False)
set(USER_MODE True)
set(XER_PRINT False)
set(XFORMS False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set ( ADDR_CONF False )
set ( DEBUG_OMG False )
set ( DISABLE_USE_NAS False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 False )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PGM_TRANSPORT True )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False )
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME False )
set ( ENABLE_VCD_FIFO True )
set ( ENB_MODE True )
set ( EPC_BUILD False )
set ( HARD_RT False )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False )
set ( LINK_ENB_PDCP_TO_IP_DRIVER False )
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD True )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX False )
set ( NAS_BUILT_IN_EPC False )
set ( NAS_BUILT_IN_UE False )
set ( NAS_MME False )
set ( NAS_NETLINK False )
set ( NAS_UE False )
set ( NB_ANTENNAS_RX 2 )
set ( NB_ANTENNAS_TX 2 )
set ( NB_ANTENNAS_TXRX 2 )
set ( NEW_FFT True )
set ( NO_RRM True )
set ( OAI_EMU True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET True )
set ( OAI_NW_DRIVER_USE_NETLINK False )
set ( OAISIM True )
set ( OPENAIR1 False )
set ( OPENAIR2 True )
set ( OPENAIR_EMU False )
set ( OPENAIR_LTE True )
set ( PBS_SIM False )
set ( PC_DSP False )
set ( PC_TARGET False )
set ( PDCP_MSG_PRINT False )
set ( PDCP_USE_NETLINK_QUEUES False )
set ( PDCP_USE_NETLINK True )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION True )
set ( PHY_CONTEXT 1 )
set ( PHY_EMUL False )
set ( PHYSIM False )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD False )
set ( RLC_STOP_ON_LOST_PDU True )
set ( RRC_ASN1_VERSION Rel10 )
set ( RRC_DEFAULT_RAB_IS_AM False )
set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( S1AP_LIMIT_STREAM_ID_TO_1 False )
set ( S1AP_VERSION R10 )
set ( SMBV False )
set ( SPECTRA False )
set ( STOP_ON_IP_TRAFFIC_OVERLOAD False )
set ( TEST_OMG False )
set ( TRACE_RLC_AM_BO False )
set ( TRACE_RLC_AM_FREE_SDU False )
set ( TRACE_RLC_AM_HOLE False )
set ( TRACE_RLC_AM_PDU True )
set ( TRACE_RLC_AM_RESEGMENT False )
set ( TRACE_RLC_AM_RX_DECODE False )
set ( TRACE_RLC_AM_RX False )
set ( TRACE_RLC_AM_STATUS_CREATION False )
set ( TRACE_RLC_AM_TX False )
set ( TRACE_RLC_AM_TX_STATUS False )
set ( TRACE_RLC_PAYLOAD False )
set ( TRACE_RLC_UM_DAR False )
set ( TRACE_RLC_UM_DISPLAY_ASCII_DATA False )
set ( TRACE_RLC_UM_PDU True )
set ( TRACE_RLC_UM_RX False )
set ( TRACE_RLC_UM_SEGMENT False )
set ( TRACE_RLC_UM_TX_STATUS False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME False )
set ( USER_MODE True )
set ( XER_PRINT False )
set ( XFORMS False )
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( ADDR_CONF False )
set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PGM_TRANSPORT True )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False)
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True )
set ( EXMIMO_IOT True )
set ( HARD_RT False )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False)
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD 1 )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX True )
set ( NAS_BUILT_IN_UE False)
set ( NAS_MME False )
set ( NAS_UE False )
set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" )
set ( NB_ANTENNAS_TXRX "2" )
set ( NEW_FFT True )
set ( NO_RRM True )
set ( OAI_EMU True )
set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET True )
set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR1 True )
set ( OPENAIR2 True )
set ( OPENAIR_EMU False )
set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "oaisim" )
set ( PBS_SIM False )
set ( PDCP_USE_NETLINK True )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION True )
set ( PHY_CONTEXT False )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD "False" )
set ( RRC_ASN1_VERSION "Rel10" )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( SECU False )
set ( SMBV False )
set ( SPECTRA False )
set ( TEST_OMG False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" )
set ( USER_MODE True )
set ( XER_PRINT False )
set ( XFORMS False )
set ( PRINT_STATS False )
set ( RRC_ASN1_VERSION "Rel10")
set ( ENABLE_VCD_FIFO False )
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( ADDR_CONF False )
set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PGM_TRANSPORT True )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False)
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True )
set ( EXMIMO_IOT True )
set ( HARD_RT False )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False)
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD 1 )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX True )
set ( NAS_BUILT_IN_UE False)
set ( NAS_MME False )
set ( NAS_UE False )
set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" )
set ( NB_ANTENNAS_TXRX "2" )
set ( NEW_FFT True )
set ( NO_RRM True )
set ( OAI_EMU True )
set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET True )
set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR1 True )
set ( OPENAIR2 True )
set ( OPENAIR_EMU False )
set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "oaisim" )
set ( PBS_SIM False )
set ( PDCP_USE_NETLINK True )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION True )
set ( PHY_CONTEXT False )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD "False" )
set ( RRC_ASN1_VERSION "Rel10" )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( SECU False )
set ( SMBV False )
set ( SPECTRA False )
set ( TEST_OMG False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" )
set ( USER_MODE True )
set ( XER_PRINT False )
set ( XFORMS False )
set ( PRINT_STATS False )
set ( RRC_ASN1_VERSION "Rel10")
set ( ENABLE_VCD_FIFO False )
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( ADDR_CONF False )
set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PGM_TRANSPORT True )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False)
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True )
set ( EXMIMO_IOT True )
set ( HARD_RT False )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False)
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD 1 )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX True )
set ( NAS_BUILT_IN_UE False)
set ( NAS_MME False )
set ( NAS_UE False )
set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" )
set ( NB_ANTENNAS_TXRX "2" )
set ( NEW_FFT True )
set ( NO_RRM True )
set ( OAI_EMU True )
set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET True )
set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR1 True )
set ( OPENAIR2 True )
set ( OPENAIR_EMU False )
set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "oaisim" )
set ( PBS_SIM False )
set ( PDCP_USE_NETLINK True )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION True )
set ( PHY_CONTEXT False )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD "False" )
set ( RRC_ASN1_VERSION "Rel10" )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( SECU False )
set ( SMBV False )
set ( SPECTRA False )
set ( TEST_OMG False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" )
set ( USER_MODE True )
set ( XER_PRINT False )
set ( XFORMS False )
set ( PRINT_STATS False )
set ( RRC_ASN1_VERSION "Rel10")
set ( ENABLE_VCD_FIFO False )
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( ADDR_CONF False )
set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PGM_TRANSPORT True )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False)
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True )
set ( EXMIMO_IOT True )
set ( HARD_RT False )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False)
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD 1 )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX True )
set ( NAS_BUILT_IN_UE False)
set ( NAS_MME False )
set ( NAS_UE False )
set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" )
set ( NB_ANTENNAS_TXRX "2" )
set ( NEW_FFT True )
set ( NO_RRM True )
set ( OAI_EMU True )
set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET True )
set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR1 True )
set ( OPENAIR2 True )
set ( OPENAIR_EMU False )
set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "oaisim" )
set ( PBS_SIM False )
set ( PDCP_USE_NETLINK True )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION True )
set ( PHY_CONTEXT False )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD "False" )
set ( RRC_ASN1_VERSION "Rel10" )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( SECU False )
set ( SMBV False )
set ( SPECTRA False )
set ( TEST_OMG False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" )
set ( USER_MODE True )
set ( XER_PRINT False )
set ( XFORMS False )
set ( PRINT_STATS False )
set ( RRC_ASN1_VERSION "Rel10")
set ( ENABLE_VCD_FIFO False )
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( ADDR_CONF False )
set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PGM_TRANSPORT True )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False)
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True )
set ( EXMIMO_IOT True )
set ( HARD_RT False )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False)
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD 1 )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX True )
set ( NAS_BUILT_IN_UE False)
set ( NAS_MME False )
set ( NAS_UE False )
set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" )
set ( NB_ANTENNAS_TXRX "2" )
set ( NEW_FFT True )
set ( NO_RRM True )
set ( OAI_EMU True )
set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET True )
set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR1 True )
set ( OPENAIR2 True )
set ( OPENAIR_EMU False )
set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "oaisim" )
set ( PBS_SIM False )
set ( PDCP_USE_NETLINK True )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION True )
set ( PHY_CONTEXT False )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD "False" )
set ( RRC_ASN1_VERSION "Rel10" )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( SECU False )
set ( SMBV False )
set ( SPECTRA False )
set ( TEST_OMG False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" )
set ( USER_MODE True )
set ( XER_PRINT False )
set ( XFORMS False )
set ( PRINT_STATS False )
set ( RRC_ASN1_VERSION "Rel10")
set ( ENABLE_VCD_FIFO False )
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set ( CMAKE_BUILD_TYPE "RelWithDebInfo" )
set ( ADDR_CONF False )
set ( DEBUG_OMG False )
set ( DISABLE_XER_PRINT False )
set ( DRIVER2013 True )
set ( EMOS False )
set ( ENABLE_FXP True )
set ( ENABLE_ITTI True )
set ( ENABLE_NAS_UE_LOGGING False )
set ( ENABLE_NEW_MULTICAST True )
set ( ENABLE_PGM_TRANSPORT True )
set ( ENABLE_RAL False )
set ( ENABLE_SECURITY False )
set ( ENABLE_STANDALONE_EPC False)
set ( ENABLE_USE_CPU_EXECUTION_TIME True )
set ( ENABLE_USE_MME False )
set ( ENABLE_USE_RAW_SOCKET_FOR_SGI False)
set ( ENABLE_VCD_FIFO False )
set ( ENB_MODE True )
set ( EXMIMO_IOT True )
set ( HARD_RT False )
set ( JUMBO_FRAME True )
set ( LARGE_SCALE False )
set ( LINK_ENB_PDCP_TO_GTPV1U False)
set ( LINUX_LIST False )
set ( LINUX True )
set ( LOCALIZATION False )
set ( LOG_NO_THREAD 1 )
set ( LOWLATENCY False )
set ( MAC_CONTEXT 1 )
set ( MAX_NUM_CCs 1 )
set ( MESSAGE_CHART_GENERATOR False )
set ( MESSAGE_CHART_GENERATOR_RLC_MAC False )
set ( MESSAGE_CHART_GENERATOR_PHY False )
set ( MIH_C_MEDIEVAL_EXTENSIONS False )
set ( MSG_PRINT False )
set ( MU_RECEIVER False )
set ( NAS_ADDRESS_FIX True )
set ( NAS_BUILT_IN_UE False)
set ( NAS_MME False )
set ( NAS_UE False )
set ( NB_ANTENNAS_RX "2" )
set ( NB_ANTENNAS_TX "2" )
set ( NB_ANTENNAS_TXRX "2" )
set ( NEW_FFT True )
set ( NO_RRM True )
set ( OAI_EMU True )
set ( OAISIM True )
set ( OAI_NW_DRIVER_TYPE_ETHERNET True )
set ( OAI_NW_DRIVER_USE_NETLINK True )
set ( OPENAIR1 True )
set ( OPENAIR2 True )
set ( OPENAIR_EMU False )
set ( OPENAIR_LTE True )
set ( PACKAGE_NAME "oaisim" )
set ( PBS_SIM False )
set ( PDCP_USE_NETLINK True )
set ( PC_DSP True )
set ( PC_TARGET True )
set ( PDCP_MSG_PRINT False )
set ( PERFECT_CE False )
set ( PHY_ABSTRACTION True )
set ( PHY_CONTEXT False )
set ( PHY_EMUL False )
set ( PHYSIM True )
set ( PUCCH True )
set ( RANDOM_BF False )
set ( RF_BOARD "False" )
set ( RRC_ASN1_VERSION "Rel10" )
set ( RLC_STOP_ON_LOST_PDU False )
set ( RRC_MSG_PRINT False )
set ( RTAI False )
set ( SECU False )
set ( SMBV False )
set ( SPECTRA False )
set ( TEST_OMG False )
set ( USE_3GPP_ADDR_AS_LINK_ADDR False )
set ( USE_MME "R10" )
set ( USER_MODE True )
set ( XER_PRINT False )
set ( XFORMS False )
set ( PRINT_STATS False )
set ( RRC_ASN1_VERSION "Rel10")
set ( ENABLE_VCD_FIFO False )
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
......@@ -5,7 +5,7 @@ set(RF_BOARD None)
set(XFORMS False)
set(DEBUG_PHY False)
set(MU_RECIEVER Flase)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
......
......@@ -5,7 +5,7 @@ set(RF_BOARD None)
set(XFORMS False)
set(DEBUG_PHY False)
set(MU_RECIEVER Flase)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
......
......@@ -5,7 +5,7 @@ set(RF_BOARD None)
set(XFORMS False)
set(DEBUG_PHY False)
set(MU_RECIEVER Flase)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
......
......@@ -5,7 +5,7 @@ set(RF_BOARD None)
set(XFORMS False)
set(DEBUG_PHY False)
set(MU_RECIEVER Flase)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
......
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True)
set(RF_BOARD None)
set(XFORMS False)
set(DEBUG_PHY False)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True)
set(RF_BOARD None)
set(XFORMS False)
set(DEBUG_PHY False)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True)
set(RF_BOARD None)
set(XFORMS False)
set(DEBUG_PHY False)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True)
set(RF_BOARD None)
set(XFORMS False)
set(DEBUG_PHY False)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True)
set(RF_BOARD None)
set(XFORMS False)
set(DEBUG_PHY False)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True)
set(RF_BOARD None)
set(XFORMS False)
set(DEBUG_PHY False)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True)
set(RF_BOARD None)
set(XFORMS False)
set(DEBUG_PHY False)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True)
set(RF_BOARD None)
set(XFORMS False)
set(DEBUG_PHY False)
set(MU_RECIEVER False)
set(RANDOM_BF False)
set(PBS_SIM False)
set(PERFECT_CE False)
set(NAS_UE False)
set(MESSAGE_CHART_GENERATOR False)
include(${CMAKE_CURRENT_SOURCE_DIR}/../../CMakeLists.txt)
This diff is collapsed.
This diff is collapsed.
#******************************************************************************
# Eurecom OpenAirInterface
# Copyright(c) 1999 - 2013 Eurecom
# This program is free software; you can redistribute it and/or modify it
# under the terms and conditions of the GNU General Public License,
# version 2, as published by the Free Software Foundation.
# This program is distributed in the hope it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
# The full GNU General Public License is included in this distribution in
# the file called "COPYING".
# Contact Information
# Openair Admin: openair_admin@eurecom.fr
# Openair Tech : openair_tech@eurecom.fr
# Forums : http://forums.eurecom.fsr/openairinterface
# Address : Eurecom, Compus SophiaTech 450, route des chappes, 06451 Biot, France
#*****************************************************************************
# \file log.py
# \brief provides primitives and defines how the logs and statistics are generated
# \author Navid Nikaein
# \date 2013
# \version 0.1
# @ingroup _test
import sys
import re
import time
import datetime
import array
import xml.etree.ElementTree as ET
debug = False
docfile = ''
start_time = time.time()
testcase_starttime = start_time
debug = 0
stats = {'passed':0, 'failed':0, 'skipped':0, 'internal_errors':0, 'cmd':0}
# xml result (jUnit like)
xUnitTestsuites = ET.Element( 'testsuites' )
xUnitTestsuite = ET.SubElement( xUnitTestsuites, 'testsuite' )
xUnitTestsuite.set( 'name', 'OAI' )
xUnitTestsuite.set( 'timestamp', datetime.datetime.fromtimestamp(start_time).strftime('%Y-%m-%dT%H:%M:%S') )
xUnitTestsuite.set( 'hostname', 'localhost' )
#xUnitSystemOut = ET.SubElement( xUnitTestsuite, 'system-out' )
class bcolors:
header = '\033[95m'
okblue = '\033[94m'
okgreen = '\033[92m'
warning = '\033[93m'
fail = '\033[91m'
normal = '\033[0m'
def __init__(self):
if not sys.stdout.isatty():
self.disable()
def disable(self):
self.header = ''
self.okblue = ''
self.okgreen = ''
self.warning = ''
self.fail = ''
self.normal = ''
class err(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return repr(self.value)
def writefile(logfile, message):
F_testlog = open(logfile, 'a')
F_testlog.write(message + '\n')
F_testlog.close()
def sleep(seconds):
time.sleep(seconds)
def start():
"""Start the timer for the following testcase."""
global testcase_starttime
testcase_starttime = time.time()
def set_debug_level(level):
debug = level
def statistics(logfile):
global start_time
#if stats['passed'] == 0:
# print "no test executed...exiting"
# sys.exit()
total_tests = stats['passed'] + stats['failed'] + stats['skipped']
total_ex_tests = stats['passed'] + stats['failed']
elapsed_time = time.gmtime(time.time() - start_time)
print '\n'
log_record('info', '===============================================')
log_record('info', 'Total tests performed ' + repr(total_tests))
log_record('info', 'Tests passed ' + repr(stats['passed']))
log_record('info', 'Tests failed ' + repr(stats['failed']))
log_record('info', 'Tests skipped ' + repr(stats['skipped']))
log_record('info', '')
log_record('info', 'Total commands sent ' + repr(stats['cmd']))
log_record('info', 'Total elapsed time (h:m:s) ' + time.strftime('%H:%M:%S', elapsed_time))
log_record('info', '===============================================')
log_record('info', 'Testing pass rate ' + repr((stats['passed'] * 100) / total_tests) + '%')
log_record('info', '===============================================')
writefile(logfile, '\n=====================Results===================')
writefile(logfile, 'Total tests performed ' + repr(total_tests))
writefile(logfile, 'Tests passed ' + repr(stats['passed']))
writefile(logfile, 'Tests failed ' + repr(stats['failed']))
writefile(logfile, 'Tests skipped ' + repr(stats['skipped']))
writefile(logfile, '')
writefile(logfile, 'Total commands sent ' + repr(stats['cmd']))
writefile(logfile, 'Total elapsed time (h:m:s) ' + time.strftime('%H:%M:%S', elapsed_time))
writefile(logfile, '===============================================')
writefile(logfile, 'Testing pass rate ' + repr((stats['passed'] * 100) / total_tests) + '%')
writefile(logfile, '===============================================\n')
xUnitTestsuite.set( 'tests', repr(total_tests) )
xUnitTestsuite.set( 'failures', repr(stats['failed']) )
xUnitTestsuite.set( 'skipped', repr(stats['skipped']) )
xUnitTestsuite.set( 'errors', '0' )
time_delta = datetime.datetime.now() - datetime.datetime.fromtimestamp(start_time)
xUnitTestsuite.set( 'time', repr(time_delta.total_seconds()) )
writefile( logfile + '.xml', ET.tostring( xUnitTestsuites, encoding="utf-8", method="xml" ) )
def log_record(level, message):
ts = time.strftime('%d %b %Y %H:%M')
message = ts + ' [' + level + '] ' + message
if level == 'passed' :
print bcolors.okgreen + message + bcolors.normal
elif level == 'failed' :
print bcolors.fail + message + bcolors.normal
elif level == 'skipped' :
print bcolors.warning + message + bcolors.normal
else :
print message
def fail(case, testnum, testname, conf, message, diag, output,trace):
# report(case, testnum, testname, conf, 'failed', output, diag, message)
report(case, testnum, testname, conf, 'failed', output, diag)
log_record('failed', case + testnum + ' : ' + testname + ' ('+ conf+')')
if message :
log_record('failed', "Output follows:\n" + message )
if trace :
log_record('failed', "trace file can be found in " + trace + "\n" )
stats['failed'] += 1
def failquiet(case, testnum, testname, conf):
log_record('failed', case + testnum + ' :' + testname + ' ('+ conf+')')
stats['failed'] += 1
def ok(case, testnum, testname, conf, message, output):
report(case, testnum, testname, conf, 'passed', output)
log_record('passed', case + testnum + ' : ' + testname + ' ('+ conf+')')
if message :
print bcolors.okgreen + message + bcolors.normal
stats['passed'] += 1
def skip(case, testnum, testname, conf, message=None, diag=None, output=None):
log_record('skipped', case + testnum + ' :' + testname + ' ('+ conf+')')
report(case, testnum, testname, conf, 'skipped', output, diag)
if message :
log_record('skipped', "Output follows:\n" + message )
if diag :
log_record('skipped', "Diagnostic: \n" + diag )
stats['skipped'] += 1
def report(case, test, name, conf, status, output, diag=None, desc=None):
writefile (output, '[' +status+ '] ' + case + test + ' : ' + name + ' ('+ conf+')')
if diag :
writefile (output, '-------> ' + diag)
if desc:
writefile(output, desc)
#log_record('report', + case + test + ' documented')
e = ET.SubElement( xUnitTestsuite, 'testcase' )
e.set( 'name', case + '_' + test + '_' + name )
e.set( 'classname', 'shellscript' )
e.set( 'time', repr( time.time() - testcase_starttime ) )
if status == 'failed':
e = ET.SubElement( e, 'failure' )
e.set( 'message', 'failed' )
e.text = diag
if status == 'skipped':
e = ET.SubElement( e, 'skipped' )
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/python
import time
import serial
import os
from pyroute2 import IPRoute
import sys
import re
import threading
import signal
import traceback
import os
# configure the serial connections (the parameters differs on the device you are connecting to)
#First we find an open port to work with
serial_port=''
ser=serial.Serial()
openair_dir = os.environ.get('OPENAIR_DIR')
if openair_dir == None:
print "Error getting OPENAIR_DIR environment variable"
sys.exit(1)
def find_open_port():
global serial_port, ser
max_ports=100
if os.path.exists(serial_port) == True:
return serial_port
for port in range(2,100):
serial_port = '/dev/ttyUSB'+str(port)
if os.path.exists(serial_port) == True:
print 'New Serial Port : ' + serial_port
break
ser = serial.Serial(port=serial_port)
return
find_open_port()
print 'Using Serial port : ' + serial_port
#serial_port = '/dev/ttyUSB2'
bandrich_ppd_config = os.environ.get('OPENAIR_DIR') + '/cmake_targets/autotests/tools/wdial.bandrich.conf'
exit_flag=0
def signal_handler(signal, frame):
print('You pressed Ctrl+C!')
print('Resetting the UE to detached state')
timeout=10
exit_flag=1
send_command('AT+CGATT=0' , 'OK' , timeout)
sys.exit(0)
signal.signal(signal.SIGINT, signal_handler)
#ser.open()
#ser.isOpen()
class pppThread (threading.Thread):
def __init__(self, threadID, name, counter):
threading.Thread.__init__(self)
self.threadID = threadID
self.name = name
self.counter = counter
def run(self):
print "Starting " + self.name
#Here we keep running pppd thread in indefinite loop as this script terminates sometimes
#while 1:
while 1:
time.sleep(5) #Hard coded, do not reduce this number!
print "Starting wvdial now..."
print 'exit_flag = ' + str(exit_flag)
send_command('AT+CGATT=1','OK', 300)
os.system('wvdial -C ' + bandrich_ppd_config + '' )
if exit_flag == 1:
print "Exit flag set to true. Exiting pppThread now"
print "Terminating wvdial now..."
def send_command (cmd, response, timeout):
count=0
sleep_duration = 1
print 'In function: send_command: cmd = <' + cmd + '> response: <' + response + '> \n'
global serial_port, ser
while count <= timeout:
try:
#Sometimes the port does not exist coz of reset in modem.
#In that case, we need to search for this port again
if os.path.exists(serial_port) == False:
find_open_port()
ser.write (cmd + '\r\n')
out = ''
time.sleep(sleep_duration)
count = count + sleep_duration
while ser.inWaiting() > 0:
out += ser.read(1)
print 'out = <' + out + '> response = <' + response + '> \n'
if re.search(response, out):
break
except Exception, e:
error = ' cmd : ' + cmd + ' response : ' + response
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
error = error + traceback.format_exc()
print error
def start_ue () :
#print 'Enter your commands below.\r\nInsert "exit" to leave the application.'
timeout=60 #timeout in seconds
send_command('AT', 'OK' , timeout)
send_command('AT+CFUN=1' , 'OK' , timeout)
#send_command('AT+CGATT=0' , 'OK' , timeout)
send_command('AT+CGATT=1','OK', 300)
#os.system('wvdial -C ' + bandrich_ppd_config + ' &' )
thread_ppp = pppThread(1, "ppp_thread", 1)
thread_ppp.start()
iface='ppp0'
while 1:
time.sleep ( 2)
#Now we check if ppp0 interface is up and running
try:
if exit_flag == 1:
break
ip = IPRoute()
idx = ip.link_lookup(ifname=iface)[0]
os.system ('route add 192.172.0.1 ppp0')
os.system ('ping -c 5 192.172.0.1')
break
except Exception, e:
error = ' Interface ' + iface + 'does not exist...'
error = error + ' In function: ' + sys._getframe().f_code.co_name + ': *** Caught exception: ' + str(e.__class__) + " : " + str( e)
error = error + traceback.format_exc()
print error
thread_ppp.join()
def stop_ue():
timeout=60
os.system('killall wvdial')
send_command('AT', 'OK' , timeout)
send_command('AT+CGATT=0' , 'OK|ERROR' , timeout)
send_command('AT+CFUN=4' , 'OK' , timeout)
for arg in sys.argv[1:]:
if arg == '--start-ue' :
start_ue()
elif arg == '--stop-ue' :
stop_ue()
else :
print " Script called with wrong arguments, arg = " + arg
sys.exit()
n=oarf_get_num_detected_cards;
for i=n-1:0
oarf_stop(i);
end
#!/bin/bash
################################################################################
# OpenAirInterface
# Copyright(c) 1999 - 2015 Eurecom
#
# OpenAirInterface is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
#
# OpenAirInterface is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenAirInterface.The full GNU General Public License is
# included in this distribution in the file called "COPYING". If not,
# see <http://www.gnu.org/licenses/>.
#
# Contact Information
# OpenAirInterface Admin: openair_admin@eurecom.fr
# OpenAirInterface Tech : openair_tech@eurecom.fr
# OpenAirInterface Dev : openair4g-devel@lists.eurecom.fr
#
# Address : Eurecom, Campus SophiaTech, 450 Route des Chappes, CS 50193 - 06904 Biot Sophia Antipolis cedex, FRANCE
#
################################################################################
# file init_nas_nos1
# brief loads the nasmesh module and sets up the radio bearers (used to provide ip interface without S1 interface)
# author Florian Kaltenberger
#
#######################################
load_module()
{
mod_name=${1##*/}
mod_name=${mod_name%.*}
if awk "/$mod_name/ {found=1 ;exit} END {if (found!=1) exit 1}" /proc/modules
then
echo "module $mod_name already loaded: I remove it first"
sudo rmmod $mod_name
fi
echo loading $mod_name
sudo insmod $1
}
function main()
{
PCI=`lspci -m | grep Xilinx`
if [ -z "$PCI" ]; then
echo "No card found. Stopping!"
return
fi
## This part corrects the wrong configuration of the endpoint done by the bios in some machines
echo "$PCI" | while read config_reg; do
SLOT_NUMBER=`echo $config_reg | awk -F\" '{print $1}'`
sudo setpci -s $SLOT_NUMBER 60.b=10
done
load_module $OPENAIR_DIR/targets/bin/openair_rf.ko
sleep 1
if [ ! -e /dev/openair0 ]; then
sudo mknod /dev/openair0 c 127 0
sudo chmod a+rw /dev/openair0
fi
DEVICE=`echo $PCI | awk -F\" '{print $(NF-1)}' | awk '{print $2}'`
DEVICE_SWID=${DEVICE:2:2}
if [ $DEVICE_SWID == '0a' ]; then
echo "Using firware version 10"
$OPENAIR_DIR/targets/bin/updatefw -s 0x43fffff0 -b -f $OPENAIR_TARGETS/ARCH/EXMIMO/USERSPACE/OAI_FW_INIT/sdr_expressmimo2_v10
else
echo 'No corresponding firmware found'
return
fi
}
main "$@"
#!/bin/bash
#$1 programs to be killed and checked
var=`ps -A |grep -E -i $1`
echo $var
if [ -n "$var" ]; then echo 'Match found'; else echo 'Match not found' ;fi
#!/usr/bin/python
import sys
import re
#Arg 1 name of file
#Arg 2 keyword
#arg 3 replacement text
#Note that these should be seperated by spaces
if len(sys.argv) != 4:
print "search_repl.py: Wrong number of arguments. This program needs 3 arguments"
sys.exit()
filename = sys.argv[1]
keyword = sys.argv[2]
replacement_text = sys.argv[3]
file = open(filename, 'r')
string = file.read()
file.close()
if keyword == 'mme_ip_address':
#string = (re.sub(r"mme_ip_address\s*=\s*\([^\$]+)\)\s*;\s*", r"<% tex \1 %>", t, re.M)
replacement_text = keyword + ' = ( { ' + replacement_text + ' } ) ; '
string = re.sub(r"mme_ip_address\s*=\s*\(([^\$]+?)\)\s*;", replacement_text, string, re.M)
else :
replacement_text = keyword + ' = ' + replacement_text + ' ; '
string = re.sub(r"%s\s*=\s*([^\$]+?)\s*;" % keyword , replacement_text, string, re.M)
#else :
# replacement_text = keyword + ' =\"' + replacement_text + '\" ; '
# string = re.sub(r"%s\s*=\s*\"([^\$]+?)\"\s*;" % keyword , replacement_text, string, re.M)
file = open(filename, 'w')
file.write(string)
file.close()
[Dialer Defaults]
Modem = /dev/ttyUSB0
ISDN = off
Modem Type = Analog Modem
Baud = 9600
Init = ATZ
Init2 = AT+CPIN?
Init3 = AT+CGREG?
Init4 = AT+COPS?
Init5 = AT+CSQ
Init6 =
Init7 = AT+CGATT=1
Init8 =
Init9 =
Phone = *99***1#
Phone1 =
Phone2 =
Phone3 =
Phone4 =
Dial Prefix =
Dial Attempts = 1
Dial Command = ATM1L3DT
Ask Password = off
Password = ''
Username = ImaginLab
Auto Reconnect = off
Abort on Busy = off
Carrier Check = on
Check Def Route = on
Abort on No Dialtone = on
Stupid Mode = on
Idle Seconds = 0
Auto DNS = on
;Minimize = off
;Dock = off
;Do NOT edit this file by hand!
......@@ -47,9 +47,14 @@ PRINT_STATS="False"
VCD_TIMING="False"
REL="Rel10"
HW="EXMIMO"
NOS1=0
EPC=0
VERBOSE_COMPILE=0
CFLAGS_PROCESSOR_USER=""
RUN_GROUP=0
TEST_CASE_GROUP=""
trap handle_ctrl_c INT
function print_help() {
echo_info '
......@@ -77,8 +82,6 @@ Options
Makes the LTE softmodem
--UE
Makes the UE specific parts (ue_ip, usim, nvram)
--EPC
Makes the EPC (MME-SPGW, HSS)
--RRH
Makes the RRH
-r | --3gpp-release
......@@ -95,6 +98,8 @@ Options
Makes the core security features unitary simulators
-s | --check
runs a set of auto-tests based on simulators and several compilation tests
--run-group
runs only specified test cases specified here. This flag is only valid with -s
-V | --vcd
Adds a debgging facility to the binary files: GUI with major internal synchronization events
-x | --xforms
......@@ -111,8 +116,8 @@ Options
Usage (first build):
oaisim (eNB + UE): ./build_oai -I -g --oaisim -x --install-system-files
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files
NI/ETTUS B201 + COTS UE : ./build_oai -I -g --eNB --EPC -x --install-system-files -w USRP
Eurecom EXMIMO + COTS UE : ./build_oai -I -g --eNB -x --install-system-files
NI/ETTUS B201 + COTS UE : ./build_oai -I -g --eNB -x --install-system-files -w USRP
Usage (Regular):
oaisim : ./build_oai --oaisim -x
Eurecom EXMIMO + OAI ENB : ./build_oai --eNB -x
......@@ -154,10 +159,6 @@ function main() {
UE=1
echo_info "Will compile UE"
shift;;
--EPC)
EPC=1
echo_info "Will compile EPC"
shift;;
--RRH)
RRH=1
echo_info "Will compile RRH"
......@@ -193,6 +194,11 @@ function main() {
OAI_TEST=1
echo_info "Will run auto-tests"
shift;;
--run-group)
RUN_GROUP=1
TEST_CASE_GROUP=$2
echo_info "executing test cases only in group: $TEST_CASE_GROUP"
shift 2;;
-V | --vcd)
echo_info "setting gtk-wave output"
VCD_TIMING=1
......@@ -265,12 +271,11 @@ function main() {
if [ "$HW" == "OAI_USRP" ] ; then
echo_info "installing packages for USRP support"
check_install_usrp_uhd_driver
fi
fi
if [ "$HW" == "OAI_BLADERF" ] ; then
echo_info "installing packages for BALDERF support"
check_install_bladerf_driver
fi
fi
if [ "$INSTALL_OPTIONAL" = "1" ] ; then
......@@ -321,7 +326,7 @@ function main() {
cmake ..
fi
if [ "$eNB" = "1" ] ; then
if [ "$eNB" = "1" -o "$UE" = "1" ] ; then
echo_info "Compiling $lte_exec"
compilations \
$lte_build_dir $lte_exec \
......@@ -338,7 +343,7 @@ function main() {
fi
fi
if [ "$UE" = 1 ] ; then
if [ "$UE" = 1 -a "$NOS1" = "0" ] ; then
# ue_ip driver compilation
echo_info "Compiling UE specific part"
compilations \
......@@ -407,7 +412,7 @@ function main() {
# EXMIMO drivers & firmware loader
###############
if [ "$HW" = "EXMIMO" -a "$EPC" = "0" ] ; then
if [ "$HW" = "EXMIMO" ] ; then
echo_info "Compiling Express MIMO 2 board drivers"
compilations \
......@@ -545,39 +550,29 @@ function main() {
rrh_gw $dbin/rrh_gw
fi
# EPC compilation
##################
if [ "$EPC" = "1" ] ; then
echo_info "Compiling EPC"
# Example HSS and EPC run on the same host
if [ "$CLEAN" = "1" ]; then
$OPENAIR_DIR/cmake_targets/tools/build_epc --clean --debug --transport-tcp-only --transport-prefer-tcp --s6a-server
$OPENAIR_DIR/cmake_targets/tools/build_hss --clean --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn`
else
$OPENAIR_DIR/cmake_targets/tools/build_epc --debug --transport-tcp-only --transport-prefer-tcp --s6a-server
$OPENAIR_DIR/cmake_targets/tools/build_hss --debug --transport-tcp-only --transport-prefer-tcp --fqdn `hostname --fqdn` --connect-to-mme `hostname --fqdn`
fi
# if [ "$INSTALL_SYSTEM_FILES" = "1" ] ;then
# if [ -f $dbin/hss.conf ] ; then
# sed -e 's/ *= */=/' $dbin/hss.conf > $dconf/hss.conf.nospace
# source $dconf/hss.conf.nospace
# rm -f $dconf/hss.conf.nospace
# create_hss_database root linux "$MYSQL_user" "$MYSQL_pass" "$MYSQL_db"
# else
# echo_warning "not created HSS database: config not found"
# fi
# fi
fi
# Auto-tests
#####################
if [ "$OAI_TEST" = "1" ]; then
echo_info "10. Running OAI pre commit tests (pre-ci) ..."
echo_error "These scripts ASSUME that user is in /etc/sudoers and can execute commands without PASSWORD prompt"
echo_error "Add the following lines in /etc/sudoers file to make your __user_name__ sudo without password prompt"
echo_error " __your_user_name__ ALL = (ALL:ALL) NOPASSWD: ALL"
echo_error " __your_user_name__ ALL = (ALL) NOPASSWD: ALL "
echo_info "The log file for the autotest script for debugging is located here: $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log "
echo_info "The results of autotests results is located here: $OPENAIR_DIR/cmake_targets/autotests/log/results_autotests.xml "
echo_info "You can hit CTRL-C any time to terminate the autotests..."
echo "Current User Name: $USER"
read -s -p "Enter Password: " mypassword
echo -e "\n"
rm -fr $OPENAIR_DIR/cmake_targets/autotests/log
mkdir -p $OPENAIR_DIR/cmake_targets/autotests/log
$OPENAIR_DIR/cmake_targets/autotests/run_compilation_autotests.bash
$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash
if [ "$RUN_GROUP" -eq "1" ]; then
$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -g "$TEST_CASE_GROUP" -p '$mypassword' >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log &
else
$OPENAIR_DIR/cmake_targets/autotests/run_exec_autotests.bash -p '$mypassword' >& $OPENAIR_DIR/cmake_targets/autotests/log/autotests.log &
fi
wait
else
echo_info "10. Bypassing the Tests ..."
fi
......
......@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8)
set(PACKAGE_NAME "unitary_tests_simulators")
set(PHYSIM True)
set(RF_BOARD None)
set(XFORMS False)
set(XFORMS True)
set(DEBUG_PHY False)
set(MU_RECIEVER False)
......
......@@ -111,7 +111,12 @@ compilations() {
cd $OPENAIR_DIR/cmake_targets/$1/build
{
rm -f $3
make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE
if [ "$VERBOSE_COMPILE" == "1" ]; then
make -j`nproc` $2 VERBOSE=$VERBOSE_COMPILE
else
make -j`nproc` $2
fi
} > $dlog/$2.$REL.txt 2>&1
echo_info "Log file for compilation has been written to: $dlog/$2.$REL.txt"
if [ -s $3 ] ; then
......@@ -158,22 +163,33 @@ install_gnutls_from_source(){
check_install_usrp_uhd_driver(){
log_file=$OPENAIR_DIR/cmake_targets/log/check_install_usrp_uhd_driver_log.txt
echo_info "\nIn function: check_install_usrp_uhd_driver(). Installing USRP Drivers : The logfile for the installation is located here: $log_file "
(
v=$(lsb_release -cs)
$SUDO apt-add-repository "deb http://files.ettus.com/binaries/uhd/repo/uhd/ubuntu/$v $v main"
$SUDO apt-get update
$SUDO apt-get -y install python python-tk libboost-all-dev libusb-1.0-0-dev
$SUDO apt-get -y install -t `lsb_release -cs` uhd --force-yes
) >& $log_file
}
check_install_bladerf_driver(){
log_file=$OPENAIR_DIR/cmake_targets/log/check_install_bladerf_driver_log.txt
echo_info "\nIn function: check_install_bladerf_driver(). Install BLADERF drivers : The logfile for the installation is located here: $log_file "
(
$SUDO add-apt-repository -y ppa:bladerf/bladerf
$SUDO apt-get update
$SUDO apt-get install -y bladerf libbladerf-dev
$SUDO apt-get install bladerf-firmware-fx3
$SUDO apt-get install bladerf-fpga-hostedx40
$SUDO apt-get install -y bladerf-firmware-fx3
$SUDO apt-get install -y bladerf-fpga-hostedx40
bladeRF-cli --flash-firmware /usr/share/Nuand/bladeRF/bladeRF_fw.img
) >& $log_file
}
check_install_additional_tools (){
log_file=$OPENAIR_DIR/cmake_targets/log/check_install_additional_tools_log.txt
echo_info "\nIn function: check_install_oai_software(). Installing optional OAI packages : The logfile for the installation is located here: $log_file "
(
$SUDO apt-get update
$SUDO apt-get install -y \
check \
......@@ -194,27 +210,32 @@ check_install_additional_tools (){
unzip \
valgrind \
vlan \
ctags
ctags \
ntpdate
) >& $log_file
}
check_install_oai_software() {
log_file=$OPENAIR_DIR/cmake_targets/log/check_install_oai_software_log.txt
echo_info "\nIn function: check_install_oai_software(). Installing mandatory OAI packages : The logfile for the installation is located here: $log_file "
(
$SUDO apt-get update
$SUDO apt-get install -y \
autoconf \
autoconf \
automake \
bison \
build-essential \
cmake \
cmake-curses-gui \
doxygen \
doxygen-gui\
texlive-latex-base\
doxygen-gui \
texlive-latex-base \
ethtool \
flex \
gccxml \
gdb \
git \
gccxml \
gdb \
git \
graphviz \
gtkwave \
guile-2.0-dev \
......@@ -233,7 +254,7 @@ check_install_oai_software() {
libgmp-dev \
libgtk-3-dev \
libidn2-0-dev \
libidn11-dev \
libidn11-dev \
libmysqlclient-dev \
liboctave-dev \
libpgm-5.1 \
......@@ -254,7 +275,12 @@ check_install_oai_software() {
openssh-server \
openssl \
python \
subversion
subversion \
xmlstarlet \
python-pip \
pydb \
wvdial \
python-numpy
$SUDO update-alternatives --set liblapack.so /usr/lib/atlas-base/atlas/liblapack.so
if [ `lsb_release -rs` = '12.04' ] ; then
install_nettle_from_source
......@@ -262,20 +288,29 @@ check_install_oai_software() {
else
$SUDO apt-get install -y libgnutls-dev nettle-dev nettle-bin
fi
$SUDO pip install paramiko
$SUDO pip install pyroute2
) > $log_file 2>&1
install_asn1c_from_source
$SUDO rm -fr /opt/ssh
$SUDO git clone https://gist.github.com/2190472.git /opt/ssh
}
install_asn1c_from_source(){
asn1_install_dir=$OPENAIR_DIR/cmake_targets/log/asn1c_install_log.txt
echo_info "\nInstalling ASN1. The log file for ASN1 installation is here: $asn1_install_dir "
(
rm -rf /tmp/asn1c-r1516
mkdir -p /tmp/asn1c-r1516
cd /tmp/asn1c-r1516
rm -rf /tmp/asn1c-r1516/*
svn co https://github.com/vlm/asn1c/trunk /tmp/asn1c-r1516 -r 1516 > /tmp/log_compile_asn1c
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch.p0 >> /tmp/log_compile_asn1c
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0 >> /tmp/log_compile_asn1c
patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0 >> /tmp/log_compile_asn1c
svn co https://github.com/vlm/asn1c/trunk /tmp/asn1c-r1516 -r 1516
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch.p0
patch -p0 < $OPENAIR_DIR/openair3/S1AP/MESSAGES/ASN1/asn1cpatch_2.p0
patch -p0 < $OPENAIR_DIR/openair2/RRC/LITE/MESSAGES/asn1c/asn1cpatch.p0
./configure
make > /tmp/log_compile_asn1c 2>&1
$SUDO make install
make -j`nproc`
$SUDO make install
) > $asn1_install_dir 2>&1
}
#################################################
......@@ -318,3 +353,42 @@ set_openair_env(){
export OPENAIR_TARGETS=$openair_path/targets
}
################################
# Function to killall the subprocesses when Ctrl-C Key is hit
###############################
function handle_ctrl_c(){
CURPID=$$
ppid=$$
arraycounter=1
echo_info "** Trapped CTRL-C. Killing all subprocesses now..."
while true
do
FORLOOP=FALSE
# Get all the child process id
for i in `ps -ef| awk '$3 == '$ppid' { print $2 }'`
do
if [ $i -ne $CURPID ] ; then
procid[$arraycounter]=$i
arraycounter=`expr $arraycounter + 1`
ppid=$i
FORLOOP=TRUE
fi
done
if [ "$FORLOOP" = "FALSE" ] ; then
arraycounter=`expr $arraycounter - 1`
## We want to kill child process id first and then parent id's
while [ $arraycounter -ne 0 ]
do
echo "first we send ctrl-c to program"
$SUDO kill -INT "${procid[$arraycounter]}"
sleep 5
echo "Now we force kill if that didn't work"
$SUDO kill -9 "${procid[$arraycounter]}" >/dev/null
arraycounter=`expr $arraycounter - 1`
done
exit
fi
done
}
File mode changed from 100644 to 100755
......@@ -68,7 +68,7 @@ declare MAX_RATE=1000
# set paths to the required binaries and check if the required binaries are available
ENB_CONFIG=$OPENAIR_DIR/targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_no_mme.conf
OAISIM_EXEC=$OPENAIR_DIR/targets/bin/oaisim_nos1
OAISIM_EXEC=$OPENAIR_DIR/cmake_targets/oaisim_noS1_build_oai/build/oaisim_nos1
BYPASSE_ITTI=0
OTGPLOT="$OPENAIR2_DIR/UTIL/OTG/OTGplot"
PS2PDF="ps2pdf"
......@@ -301,8 +301,8 @@ oaisim_otg_stats(){
sync
if [ ! -f $OAISIM_EXEC ]; then
echo_info "3.1 compiling OAISIM ($OPENAIR_TARGETS/cmake_targets/build_oai --oaisim -c)"
($OPENAIR_TARGETS/cmake_targets/build_oai --oaisim -c >> results/perf_log.txt 2>&1 )
echo_info "3.1 compiling OAISIM ($OPENAIR_DIR/cmake_targets/build_oai --oaisim -c --noS1)"
($OPENAIR_DIR/cmake_targets/build_oai --oaisim -c --noS1 >> results/perf_log.txt 2>&1 )
build_stats=$?
if [ $build_stats != 0 ] ; then
echo_error "$OAISIM_EXEC cannot be built, check results/perf_log.txt file"
......
......@@ -24,34 +24,40 @@ xUnit_start() {
# \param $1 classname
# \param $2 testcase name
# \param $3 testcase result
# \param $4 run index
# \param $4 run result
# \param $5 XML file local to test case for storing its own results
xUnit_fail() {
class=$1
test_case=$2
result=$3
run_index=$4
run_result=$4
xmlfile_testcase=$5
currtime=$(date +%s.%N)
time=$(echo "$currtime - $XUNIT_START" | bc -l)
xml="<testcase classname='$class' name='$test_case' run='$run_index' time='$time' RESULT='$result'></testcase>"
xml="<testcase classname='$class' name='$test_case' Run_result='$run_result' time='$time s' RESULT='$result'></testcase>"
echo -e $xml >> $xmlfile_testcase
XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml"
XUNIT_FAILED=$((XUNIT_FAILED+1))
}
## Call this after the testcase finished successfully.
# \sa xUnit_fail()
# \sa xUnit_success()
# \pre xUnit_start() must have been called before
# \param $1 classname
# \param $2 testcase name
# \param $3 testcase result
# \param $4 run index
# \param $4 run result
# \param $5 XML file local to test case for storing its own results
xUnit_success() {
class=$1
test_case=$2
result=$3
run_index=$4
run_result=$4
xmlfile_testcase=$5
currtime=$(date +%s.%N)
time=$(echo "$currtime - $XUNIT_START" | bc -l)
xml="<testcase classname='$class' name='$test_case' run='$run_index' time='$time' RESULT='$result'></testcase>"
xml="<testcase classname='$class' name='$test_case' Run_result='$run_result' time='$time s' RESULT='$result'></testcase>"
echo -e $xml >> $xmlfile_testcase
XUNIT_TESTCASES_XML="$XUNIT_TESTCASES_XML \n$xml"
XUNIT_SUCCESS=$((XUNIT_SUCCESS+1))
}
......
......@@ -5,7 +5,8 @@ export OPENAIR1_DIR=$OPENAIR_HOME/openair1
export OPENAIR2_DIR=$OPENAIR_HOME/openair2
export OPENAIR3_DIR=$OPENAIR_HOME/openair3
export OPENAIR_TARGETS=$OPENAIR_HOME/targets
export OPENAIRITS_DIR=$OPENAIR_HOME/openairITS
export PATH=$PATH:$OPENAIR_TARGETS/bin
alias oai='cd $OPENAIR_HOME'
alias oai0='cd $OPENAIR0_DIR'
......
......@@ -53,7 +53,7 @@ phy_adjust_gain (PHY_VARS_UE *phy_vars_ue, uint8_t eNB_id)
if (rssi>0) rx_power_fil_dB = rssi;
else rx_power_fil_dB = phy_vars_ue->PHY_measurements.rx_power_avg_dB[eNB_id];
printf("Gain control: rssi %d (%d,%d)\n",
LOG_D(PHY,"Gain control: rssi %d (%d,%d)\n",
rssi,
phy_vars_ue->PHY_measurements.rssi,
phy_vars_ue->PHY_measurements.rx_power_avg_dB[eNB_id]
......
......@@ -1102,8 +1102,12 @@ int generate_eNB_dlsch_params_from_dci(int frame,
dlsch[0]->harq_ids[subframe] = harq_pid;
if (dlsch0_harq->round == 0)
if (dlsch0_harq->round == 0) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch[0], harq_pid);
dlsch0_harq->status = ACTIVE;
}
break;
......@@ -1237,6 +1241,9 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if (dlsch0_harq->round == 0) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch[0], harq_pid);
dlsch0_harq->status = ACTIVE;
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
// MCS and TBS don't change across HARQ rounds
......@@ -1605,10 +1612,16 @@ int generate_eNB_dlsch_params_from_dci(int frame,
// reset HARQ process if this is the first transmission
if (dlsch0_harq->round == 0) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch0, harq_pid);
dlsch0_harq->status = ACTIVE;
}
if (dlsch1_harq->round == 0) {
/* necessary test? */
if (dlsch1_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch1, harq_pid);
dlsch1_harq->status = ACTIVE;
}
......@@ -1986,10 +1999,16 @@ int generate_eNB_dlsch_params_from_dci(int frame,
// reset HARQ process if this is the first transmission
if ((dlsch0->active==1) && (dlsch0_harq->round == 0)) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch0, harq_pid);
dlsch0_harq->status = ACTIVE;
}
if ((dlsch1->active==1) && (dlsch1_harq->round == 0)) {
/* necessary test? */
if (dlsch1_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch1, harq_pid);
dlsch1_harq->status = ACTIVE;
}
......@@ -2131,16 +2150,23 @@ int generate_eNB_dlsch_params_from_dci(int frame,
// check if either TB is disabled (see 36-213 V8.6 p. 26)
if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0))
if ((dlsch0_harq->rvidx == 1) && (dlsch0_harq->mcs == 0)) {
LOG_W(PHY, "what to do with respect to remove_harq_pid_from_freelist?\n");
dlsch0_harq->status = DISABLED;
}
if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0))
if ((dlsch1_harq->rvidx == 1) && (dlsch1_harq->mcs == 0)) {
LOG_W(PHY, "what to do with respect to remove_harq_pid_from_freelist?\n");
dlsch1_harq->status = DISABLED;
}
dlsch0_harq->Nl = 1;
if (dlsch0_harq->round == 0) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch0, harq_pid);
dlsch0_harq->status = ACTIVE;
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
}
......@@ -2305,11 +2331,17 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if ((dlsch0_harq->round == 0) && (dlsch0->active == 1) ) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch0, harq_pid);
dlsch0_harq->status = ACTIVE;
dlsch0_harq->mcs = mcs1;
}
if ((dlsch1_harq->round == 0) && (dlsch1->active == 1) ) {
/* necessary test? */
if (dlsch1_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch1, harq_pid);
dlsch1_harq->status = ACTIVE;
dlsch1_harq->mcs = mcs2;
}
......@@ -2473,6 +2505,9 @@ int generate_eNB_dlsch_params_from_dci(int frame,
if (dlsch0_harq->round == 0) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch0, harq_pid);
dlsch0_harq->status = ACTIVE;
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
}
......@@ -2602,6 +2637,9 @@ int generate_eNB_dlsch_params_from_dci(int frame,
// dlsch0_harq->Ndi = ((DCI1E_5MHz_2A_M10PRB_TDD_t *)dci_pdu)->ndi;
if (dlsch0_harq->round == 0) {
/* necessary test? */
if (dlsch0_harq->status == SCH_IDLE)
remove_harq_pid_from_freelist(dlsch0, harq_pid);
dlsch0_harq->status = ACTIVE;
// printf("Setting DLSCH process %d to ACTIVE\n",harq_pid);
}
......
......@@ -258,6 +258,13 @@ typedef struct {
uint8_t error_threshold;
/// Pointers to 8 HARQ processes for the DLSCH
LTE_DL_eNB_HARQ_t *harq_processes[8];
/// circular list of free harq PIDs (the oldest come first)
/// (10 is arbitrary value, must be > to max number of DL HARQ processes in LTE)
int harq_pid_freelist[10];
/// the head position of the free list (if list is free then head=tail)
int head_freelist;
/// the tail position of the free list
int tail_freelist;
/// Number of soft channel bits
uint32_t G;
/// Codebook index for this dlsch (0,1,2,3)
......
......@@ -152,6 +152,9 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne
for (i=0; i<10; i++)
dlsch->harq_ids[i] = Mdlharq;
dlsch->head_freelist = 0;
dlsch->tail_freelist = 0;
for (i=0; i<Mdlharq; i++) {
dlsch->harq_processes[i] = (LTE_DL_eNB_HARQ_t *)malloc16(sizeof(LTE_DL_eNB_HARQ_t));
LOG_T(PHY, "Required mem size %d (bw scaling %d), dlsch->harq_processes[%d] %p\n",
......@@ -192,6 +195,8 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(unsigned char Kmimo,unsigned char Mdlharq,unsigne
msg("Can't get harq_p %d\n",i);
exit_flag=3;
}
put_harq_pid_in_freelist(dlsch, i);
}
if (exit_flag==0) {
......
......@@ -662,16 +662,17 @@ int dlsch_qpsk_llr(LTE_DL_FRAME_PARMS *frame_parms,
if ((symbol_mod==0) || (symbol_mod==(4-frame_parms->Ncp))) {
if (frame_parms->mode1_flag==0)
len = (nb_rb*8);// - (2*pbch_pss_sss_adjust/3);
len = (nb_rb*8)- (2*pbch_pss_sss_adjust/3);
else
len = (nb_rb*10);// - (5*pbch_pss_sss_adjust/6);
len = (nb_rb*10) - (5*pbch_pss_sss_adjust/6);
} else {
len = (nb_rb*12);// - pbch_pss_sss_adjust;
len = (nb_rb*12) - pbch_pss_sss_adjust;
}
// printf("dlsch_qpsk_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
// printf("dlsch_qpsk_llr: symbol %d,nb_rb %d, len %d,pbch_pss_sss_adjust %d\n",symbol,nb_rb,len,pbch_pss_sss_adjust);
for (i=0; i<len; i++) {
*llr32 = *rxF;
// printf("llr %d : (%d,%d)\n",i,((int16_t*)llr32)[0],((int16_t*)llr32)[1]);
rxF++;
llr32++;
}
......
......@@ -72,17 +72,20 @@ LTE_eNB_DLSCH_t *new_eNB_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t N_RB_DL, ui
*/
void free_ue_dlsch(LTE_UE_DLSCH_t *dlsch);
LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t Mdlharq,uint8_t max_turbo_iterations,uint8_t N_RB_UL, uint8_t abstraction_flag);
LTE_UE_DLSCH_t *new_ue_dlsch(uint8_t Kmimo,uint8_t Mdlharq,uint8_t max_turbo_iterations,uint8_t N_RB_DL, uint8_t abstraction_flag);
LTE_UE_ULSCH_t *new_ue_ulsch(unsigned char Mdlharq,unsigned char N_RB_UL, uint8_t abstraction_flag);
void clean_eNb_ulsch(LTE_eNB_ULSCH_t *ulsch, uint8_t abstraction_flag);
void free_ue_ulsch(LTE_UE_ULSCH_t *ulsch);
LTE_UE_ULSCH_t *new_ue_ulsch(uint8_t Mdlharq, unsigned char N_RB_UL, uint8_t abstraction_flag);
LTE_eNB_ULSCH_t *new_eNB_ulsch(uint8_t Mdlharq,uint8_t max_turbo_iterations,uint8_t N_RB_UL, uint8_t abstraction_flag);
LTE_UE_ULSCH_t *new_ue_ulsch(uint8_t Mdlharq, unsigned char N_RB_UL, uint8_t abstraction_flag);
/** \fn dlsch_encoding(uint8_t *input_buffer,
LTE_DL_FRAME_PARMS *frame_parms,
......@@ -1764,7 +1767,9 @@ double computeRhoB_UE(PDSCH_CONFIG_DEDICATED *pdsch_config_dedicated,
LTE_UE_DLSCH_t *dlsch_ue);
*/
uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms, uint8_t tdd_mapindex, uint16_t Nf);
uint8_t get_prach_prb_offset(LTE_DL_FRAME_PARMS *frame_parms, uint8_t tdd_mapindex, uint16_t Nf);
uint8_t ul_subframe2pdcch_alloc_subframe(LTE_DL_FRAME_PARMS *frame_parms,uint8_t n);
/**@}*/
#endif
......@@ -115,11 +115,11 @@ int32_t dot_product(int16_t *x,
// convert back to integer
result = _mm_cvtsi64_si32(mmtmp7);
return(result);
_mm_empty();
_m_empty();
return(result);
#elif defined(__arm__)
int16x4_t *x_128=(int16x4_t*)x;
int16x4_t *y_128=(int16x4_t*)y;
......
......@@ -94,7 +94,7 @@ static inline void cmacc(__m128i a,__m128i b, __m128i *re32, __m128i *im32)
cmac_tmp = _mm_sign_epi16(b,*(__m128i*)reflip);
// cmac_tmp = _mm_shufflelo_epi16(b,_MM_SHUFFLE(2,3,0,1));
// cmac_tmp = _mm_shufflehi_epi16(cmac_tmp,_MM_SHUFFLE(2,3,0,1));
cmac_tmp = _mm_shuffle_epi8(b,_mm_set_epi8(13,12,15,14,9,8,11,10,5,4,7,6,1,0,3,2));
cmac_tmp = _mm_shuffle_epi8(cmac_tmp,_mm_set_epi8(13,12,15,14,9,8,11,10,5,4,7,6,1,0,3,2));
cmac_tmp_im32 = _mm_madd_epi16(cmac_tmp,a);
*re32 = _mm_add_epi32(*re32,cmac_tmp_re32);
......@@ -401,6 +401,8 @@ uint16_t get_Np(uint8_t N_RB_DL,uint8_t nCCE,uint8_t plus1);
int get_nCCE_offset(unsigned char L, int nCCE, int common_dci, unsigned short rnti, unsigned char subframe);
void put_harq_pid_in_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid);
void remove_harq_pid_from_freelist(LTE_eNB_DLSCH_t *DLSCH_ptr, int harq_pid);
int8_t find_ue(uint16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
int32_t add_ue(int16_t rnti, PHY_VARS_eNB *phy_vars_eNB);
......
This diff is collapsed.
This diff is collapsed.
......@@ -54,8 +54,6 @@
#include "OCG_vars.h"
//#define BW 5.0
PHY_VARS_eNB *PHY_vars_eNB;
PHY_VARS_UE *PHY_vars_UE;
......@@ -131,7 +129,7 @@ int main(int argc, char **argv)
char c;
int i,l,aa,aarx;
int i,l,aa,aarx,k;
double sigma2, sigma2_dB=0,SNR,snr0=-2.0,snr1=0.0;
uint8_t snr1set=0;
double snr_step=1,input_snr_step=1;
......@@ -172,7 +170,6 @@ int main(int argc, char **argv)
unsigned int trials,errs[4]= {0,0,0,0}; //,round_trials[4]={0,0,0,0};
uint8_t N_RB_DL=25,osf=1;
double BW=5.0;
uint32_t perfect_ce = 0;
lte_frame_type_t frame_type = FDD;
......@@ -255,27 +252,9 @@ int main(int argc, char **argv)
case 'R':
N_RB_DL = atoi(optarg);
switch (N_RB_DL) {
case 6:
BW=1.25;
break;
case 25:
BW=5.0;
break;
case 50:
BW=10.0;
break;
case 100:
BW=20.0;
break;
default:
if ((N_RB_DL!=6) && (N_RB_DL!=25) && (N_RB_DL!=50) && (N_RB_DL!=100)) {
printf("Unsupported Bandwidth %d\n",N_RB_DL);
exit(-1);
break;
}
break;
......@@ -397,7 +376,8 @@ int main(int argc, char **argv)
eNB2UE = new_channel_desc_scm(PHY_vars_eNB->lte_frame_parms.nb_antennas_tx,
PHY_vars_UE->lte_frame_parms.nb_antennas_rx,
channel_model,
BW,
N_RB2sampling_rate(PHY_vars_eNB->lte_frame_parms.N_RB_DL),
N_RB2channel_bandwidth(PHY_vars_eNB->lte_frame_parms.N_RB_DL),
0,
0,
0);
......@@ -541,15 +521,26 @@ int main(int argc, char **argv)
subframe%10,
0,
0);
}
for (l=2; l<12; l++) {
rx_pmch(PHY_vars_UE,
if (PHY_vars_UE->perfect_ce==1) {
// fill in perfect channel estimates
freq_channel(eNB2UE,PHY_vars_UE->lte_frame_parms.N_RB_DL,12*PHY_vars_UE->lte_frame_parms.N_RB_DL + 1);
for(k=0; k<NUMBER_OF_eNB_MAX; k++) {
for(aa=0; aa<frame_parms->nb_antennas_tx; aa++) {
for (aarx=0; aarx<frame_parms->nb_antennas_rx; aarx++) {
for (i=0; i<frame_parms->N_RB_DL*12; i++) {
((int16_t *) PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[k][(aa<<1)+aarx])[2*i+(l*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(int16_t)(eNB2UE->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].x*AMP);
((int16_t *) PHY_vars_UE->lte_ue_common_vars.dl_ch_estimates[k][(aa<<1)+aarx])[2*i+1+(l*frame_parms->ofdm_symbol_size+LTE_CE_FILTER_LENGTH)*2]=(int16_t)(eNB2UE->chF[aarx+(aa*frame_parms->nb_antennas_rx)][i].y*AMP);
}
}
}
}
}
rx_pmch(PHY_vars_UE,
0,
subframe%10,
l);
}
PHY_vars_UE->dlsch_ue_MCH[0]->harq_processes[0]->G = get_G(&PHY_vars_UE->lte_frame_parms,
......
......@@ -53,9 +53,6 @@
#include "OCG_vars.h"
#define BW 5.0
PHY_VARS_eNB *PHY_vars_eNb,*PHY_vars_eNb1,*PHY_vars_eNb2;
PHY_VARS_UE *PHY_vars_UE;
......@@ -485,7 +482,8 @@ int main(int argc, char **argv)
eNB2UE = new_channel_desc_scm(PHY_vars_eNb->lte_frame_parms.nb_antennas_tx,
PHY_vars_UE->lte_frame_parms.nb_antennas_rx,
channel_model,
BW,
N_RB2sampling_rate(PHY_vars_eNb->lte_frame_parms.N_RB_DL),
N_RB2channel_bandwidth(PHY_vars_eNb->lte_frame_parms.N_RB_DL),
0,
0,
0);
......@@ -494,7 +492,8 @@ int main(int argc, char **argv)
eNB2UE1 = new_channel_desc_scm(PHY_vars_eNb->lte_frame_parms.nb_antennas_tx,
PHY_vars_UE->lte_frame_parms.nb_antennas_rx,
channel_model,
BW,
N_RB2sampling_rate(PHY_vars_eNb->lte_frame_parms.N_RB_DL),
N_RB2channel_bandwidth(PHY_vars_eNb->lte_frame_parms.N_RB_DL),
0,
4,
0);
......@@ -503,7 +502,8 @@ int main(int argc, char **argv)
eNB2UE2 = new_channel_desc_scm(PHY_vars_eNb->lte_frame_parms.nb_antennas_tx,
PHY_vars_UE->lte_frame_parms.nb_antennas_rx,
channel_model,
BW,
N_RB2sampling_rate(PHY_vars_eNb->lte_frame_parms.N_RB_DL),
N_RB2channel_bandwidth(PHY_vars_eNb->lte_frame_parms.N_RB_DL),
0,
8,
0);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment