[GITLAB] - A technical upgrade is planned on Thursday the 1st of July at noon on our GITLAB server.

Commit ca790b59 authored by Aikaterini Trilyraki's avatar Aikaterini Trilyraki

resolve errors after merging with develop / add configuration file for RRH with USRP

parent 8fc747ac
......@@ -749,56 +749,6 @@ include_directories("${OPENAIR_DIR}")
# Utilities Library
################
if (ENB_AGENT)
# set the version of protobuf messages, V3 not supported yet
add_list1_option(PRPT_VERSION V2 "PRPT MSG protobuf grammar version" V2 V3)
if (${PRPT_VERSION} STREQUAL "V2")
set (PRPTDIR V2)
elseif (${PRPT_VERSION} STREQUAL "V3")
set (PRPTDIR V3)
endif(${PRPT_VERSION} STREQUAL "V2")
set(PRPT_MSG_DIR ${OPENAIR2_DIR}/ENB_APP/MESSAGES/${PRPTDIR} )
set(PRPT_MSG_FILES
${PRPT_MSG_DIR}/header.proto
${PRPT_MSG_DIR}/progran.proto
${PRPT_MSG_DIR}/stats_common.proto
${PRPT_MSG_DIR}/stats_messages.proto
)
set(PRPT_C_DIR ${protobuf_generated_dir}/${PRPTDIR})
message("calling ${protoc_call} ${PRPT_C_DIR} ${PRPT_MSG_FILES}")
execute_process(COMMAND ${protoc_call} ${PRPT_C_DIR} ${PRPT_MSG_FILES})
file(GLOB PRPT_source ${PRPT_C_DIR}/*.c)
set(PRPT_OAI_generated
${PRPT_C_DIR}/header.pb-c.c
${PRPT_C_DIR}/progran.pb-c.c
${PRPT_C_DIR}/stats_common.pb-c.c
${PRPT_C_DIR}/stats_messages.pb-c.c
)
file(GLOB prpt_h ${PRPT_C_DIR}/*.h)
set(prpt_h ${prpt_h} )
add_library(PRPT_MSG
${PRPT_OAI_generated}
${PRPT_source}
)
include_directories ("${PRPT_C_DIR}")
add_library(ASYNC_IF
${OPENAIR2_DIR}/UTIL/ASYNC_IF/socket_link.c
${OPENAIR2_DIR}/UTIL/ASYNC_IF/link_manager.c
${OPENAIR2_DIR}/UTIL/ASYNC_IF/message_queue.c
)
set(ASYNC_IF_LIB ASYNC_IF)
include_directories(${OPENAIR2_DIR}/UTIL/ASYNC_IF)
endif()
add_library(HASHTABLE
${OPENAIR_DIR}/common/utils/collection/hashtable/hashtable.c
${OPENAIR_DIR}/common/utils/collection/hashtable/obj_hashtable.c
......@@ -955,6 +905,7 @@ set(PHY_SRC
${OPENAIR1_DIR}/PHY/CODING/viterbi_lte.c
${OPENAIR1_DIR}/PHY/INIT/lte_init.c
${OPENAIR1_DIR}/PHY/INIT/lte_parms.c
${OPENAIR1_DIR}/PHY/INIT/lte_param_init.c
${OPENAIR1_DIR}/PHY/TOOLS/file_output.c
${OPENAIR1_DIR}/PHY/TOOLS/lte_dfts.c
${OPENAIR1_DIR}/PHY/TOOLS/log2_approx.c
......@@ -1706,7 +1657,7 @@ add_executable(oaisim_nos1
target_include_directories(oaisim_nos1 PUBLIC ${OPENAIR_TARGETS}/SIMU/USER)
target_link_libraries (oaisim_nos1
-Wl,--start-group
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB} ${ASYNC_IF_LIB}
RRC_LIB X2AP_LIB SECU_CN UTIL HASHTABLE SCHED_LIB PHY LFDS ${MSC_LIB} L2 ${RAL_LIB} SIMU SIMU_ETH SECU_OSA ${ITTI_LIB} ${MIH_LIB}
-Wl,--end-group )
target_link_libraries (oaisim_nos1 ${LIBXML2_LIBRARIES} ${LAPACK_LIBRARIES})
......
......@@ -51,8 +51,11 @@ int set_device(openair0_device *device) {
case EXMIMO_DEV:
printf("[%s] has loaded EXPRESS MIMO device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
break;
case USRP_DEV:
printf("[%s] has loaded USRP device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
case USRP_B200_DEV:
printf("[%s] has loaded USRP B200 device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
break;
case USRP_X300_DEV:
printf("[%s] has loaded USRP X300 device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
break;
case BLADERF_DEV:
printf("[%s] has loaded BLADERF device.\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"));
......
......@@ -72,17 +72,17 @@ int eth_socket_init_raw(openair0_device *device) {
int sock_proto=0;
if (device->host_type == RRH_HOST ) { /* RRH doesn't know remote MAC(will be retrieved from first packet send from BBU) and remote port(don't care) */
local_mac = device->openair0_cfg.my_addr;
local_port = device->openair0_cfg.my_port;
local_mac = device->openair0_cfg->my_addr;
local_port = device->openair0_cfg->my_port;
remote_mac = malloc(ETH_ALEN);
memset(remote_mac,0,ETH_ALEN);
remote_port = 0;
printf("[%s] local MAC addr %s remote MAC addr %s\n","RRH", local_mac,remote_mac);
} else {
local_mac = device->openair0_cfg.my_addr;
local_port = device->openair0_cfg.my_port;
remote_mac = device->openair0_cfg.remote_addr;
remote_port = device->openair0_cfg.remote_port;
local_mac = device->openair0_cfg->my_addr;
local_port = device->openair0_cfg->my_port;
remote_mac = device->openair0_cfg->remote_addr;
remote_port = device->openair0_cfg->remote_port;
printf("[%s] local MAC addr %s remote MAC addr %s\n","BBU", local_mac,remote_mac);
}
......@@ -109,7 +109,7 @@ int eth_socket_init_raw(openair0_device *device) {
local_addr[Mod_id].sll_family = AF_PACKET;
local_addr[Mod_id].sll_ifindex = if_index[Mod_id].ifr_ifindex;
/* hear traffic from specific protocol*/
local_addr[Mod_id].sll_protocol = htons((short)device->openair0_cfg.my_port);
local_addr[Mod_id].sll_protocol = htons((short)device->openair0_cfg->my_port);
local_addr[Mod_id].sll_halen = ETH_ALEN;
local_addr[Mod_id].sll_pkttype = PACKET_OTHERHOST;
addr_len[Mod_id] = sizeof(struct sockaddr_ll);
......@@ -122,7 +122,7 @@ int eth_socket_init_raw(openair0_device *device) {
/* Construct the Ethernet header */
ether_aton_r(local_mac, (struct ether_addr *)(&(eh.ether_shost)));
ether_aton_r(remote_mac, (struct ether_addr *)(&(eh.ether_dhost)));
eh.ether_type = htons((short)device->openair0_cfg.my_port);
eh.ether_type = htons((short)device->openair0_cfg->my_port);
printf("[%s] binding mod_%d to hardware address %x:%x:%x:%x:%x:%x\n",((device->host_type == BBU_HOST) ? "BBU": "RRH"),Mod_id,eh.ether_shost[0],eh.ether_shost[1],eh.ether_shost[2],eh.ether_shost[3],eh.ether_shost[4],eh.ether_shost[5]);
......
......@@ -71,18 +71,18 @@ int addr_len[MAX_INST];
int sock_type=0;
int sock_proto=0;
int enable=1;
if (device->host_type == RRH_HOST ) {
local_ip = device->openair0_cfg.my_addr;
local_port = device->openair0_cfg.my_port;
local_ip = device->openair0_cfg->my_addr;
local_port = device->openair0_cfg->my_port;
remote_ip = "0.0.0.0";
remote_port = 0;
printf("[%s] local ip addr %s port %d\n", "RRH", local_ip, local_port);
} else {
local_ip = device->openair0_cfg.my_addr;
local_port = device->openair0_cfg.my_port;
remote_ip = device->openair0_cfg.remote_addr;
remote_port = device->openair0_cfg.remote_port;
local_ip = device->openair0_cfg->my_addr;
local_port = device->openair0_cfg->my_port;
remote_ip = device->openair0_cfg->remote_addr;
remote_port = device->openair0_cfg->remote_port;
printf("[%s] local ip addr %s port %d\n","BBU", local_ip, local_port);
}
......@@ -123,22 +123,17 @@ int addr_len[MAX_INST];
}
/* apply additional configuration */
//ethernet_tune (device,MTU_SIZE,UDP_PACKET_SIZE_BYTES(device->openair0_cfg.samples_per_packet));
//ethernet_tune (device,MTU_SIZE,UDP_PACKET_SIZE_BYTES(device->openair0_cfg->samples_per_packet));
/* if RRH, then I am the server, so bind */
if (device->host_type == RRH_HOST) {
/* want to receive -> so bind */
if (bind(eth->sockfd[Mod_id],(struct sockaddr *)&local_addr[Mod_id],addr_len[Mod_id])<0) {
perror("ETHERNET: Cannot bind to socket");
exit(0);
} else {
printf("[%s] binding mod_%d to %s:%d\n","RRH",Mod_id,str_local,ntohs(local_addr[Mod_id].sin_port));
}
/* if BBU, then I am a client, so connect */
} else {
printf("[%s] Connecting to %s:%d\n","BBU",str_remote,ntohs(dest_addr[Mod_id].sin_port));
}
printf("ssssssssssssssss\n");
return 0;
}
......@@ -359,14 +354,14 @@ int eth_get_dev_conf_udp(openair0_device *device) {
/* get remote ip address and port */
/* inet_ntop(AF_INET, &(dest_addr[Mod_id].sin_addr), str1, INET_ADDRSTRLEN); */
/* device->openair0_cfg.remote_port =ntohs(dest_addr[Mod_id].sin_port); */
/* device->openair0_cfg.remote_addr =str1; */
/* device->openair0_cfg->remote_port =ntohs(dest_addr[Mod_id].sin_port); */
/* device->openair0_cfg->remote_addr =str1; */
/* /\* restore local ip address and port *\/ */
/* inet_ntop(AF_INET, &(local_addr[Mod_id].sin_addr), str, INET_ADDRSTRLEN); */
/* device->openair0_cfg.my_port =ntohs(local_addr[Mod_id].sin_port); */
/* device->openair0_cfg.my_addr =str; */
/* device->openair0_cfg->my_port =ntohs(local_addr[Mod_id].sin_port); */
/* device->openair0_cfg->my_addr =str; */
/* printf("[RRH] mod_%d socket %d connected to BBU %s:%d %s:%d\n", Mod_id, eth->sockfd[Mod_id],str1, device->openair0_cfg.remote_port, str, device->openair0_cfg.my_port); */
/* printf("[RRH] mod_%d socket %d connected to BBU %s:%d %s:%d\n", Mod_id, eth->sockfd[Mod_id],str1, device->openair0_cfg->remote_port, str, device->openair0_cfg->my_port); */
return 0;
}
......@@ -72,7 +72,7 @@ int trx_eth_start(openair0_device *device) {
if(eth_get_dev_conf_raw(device)!=0) return -1;
}
/* adjust MTU wrt number of samples per packet */
if(ethernet_tune (device,MTU_SIZE,RAW_PACKET_SIZE_BYTES(device->openair0_cfg.samples_per_packet))!=0) return -1;
if(ethernet_tune (device,MTU_SIZE,RAW_PACKET_SIZE_BYTES(device->openair0_cfg->samples_per_packet))!=0) return -1;
} else {
if (eth_socket_init_udp(device)!=0) return -1;
/* RRH gets openair0 device configuration - BBU sets openair0 device configuration*/
......@@ -82,7 +82,7 @@ int trx_eth_start(openair0_device *device) {
if(eth_get_dev_conf_udp(device)!=0) return -1;
}
/* adjust MTU wrt number of samples per packet */
if(ethernet_tune (device,MTU_SIZE,UDP_PACKET_SIZE_BYTES(device->openair0_cfg.samples_per_packet))!=0) return -1;
if(ethernet_tune (device,MTU_SIZE,UDP_PACKET_SIZE_BYTES(device->openair0_cfg->samples_per_packet))!=0) return -1;
}
return 0;
......@@ -93,7 +93,7 @@ void trx_eth_end(openair0_device *device) {
eth_state_t *eth = (eth_state_t*)device->priv;
int Mod_id = device->Mod_id;
/*destroys socket only for the processes that call the eth_end fuction-- shutdown() for beaking the pipe */
/* destroys socket only for the processes that call the eth_end fuction-- shutdown() for beaking the pipe */
if ( close(eth->sockfd[Mod_id]) <0 ) {
perror("ETHERNET: Failed to close socket");
exit(0);
......@@ -177,7 +177,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
if (1==0) {
/***************** get working interface name ***************************/
/* convert ascii ip address from config file to network binary format */
inet_aton(device->openair0_cfg.my_addr, &ia);
inet_aton(device->openair0_cfg->my_addr, &ia);
/* look for the interface used, we have its ip address get info on all our network interfaces*/
ids = if_nameindex();
/* loop on these network interfaces */
......@@ -201,7 +201,7 @@ int ethernet_tune(openair0_device *device, unsigned int option, int value) {
}
if_freenameindex(ids);
if( if_name == NULL) {
printf("Unable to find interface name for %s\n",device->openair0_cfg.my_addr);
printf("Unable to find interface name for %s\n",device->openair0_cfg->my_addr);
return -1;
}
eth->if_name[Mod_id]=if_name;
......@@ -339,12 +339,9 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, cha
eth_state_t *eth = (eth_state_t*)malloc(sizeof(eth_state_t));
memset(eth, 0, sizeof(eth_state_t));
int card = 0;
/*hardcoded!!!!*/
eth->flags = ETH_RAW_MODE;
eth->buffer_size = (unsigned int)openair0_cfg[card].samples_per_packet*sizeof(int32_t);
printf("[ETHERNET]: Initializing openair0_device for %s ...\n", ((device->host_type == BBU_HOST) ? "BBU": "RRH"));
device->Mod_id = num_devices_eth++;
device->transp_type = ETHERNET_TP;
......@@ -370,7 +367,7 @@ int transport_init(openair0_device *device, openair0_config_t *openair0_cfg, cha
device->priv = eth;
openair0_cfg->iq_txshift = 5;
openair0_cfg->iq_rxrescale = 15;
memcpy((void*)&device->openair0_cfg,(void*)openair0_cfg,sizeof(openair0_config_t));
memcpy((void*)device->openair0_cfg,(void*)openair0_cfg,sizeof(openair0_config_t));
return 0;
}
......@@ -407,14 +404,14 @@ void dump_dev(openair0_device *device) {
eth_state_t *eth = (eth_state_t*)device->priv;
printf("Ethernet device interface %i configuration:\n" ,device->openair0_cfg.Mod_id);
printf(" Log level is %i :\n" ,device->openair0_cfg.log_level);
printf("Ethernet device interface %i configuration:\n" ,device->openair0_cfg->Mod_id);
printf(" Log level is %i :\n" ,device->openair0_cfg->log_level);
printf(" RB number: %i, sample rate: %lf \n" ,
device->openair0_cfg.num_rb_dl, device->openair0_cfg.sample_rate);
printf(" Delay: %i, Forward samples: %u \n" ,
device->openair0_cfg.tx_delay, device->openair0_cfg.tx_forward_nsamps);
device->openair0_cfg->num_rb_dl, device->openair0_cfg->sample_rate);
printf(" Scheduling_advance: %i, Sample_advance: %u \n" ,
device->openair0_cfg->tx_scheduling_advance, device->openair0_cfg->tx_sample_advance);
printf(" BBU configured for %i tx/%i rx channels)\n",
device->openair0_cfg.tx_num_channels,device->openair0_cfg.rx_num_channels);
device->openair0_cfg->tx_num_channels,device->openair0_cfg->rx_num_channels);
printf(" Running flags: %s %s %s\n",
((eth->flags & ETH_RAW_MODE) ? "RAW socket mode - ":""),
((eth->flags & ETH_UDP_MODE) ? "UDP socket mode - ":""),
......@@ -425,14 +422,14 @@ void dump_dev(openair0_device *device) {
void inline dump_txcounters(openair0_device *device) {
eth_state_t *eth = (eth_state_t*)device->priv;
printf(" Ethernet device interface %i, tx counters:\n" ,device->openair0_cfg.Mod_id);
printf(" Ethernet device interface %i, tx counters:\n" ,device->openair0_cfg->Mod_id);
printf(" Sent packets: %llu send errors: %i\n", eth->tx_count, eth->num_tx_errors);
}
void inline dump_rxcounters(openair0_device *device) {
eth_state_t *eth = (eth_state_t*)device->priv;
printf(" Ethernet device interface %i rx counters:\n" ,device->openair0_cfg.Mod_id);
printf(" Ethernet device interface %i rx counters:\n" ,device->openair0_cfg->Mod_id);
printf(" Received packets: %llu missed packets errors: %i\n", eth->rx_count, eth->num_underflows);
}
......
......@@ -172,7 +172,7 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
#endif
if (device->type == USRP_B200_IF) {
if (device->type == USRP_B200_DEV) {
if (cc>1) {
// receive multiple channels (e.g. RF A and RF B)
std::vector<void *> buff_ptrs;
......@@ -198,7 +198,7 @@ static int trx_usrp_read(openair0_device *device, openair0_timestamp *ptimestamp
#endif
}
}
} else if (device->type == USRP_X300_IF) {
} else if (device->type == USRP_X300_DEV) {
if (cc>1) {
// receive multiple channels (e.g. RF A and RF B)
std::vector<void *> buff_ptrs;
......@@ -395,15 +395,9 @@ extern "C" {
// Initialize USRP device
<<<<<<< HEAD
std::string args = "type=b200";
std::string args = "type=b200";
uhd::device_addrs_t device_adds = uhd::device::find(args);
size_t i;
printf("Checking for USRPs\n");
=======
uhd::device_addrs_t device_adds = uhd::device::find(args);
size_t i;
......@@ -413,29 +407,19 @@ extern "C" {
sscanf(uhd::get_version_string().c_str(),"%d.%d.%d",&vers,&subvers,&subsubvers);
printf("Checking for USRPs : UHD %s (%d.%d.%d)\n",uhd::get_version_string().c_str(),vers,subvers,subsubvers);
>>>>>>> acd607fa359709ba16a83437f483c230cee1d9b0
if(device_adds.size() == 0)
{
double usrp_master_clock = 184.32e6;
std::string args = "type=x300";
// workaround for an api problem, master clock has to be set with the constructor not via set_master_clock_rate
args += boost::str(boost::format(",master_clock_rate=%f") % usrp_master_clock);
uhd::device_addrs_t device_adds = uhd::device::find(args);
if(device_adds.size() == 0)
<<<<<<< HEAD
{
std::cerr<<"No USRP Device Found. " << std::endl;
free(s);
return -1;
}
=======
{
std::cerr<<"No USRP Device Found. " << std::endl;
free(s);
......@@ -444,17 +428,16 @@ extern "C" {
}
>>>>>>> acd607fa359709ba16a83437f483c230cee1d9b0
printf("Found USRP X300\n");
s->usrp = uhd::usrp::multi_usrp::make(args);
// s->usrp->set_rx_subdev_spec(rx_subdev);
// s->usrp->set_tx_subdev_spec(tx_subdev);
// lock mboard clocks
s->usrp->set_clock_source("internal");
//Setting device type to USRP X300/X310
device->type=USRP_X300_IF;
device->type=USRP_X300_DEV;
// this is not working yet, master clock has to be set via constructor
// set master clock rate and sample rate for tx & rx for streaming
......@@ -511,11 +494,8 @@ extern "C" {
// s->usrp->set_clock_source("internal");
// set master clock rate and sample rate for tx & rx for streaming
device->type = USRP_B200_IF;
device->type = USRP_B200_DEV;
<<<<<<< HEAD
=======
if ((vers == 3) && (subvers == 9) && (subsubvers>=2)) {
openair0_cfg[0].rx_gain_calib_table = calib_table_b210;
......@@ -574,20 +554,14 @@ extern "C" {
}
}
>>>>>>> acd607fa359709ba16a83437f483c230cee1d9b0
for(i=0;i<s->usrp->get_rx_num_channels();i++) {
if (i<openair0_cfg[0].rx_num_channels) {
s->usrp->set_rx_rate(openair0_cfg[0].sample_rate,i);
s->usrp->set_rx_bandwidth(openair0_cfg[0].rx_bw,i);
printf("Setting rx freq/gain on channel %lu/%lu : BW %f (readback %f)\n",i,s->usrp->get_rx_num_channels(),openair0_cfg[0].rx_bw/1e6,s->usrp->get_rx_bandwidth(i)/1e6);
s->usrp->set_rx_freq(openair0_cfg[0].rx_freq[i],i);
<<<<<<< HEAD
set_rx_gain_offset(&openair0_cfg[0],i);
=======
set_rx_gain_offset(&openair0_cfg[0],i,bw_gain_adjust);
>>>>>>> acd607fa359709ba16a83437f483c230cee1d9b0
::uhd::gain_range_t gain_range = s->usrp->get_rx_gain_range(i);
// limit to maximum gain
if (openair0_cfg[0].rx_gain[i]-openair0_cfg[0].rx_gain_offset[i] > gain_range.stop()) {
......@@ -610,11 +584,11 @@ extern "C" {
s->usrp->set_tx_gain(openair0_cfg[0].tx_gain[i],i);
}
}
// display USRP settings
std::cout << boost::format("Actual master clock: %fMHz...") % (s->usrp->get_master_clock_rate()/1e6) << std::endl;
// create tx & rx streamer
uhd::stream_args_t stream_args_rx("sc16", "sc16");
//stream_args_rx.args["spp"] = str(boost::format("%d") % 2048);//(openair0_cfg[0].rx_num_channels*openair0_cfg[0].samples_per_packet));
......@@ -623,17 +597,18 @@ extern "C" {
s->rx_stream = s->usrp->get_rx_stream(stream_args_rx);
std::cout << boost::format("rx_max_num_samps %u") % (s->rx_stream->get_max_num_samps()) << std::endl;
//openair0_cfg[0].samples_per_packet = s->rx_stream->get_max_num_samps();
uhd::stream_args_t stream_args_tx("sc16", "sc16");
//stream_args_tx.args["spp"] = str(boost::format("%d") % 2048);//(openair0_cfg[0].tx_num_channels*openair0_cfg[0].samples_per_packet));
for (i = 0; i<openair0_cfg[0].tx_num_channels; i++)
stream_args_tx.channels.push_back(i);
stream_args_tx.channels.push_back(i);
s->tx_stream = s->usrp->get_tx_stream(stream_args_tx);
std::cout << boost::format("tx_max_num_samps %u") % (s->tx_stream->get_max_num_samps()) << std::endl;
s->usrp->set_time_now(uhd::time_spec_t(0.0));
for (i=0;i<openair0_cfg[0].rx_num_channels;i++) {
if (i<openair0_cfg[0].rx_num_channels) {
printf("RX Channel %lu\n",i);
......@@ -644,8 +619,9 @@ extern "C" {
std::cout << boost::format("Actual RX antenna: %s...") % (s->usrp->get_rx_antenna(i)) << std::endl;
}
}
for (i=0;i<openair0_cfg[0].tx_num_channels;i++) {
if (i<openair0_cfg[0].tx_num_channels) {
printf("TX Channel %lu\n",i);
std::cout << std::endl<<boost::format("Actual TX sample rate: %fMSps...") % (s->usrp->get_tx_rate(i)/1e6) << std::endl;
......@@ -655,11 +631,10 @@ extern "C" {
std::cout << boost::format("Actual TX antenna: %s...") % (s->usrp->get_tx_antenna(i)) << std::endl;
}
}
std::cout << boost::format("Device timestamp: %f...") % (s->usrp->get_time_now().get_real_secs()) << std::endl;
device->priv = s;
device->type = USRP_DEV;
device->trx_start_func = trx_usrp_start;
device->trx_write_func = trx_usrp_write;
device->trx_read_func = trx_usrp_read;
......@@ -673,37 +648,12 @@ extern "C" {
s->sample_rate = openair0_cfg[0].sample_rate;
// TODO:
// init tx_forward_nsamps based usrp_time_offset ex
/*if(is_equal(s->sample_rate, (double)30.72e6))
if(is_equal(s->sample_rate, (double)30.72e6))
s->tx_forward_nsamps = 176;
if(is_equal(s->sample_rate, (double)15.36e6))
if(is_equal(s->sample_rate, (double)15.36e6))
s->tx_forward_nsamps = 90;
if(is_equal(s->sample_rate, (double)7.68e6))
s->tx_forward_nsamps = 50;*/
/* move device specific parameters from lte-softmodem.c here */
if(is_equal(s->sample_rate, (double)30.72e6)) {
openair0_cfg->tx_delay = 8;
s->tx_forward_nsamps = 175;
openair0_cfg->tx_forward_nsamps = 175;
}
if(is_equal(s->sample_rate, (double)15.36e6)) {
openair0_cfg->tx_delay = 5;
s->tx_forward_nsamps = 95;
openair0_cfg->tx_forward_nsamps = 95;
}
if(is_equal(s->sample_rate, (double)7.68e6)) {
openair0_cfg->tx_delay = 5;
s->tx_forward_nsamps = 70;
openair0_cfg->tx_forward_nsamps = 70;
}
if(is_equal(s->sample_rate, (double)1.92e6)) {
openair0_cfg->tx_delay = 8;
s->tx_forward_nsamps = 40;
openair0_cfg->tx_forward_nsamps = 40;
}
openair0_cfg->iq_txshift= 5;
openair0_cfg->iq_rxrescale = 15;
printf("check params %d:%d",openair0_cfg->tx_forward_nsamps, openair0_cfg->tx_delay);
s->tx_forward_nsamps = 50;
return 0;
}
}
Active_eNBs = ( "eNB_Eurecom_LTEBox");
# Asn1_verbosity, choice in: none, info, annoying
Asn1_verbosity = "none";
eNBs =
(
{
////////// Identification parameters:
eNB_ID = 0xe00;
cell_type = "CELL_MACRO_ENB";
eNB_name = "eNB_Eurecom_LTEBox";
// Tracking area code, 0x0000 and 0xfffe are reserved values
tracking_area_code = "1";
mobile_country_code = "208";
mobile_network_code = "92";
////////// Physical parameters:
component_carriers = (
{
frame_type = "FDD";
tdd_config = 3;
tdd_config_s = 0;
prefix_type = "NORMAL";
eutra_band = 7;
downlink_frequency = 2680000000L;
uplink_frequency_offset = -120000000;
Nid_cell = 0;
N_RB_DL = 25;
Nid_cell_mbsfn = 0;
nb_antennas_tx = 1;
nb_antennas_rx = 1;
tx_gain = 90;
rx_gain = 120;
prach_root = 0;
prach_config_index = 0;
prach_high_speed = "DISABLE";
prach_zero_correlation = 1;
prach_freq_offset = 2;
pucch_delta_shift = 1;
pucch_nRB_CQI = 1;
pucch_nCS_AN = 0;
pucch_n1_AN = 32;
pdsch_referenceSignalPower = -29;
pdsch_p_b = 0;
pusch_n_SB = 1;
pusch_enable64QAM = "DISABLE";
pusch_hoppingMode = "interSubFrame";
pusch_hoppingOffset = 0;
pusch_groupHoppingEnabled = "ENABLE";
pusch_groupAssignment = 0;
pusch_sequenceHoppingEnabled = "DISABLE";
pusch_nDMRS1 = 1;
phich_duration = "NORMAL";
phich_resource = "ONESIXTH";
srs_enable = "DISABLE";
/* srs_BandwidthConfig =;
srs_SubframeConfig =;
srs_ackNackST =;
srs_MaxUpPts =;*/
pusch_p0_Nominal = -90;
pusch_alpha = "AL1";
pucch_p0_Nominal = -96;
msg3_delta_Preamble = 6;
pucch_deltaF_Format1 = "deltaF2";
pucch_deltaF_Format1b = "deltaF3";