When pushing traffic with iperf the UE was crashing.
The argument passed to pthread_mutex_timedlock is absolute time based
on the CLOCK_REALTIME timer, not relative time. That seems to be the
root cause of the bug. (That there is a timeout is another story.)
This commit uses absolute value.
Also we separate cases between IS_SOFTMODEM_BASICSIM / IS_SOFTMODEM_RFSIM
and standard realtime UE. In the 'sim' modes we don't care about
timeout and just call pthread_mutex_lock. It seems to be the idea
of the original work. If not, then to be fixed.
In the configuration file, to enable measurements, add:
enable_measurement_reports = "yes";
Note that if x2 is enabled then the option 'enable_measurement_reports'
is not taken into account and the measurements are enabled.
Not much major changes. In openair1/PHY/LTE_UE_TRANSPORT/dci_tools_ue.c,
in the function generate_ue_dlsch_params_from_dci,
'harq_pid' was removed and dci_info_extarcted.harq_pid is now used for
all cases.
The ue T tracer only deals with PHY signals (no MAC, RLC, PDCP, RRC).
- size of PUCCH has been fixed to:
- 2 RBs for N_RB_UL = 25 (1 RB at top of resource grid, 1 RB at bottom)
- 4 RBs for N_RB_UL = 50
- 6 RBs for N_RB_UL = 100
this is arbitrary and will need some rework at some point.
This may be also wrong. PUCCH size actually depends on DL traffic
(if the ack/nack is not done in PUSCH) and scheduling request
configurations.
- add sched_frame %= 1024 at one needed place
- reserve RBs for retransmission
this was not done so new transmissions were scheduled in the same
RBs. Since the code works with the notion of 'first_rb' only, it
was decided to skip all RBs lower than those retransmitted. This
works but is not correct (imagine we have to retransmit RB 23, then
all RBs < 23 will not be used for new transmission). The work to
fix this properly is complex, a lot has to change, so let's do it
this simple way for now.
- sort_ue_ul was not correct
- add the function maxround_ul to use the correct 'round' (the one
from DL was used, which is totally wrong)
- be sure to use the correct frame/subframe to get the correct HARQ pid
For retransmission, let's use cqi_req used for the 1st transmission.
Maybe incorrect, should check the specs. (In the worst case, we
simply won't decode this transmission at all. No big deal.)
end_of_burst_delay is used to stop TX only "after a while".
If we stop right after effective signal, with USRP B210 and
B200mini, we observe a high EVM on the S subframe (on the
PSS).
A value of 400 (for 30.72MHz) solves this issue. This is
the default.
This default value can be changed in the configuration file.
For example:
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 20
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 105;
eNB_instances = [0];
sf_extension = 312;
end_of_burst_delay = 200;
}
);
Here we would set a value of 200.
The value to put in the configuration file is for
30.72MHz. The value is scaled accordingly at runtime
(thus only one value to set for every RB configuration,
25, 50 or 100, leading to less problems when adapting
configuration files).
This option is for experts and should not be changed
randomly.
Start of burst is to start TDD DL transmission in the driver
(tested with USRP for the moment).
End of burst is to stop DL transmission.
Start of burst can only happen for a DL subframe when the
previous subframe was an UL subframe.
End of burst can only happen for an S subframe.
It's impossible for a subframe to be both the start of a burst
and the end of a burst.
This can be checked with eg. http://niviuk.free.fr/lte_resource_grid.html
(or reading the specs).
This parameter is meaningful in TDD, to decide
when to start DL at eNB side. Since there is a
need for the PA to be operational, we need to
transmit a bit before the DL subframe coming
after an UL subframe. (We transmit zeros.)
We used to use N_TA_offset which may be too much.
Default value is now N_TA_offset/2 and can be
changed in the configuration file, in the RUs
section, like:
RUs = (
{
local_rf = "yes"
nb_tx = 1
nb_rx = 1
att_tx = 0
att_rx = 0;
bands = [7];
max_pdschReferenceSignalPower = -27;
max_rxgain = 105;
eNB_instances = [0];
sf_extension = 312;
}
);
N_TA_offset is 624 (for 30.72MHz). In the example
above, we set sf_extension = 312, which is also
the default.
The value to put in the configuration file is for
30.72MHz. The value is scaled accordingly at runtime
(thus only one value to set for every RB configuration,
25, 50 or 100, leading to less problems when adapting
configuration files).
This option is for experts and should not be changed
randomly.
This commit introduces X2AP timers (t_reloc_prep, tx2_reloc_overall).
You need to set the values in the configuration file.
X2AP can be enabled or disabled in the configuration file too (disabled
by default).
Some deadcode was removed.
Some deadcode was removed.
The implementation of the ID management is not finished.
It will only work if the handover is successful. No error
recovery has been done. For error recovery, we need to
implement the X2AP timers. As it is, in case of error, an ID
might very well never be released.
It has been tested with 1 and 2 UEs doing handover more or less
at the same time.
With the introduction of X2AP into develop, the UEs now have to regularly
send measurement reports.
In the logs of the eNB, we see:
[OSA] Mismatch found in integrity for algorithm 2,
got e0.a0.c2.66, expecting a5.9c.cb.57
[PDCP] [OSA][RB 1] eNB failed to validate MAC-I of incoming PDU
This is a bug in the PDCP layer that uses wrong parameters to compute the
integrity.
This commit fixes this bug.
The function pdcp_is_rx_seq_number_valid was removed. Its processing
has been directly integrated into the function pdcp_data_ind.
The function pdcp_mark_current_pdu_as_received is not called anymore.
Its processing was not used later on, so as of today, not calling it does
not introduce any functional change.
The function pdcp_validate_security takes now as parameters both
SN and HFN. Same for the function pdcp_get_next_count_rx.
Useless constants PDCP_SN_5BIT, PDCP_SN_7BIT and PDCP_SN_12BIT have been
removed.
The compilation option ENABLE_SECURITY has been removed. It's now always
on. (This may impact some use cases.)
The PDCP for DRB using RLC AM is not correct. It was not correct before
this commit (apart from the integrity bug). We should deal with a list
of PDUs and transmit packets to upper layers as detailed in the specs.
Today we transmit the PDU as soon as we get it. We don't care about
duplicates, in-order delivery, timeouts.
Also, we don't deal with "PDCP re-establishment". Not sure how that impacts
the software.
And, last but not least, there is still no ROHC.
Due to some unknown bug in the eNB (or UE, or both), the first frames
are not correctly generated (or handled), which leads to a bad behavior
of the simulator in some cases (seen with 100 RBs: the UE reads a bad
MIB and switches to 25 RBs, which results in a deadlock in the
tcp_bridge_oai driver).
Let's "fix" this problem by skipping (in the driver) some frames at the
beginning of the simulation.
A new option -live has been added to run live (ie. like the 'enb' tracer)
and options -live-ip and -live-port to select IP/port of the machine running
the eNodeB.
Some new options to control MIB and SIBs recording have been added.
Some global variables have been removed.
Not much has been changed in the driver (that used libbladerf 1.0).
Some bugs have been fixed. Documentation has been added. A configuration
file has been added too, put in the directory ./configuration/bladeRF.
To use a bladeRF device, see documentation in targets/ARCH/BLADERF/README.
Only the BladeRF x40 has been tested.
Performance is not too bad at 5MHz, a bit worse at 10MHz and on the test
machine I used I face realtime problems at 20MHz when I push downlink
throughput.
So, there is still some work to do to have a good support of bladeRF.
If you run 'make' in common/utils/T/tracer
just after a clone of the repository then the
compilation will fail because the file ../T_IDs.h
was not generated.
Let's add a simple dependency to fix this.
It is to ease the life of people wanting to record traces to be
consumed later on by wireshark.
You just run: ./record -d ../T_messages.txt -o /tmp/record.raw -on WIRESHARK
and you're good.
The tracer macpdu2wireshark can send MIBs to wireshark.
This can be disabled by passing the new -no-mib option.
openair1/SCHED/phy_procedures_lte_eNb.c has been modified
to have a new T trace with the MIB.
The symptom: when two UEs do uplink traffic at the same time, the
eNB fails to decode data sometimes. This has been seen with FDD
and 50 RBs. This generates a cascade of other problems leading to
disconnection/reconnection events seen in the log.
The problem: there are probably many, but one obvious bug was found
while analyzing some logs. Scheduling in the same TTI one UE's uplink
traffic and random access (msg3) was done in the same RB.
This commit fixes this simple case. It is probably not the end of
the story.
This is a hotfix, that does not change the code much.
We need to use vrb_map_UL properly all over the places. Today is
not used, but this is the way to go (most probably).
Fix the assertion:
Assertion ((instance_p->mnc_digit_length[ue_desc_p->selected_plmn_identity] == 3) || (instance_p->mnc_digit_length[ue_desc_p->selected_plmn_identity] == 2)) failed!
In s1ap_eNB_handle_nas_first_req() /home/ubuntu/tmp/openair3/S1AP/s1ap_eNB_nas_procedures.c:243
With this hotfix the UE selects the first PLMN sent by the eNodeB.
The UE has to select the correct PLMN from those received in SIB1. This
will be done with a later merge request.
For whatever reason we need N_TA_offset to be 0 for the basic simulator
to function properly.
This is more a hack than a proper solution. More analysis is needed
to understand what happens and what should be really done.
In TDD mode the eNB does not output data all the time,
only in downlink and special subframes.
The basic simulator needs a continuous stream of samples.
So let's fill the blank with silence.
When compiling in debug mode, the 'inline' semantics of C99 led to the errors:
/roux/w25/openairinterface5g/common/utils/LOG/log.c:479: undefined reference to `log_header'
libUTIL.a(log.c.o): In function `log_dump':
/roux/w25/openairinterface5g/common/utils/LOG/log.c:502: undefined reference to `log_header'
collect2: error: ld returned 1 exit status
Let's use static instead of inline.
This commit manually reverts the commits:
- 97c69dc4a4
- 3278aa494d
The basic simulator was not functional anymore because
the UE did not send RRCConnectionSetupComplete due to
some problem in the PDCP layer, most probably.
Note: we don't include the last commit from origin/recode_itti_from_scratch
because it is just astyle formatting. As of today we don't enforce
astyle and including this work would lead to future merge conflicts.
A proper process to enforce astyle has to be put in place. In the
meantime, no astyle allowed in commits if the changes are too big
and not relevant to work done.
The bug popped up when one UE was doing TCP UL iperf and a second UE
attempted to connect. A crash of the eNB happened because we changed
the wrong NFAPI structure in a TTI where both UEs are scheduled.
Something like that.
Using the basic simulator and valgrind, it was found that
the lack of initialization of those two pointers leads to
some very nasty behavior of some other parts of the system.
In the eNB it's not really used for the moment because there
is a limitation to uplink scheduling. In
openair2/LAYER2/MAC/eNB_scheduler_ulsch.c we have:
while (((rb_table[rb_table_index] > (N_RB_UL - 1 - first_rb[CC_id]))
|| (rb_table[rb_table_index] > 45))
That limits uplink scheduling to at most 44 RBs. The 768 case is for
64 RBs.