Commit 07d6d0ab authored by matzakos's avatar matzakos

fixed unwanted modification on ue NAS configuration. cleanup of commented code in usrp_lib.cpp

parent 475242c6
...@@ -86,14 +86,9 @@ UE0: ...@@ -86,14 +86,9 @@ UE0:
}; };
SIM: { SIM: {
MSIN="0000000001"; MSIN="0100001111";
#USIM_API_K="e56e26f5608b8d268f2556e198a0e01b"; USIM_API_K="8baf473f2f8fd09487cccbd7097c6862";
#USIM_API_K="8baf473f2f8fd09487cccbd7097c6862"; #initial OPC="e734f8734007d6c5ce7a0508809e7e9c";
#USIM_API_K= "11111111111111111111111111111111"; #nano
USIM_API_K="fec86ba6eb707ed08905757b1bb44b8f";
#OPC="e734f8734007d6c5ce7a0508809e7e9c"; #initial
#OPC="f47f37e4719a9c379e3447f089b1f10a"; #nano
OPC="C42449363BBAD02B66D16BC975D77CC1";
MSISDN="33611123456"; MSISDN="33611123456";
}; };
......
...@@ -465,20 +465,8 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp, ...@@ -465,20 +465,8 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
} }
} }
int packet_size = s->tx_stream->get_max_num_samps();
int residual = nsamps % packet_size;
int num_packets = (nsamps/packet_size) + ((residual>0) ? 1 : 0);
int first_packet_length = (num_packets>1) ? packet_size : residual;
int packet_s;
/* s->tx_md.has_time_spec = flags;
if(flags>0)
s->tx_md.has_time_spec = true;
else
s->tx_md.has_time_spec = false;*/
boolean_t first_packet_state=false,last_packet_state=false,first_packet_has_timespec=false; boolean_t first_packet_state=false,last_packet_state=false,first_packet_has_timespec=false;
if (flags == 2) { // start of burst if (flags == 2) { // start of burst
// s->tx_md.start_of_burst = true; // s->tx_md.start_of_burst = true;
// s->tx_md.end_of_burst = false; // s->tx_md.end_of_burst = false;
...@@ -509,49 +497,10 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp, ...@@ -509,49 +497,10 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
first_packet_state=false; first_packet_state=false;
last_packet_state=true; last_packet_state=true;
} }
/* s->tx_md.has_time_spec = first_packet_has_timespec;
int offset=0; s->tx_md.start_of_burst = first_packet_state;
for (int packet_ind=0;packet_ind<num_packets;packet_ind++) { s->tx_md.end_of_burst = last_packet_state;
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate);
s->tx_md.has_time_spec = first_packet_has_timespec;
s->tx_md.start_of_burst = false;
s->tx_md.end_of_burst = false;
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp+offset, s->sample_rate);
if (packet_ind == 0) {
packet_s = first_packet_length;
s->tx_md.start_of_burst = first_packet_state;
if (num_packets==1) s->tx_md.end_of_burst = last_packet_state;
else s->tx_md.end_of_burst = false;
}
else if (packet_ind==num_packets-1) {
packet_s = residual;
s->tx_md.end_of_burst = last_packet_state;
}
else packet_s = packet_size;
if (cc>1) {
std::vector<void *> buff_ptrs;
for (int i=0; i<cc; i++)
buff_ptrs.push_back(&(((int16_t*)buff_tx[i])[offset]));
ret = (int)s->tx_stream->send(buff_ptrs, packet_s, s->tx_md,1e-3);
} else
ret = (int)s->tx_stream->send(&(((int16_t *)buff_tx[0])[offset]), packet_s, s->tx_md,1e-3);
if (ret != packet_s) {
LOG_E(PHY,"[xmit] tx samples %d != %d\n",ret,nsamps);
break;
}
offset += packet_s;
}
ret=offset;
*/
s->tx_md.has_time_spec = first_packet_has_timespec;
s->tx_md.start_of_burst = first_packet_state;
s->tx_md.end_of_burst = last_packet_state;
s->tx_md.time_spec = uhd::time_spec_t::from_ticks(timestamp, s->sample_rate);
if (cc>1) { if (cc>1) {
std::vector<void *> buff_ptrs; std::vector<void *> buff_ptrs;
...@@ -559,9 +508,8 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp, ...@@ -559,9 +508,8 @@ static int trx_usrp_write(openair0_device *device, openair0_timestamp timestamp,
for (int i=0; i<cc; i++) for (int i=0; i<cc; i++)
buff_ptrs.push_back(&(((int16_t*)buff_tx[i])[0])); buff_ptrs.push_back(&(((int16_t*)buff_tx[i])[0]));
ret = (int)s->tx_stream->send(buff_ptrs, nsamps, s->tx_md,1e-3); ret = (int)s->tx_stream->send(buff_ptrs, nsamps, s->tx_md);
} else } else ret = (int)s->tx_stream->send(&(((int16_t *)buff_tx[0])[0]), nsamps, s->tx_md);
ret = (int)s->tx_stream->send(&(((int16_t *)buff_tx[0])[0]), nsamps, s->tx_md,1e-3);
if (ret != nsamps) LOG_E(PHY,"[xmit] tx samples %d != %d\n",ret,nsamps); if (ret != nsamps) LOG_E(PHY,"[xmit] tx samples %d != %d\n",ret,nsamps);
......
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