-- scenarios were using FDD 5MHz conf file w/ active RRC inactivity timeout
-- since we are waiting very long that UE is sync'ed w/ eNB, timeout occurs and UE is released
-- solution is to disable timeouts in command line in scenario
-- also python is fixed to handle properly wrong ping exits
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
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 python: detection of a build failure, the tab should close nicely
-- L2-nFAPi simulator: adding the num-ue-thread option
-- Moved the VM destroy stage into the "VM-based test" branch.
-- On "slave" job pipeline, moved the XML parsing after the git merge step so new test-cases are nicely taken care of.
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- in python: detection of a build failure, the tab should close nicely
-- L2-nFAPi simulator: adding the num-ue-thread option
-- Moved the VM destroy stage into the "VM-based test" branch.
-- On "slave" job pipeline, moved the XML parsing after the git merge step so new test-cases are nicely taken care of.
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
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.
* Instead of partly initializing in read_config_and_init(), everything of
PDCP is initialized in main() of lte-softmodem
* Omit RC.rrc access in RRU through checking of RC.nb_inst > 0
* Includes FlexRAN, i.e. do not start FlexRAN in RRU
* Function pointers to PDCP functions have to be set explicitly (avoid
confusion of multiply setting function pointers)
-> slight increase on the ping RTT by 10 ms
-> notification in the HTML report that CDRX was activated
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
The following Merge Requests are included:
- MR 553: L2-nFAPI-simulator improvements and nFAPI code clean-up
- MR 554: Fixes on MAC scheduler
- MR 558: T: minor fix: ensure printing is inside the widget
- MR 559: UE T Tracer: bug fixes
- MR 561: Adding OAI UE + USRP test scenarios
- MR 567: Adding F1 - CU/DU test scenarios
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.)
-- EPC lists are expended to 16 users
-- UE .u* files are regenerated on demand
-- ping still one UE from EPC
CI: pipeline improvement
-- L2-Sim is no more a build variant
One VM less to be created
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
This resolves the following warning:
"error: invalid suffix on literal; C++11 requires a space between literal and
identifier"
Since this file might be included from a C++11 file. It only adds spaces.
Successfully writing the log file ue_080101.log and finding the sync marker.
Initialize OAI UE is working.
BuildOAIUE action seems ok. Must fix the log file path for the InitializeOAIUE action.
Doing the work in /tmp, not in the repository of the main.py script being executed.
Signed-off-by: Boris Djalal <boris.djalal@eurecom.fr>
-- rrc_inactivity_threshold in seconds
Adding support in CI to test it
-- disable/enable data service on UEs
-- no automatic check yet on the UE status
certainly should be done w/ a Flexran controller command
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
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.
-- Master has now a stage calling the Band 13 job
-- Pipeline executor is now a parameter
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- RRU max rx gain is given in command line
-- USRP reset is only done once in protocol split scenarios
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
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.
-- Moved the Gitlab notification within the try:
As a result, when fails, the notification will be a fail
-- Changed all exit by return in the runTest script
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Although not used in the UE, we currently need to link the F1 library into it.
This is because we do not define ASN_DISABLE_OER_SUPPORT (otherwise, F1 has
compilation problems). In this case, some functions are apparently not
correctly defined, giving linker errors in the UE. Linking F1 in solves the
problem.
This is a hack. It would be better to be able to define ASN_DISABLE_OER_SUPPORT
and have no compilation errors or compile everything with
ASN_DISABLE_OER_SUPPORT except F1. I did not do this because I did not find
another way than add target_compile_definitions() to every target except F1
which adds many lines just so that one target (F1 ASN.1) compiles correctly (in
other words, F1 needs to be fixed).
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.
- manage target eNB based on target cell id received by measurement report
for Handover Request
- manage source eNB based on association id for Handover Request Ack
- use only x2ap instance and not x2ap data instance points to x2ap instance
- free correctly in rrc_eNB_free_mem_UE_context
- check for existence of ue_context.handover_info in rrc_enb_process_itti_msg
- check return value sctp_peeloff in sctp_handle_new_association_req_multi
and exit in case of failure
When testing x2 handover, we found a race issue between the
RRC thread and the phy/mac thread (which is calling rrc_rx_tx).
The UE context was updated by the RRC thread but in the middle of
the update (which consists of several function calls and variables'
updates) the context was accessed by rrc_rx_tx. At this point, the
context was in an inconsistent state.
The solution is to access RRC data in the RRC thread only.
The function rrc_rx_tx now just sends an ITTI message to the
RRC thread. When receiving this message, the RRC thread does
the processing that was done by the function rrc_rx_tx (in
the new function rrc_subframe_process).
This way, the race condition disappears.
However we now send an ITTI message from the phy/mac thread to
the RRC thread at each subframe. That might increase the processing
time of the eNB. So maybe it's not the best solution. It may also
improve the realtime performance because less work is done by the
phy/mac realtime thread. To be checked somehow.
Also, it may be possible that some other RRC functions are still
called by the phy/mac thread, which should also be checked and
replaced by ITTI messages (if this solution is considered to be
correct).
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.
-- should prevent VM-creation crashes during test stages
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
(cherry picked from commit eeffdfa200)
--> openair2/LAYER2/MAC/eNB_scheduler_primitives.c is still old (not from issue394_fix_cppcheck branch)
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
link_send_packet() has been extended to use for multiple protocols (added UDP,
SCTP after TCP). The test was not update, though, which is fixed in this
commit.
This changes the destroy_link_manager() function to:
* call a new function message_get_unlock() to unlock the sending thread from
its blocking message_get()
* calls pthread_cancel() on the receiving thread, because this unlocks any
blocking read from a file descriptor
The same message_get_unlock() function has been added ringbuffer_queue to keep
the interfaces the same (it does nothing, because ringbuffer_queue is
non-blocking).
This commits isolates the S1 UE Ctxt Rel Complete and GTP Tunnel Delete
Requests in functions and calls these function in the original place
(rrc_rx_tx()). The same functions are then used in the F1 UE Ctxt Rel
Complete handler to perform the same functionality, i.e. forward the UE
Ctxt Rel Complete message to the MME and free outstanding resources (RRC
context, GTP tunnels, S1 context).
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.
--> increase the timeout of copyin/copyout functions to 100 sec
Also changed the UHD driver version retrieval
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
When a phone loses connection, it should not simply be removed but first
CU should be informed which will send a ContextRelCmd. Correspondingly,
when the RRC releases the UE, it does not send a UE Context Release Req
See merge request oai/openairinterface5g!486
Integration Branch: 2019 week 03
* MR 477: Resolve "384 obsolete files to delete"
* MR 479: Fix on allow remote connection in tcpbridge
* MR 480: Ue hotfix u emode during initial connection
* MR 484: Fix on T early logs
* MR 485: Fix on exit softmodem when a command line option requiring an argument is specified
sctp_create_new_listener() takes a parameter server_type which is NOT
the IP version but whether it is an SCTP multihoming server. There was a
bug that when multihoming is not wanted, it created an IPv6 socket
instead of IPv4. This commit fixes this.
IPv6 is not supported yet.
Develop integration 2018 week 51
See merge request oai/openairinterface5g!470
Integration branch for week 51 (2018). Last of the year
The following MRs have been merged:
- 440 : L1 renaming
- 459 : dlsim format1A testing
- 464 : Iris HW support
- 466 : Workshop demo
- 467 : compilation make fix for ASN1C
- 468 : limeSDR compilation fix
In addition: added support for multi-XML scenarios on slave CI jobs
* MAC differentiates between DU/eNB
* sends ITTI message to DU task for F1AP_UE_CONTEXT_RELEASE_REQ
* message is dispatched to correctly in DU_TASK
* sender correctly fills IDs and cause and sends
* RRC and MAC might sort users differently
* therefore, we have to "reverse lookup" the MAC ID from the RNTI when filling
user info
* For this purpose, add RAN API function flexran_get_mac_ue_id_rnti()
Develop integration 2018 week 48
See merge request oai/openairinterface5g!462
Integration of the following MRs:
- MR 448: Missing RRC inactivity timer
- MR 458: Adding MAC main config to RRC connection setup
- MR 457: Resolving "parallelization not working correctly in phy simulators"
- MR 460: Fixing RU DFT initialization
-- RAW record file is parsed and replayed
-- Replayed log file is parsed instead of normal eNB file during terminate
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- tracing is done w/ a single UE attach / detach
-- traffic b/ EPC and eNB is captured by tshark
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
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.
OER can be disable with the switch -DASN_DISABLE_OER_SUPPORT. In F1AP,
disabling OER leads to a typedef void a_type; leading to lots of compilation
errors because of illegal void variable declarations. This commit leaves OER
support enabled, avoiding this error.
The PROTO_AGENT variable holding the channel for various was named as the same
one for FlexRAN. In C, global variables with the same name are merged into one,
which had the effect that the same queues where used for PROTO_AGENT and
FlexRAN, locking the FlexRAN RX thread. Renaming the PROTO_AGENT variable (it
was introduced second) resolves this issue.
This commit cleans up the link_manager interface:
* don't provide peer_addr/port in create_link_manager() (for TCP/SCTP it is not
needed, so in the UDP case in needs to be set explicitly)
* Make FlexRAN connect again (correct hardcoded address)
* Fix FlexRAN: retain the manager pointer
* Fix FlexRAN: store receive_queue pointer
* the link_manager's sender thread passes the correct peer_addr/port for the
UDP case
* the RAN API RRC part now takes rnti and does not look it up in the MAC every
time again
* the function flexran_get_aperiodic_cqi_rep_mode() has been changed to return
a proper protobuf variable, not OAI typedef
The functions of the RAN API should not return the types of OAI, but protobuf
types. Previously, they would return OAI types and the calling code "marshals"
this into Protobuf type. This commit changes the following functions and
modifies the calling code to directly store the protobuf type:
* flexran_get_hopping_mode()
* flexran_get_phich_resource()
* flexran_get_phich_duration()
* flexran_get_ul_cyclic_prefix_length()
* flexran_get_dl_cyclic_prefix_length()
* flexran_get_duplex_mode() usage
* flexran_get_enable64QAM()
* Hello msg agent->RTC carries ID and capabilities this agent supports
* RAN API provides ID and capabilities:
- flexran_get_bs_id()
- flexran_get_capabilities() // protobuf list of capabilities
- flexran_get_capabilities() // capabilities as bit mask
Add FlexRAN capabilities mask RAN API function
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.
-- in slave job, the lock is now properly done for the whole job
-- in master job, all slave jobs are really sent in parallel
they should now now appear as failed (if fails)
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Fix the problem that duplicate type names exist in OPEN TYPE.
The following excerpt of ASN.1 of X2AP is one example.
HandoverRequestAcknowledge-IEs X2AP-PROTOCOL-IES ::= {
{ ID id-Old-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}|
{ ID id-New-eNB-UE-X2AP-ID CRITICALITY ignore TYPE UE-X2AP-ID PRESENCE mandatory}|
...
}
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.
-- Note that max line length is 200 (maximum allowed by tool)
-- Pre-commit hook tested and uses the same option file as CI
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
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 for IF4p5 TDD scenario (missing build test-case)
-- added automatic UE/eNB termination in main.py when iperf/ping fails
It allows to have a eNB log analysis for HTML reporting
-- added statistics on PDCP out-of-resource messages
-- added statistics on ULSCH error messages
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- basic-simulator: added TDD 5MHz DL iperf test
-- main.py script
* better HTML reporting when ping/iperf commands timed out
* at eNB terminate, more analysis on RRC commands
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
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.
-- at the end of eNB run, eNB log file is retrieved and analyzed for SegFault / Assertions / Real Time issues
if any found, added to the HTML report
-- When script fails to retrieve UE IP address, try again and report in HTML report if failed
-- Core is dumped during seg fault event and added to eNB run log zip artifact
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Introduction of S1-flex. It handles multiple PLMN IDs (up to 6) in the SIB as well as the selection of an MME based on the selected PLMN identity.
Major impact: changes on the eNB configuration files:
tracking_area_code = 1;
plmn_list = (
{ mcc = 208; mnc = 94; mnc_length = 2; },
{ mcc = 208; mnc = 95; mnc_length = 2; }
)
See https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/s1-flex-conf-nnsf for more details.
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
1. Fix the problem of compiling NR_RangeToBestCell.c of NR-RRC 15.3.0
2. Fix the problem that default OCTET/BIT STRING value not used in APER
3. Add support of extension group inside CHOICE type used in LTE-RRC 15.3.0
4. Fix the problem that NGAP 15.0.0 ASN.1 can not generate C files
* unified CU/DU in one PROTO_AGENT instance since they are symmetric from UDP POV
* delete a lot of unnecessary code
* better error handling
* can reciprocally send data
* peer_addr is now const
* new_link_udp_server() can bind to address or INADDR_ANY
* socket_udp_receive() happens without a loop
* socket_udp_send() happens without a loop
* sending in two packets (first size, then data) is only performed for TCP,
SCTP, not for UDP anymore (it is unreliable, so we could miss something and
will receive complete garbage)
- add message sender (CU) + handler (CU) and fill with data from ITTI message
- add PLMNID_TO_MCC_MNC and BIT_STRING_TO_TRANSPORT_LAYER_ADDRESS_IPv4 macros
- correct TRANSPORT_LAYER_ADDRESS_TO_BIT_STRING:
change name to TRANSPORT_LAYER_ADDRESS_IPv4_TO_BIT_STRING, make it send 4B, not 5
Connection goes until generation of RRCConnectionSetup in CU which crashes (it calls rrc_mac_config_req. For DU this should be replaced with filling DL_RRC_MESSAGE_TRANSFER
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.
When the RLC layer returns error codes (like dropped packets), this is still
counted as PDCP layer traffic. In order to reflect dropped packets or
malfunctioning, this patch makes that upon an RLC error code, the function is
exited immediately. In this case, it is not counted as additional PDCP traffic.
An example is too much UDP traffic. If the RLC buffer is saturated and the
packet therefore refused, incoming traffic won't be counted anymore. With this
patch, the PDCP layer statistics won't count such traffic anymore.
the integration of the nfapi-L2-emulator-for-develop (f254107b2) added more
types in the RCconfig_flexran(), but they were partially wrong. This commit
fixes those types after the rebase of this branch on top of 2018.w19
* give the correct UE_id instead an index of the protobuf message (they can
diverge from each other)
* in the PDCP part of the RAN API, the RAN API has to make the conversion UE_id
(MAC) to UID (PDCP)
* a follow up commit could clean up the interfaces:
- the MAC functions take the UE_id
- the RRC functions take the RNTI
- the PDCP functions take the UID
this would mean the caller has to find those ID but would decrease
computations since the RAN API functions do not have to do that themselves
If the buffer in the RLC is full, testing the buffer state over and over again
slows the DL traffic down. In order to circumvent this, the PDCP will drop any
data during a configurable time (compile-time) before it delivers data to RLC
again.
To change this, see the constant TM_SKIP_FULL_BUF_MS in pdcp.h.
- there can be a race between the FlexRAN agent reading the RC.mac and its
allocation in main.c
- In order to circumvent this, change the allocation by allocating
everything "into" a local variable
- finally "make it visible" by storing the pointer in RC.mac
* check whether a library has been loaded before; in this case, don't allocate
new memory but load from old library again
* vital parameters, previous exit_fun are checked by AssertFatal()
* structure has changed a bit to make it easier to follow (instead of nested
ifs includes one goto to the end of the function)
* formatting has been improved
* instead of the lengthy YAML parsing, can now handle protobuf message
* after setting the parameters, send a message to ENB_APP to perform it
* old YAML way still works
* join pthread_FH (ru_thread) once all condition variables have been set
* join RU FHTX only if it has been started (check as for pthread_create())
* join PRACH thread in the monolithic case
* send broadcast on condition variable cond_eNBs, as there can be multiple
waits on it
* integrate stop_ru(*ru) into kill_RU_proc(*ru)
* Correct memory freeing
* init_td_thread()/init_te_thread() are only initialized depending on condition
get_nprocs() > 2 && codingw
* apply the same the same for the functions kill_td_thread()/kill_te_thread()
* properly allocate memory for scheduler name/sorting
* free mem of sc_update, include todo for slice_config
* set has_x to one, add fct whether sorting update necessary
* set n_ul/n_dl to correct value after every loop iteration
* support for delete of multiple slices
* allocate memory for scheduler name in slice_config
* check that we really set the scheduler
- in order to facilitate the steps as verification and parameter setting,
slices are "filled up" with default values:
* if it is an update, with the values of the concerned slice
* if it is a new one, with the parameters of slice 0
- because of this, it can be assumed that all slices have all parameters
- setter & getter have been renamed
- setter sets scheduler name and links to the corresponding function
- it also returns whether it succeeded (whether the scheduler callback is
non-null)
- it performs a strdup on the scheduler name
- the remove function free the scheduler function name
- until now, on every iteration, the scheduler checked for changed parameter
(and verified some)
- this functionality moves to the FlexRAN Agent, which verifies all parameters
* individually, e.g. Max MCS <= 28 for DL
* group-based, e.g. the sum of slice percentages is <= 100
- slice configuration changes are only applied if all verifications pass
- it is assumed in the scheduler, that configuration passed from outside is
correct and can be used "as-is"
fix accounting setting
- uncomment "Couldn't find RNTI for UE X" in UE_RNTI() and rb_alloc in
pre_processor_reset() as they only inflate the debug output with little
benefited
- "doing ue_schedule_spec" is now displayed for individual UEs (and individual
CCs)
- show messages when not scheduling UE in ue_schedule_spec() due to invalid
slice or if not in RRC_CONNECTED
- slice multiplexing resorts UE_list for its purposes with restoring the
original order
- in order to keep the order in UE_list, resort to original order after
multiplexing
- ideally, this would happen in the multiplexing but currently, the slice_idx
is not passed to multiplexing (it does not care), so this cannot be done ATM
Incoming slice configuration changes are buffered in an intermediate structure.
The MAC scheduler periodically polls the agent about changes. If there has been
a slice configuration change, apply it.
- introduce structure in RC for slicing conf (UL/DL)
- move global variables regarding slice configuration into RC
- change ue_slice_membership(): consider UL/DL
- remove the unnecessary header files
- set default parameters: one slice
-- Configuration files for a Band-40 test setup
-- XML file test on band-40 for 5 and 10 MHz in DL only
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
1. Fix UE_CONTEXT_SETUP_REQUEST and CONTEXT_MODIFICATION_REQUEST encode/decode
2. Add gNB_DU_CONFIGURATION_UPDATE and gNB_CU_CONFIGURATION_UPDATE procedure
3. Add C_RNTI_TO_BIT_STRING function
4. Add INITIAL_UL_RRC_MESSAGE_TRANSFER procedure and with mac_du_data_ind (MSG3)
5. Add GNB-CUSystemInformation extension part for the F1SetupResponse procedure
-- URL of jenkins build included in top of HTML report
-- when one of the needed processes not present, reported in HTML
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Various problems were found with the basic simulator.
Variables used by various threads for synchronization need to
be initialized properly. That is before the various threads
start using them.
This goes for:
- UE->is_synchronized
- UE->proc.instance_cnt_synch
- UE->proc.instance_cnt_rxtx
The function "UE->rfdevice.trx_start_func" was called in
"UE_thread_synch" but should be called in "UE_thread" because
"UE_thread" is the one that calls "UE->rfdevice.trx_read_func"
and there is no guaranty that the call to "UE->rfdevice.trx_start_func"
is done before as it has to (it's in another thread).
And finally "pthread_cond_signal(&proc->cond_rxtx)" was called twice,
which may not be a problem but was certainly not intended. Plus
removing one call simplifies the code by removing some "if" logic,
which is a good thing per se.
This commit was not tested with a real UE and may thus introduce some
issues. Hopefully not!
With 50 RBs and 100 RBs the UE crashes in the basic simulator
because of false detection of DCIs.
Putting nothing in the unused REs in the DCI instead of random
bits solves this issue and let the basic simulator run with 50 RBs
and 100 RBs.
Note that in the real UE the problem needs to be solved because
the channel may lead to false DCI detection and the consequent
crashes have to be solved. This commit sort of "hides" the issue
to have the basic simulator functional.
Note also that putting nothing in the unused REs in the DCI should
be the normal general case. But it has not been tested with anything
but the basic simulator so the previous code is left.
Before this commit we were checking for UE->is_synchronized == 0
then we were waiting for a potentially active synch routine to
finish and then we were starting the synch routine again but the
synch routine that was running may have set UE->is_synchronized
to 1. This was leading to various problems, most notably the following
message repeated over and over in the UE log and the UE unable to
connect properly:
[RRC] [UE 0] Frame 377: OUT OF SYNC FROM eNB 0 (T310 active 0 : T310 0, N310 345, N311 0)
So let's wait for a potentially active synch routine to finish
before anything else.
-- no more -x option at compilation time
-- iperf server report crash better handled
-- python executor retrieve iperf server files in case of failure to analyze
-- comparison w/ requested bandwidth
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Summary of changes:
- fix compilation on CentOS
- some work on the T tracer:
- add a 'multi' tracer to connect several tracers at the same time
- improve 'to_vcd' to be compatible with previous VCD traces
- preliminary work for X2 handover
- various bug fixes
A new version of asn1c is to be used with this commit.
Do:
cd [top directory of repository]
source oaienv
cd cmake_targets
./build_oai -I
- 'busy' has to be handled in a more atomic fashion to avoid crazy
runtime race conditions
- the basic simulator is too fast sometimes; rewrite the accesses to
the T cache to avoid there again crazy behaviors
Hopefully that's better...
This commit removes the warning:
make[4]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule.
Basically, inside a Makefile we should use $(MAKE) instead of make.
Since VCD has now to go through the T tracer, we enforce the consistency
of data found in common/utils/LOG/vcd_signal_dumper.[ch] with data
found in common/utils/T/T_messages.txt.
We might get completely rid of common/utils/LOG/vcd_signal_dumper.[ch] at some
point. For the moment, let's keep it.
This commit adds the program common/utils/T/check_vcd.c and necessary
modifications to enforce its use at compilation time.
If you modify common/utils/LOG/vcd_signal_dumper.[ch] but do not update
common/utils/T/T_messages.txt an error will pop up when you compile the
software. You have to keep both modules synchronized.
TODO: Currently the driver picks the two first RX and TX channels when nb_tx and nb_rx are both set to 2. If a developers wants to force usage of two devices, 'set_rx_subdev_spec' and 'set_tx_subdev_spec' can be used to indicate to the driver so that antennas from separate devices will be used. To rephrase: until 4 antennas are supported by OAI, testing with two devices, so that antennas from both devices are used, requires manual configuration of which subdevices' antennas are used.
Conflicts:
targets/ARCH/USRP/USERSPACE/LIB/usrp_lib.cpp
Also add output of MBMS multicast IP packets to the network.
This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de) by Javier Morgade, Ph.D.
Also for PMCH subframes, call slot_fep() for first OFDM symbol of next subframe.
This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de).
Subframe 6 may be an MBMS subframe, and timing sync does not (yet) work on MBMS subframes.
This commit was developed at Fraunhofer IIS (https://www.iis.fraunhofer.de).
- fix when FDD slave job fails, it still retrieves the HTML report
- improvement in HTML report, stats per UE for attach, ping, iperf
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Make it compatible with 'template' gtwave files as found in openair's
repository.
The type VCD_NAME was added to the VCD IDs in T_messages.txt.
The database processing code was adapted to use it.
The tracer to_vcd was adapted to use it and render the produced vcd
output compatible with the 'template' gtkwave files.
When running to_vcd, do not forget to pass -vcd to use this feature.
This tracer allows the connection of several tracers to one tracee.
To use the multi tracer:
- run the tracee as usual, eg. ./lte-softmodem -O xxxx.conf --T_stdout 0
- run the multi tracer: ./multi -d ../T_messages.txt
- connect other tracers to the multi tracer:
- ./enb -d ../T_messages.txt -p 2022
- ./textlog -d ../T_messages.txt -p 2022
- etc.
By default the multi tracer connects to the tracee to the port 2021,
as for any other tracer.
Then it accepts connections from other tracers on the port 2022.
This can be changed with parameters on the command line.
The tracee and the other tracers can be stopped/started at any time.
-- balanced (current version): all UE shares the same BW
-- single-ue : one UE will use the whole requested BW
-- unbalanced : all but one UE will use a residual 2% of the requested BW
the rest of requested BW will be used by one UE
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
One of the optimized RE allocation function does not work properly
and generates some decoding errors with a COTS UE. Let's use the
generic function for the moment, while analyzing what is wrong.
* adding merge request allow flag:
-- if false no forced merge to develop
-- if true and if branch is not develop, then forced merge to develop
* lowered the ru gains in CI conf files
* adding on-the-fly HTML summary within python main.py script
* adding 20 MHz testcases to FDD band 7 scenario
* adding GitLab status for
-- centOS build
-- FDD-band7 tests
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- if false no forced merge to develop
-- if true and if branch is not develop, then forced merge to develop
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
- install package 'vim-common' to have 'xxd' needed by the compilation
process of the T tracer
- change the way xxd is called so that no file is created in case
of error
Adding a build stage on CentOS (only one variant : -w USRP --eNB)
Should not trigger a fail for the moment
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- stdbuf -o0 seems to be causing segmentation fault
-- using daemon instead of nohup
-- also repeating several time "got sync" message and flushing stdout/stderr
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
* added banner to pipeline script
* added parameters to Jenkins pipeline / python
* xmlfile and test stage
* eNB configuration files are located under ci-scripts/conf_files
* no more correction of MNC
* still correction of EPC / eNB IP addresses at runtime
* Initialize_eNB_args is back using the proper "-O " syntax
* Terminate stage is parallel as in FJU's original pipeline
* Log collection stage is back fully parallel
* Console as artifact an option
* Check if terminate calls ended well, to be repeated at the end
* Adding back iperf:
* selection of iperf vs iperf3
* adding some iperf testcases to test suite
* Better enb launch
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- a boolean parameter should be added to master eNB job
-- for slack: pipelineUsesSlack
if not present or false, no message will be sent
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- Jenkins Pipeline script:
-- Moved the node to a proper subnetwork
-- Added ansiColor option
-- XML testsuite file can now be an option to the main.py python script
-- Added some examples testsuite templates
-- main.py python file
-- Added an option when opening an SSH session: taking care of clients with copied SSH keys
in that case, verifing that we are on the correct host
-- BuildeNB method is closer from Fujitsu's original one
improvement on flexibility for code source path naming
better clean-up of workspace
-- LTEBOX EPC (init / termination / logCollection) methods improvements w/ a /tmp path
-- Checking of processes (EPC / eNB) is parallelized
also handles LTEBOX EPX vs OAI CN
-- UE methods added: attach, detach, reboot, ping
With complete parallelism for multiple UEs
iperf added but not tested
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- temporary into a separate jenkins job
-- parameters are not in the pipeline script file
they have to be set up manually in the Jenkins GUI configuration page
they are then check if present in pipeline script
-- call to python script
-- build on a server with RF HW capabilities
for the moment USRP B2x0
also handles merge request process for gitlab
-- since it is for CI, it is a clean build
-- connect to an EPC (OAI or LTEBOX)
-- terminates eNB / EPC
-- log collection
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
The power estimation of the UE has to be debugged (calibrated?).
In the meantime, using "--ue-rxgain 140" lets the UE and eNB
talk to each other in the basic simulator.
2. minor modifications in dlsch_demodulation.c for 2 eNB TX antennas, 1 RX antenna. Inconsistant indexing of some arrays in this case.
3. change in config_load_configmodule.c : removed exit(-1) when no configuration file is used. This makes unitary simulators exit. Effect on lte-XXsoftmodem TBC.
receiver. THe proposed solution is to replace the average channel level with
median = (max+min)>>1.
For these reasons lsch_channel_level_median is introduced.
1. It's no need to modify LTE-RRC's ASN.1 file for enabling option group
feature in generate_asn1.
2. It's no need to patch the C header files generated from
LTE-RRC/S1AP/X2AP's ASN.1 in fix_asn1.
3. It's no need to pre-process S1AP/X2AP's ASN.1 for enabling information
object class feature by asn1tostruct.py.
This commit requires an un-official version of asn1c which are
collaboration of asn1c community members and `build_helper` is modified
in this commit accordingly :
https://github.com/brchiu/asn1c/tree/velichkov_s1ap_plus_option_group
This asn1c can also convert ASN.1 of 5G NR RRC (38.331, v15.1.0) and
generate C files with -findirect-choice command line option without
tweaking ASN.1 file.
Examples for how to use this asn1c for S1AP are in S1AP files, e.g.
s1ap_eNB_nas_procedures.c and s1ap_eNB_handler.c.
There is an modified openair-cn (based on tag 0.5.0) with this new asn1c at :
https://github.com/brchiu/openair-cn/tree/new-asn1c
Basic S1AP interaction and data transfer operation between OAI eNB and
this modified openair-cn has been tested.
Note: Community version of asn1c is keeping evolved to provide better usage.
2. Remove get_pmi from PHY_SRC_UE and add it instead to PHY_SRC_COMMON.
3. Linking lte-uesoftmodem and lte-uesoftmodem-nos1 targets with ${ATLAS_LIBRARIES}.
1. Moving get_pmi into a separate file and making corresponding
changes in CMakeLists.txt.
2. Creating PHY_MEX library with functions required for the receiver
mex-functions.
3. Making necessary changes in defs_UE.h so that mex-functions
do not complain about multiple LOG_ calls.
to linear_preprocessing_rec.c.
2. Adding linear_preprocessing_rec.c to PHY_SRC_UE library.
3. Adding mmse_flag and mmse functionalities to dlsch_demodulation.
4. For now, dlsim_tm4 will not compile.
as more transparent functions independent from the number of
resource elements in RB. They will tream as many resource
elements as there is in the vector that is passed.
-- Stability issues when installing packages for USRP variants on new VM
It sometimes timed-out
Added loop up to 5 tries to add apt-repository
-- Temporary merge during MergeRequest processing now returns an
error when there are any conflicts
Will stop the whole build
-- Physical simulator now has a XLST for the XML result
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- Corrected the long option version for variant in test run script
-- added proper test in zip command in pipeline
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- VM are kept alive to prepare for running tests
-- Added destroy script to kill all VM after run
-- VM names are now based on jobname and buildid
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- when unzip, added --DD option: skip restoration of timestamps for all extracted items.
should resolve clock skew issues
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- new stage in parallel on a VM
-- detailed reporting of CPPCHECK
-- Option to keep vm alive after build (not used yet on jenkins pipeline)
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- Added VM-build support for physical simulators
-- More details in the reported HTML files
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
-- quieter zip of the repository
-- remove clock skew and flexran.proto in the warning count
-- increase to 4 CPU on VM
-- created a new template to use host cpu properties (resolve AXV2 compilation issue)
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Summary of changes:
- import work from Fujitsu:
- multiple UEs
- TDD configuration 1
- several bugs fixed:
- UE power changes
this one introduces two new parameters in the configuration file,
update yours! The new parameters are "puSch10xSnr" and "puCch10xSnr".
See targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.tm1.50PRB.usrpb210.conf
- IQ replay module
- use MAKE_VERSION(x,y,z) instead of RRC_VERSION
- some UE fixes
Some new problems may happen. The work from Fujitsu was huge
and their branch diverged a lot from develop, leading to a very
complex merge.
The UE power management may also have an impact. It expects the noise
level to be at around 30 (as seen in the enb T tracer, in the
"input signal" view) and asks for an SNR of 20dB (value 200 for puSch10xSnr
and puCch10xSnr in the configuration file). You may want to put a
lower value, say 100 (SNR of 10dB). This is still work in progress
and needs some more work (we need to calculate the noise level at
runtime and not use a hardcoded value of 30).
This commit reverts the change coming from
675fd0af4e.
On a test machine, running the basic simulator (both eNB, UE
and T tracer) with 100 RBs eats too much of memory on a computer
with 8GB of RAM, leading to a reboot because the computer
was not responsive anymore.
Other solutions are needed to solve the memory issues, but
multiplying by 50 this number is not a good one, at least
not in the basic mode of operation. If this value needs
to be that big, a #ifdef #else #endif may be used.
20 was wrong, it means 2 dB.
200 is a bit high on my setup. Today the code hardcodes the noise
level as 30dB and a target of 20dB above noise is chosen by default.
Some more work is needed to estimate the real noise level. Some
more work is needed to set proper defaults.
- comment to GitLab merge-request does not anymore # as number (misinterpreted as issue number)
- added local build script w/ generation of HTML result file
Improvements on bash scripts:
- use of proper option parsing
Signed-off-by: Raphael Defosseux <raphael.defosseux@eurecom.fr>
Since now pucch_n1_AN is taken from the configuration file,
it has to be set to 0. Value 32 will not work well, at least
in FDD. This has to be handled properly at some point
(do not use uplink resource blocks used by PUCCH for PUSCH).
To minimize migration effort, we follow the logic of legacy macro Rel10 and Rel14 used
for conditional compilation of current code.
In the future, they might be changed to accommodate finer software configuration, e.g.
MAKE_VERSION(12,2,0) or MAKE_VERSION(13,1,0) .... etc.
Summary of changes:
- split UE and eNB directories
- nFAPI L2 emulator
- basic simulator
- various bug fixes
The nFAPI L2 emulator is not functional yet. Some code had to be removed
because it made the monolithic eNB non functional.
The unitary simulators (ulsim, dlsim) do not compile anymore. This will
be fixed later.
MAX_MOBILES_PER_ENB cannot be used to compile ue_ip
because it is defined in platform_constants.h and this
cannot be included to compile a kernel module.
Let's use NUMBER_OF_UE_MAX as it was before instead.
Status so far:
- monolithic eNB compiles and is functional with 1 UE in FDD, 5/10/20MHz.
For 20MHz we don't have a nice TCP downlink (on haswell).
- oaisim does not compile
- UE does not compile
- phy simulators don't compile
- many new warnings
Conflicts:
cmake_targets/CMakeLists.txt
openair1/PHY/LTE_TRANSPORT/transport_eNB.h
openair1/PHY/LTE_UE_TRANSPORT/transport_proto_ue.h
openair1/PHY/defs_eNB.h
openair1/SCHED/pusch_pc.c
openair1/SCHED/sched_common.h
openair1/SCHED_UE/phy_procedures_lte_ue.c
openair2/LAYER2/MAC/eNB_scheduler.c
openair2/LAYER2/MAC/eNB_scheduler_mch.c
openair2/LAYER2/MAC/mac.h
openair2/LAYER2/MAC/ra_procedures.c
openair2/LAYER2/MAC/ue_procedures.c
openair2/RRC/LTE/MESSAGES/asn1_msg.h
openair2/RRC/LTE/rrc_UE.c
openair2/RRC/LTE/rrc_defs.h
targets/RT/USER/lte-softmodem.h
targets/RT/USER/lte-ue.c
One user had a problem compiling oaisim.
This commit fixes it.
The compilation log was saying:
targets/RT/USER/lte-ue.c:
In function UE_thread_rxn_txnp4:
openair2/UTIL/LOG/log.h:370:3:
error: inconsistent operand constraints in an asm
__asm__ volatile ("rdtsc" : "=a" (a), "=d" (d));
^
Whenever the value T_BUFFER_MAX changes, the tracers had to
be recompiled. The only reason why it was needed is because we
used some fixed size buffers to read events. This commit removes
this restriction.
Also, with the basic simulator, this value T_BUFFER_MAX now comes
with an #ifdef which would have required some special hackish-level
tricks in the tracers, which is not good.
Let's just allocate memory when needed.
This commit introduces a 'basic simulator'.
This basic simulator is made of:
- the standard eNB code using a special driver that mimics the USRP driver
- the standard UE code using a special driver that mimics the USRP driver
- no channel simulation
- some special code to deal with faster-than-realtime behaviour of this
basic simulator
It connects one UE to one eNB. It requires an EPC, populated with the
correct configuration for the UE.
This is the initial release and may contain bugs (most probably race
conditions due to the faster-than-realtime behaviour).
To use it, see the documentation at:
targets/ARCH/tcp_bridge/README.tcp_bridge_oai.
It has been tested with 25, 50 and 100 RBs, FDD mode.
(No check at all has been done to know if it could work in TDD mode.)
The one in lte-enb.c disrupts the realtime. Using a B200mini with
20MHz bandwidth leads to the UE unable to connect for it seesms like
the UL and DL are not properly time synched because of this sleep
of one second that happens after the USRP streaming has started.
We see some random access attempts but the decoded preamble is
wrong.
This may be dependant on the setup. I had sporadic errors with
a B210, where sometimes the UE could connect and sometimes not.
(cherry picked from commit 5a61f9944c)
1. Previous SW configuration for different RRC version relies on whether macro Rel10,
Rel14 defined or not by checking #ifdef Rel14 or #if defined(Rel10) || defined(R14).
Whenever there is a newer RRC version, e.g. Rel15, it will be very a tedious and
error-prone job to add defined(Rel15) in every place.
2. Some RRC messages are defined in release 13 instead of release 14, NB-IoT
feature is one of such example. Our code shall reflect this fact instead of using
an afterward version number in software configuration.
3. Some RRC messages or some fields of certain RRC messages are added in the middle
a release, e.g. SystemInformationBlockType1_v1310_IEs_t defined in RRC 13.1.0
and RRC 9.2.0 made some changes to SIB12 and SIB13 so we have sib12_v920 and
sib13_v920 fields in SIB12 and SIB13's struct.
We need a finer grain of control when using ASN1 from different RRC version.
4. S1AP also has this problem that it use UPDATE_RELEASE_9 and UPDATE_RELEASE_10 to
differentiate between various S1AP version.
This commit propose using MAKE_VERSION(x,y,z) to designate the version number and
modify current conditional compilation accordingly.
Note: 2018/04/16, Modified based on Cedric's comment.
Summary of changes:
- some work on better parallel processing of eNB
try the eNB with options: --fepw --codingw
- small changes for multi-UE simulation and simulation accuracy
(UE power levels)
- initial work for the UE to use TUN device instead of ue_ip.ko
only done for oaisim, default bearer, compile with:
./build_oai --ue-nas-use-tun <rest of options>
- fix compilation of dlsim/ulsim/oaisim by defining some needed
global variables
- fix compilation of oaisim: compile coding and params_libconfig
- fix running of if4p5 with low CPU count (oaisim was not working
on the machine 'haswell' because of this)
This work is based on work by NTT.
To use the code, do:
./build_oai --oaisim --ue-nas-use-tun -t ETHERNET -c
This commit only handles oaisim in S1 mode.
We won't handle noS1 mode.
Summary of changes:
- free configmodule memory when shutting down
It is possible to restart the lte-softmodem via the FlexRAN controller.
For this to work, the end_configmodule() method needs to be called when
shutting the lte-softmodem down so that the configuration can be read
again during a restart.
- Feature agent
Implements an agent ID, consisting of the OAI module ID, the OAI eNB ID
and the cell ID. The agent reads this information in its configuration
read function and forwards it to the controller.
This MR also contains some code forwarding SI info to the controller.
- various bugs fixed
- remove start_background_system from eNB softmodem
- fix memory leak when doing traffic
- disable ITTI dump (does someone uses this?)
- disable U-plane inactivity timer: it's very simple to put this back,
but as of now it comes with its own problems that we don't have time
to check/fix
Only ulsim and dlsim compile. The others (dlsim_tm4 pucchsim prachsim
pdcchsim pbchsim mbmssim) have been disabled.
Command line to compile: ./build_oai --phy_simulators
When doing TCP downlink traffic with iperf for several
hours, the memory consumption of lte-softmodem does not
stop to grow.
After analysis, this commit seems to be the only fix needed.
To be checked somehow.
The agent_id is a uint64 consisting of: module ID (i.e. mod_id, the several
instances of OAI at once, 16 bit), the enb_id from the configuration file (32
bit) and the cell_id from the configuration file (16 bit).
The module ID is part of the agent ID but it is easier to have it directly in
the struct.
It is possible to restart the lte-softmodem via the FlexRAN controller. For
this to work, the end_configmodule() method needs to be called when shutting
the lte-softmodem down so that the configuration can be read again during a
restart.
The PHICH was not programmed for the last round (4) because it was
not programmed in rx_sdu but in schedule_ulsch_rnti, only in case
of a programmed retransmission (there is obviously no retransmission
programmed after the last round).
The case of Msg3 is not handled. To be done somehow.
As reported by Emad Alizade:
According to "Issue255 256 257 paging reesta release" that has been
merged in develop version, we have a question: In rrc_eNB_free_UE()
function only all ulsch related memory of user has been cleaned, but
I think not only ulsch memory but also dlsch memory must be cleaned.
I tested the latest develop version and with repetition UE attach-detach
procedures we find that the dlsch memory has not been cleaned and after
repeat this sequence (45 times) assertion with cause UE_id!=-1 (no free
or exiting dlsch_context, dci_tools.c: fill_dci_and_dlsch() ) occurred
and no UE will be attached to system.
The fixes in this commit are from Emad Alizade.
(cherry picked from commit 4b5b556493)
# Conflicts:
# openair1/PHY/LTE_TRANSPORT/dlsch_coding.c
# openair2/LAYER2/MAC/eNB_scheduler.c
# openair2/RRC/LITE/rrc_eNB.c
Summary of changes:
- bug fix in the FlexRAN API (correct a check)
- bug fix for sending the right RNTI in a FlexRAN message
- fixes small bug in ulsim which kills one RX antenna in channel simulation.
Another simple but bad bug in ulsch_demodulation.c (bad access of avgU
array). This probably resulted in a performance degradation for non-ideal
channels, even for 1 antenna. The avgU was read in position 1 instead of
0 for 1-antenna and in positions 1 and 2 instead of 0 and 1 for 2-antennas.
- work from Nokia:
1) shared library loader, with integration for oai devices, encoder and telnet server
2) telnet server (use build-oai --build-telnetsrv option and --telnetsrv softmodem option)
3) UE/eNB in different executables (lte-uesoftmodem and lte-softmodem + noS1 variants)
4) config module fixes and extensions
5) very preliminary NB-IoT integration preparation, using shared lib loader ( use make NB-IoT to build, after building the eNB softmodem)
6) Rename NB-IoT configuration sources from nbiot_ to NB-IoT_ to be consistent with other NB-IoT developments.
- various bugs fixed:
- try to avoid "buffer full" problem when pushing DL traffic
- add a stop_rf function in the RU
- cleanup - remove unnecessary calls to get_cpu_freq_GHz
(was disrupting realtime at startup, generating lots of UU and LL)
- cleanup MAC PDU generation
Compilation with Rel10 is not functional anymore.
Compilation of unitary simulator is not functional anymore.
fixes small bug in ulsim which kills one RX antenna in channel simulation.
Another simple but bad bug in ulsch_demodulation.c (bad access of avgU
array). This probably resulted in a performance degradation for non-ideal
channels, even for 1 antenna. The avgU was read in position 1 instead of
0 for 1-antenna and in positions 1 and 2 instead of 0 and 1 for 2-antennas.
1) shared library loader, with integration for oai devices, encoder and telnet server
2) telnet server (use build-oai --build-telnetsrv option and --telnetsrv softmodem option)
3) UE/eNB in different executables (lte-uesoftmodem and lte-softmodem + noS1 variants)
4) config module fixes and extensions
5) very preliminary NB-IoT integration preparation, using shared lib loader ( use make NB-IoT to build, after building the eNB softmodem)
6) Rename NB-IoT configuration sources from nbiot_ to NB-IoT_ to be consistent with other NB-IoT developments.
This is hack-level development.
With this commit you can do UDP DL traffic of say 100Mb/s over
a 5MHz link with one connected UE and the eNB should not crash
because of memory exhaustion. Of course on the receiver side
you won't get 100Mb/s and many many lost packets. But the system
should not crash. 1Gb/s does not work. So in any case try to
remain within some reasonable limits. There is no reason to
push more than twice the maximum achievable throughput of
the link.
This work is based on a patch proposed by Francesco Gringoli.
When the program exits it has to stop the streaming of the USRP.
The function exit_fun is supposed to do that. When quitting with
control+c (very common case) this function is not called. The
code is very unclear there, so let's add a stop_rf in the RU,
as there is already a start_rf.
If we don't call trx_end_func, then at the next run the USRP
device may be in an unstable state and behave improperly.
If the program crashes then the USRP device may be in an
unstable state. The only solution to this problem is to reset
the USRP device.
Maybe there is a way to clean the state of the device when we
open it, before we start using it. Sort of a cleanup before
use. That could be a better solution to "bad state after program
crash".
What has been tested:
- monolithic eNB only
The one in lte-enb.c disrupts the realtime. Using a B200mini with
20MHz bandwidth leads to the UE unable to connect for it seesms like
the UL and DL are not properly time synched because of this sleep
of one second that happens after the USRP streaming has started.
We see some random access attempts but the decoded preamble is
wrong.
This may be dependant on the setup. I had sporadic errors with
a B210, where sometimes the UE could connect and sometimes not.
The code was very unclear and potentially buggy.
This new version is more robust.
We can waste up to 2 bytes because the last header in the MAC PDU
does not contain a length field and when we request data from RLC
we suppose a 3-bytes MAC header. This might be optimized at some
point, but the benefit would be low.
This commit also contains some general cleanup:
- formatting
- variables' types: let's use 'int' instead of trying to be clever
by using small types that may generate bugs if the value is
too big
- remove 'tpc_accumulated' which was globally used for all UEs
and has no purpose other than logging. We may want to rework
a bit the TPC machinery at some point. As the code is today
we may repeatedly send TPC over and over without caring about
the 3GPP limits, in which case no one knows how the UE is
supposed to behave: does it clamp the current max value or does
it accumulate over and over and take the clamped value to compute
its actual power? If we send a reverse TPC (reduce power instead
of increase) does it do it immediately or does it have to decrease
n+1 times if we previously ordered it to increase n times?)
We do not address the problem of prioritizing LCIDs. As of today there
is only one dedicated traffic channel (DTCH), so it's not a problem
at this point.
What has been tested:
- monolithic eNB 5/10/20MHz with one cots UE, TCP/UDP UL/DL. At 20MHz the
machine used was not capable of keeping up, generating lots of Us
and Ls when the throughput reaches 60Mb/s. USRP B210 was used.
Running TCP DL traffic with one connected UE showed a lot of
fluctuations in throughput. After analysis it was found that
sometimes the RLC UM PDU was not correct. It contained one byte
more than it should. On the receiver side, the TCP packet
contained in the RLC packet seems to be rejected by the TCP
stack of the UE (it has one byte more than it should),
leading to a brutal reduction of the throughput, probably due
to some congestion detection in the TCP implementation.
Or something.
This hotfix seems to solve the problem. Using iperf in downlink
with a 5MHz eNB, we see no more fluctuations, the traffic is
very steady at 16.8Mb/s, as reported by the iperf server running
on the phone. (17.5 in the PHY plot of the T tracer.)
A rewrite of both the MAC and RLC UM packet generation is needed.
The code is way too complex for what it does and may contain
several similar problems that only trigger in specific rare
conditions.
The problem is the following (as reported by an user):
"one UE is attached to OAI system. UE is near the antenna. Try to detach
the UE and attach again. Repeat this procedure for 5-6 times. OAI system
does not work and any the UE can not attach to this system. I use TEMS
software and I can see MIB signaling on this UE but UE can not decode SIB1
and SIB2."
What happens is that the DCI for SIB1 and SIB2 is not cleared before
use. That is the bits in the 'padding' field keep the values that were
set before. If the structure has been used to transmit other DCIs
(eg. for UEs) in the past, it may be reused with some of those bits set
to 1. When receiving this DCI, the UE won't accept it because it
gets some bits at 1 where it expects them to be 0.
The short-term/quick solution is to clear the 'padding' field.
A better solution would be to rewrite this part of the code,
which is way too complicated for what it does. But this takes
too much time.
In dci.h the field 'dummy' of some structures was renamed to 'padding'.
The fields 'padding32' and 'padding64' were also renamed to 'padding'
for consistency.
Some structures (DCI2B_1_5MHz_TDD, DCI2B_10MHz_FDD, DCI2D_1_5MHz_FDD,
DCI2D_5MHz_FDD, DCI2D_10MHz_FDD) had a 'padding' field at the end, which
was renamed to 'padding0'. I don't know if this field should be here at all.
To me this field looks very suspicious. When we test DCIs 2B and 2D we
should be careful.
(cherry picked from commit c5ca2bd862)
Summary of changes:
- fix dlsim/ulsim
- fix centOS compilation
- Move the accounting phase of the DL pre-processor in a separate procedure
and fix some issues
- additional Mac stats and Improvements
- minor fix in test setup v2
With value 4 when connecting one UE and doing some downlink
iperf TCP there is a crash. Probably due to the multiple wrong
RA detected leading to uplink failure of fake UE that never
sends Msg3 (because, well, there is no other UE).
This is another problem that will be fixed at some point.
Anyway, this value 4 fails. Let's put back 3.
eNB should be keep UE context longer than T311 timer after UL failure is detected in layer2.
Configuration file(GENERIC-LTE-EPC) sets T311 to 10s, so eNB keep UE context up to 20s.
Some more fixes for some bad conflict resolutions.
I ran:
git diff 2018.w04 2018.w05
And saw some problems with config_sib2.
There was also something strange in openair2/LAYER2/openair2_proc.c
in the function dump_eNB_l2_stats. Maybe the fix is wrong for
this one. To be checked.
Doing an iperf UDP uplink test, we could reach only 6Mb/s
with very good radio conditions instead of around 8Mb/s.
It turns out the MCS was limited to 16.
With this commit, we are back to a bit more than 8Mb/s
as it used to be.
(This is with a 5MHz bandwidth.)
Doing airplane mode off to connect a cots UE followed by airplane mode on
to disconnect it gives very bad results (bad disconnection with lots of
UL failures followed by lots of logs in the eNB). It used to work properly
after the work done by Xu Bo.
It turns out that in 2018.w04 things were still working okay. But
in 2018.w05 no.
So I ran:
git diff 2018.w04 2018.w05
And I checked all the modifications that I thought were relevant
(everything related to the UE, oaisim, if4 and fapi has not been checked).
This commits takes back the version of 2018.w04.
The modifications in openair2/RRC/LITE/rrc_eNB.c are necessary, I think.
The other modifications may not be necessary or even wrong. To be checked
at some point.
- move IMSI extraction code to function, remove FLEXRAN comp. directive
- refactor the code, esp. don't do deep if-nesting
- remove m-tmsi part (does not give correct value)
- copy complete IMSI info to UE context, decode in RAN API
Original Author: Xenofon Foukas
Changed formatting
does not compile
RS: cast to get rid of compiler warning
-> ImsiEpsMobileIdentity_t to ImsiMobileIdentity_t which is defined the same
way
Summary of changes:
- fix MAC indentation
- bug fixes:
- fix uplink over-scheduling
- fix CQI updating (it was done even when it shouldn't)
- fix rrc rel10 compilation
- some minor bug fixes related to ASN.1
'_' is not a valid character.
S1AP specs say:
ENBname ::= PrintableString (SIZE (1..150,...))
And X.680 (08/2015) 41.4 table 10 lists the valid characters for
PrintableString. '_' is not there. We replace by '-' which is there.
Connection of eNB to ppenair-cn has not been tested. There is no reason
why it would fail.
The problem that may happen is that when the UE does not transmit
on PUCCH (for whatever reason) we may get no signal at all, and
thus compute a very low CQI. Later on we may ask the UE to transmit
louder which may lead to saturation and more problems.
The solution is simple: don't care about CQI in case of DTX
(and NACK also, as done for PUSCH).
Only FDD case done.
For TDD it seems that:
- nfapi structures are not correct. See nfapi_harq_indication_tdd_rel13_t
in nfapi/open-nFAPI/nfapi/public_inc/nfapi_interface.h, all the cases
(bundling, multiplex, ...) use nfapi_harq_indication_tdd_harq_data_t
- the function extract_harq does not handle TDD
S1AP specs say:
initialUEMessage S1AP-ELEMENTARY-PROCEDURE ::= {
INITIATING MESSAGE InitialUEMessage
PROCEDURE CODE id-initialUEMessage
CRITICALITY ignore
}
So let's use "ignore", not "reject".
The online decoder http://asn1-playground.oss.com/ did
not decode a message encoded by the eNB because of this.
Only the S1AP messages captured while doing a simple connection
of one UE have been tested with the online decoder.
So, not all the S1AP messages have been checked, maybe some
instances of this problem are still there.
It does not seem to harm the actual UE<->eNB<->EPC communication
(because we don't check the integrity of messages or because
asn1c does not do it), so it's not a big deal.
- add function free_td() -> complements init_td() [seems to not be used, added
for completeness]
- add function free_td8() -> undoes init_td8() [free memory of 8-bit LLR Turbo
decoder]
- add function free_td16() -> undoes init_td16() [free memory of 16-bit LLR
Turbo decoder]
- change function free_tdavx216() -> undoes init_tdavx216() [free memory of
16-bit LLR Turbo decoder, AVX2 version]
- add free_lte_top() -> frees memory allocated by init_lte_top()
- change free_ul_ref_sigs() to set freed pointers to NULL
- add method free_transport() -> frees memory of ULSCH/DLSCH transport channels
- use the above functions when stopping/restarting the lte-softmodem
Through configuration, the lte-softmodem can be halted to await a
reconfiguration from the lte-softmodem. A mutex and condition variable are used
to implement this.
Furthermore, the dependance of lte-softmodem.c on FlexRAN has been reduced to
one include and the flexran_agent_start() call.
- add set_function_spec_param() which configures RU_t instance depending on its
function(al split)
- export more functions like kill_RU_proc() so that they can be reused by
restart functionality
- when changing values RC.rrc[i]->configuration should be changed too
- then, RRC_RECONFIGURATION_REQ will pass the changed conf down until PHY
- give warnings at functions that are not implemented
- rename functions
flexran_get_tdd_ack_nack_feedback() -> flexran_get_tdd_ack_nack_feedback_mode()
flexran_get_ue_pmi() -> flexran_get_ue_wpmi()
Try to merge feature-68-enb-agent into develop
develop should be fast-forwarded later to this branch to complete the merge
This code does not compile yet. Among other things:
- the scheduler structure needs to be reworked for FlexRAN
- the config is structured differently. The files enb_config.{c,h} from develop
have been copied in here, the files with merge annotations are in
enb_config.{c,h}.before_merge
- the restart needs to be restructured, since the PHY vars data structure lives
in RC now
As reported by Emad Alizade:
According to "Issue255 256 257 paging reesta release" that has been
merged in develop version, we have a question: In rrc_eNB_free_UE()
function only all ulsch related memory of user has been cleaned, but
I think not only ulsch memory but also dlsch memory must be cleaned.
I tested the latest develop version and with repetition UE attach-detach
procedures we find that the dlsch memory has not been cleaned and after
repeat this sequence (45 times) assertion with cause UE_id!=-1 (no free
or exiting dlsch_context, dci_tools.c: fill_dci_and_dlsch() ) occurred
and no UE will be attached to system.
The fixes in this commit are from Emad Alizade.
Summary of changes:
- Implementation of paging (see issue #255 in gitlab)
- Implementation of RRC RE-ESTABLISHMENT (see issue #256 in gitlab)
- Implementation of RRC CONNECTION RELEASE (see issue #257 in gitlab)
Some modifications with timers have been done.
Expect (and report) problems, thanks.
What has been tested:
- monolithic eNB 5 and 10MHz with one commercial UE. UDP and TCP
traffic, uplink and downlink, with iperf (with a third party
EPC, not openair-cn). TCP downlink traffic is not stable.
Reason yet unknown. Will be fixed later.
Summary of changes:
- integration of Cisco work on nFAPI.
See commits 7757b9e7e7
and 922b5b595a for details.
- support Ubuntu 17.04 and 17.10
- bugfix: DCI padding bits
This bug made the system non-working because the DCIs for
SIBs were wrong. See commit c5ca2bd862
for details.
- fix issue 281: IQ record/playback explicit filename segv.
This commit fixes issues introduced by the previous commit.
Summary of work:
- cleanup:
- fix LOG_XX to be less verbose
- fix cmake_targets/CMakeLists.txt
- fix oaienv
- remove dead code
- bug fixes:
- in openair1/SCHED/fapi_l1.c we had:
eNB->pdcch_vars[subframe&1].num_dci = number_dci;
should be:
eNB->pdcch_vars[subframe&1].num_dci = 0;
This bug let the PHY send more DCIs than what should have been
sent because num_dci is incremented later on in the code.
This fix may be a problem for fapi mode, to be checked.
- add new T VCD traces
- revert openair1/PHY/TOOLS/file_output.c to 'develop' version
- remove thread_id in logRecord/logRecord_mt
- revert (and adapt) configuration files
- be careful when doing frame++, we need to % 1024
- revert target_rx_power in openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
- NFAPI:
- the open-nFAPI code has been included in the repository. See nfapi/README.
Maybe we should "git clone" the Cisco repository instead. We have to be
careful of availability though.
What has been tested:
- monolithic eNB FDD 5/10MHz with one UE, iperf UDP/TCP uplink/downlink
Anything else may fail to work, especially the FAPI mode, which has not
been tested at all.
It has been chosen to not include the full history of commits
from David. He included a binary version of wireshark, probably
a modified one that understands NFAPI. Wireshark is released under
the GPL license, we cannot include it in the repository. We could
have done a next commit to remove this binary. But then it would
still be present in the history of commits, which may not be allowed.
And it would take space on disk. We could edit the history to remove
wireshark entirely. But this operation is too complicated.
There was also a pcap capture file, which has nothing to do in
the history of commits and would take space on disk. There again,
it's too difficult to edit the history to remove it.
There was a file .gitignore that was also removed.
The original history can be found on David's repository:
https://gitlab.eurecom.fr/daveprice/openairinterface5g/
The branch is: nfapi-ru-rau-split.
A copy of that branch has been included in the internal OAI
repository, for those who have access to it.
The branch is the same. The last commit ID is
9106438239e0bc626ff1fa1d97d911caadd0fbb9.
You can compare the current commit with the commit 9106...
to see what differs.
The current commit has to be considered non-working.
The commit following the current commit will fix problems with
the work in the current commit.
If you use git bisect, don't spend time analyzing the current
commit.
Basically, build_helper has been adapted so that:
./buil_oai -I -w USRP
works for Ubuntu 17.04 and 17.10.
Concerning those systems:
- compilation with "--eNB --UE -w USRP" works
- the enb softmodem runs on 17.04 (not tested on 17.10)
- nothing else has been tested.
Users should report any problem.
The problem is the following (as reported by an user):
"one UE is attached to OAI system. UE is near the antenna. Try to detach
the UE and attach again. Repeat this procedure for 5-6 times. OAI system
does not work and any the UE can not attach to this system. I use TEMS
software and I can see MIB signaling on this UE but UE can not decode SIB1
and SIB2."
What happens is that the DCI for SIB1 and SIB2 is not cleared before
use. That is the bits in the 'padding' field keep the values that were
set before. If the structure has been used to transmit other DCIs
(eg. for UEs) in the past, it may be reused with some of those bits set
to 1. When receiving this DCI, the UE won't accept it because it
gets some bits at 1 where it expects them to be 0.
The short-term/quick solution is to clear the 'padding' field.
A better solution would be to rewrite this part of the code,
which is way too complicated for what it does. But this takes
too much time.
In dci.h the field 'dummy' of some structures was renamed to 'padding'.
The fields 'padding32' and 'padding64' were also renamed to 'padding'
for consistency.
Some structures (DCI2B_1_5MHz_TDD, DCI2B_10MHz_FDD, DCI2D_1_5MHz_FDD,
DCI2D_5MHz_FDD, DCI2D_10MHz_FDD) had a 'padding' field at the end, which
was renamed to 'padding0'. I don't know if this field should be here at all.
To me this field looks very suspicious. When we test DCIs 2B and 2D we
should be careful.
Includes the following updates:
1. oaisim/lte-softmodem in noS1
2. UE fixes for oaisim
3. IF4p5 fixes (doesn't work on develop)
4. UE fixes for DCI handling (corrects problem introduced in develop)
Conflicts:
cmake_targets/CMakeLists.txt
targets/SIMU/USER/oaisim_functions.c
- {restart,stop}_L1L2() in lte-softmodem.c
- add function start_phy_rrc() in enb_app.{c,h}, accessible from outside
- will be used to restart PHY and RRC when lte-softmodem is restarted
use only one FlexRAN wait function
physicalConfigDedicated may be legitimately NULL at some places
with the current code.
A cleaner solution is needed (we should always have a dedicated
config, initialized with values from the 3GPP specs, not have
a NULL as we do now).
Summary of changes:
- minor changes in RA code (functionality not changed, only notation)
- automatic indentation of some files (with indent -kr)
- bugfixes for TDD in RRU (IF4p5) and timing statistics of fronthaul and
compression
Summary of changes:
- fix a bug with Timing Advance.
This should improve the stability of the connection
(for now, only the scenario with one connected UE works).
- use RRC Release 14.3
- add some T tracers, minor fixes for T
This tracer extracts the content of a buffer field of an event
that was previously saved using the tracer 'record'.
For example, to extract the channel estimation done in
frame 924 and subframe 2 as saved in the file input_record.raw
and to store it in the file output.raw, do:
./extract -d ../T_messages.txt -o output.raw input_record.raw ENB_PHY_UL_CHANNEL_ESTIMATE chest_t -f frame 924 -f subframe 2
- remove global variables in the function lte_est_timing_advance_pusch
- do the smoothing logic that was in lte_est_timing_advance_pusch
in rx_sdu (is it necessary? is it correct?)
- put back the value 100 in prach_procedures for the test on prach energy
- change the value of timing_advance_update
it was:
timing_advance_update = sync_pos - eNB->frame_parms.nb_prefix_samples/4; //to check
it is now:
timing_advance_update = sync_pos; // - eNB->frame_parms.nb_prefix_samples/4; //to check
this should be checked somehow. The computation looked suspicious. Maybe
the new one is wrong.
The warning was:
/roux/ru/openairinterface5g/openair1/PHY/LTE_TRANSPORT/pucch.c: In function 'generate_pucch2x':
/roux/ru/openairinterface5g/openair1/PHY/LTE_TRANSPORT/pucch.c:729:73: warning: array subscript is above array bounds [-Warray-bounds]
AssertFatal(1==0,"Illegal modulation symbol %d for PUCCH %s\n",B2,pucch_format_string[fmt]);
^
/roux/ru/openairinterface5g/common/utils/./itti/assertions.h:52:53: note: in definition of macro '_Assert_'
__FUNCTION__, __FILE__, __LINE__, ##aRGS); \
^~~~
/roux/ru/openairinterface5g/openair1/PHY/LTE_TRANSPORT/pucch.c:729:7: note: in expansion of macro 'AssertFatal'
AssertFatal(1==0,"Illegal modulation symbol %d for PUCCH %s\n",B2,pucch_format_string[fmt]);
^
The root cause was that the array pucch_format_string was not in sync with
the structure. (This plus why force its size and put \0 in the string...)
phy_init_lte_ue_signal was renamed init_lte_ue_signal in openair1/PHY/INIT/defs.h
maybe it's the opposite that should have been done?
Functions used in one file and defined in another may have been
declared in the wrong header file.
- UE_id 0 is for rnti 65535 (sib)
- UE_id 1 is for rnti 65534 (this is a hack)
- UE_id 2 is for rnti 2 (RA RNTI as of today's code/config)
- we start enb by displaying UE_id 3
- there was a bug: we need to lock when resetting UE ids (reset_ue_ids)
TODO: if the UE did random access (followed by a MAC uplink with
CRNTI) because none of its scheduling request was granted, then
according to 36.321 5.4.4 the UE's MAC will notify RRC to release
PUCCH/SRS. According to 36.331 5.3.13 the UE will then apply
default configuration for CQI reporting and scheduling requests,
which basically means that the CQI requests won't work anymore and
that the UE won't do any scheduling request anymore as long as the
eNB doesn't reconfigure the UE.
We have to take care of this. As the code is, nothing is done and
the UE state in the eNB is wrong.
- change target values
- change upper/lower limit to trigger a tpc
- don't use ul_cqi from SR
The value of ul_cqi is not convincing, for both PUSCH and PUCCH,
more work/analysis is required.
- better ulsch harq management in phy (maybe not over)
- don't do schedule_CSI if UE not in RRC_CONNECTED (not sure if correct)
- don't call find_ulsch in fill_dci0
- some spaces cleaned
- log improved
- re-use ta_timer
- when ta_timer is running:
- no TA sent to UE
- no TA from UE (for UE to have time to apply previous TA command)
- decrease ta_timer every TTI
- be careful to use correct value of ta_update (31 means no TA)
Maybe not correct, to be checked.
we can't use &ul_config_pdu->ulsch_harq_pdu.harq_information directly,
because that function is called for 2 cases and the substructure
harq_information is not as the same position in both cases.
- don't use o_flip anymore in ulsch_decoding
- remove dl_cqi from eNB_UE_STATS
- put dl_cqi[NFAPI_CC_MAX] in UE_sched_ctrl
- adapt code for this dl_cqi change (from eNB_UE_STATS to UE_sched_ctrl)
- extract_pusch_csi has been fixed for CQI_ReportModeAperiodic_rm30,
the others need to be done. Program will exit if one uses them.
Not sure if setting sched_ctl->dl_cqi[CC_idP] has to be done in this
function...
Summary of changes:
- USRP driver improvements (GPSDO handling, GPIO for TDD)
- multi-UEs scenario improvements, mostly the MAC scheduler
- mobipass standalone driver
- bug fixes for VCD tracing code
- some cleanup in the installation scripts
- some work on the T tracer
To use the GPSDO with the USRP device (notably B210), use the
command line argument: --gpsdo-clock
This commits contains several fixes to improve a multi-UE scenario.
This is not the end of the story.
Summary of work:
================
1 - improve SR (scheduling requests):
We configured n1pucch == 3 for scheduling requests, for all
UEs. We now use 71 - UE_id/10.
For it to work, it is vital that pucch_nRB_CQI in the configuration
file is set to 0, otherwise the SR will go to an RB used for
PUSCH and uplink decoding will fail whenever an UE does SR.
Note that we will have problems with 20MHz when we use a CCE that
let the UE send the ACK/NACK using a n1pucch allocated for SR,
because when the PDCCH is of size 3, we can have 87 CCEs
and it may lead to an n1pucch colliding with one for SR.
The work done in this patch is a quick solution, seems to work
with 10MHz.
The real solution is to disable the use of those CCEs that would
lead an UE to use a n1pucch colliding with an SR n1pucch. Then
we can use whatever n1pucch we want for SR, as long as the
scheduler protects them.
Impacted files: configuration files
openair2/RRC/LITE/MESSAGES/asn1_msg.c
2 - some fixes for uplink scheduling:
- Do not use PRACH for PUSCH, that leads to too many false
PRACH detection. Plus the PUSCH receiving may fail if one
UE uses the PRACH at the same time.
- Take care of retransmissions. That was not done at all, so
we could allocate one RB to several UEs. The current design
of the code makes it hard to do it properly, so we chose a
quick and dirty solution, which is to increase "first_rb"
to skip any RB used for retransmission. In this process we
may skip a lot of free RBs. A proper solution is needed here.
- Do not allocate the last RB. This one is used for PUCCH.
It was sometimes allocated to PUSCH.
- In the pre-processor we didn't pre-allocate RBs to UEs
with an empty buffer status. We didn't check if the UE
sent an SR. For example in a three UEs scenario, we
could have the third UE never scheduled in the uplink.
- rb_table_index was not decreased properly, so we allocated
too much RBs to some UEs and thus not enough to others.
Impacted files: openair2/LAYER2/MAC/eNB_scheduler_ulsch.c
openair2/LAYER2/MAC/pre_processor.c
openair1/SCHED/phy_procedures_lte_eNb.c
3 - some fixes for downlink scheduling:
- The check on CCE allocation was not correct. We did something
like:
if (cce allocation is possible) {
prepare
}
We should have done:
save current cce allocation
if (cce allocation is possible) {
allocate cce
prepare
}
reset current cce allocation
Basically, when we scheduled several UEs, they were checked
separately, and the totality of them was not checked.
Impacted file: openair2/LAYER2/MAC/eNB_scheduler_dlsch.c
- The retransmissions are probably not handled correctly.
Check in openair2/LAYER2/MAC/pre_processor.c, near
the comment "// control channel or retransmission",
the case "round > 0" was added. It's probably not enough,
even maybe not correct.
- Change SF05_LIMIT with SF0_LIMIT. We accept to use
central blocks in SF 5. The code was also not correct,
vrb_map was not set properly because the loop on j
was wrong for the last RBG (which can have one less
RB than the others).
This is not satisfying. The real solution is to use the
central RBs and check that the MCS used is compatible
with the numbers of resource elements allocated (we don't
want to put too more data bits than what fits).
4 - some fixes in PUCCH decoding:
See: openair1/PHY/LTE_TRANSPORT/pucch.c
Probably not enough. Some more work and analysis is
required for a proper use of the PUCCH. What we see
is that the PUCCH constellation gets wrong when there
are several UEs, meaning the received ACK/NACK is
not properly decoded (this, or something else...).
5 - several fixes/checks added here and there:
- The final allocate_CCEs in eNB_dlsch_ulsch_scheduler
is checked and we brutally exit if it fails.
- We exit in get_num_pdcch_symbols in case of failure
(this should never happen anyway, no big deal normally).
- Some logs added or changed to error/warning instead
of debug.
- In dlsch_scheduler_pre_processor an abort() was added.
The code here looks suspicious.
- In assign_max_mcs_min_rb, rb_table_index was not set
to 2, the value 0 was used. This was not correct.
What remains to be done:
========================
- Correct CCE allocation (take into account SR n1pucch,
check that all the n1pucch that will be used are "compatible").
- Take into account the PHICH when scheduling uplink. As of
today it is very possible to have two UEs use the same PHICH
group and PHICH sequence index. We can use n_DMRS in the DCI
to have uniqueness (see 36.213 table 9.1.2-2). We can drop an
allocation if there is no free PHICH group/sequence index for
a given UE.
- When there is an uplink retransmission in the PRACH, we have
to disable PRACH detection. It is possible that one UE does
PRACH at the same time, but then what to do? We could use
DCI0-based retransmission in this specific case maybe...
- Handle free RBs in uplink in a much better way in case of
a retransmission. We may have a lot of free unused RBs with
the current code.
- Check downlink retransmissions. Not much has been done there.
- Surely more stuff not clear yet. In some situations we don't
have a good behavior of the system. Hard to describe more
precisely at this point.
How to use:
1 - compilation of softmodem:
./build_oai --eNB -t ETHERNET
2 - compilation of mobipass driver:
cd cmake_targets/lte_build_oai/build
make oai_mobipass
ln -sf liboai_mobipass.so liboai_transpro.so
3 - configuration:
edit the configuration file, set "node_timing" to
"synch_to_mobipass_standalone"
that is, have the line:
node_timing = "synch_to_mobipass_standalone";
4 - run:
run as usual: sudo ./lte-softmodem -C <configuration file>
protobuf-c does not compile anymore.
Let's handle this a bit better.
We now install protobuf and protobuf-c only for the
flexran agent. That is, if you want to use the flexran
agent, you need to install protobuf/protobuf-c and
you do it this way:
./build_oai -I -a
(you add -a)
Other targets don't need protobuf nor protobuf-c, so
it's not installed by the -I command of build_oai,
unless you pass -a with -I.
Also, we now use protobuf 3.3.0, not 2.6.1. The code
has been adapted, a quick test seems to indicate that
the system works, but it has not been intensively tested.
protobuf-c does not compile anymore.
Let's handle this a bit better.
We now install protobuf and protobuf-c only for the
flexran agent. That is, if you want to use the flexran
agent, you need to install protobuf/protobuf-c and
you do it this way:
./build_oai -I -a
(you add -a)
Other targets don't need protobuf nor protobuf-c, so
it's not installed by the -I command of build_oai,
unless you pass -a with -I.
Also, we now use protobuf 3.3.0, not 2.6.1. The code
has been adapted, a quick test seems to indicate that
the system works, but it has not been intensively tested.
several problems were present:
- there was no comma after "ue0_trx_write_ns_missing" in the array
eurecomVariablesNames;
comma was put, and also commas for the last element in the array,
which doesn't hurt and will prevent future problems
- bad order of values in eurecomVariablesNames, which
was different from the enum vcd_signal_dump_variables;
order was checked and fixed
- strange/wrong use of VCD_SIGNAL_DUMPER_MODULE_END/LAST;
the whole logic was removed/simplified
Summary of changes:
- UE: new thread idx
- UE: Pdcch optim
- UE: slot0 slot1 parallelization
- bugfixes for RLC AM (see gitlab issue 250)
- fix bug "unknown UE_id for rnti"
Note: due to the new UE threading architecture,
oaisim and the phy simulators may not work properly
anymore. Adaptation in the code has been done, automatic
tests seem to pass, but it may not be enough.
See merge request !215
With the new threading architecture of the UE dlsim
(and others) does not work properly anymore.
When looking at the scope, you see a difference
in PDSCH LLR display. The end is always 0 where
in the current develop branch (tag 2017.w25) it's not.
This commit attempts to fix it.
We still don't have the same behavior as in 2017.w25.
I disabled channel simulation (so that UE RX = eNB TX)
and I have one error where in 2017.w25 I have zero.
For example, here comes the output of a run of "./dlsim":
**********************SNR = 0.000000 dB (tx_lev 51.000000)**************************
Errors (1(0)/1000 0/1 0/0 0/0), Pe = (1.000000e-03,0.000000e+00,-nan,-nan), dci_errors 0/1001, Pe = 0.000000e+00 => effective rate 99.900100, normalized delay 0.001472 (1.001000)
And in 2017.w25 we have (with the same hack to disable
channel simulation):
**********************SNR = 0.000000 dB (tx_lev 51.000000)**************************
Errors (0(0)/1000 0/0 0/0 0/0), Pe = (0.000000e+00,-nan,-nan,-nan), dci_errors 0/1000, Pe = 0.000000e+00 => effective rate 100.000000, normalized delay 0.001471 (1.000000)
There may be a problem somewhere. Or there was one before and we should
have had one error and the new UE architecture fixed things and now
it's as it has to be. Hard to say at this point...
When looking at the scope we quickly see some zeros for the PDSCH
LLR, at the begining this time, not at the end. This is just when
the GUI appears and then all is fine, so this seems to be for the
first frame only. In 2017.w25 this does not happen.
With the current implementation of oaisim
(rxdata and channel simulation), we cannot
call trx_read_func on a dummy buffer. The
code will actually modify the rxdata buffers
of the UE.
This is has to be rewritten properly. In the
meantime, let's introduce a simple hack. The
idea of the read at this point is to wait for
the synch to finish and not lose samples from
the hardware in the real UE. In the simulator,
as it is today, we can simply sleep until the
synch code has finished its work.
In case of oaisim, dl_phy_sync_success has to be called
by initial_sync, as it used to be.
We introduce an #if OAISIM, this is not elegant, but will
do it for the moment.
This bug happens when we detect uplink failure for one UE.
In this case, a DCI format 1A is sent to the UE to ask it
to do random acces.
The way this DCI is generated was not compatible with how
the software is organized. It was expected that the DCI are
added (with add_ue_spec_dci and add_common_dci) in a very
specific order: first all DCIs in common space are added
(with add_common_dci) then all DCIs in UE specific space
are added (with add_ue_spec_dci).
The problem was that the DCI format 1A DCI sent to the UE
for it to do random access is added (with add_ue_spec_dci)
before the DCIs in common space.
That totally messed up the logic in add_common_dci and
add_ue_spec_dci.
The solution is to get rid of Num_common_dci and Num_ue_spec_dci,
replace those two counters by only one (Num_dci) and add
"search_space" in the dci_alloc structure to be used later by
the function "allocate_CCEs" when calling "get_nCCE_offset".
The software had to be adapted to the new variables, everywhere.
I am not sure that the simulators work. It seems that some
of them didn't use Num_common_dci and Num_ue_spec_dci to
decide on what space (common or UE specific) to put the DCI,
but relied on the rnti (comparing with SI_RNTI). To be tested
properly.
The modified simulators are:
- openair1/SIMULATION/LTE_PHY/dlsim.c
- openair1/SIMULATION/LTE_PHY/dlsim_tm4.c
- openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
- openair1/SIMULATION/LTE_PHY/framegen.c
- openair1/SIMULATION/LTE_PHY/pdcchsim.c
- openair1/SIMULATION/LTE_PHY/syncsim.c
Added selection of interfaces through the configuration file with a new block of statements as follows:
FLEXSPLIT_INTERFACES :
{
DU_INTERFACE_NAME_FOR_F1U = "lo";
DU_IPV4_ADDRESS_FOR_F1U = "127.0.0.1/24";
DU_PORT_FOR_F1U = 2210;
CU_INTERFACE_NAME_FOR_F1U = "lo";
CU_IPV4_ADDRESS_FOR_F1U = "127.0.0.1"; //Address to search the DU
CU_PORT_FOR_F1U = 2210;
// One of TCP/UDP/SCTP
F1_U_TRANSPORT_TYPE = "UDP";
};
changes:
- ue mcc/mnc 208.93
- use correct key/opc for user
- change addresses in conf file for them to be easier to understand
(maybe)
With those changes, running:
sudo ./run_enb_ue_virt_s1
in cmake_targets/tools should work out of the box
The user still has to configure correct IP addresses in
targets/PROJECTS/GENERIC-LTE-EPC/CONF/enb.band7.generic.oaisim.local_mme.conf
We supposed oaisim (enb+ue) machine to be on IP address 10.0.1.1
and EPC (hss, mme, spgw) machine to be on IP address 10.0.1.2.
Several problems are present.
The first is that _write returns 0 instead of the
number of samples. We solve it by returning
nsamps.
The second is that _read may return less samples at
the beginning and we don't want to exit for that.
We solve it also by returning nsamps.
(We still need to log more in this, to be done in the
next commit.)
The third is that after initialization we don't send
anything for a while, time for the softmodem to finish
its init. This generates lots of "RX overrun".
We solve it by disabling TX and RX modules after init
and then in trx_brf_start we activate them again (and
also call bladerf_sync_config, which seems to be
mandatory, and bladerf_calibrate_dc, which may be avoided,
perhaps).
Maybe not the end of the story. Sometimes it works, UE connects,
traffic is fine (tested only with 5MHz). Sometimes it does not,
UE does not connect, or it connects but then traffic is bad,
especially uplink.
To be refined.
develop_integration_w22 into develop
Summary of changes:
- UE:
* TDD multiplexing
* TDD autotest
* bug fixes: power control management for Msg3, logging
- eNB:
* CCE allocation fixes
* S1U port in some configuration files set to 2152 (was 2153)
- support for RedHat enterprise linux 7 and derivatives (CentOS, ...)
(work provided by RedHat)
See merge request !198
- rename UE_NO_LOG to DISABLE_LOG_X
because the name is misleading. The full software
is impacted, not only the UE part
- same for compilation option ---ue-no-log
that becomes --disable-log
- keep LOG_X for the standard case, that is the
case without DISABLE_LOG_X where printf has been
put. Two reasons:
* printf is not realtime friendly
* keep behavior similar for other users who may
be troubled by different logs that don't add
any benefit to previous logs
develop_integration_w20 into develop
Summary of changes:
- bug fixes
* UE TDD fixes
* PDCCH size computation (at phy level, still to be corrected at mac level)
* DAI increment
* fix run_enb_ue_virt_noS1 and run_enb_ue_virt_s1 to use Rel14 and
have --xforms to work
* compilation warning removals
* better oaisim logging (print UE security keys,
print version (git commit ID) at runtime, print working directory)
See merge request !190
Problems reported by Jorge Muñoz Castañer <jorgem@gti.uvigo.es>.
- use Rel14 binaries (those are produced by default)
- let -x option work to have graphical output
- fix VCD missing 'echo'
It seems that ciphering_algorithm is "unsigned int" in RRC Rel10
and "unsigned long" in RRC Rel14 (as processed by asn1c)
Let's force it to unsigned long in the log to avoid compilation-time
warnings.
Seems like this commit got lost at some point.
Here was the message:
-----------------------------------------------------------------------------
Author: Cedric Roux <cedric.roux@eurecom.fr>
Date: Tue Jan 10 14:21:02 2017 +0100
add format indicator to get LOG_X warnings
The LOG_X macros emit a lot of warnings when compiling with the T
because they call the function logRecord (or logRecord_mt)
which has not been "marked" as calling printf, so gcc won't
emit typical printf warnings.
With the T, they directly translate to sprintf, so those warnings
pop up, much more verbose due to several macro expansions.
Let's make them pop up all the time so it's easier to fix them.
-----------------------------------------------------------------------------
- print current working directory
- print git version (if available)
- print security keys
this last one is a security breach, but as of today
it's not a problem
develop_integration_w19 into develop
Summary of changes:
- bug fixes:
* RLC AM fixes
* UE TDD fixes
* Fujitsu bug fixes (TDD also)
* mobipass fixes (bad management of carriers, softmodem was failing with more than one CC)
* compilation warnings removal
- PUCCH format 3 preliminary support (work from Fujitsu)
- build fixes: do not include shared library in main executable (work from Nokia)
express MIMO2 needs some more work here
See merge request !184
There is now the function copy_harq_proc_struct and some
procedures for the UE have changed, which makes necessary
to have UE->dlsch valid for both subframes (odd and even).
We increase memory usage, maybe it's not the correct solution.
To be kept in mind if something goes wrong at some point.
----------------------------------------------------------
bug 24
Ttile:
The last line "multicast_group = multicast_group" is hard
to understand. The local variable should be different name
than the global variable.
Bug Location:
const char *multicast_group_list[MULTICAST_LINK_NUM_GROUPS] = {
"239.0.0.161",
"239.0.0.162",
"239.0.0.163",
"239.0.0.164"
};
:
:
void multicast_link_start(void (*rx_handlerP) (unsigned int, char *),
unsigned char multicast_group, char *multicast_ifname)
{
rx_handler = rx_handlerP;
multicast_group = multicast_group;
Note:
Detected by CppCheck
----------------------------------------------------------
Note: not sure that the code is correct,
to be checked (Cédric Roux).
----------------------------------------------------------
bug 22
Ttile:
(subframe!=2)||(subframe!=7) is always TRUE. This coding
is really intended? Operator || should be && instead?
Bug Location:
((frame_parms->frame_type==TDD)&&(frame_parms->tdd_config==1)&&((subframe!=2)||(subframe!=7)))) {
Note:
Detected by CppCheck
----------------------------------------------------------
Note: this fix does not solve the issue with how
this buffer is used in this function, but I'm not
sure this code is used at all (Cédric Roux).
----------------------------------------------------------
bug 21
Ttile:
PAYLOAD_MAX=1500, so this coding results in index overflow.
Additionally, operator "!=" just compairs something, this
coding is meaningless.
Bug Location:
buffer[PAYLOAD_MAX] != '\0';
Note:
Detected by CppCheck
----------------------------------------------------------
----------------------------------------------------------
bug 18
Ttile:
Probably he/she wants to copy the contents of arrays, but
this coding doesn't copy anything, moreover index overflow
occurs.
Bug Location:
u2e_t[UE_id][eNB_id]->tx_data[3]=tx[eNB_id][3];
u2e_t[UE_id][eNB_id]->rx_data[3]=rx[NB_eNB_INST+UE_id][3];
Note:
Detected by CppCheck
----------------------------------------------------------
bug 19
Title:
Probably he/she wants to copy the contents of arrays, but
this coding doesn't copy anything, moreover index overflow
occurs.
Bug Location:
e2u_t[eNB_id][UE_id]->tx_data[3]=tx[NB_eNB_INST+UE_id][3];
e2u_t[eNB_id][UE_id]->rx_data[3]=rx[eNB_id][3];
Note:
Detected by CppCheck
----------------------------------------------------------
bug 20
Title:
Probably he/she wants to copy the contents of arrays, but
this coding doesn't copy anything, moreover index overflow
occurs.
Bug Location:
tx_data[3]=cthread->tx_data[3];
rx_data[3]=cthread->rx_data[3];
Note:
Detected by CppCheck
----------------------------------------------------------
In 20MHz the UE didn't do any uplink granted by DCI0.
It was replying to RAR, so uplink decoding was okay.
Turns out the DCI0 structure for TDD was wrong.
The constant RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU is set to 24. This is
too low. Running a downlink TCP iperf with a 10MHz or 20MHz cell
leads to lots of the following warning in the log:
[RLC][W][SN 792] Bad RLC header! Discard this RLC PDU (size=618)
The problem is that the uplink RLC PDU contains a lot of TCP ack.
We can see much more than 24 of them. The RLC layer is not happy
and discards the PDU.
Putting 256 for RLC_UM_SEGMENT_NB_MAX_LI_PER_PDU (arbitrarily chosen,
big but not too big) solves the problem, at least for 10MHz.
Using "system" to call "git log" is too error-prone.
In the test setup, lte-softmodem was blocked because
"git log" uses a pager ("less") and the pager was
waiting for the user to press enter.
We could pass "--no-pager" to "git log" but then
what if someone runs the softmodem out of the source
tree?
cmake defines PACKAGE_VERSION, we can use that instead,
as is done in openair-cn.
This reverts commit 7f24927c43.
With value 13 uplink TDD for a 10MHz configuration was not working.
UDP traffic sent with: "iperf -c XX -u -b10M" was crashing
the eNB.
Develop integration w13
Summary of changes:
- RLC AM reworking (a lot has changed)
- several bug fixes
* support processing multiple MAC RAR control elements in a single MSG2
* fix ACK/NACK resetting
* do not correct USRP frequency from carrier offset estimation when --ue-carrier-scan == off
* fix TDD uplink due to incorrect PUCCH format for SR in TDD
* several other simple fixes
- better support for LMS SDR
See merge request !168
- define _GNU_SOURCE before including pthread.h
- do not use static for the array 'threadname' used
to store the name, it makes it a global variable
accessed by several threads in parallel
- increase size of 'threadname' (maybe not necessary)
- properly indent #define / #under (# should be at column 1)
When you ran it with the scope as:
./dlsim -X
you saw no activity in the "PDSCH I/Q of MF Output" window,
so matter what SNR you put (even for very high SNR, say: ./dlsim -X -s40)
this commit seems to fix it.
I am not sure it is the end of story. The 2 threads PDCCH/PDSCH structures
may still not be used correctly everywhere.
We have a strange problem with the timestamp of the very
first packets received from the LimeSDR that leads to
a complete failure of the eNB.
A simple workaround is to discard the first RX packet
just after a "start" of the device.
We also change the value of "tx_sample_advance" to a more
reasonable value. The problem of timestamp was "solved"
differently in the past and at the time we needed to put
a much higher value.
This may have to be refined at some point.
Now the llrs after SIC procedure are updated.
In dlsim_tm in case of TB0_active==-1,
the llr were taken from the wrong buffer, and in dlsch_demodulation
the SIC llrs were written into the wrong buffer in the same case.
develop_integration_w12 into develop
Summary of changes:
- RRC Rel14: tests done so far indicate no problem
- SRS support in eNB
- bug fixes / warning removals
See merge request !155
The files NativeInteger.c.diff and constr_SET_OF.c.diff
from asn1c were generating compilation warnings. We had
local patches applied on generated files by asn1c.
A new version of asn1c has been pushed to
https://gitlab.eurecom.fr/oai/asn1c
(commit 224dc1f991b7e7ad705ce92e171b942f87b7b7e7)
making obsolete the fixes we do here.
So we now remove those fixes.
*************************
* IMPORTANT BEGIN *
*************************
Everyone should update their asn1c installation.
The simplest is to do:
source oaienv
cd cmake_targets
./build_oai -I
*************************
* IMPORTANT END *
*************************
The files NativeInteger.c.diff and constr_SET_OF.c.diff
from asn1c were generating compilation warnings. We had
local patches applied on generated files by asn1c.
A new version of asn1c has been pushed to
https://gitlab.eurecom.fr/oai/asn1c
(commit 224dc1f991b7e7ad705ce92e171b942f87b7b7e7)
making obsolete the fixes we do here.
So we now remove those fixes.
*************************
* IMPORTANT BEGIN *
*************************
Everyone should update their asn1c installation.
The simplest is to do:
source oaienv
cd cmake_targets
./build_oai -I
*************************
* IMPORTANT END *
*************************
- import RRC ASN.1 defintions from the specifications
(file openair2/RRC/LITE/MESSAGES/asn1c/ASN1_files/RRC-e10.asn)
contrary to rel8/10, all modules have been imported, maybe it's too much
to refine in case of problems
- deal with rel14 in fix_asn1
- all code that was for Rel10 is now for Rel10/Rel14
- some incompatible changes (mostly in naming) were resolved in favor
of rel14, see in openair2/RRC/LITE/defs.h
- unsure about the rlc layer, some arrays have changed (values appended),
I only changed the definition and in tests in the code, I changed
the index limit, maybe it's not enough
Rel14 is the default compilation mode.
see https://gitlab.eurecom.fr/oai/openairinterface5g/issues/227
When the UE connects to the eNodeB and receives its IP address from the
network, it calls system() to set it in the linux kernel world. This call
is not done in a realtime thread, but in the NAS, which uses its own thread,
independent of the realtime processing.
In some situations this totally disrupts realtime processing.
It is difficult to know precisely why that happens, but it seems that calling
fork(), as system() does, in a multi-threaded program is not a good idea. (So
say several people on the internet.) It is not clear why the softmodem is
impacted, but it seems that fork() is really what triggers the disruption.
Several tests lead to that conclusion.
To fix the problem, we create a child background process very early in main()
(before anything else basically). Then instead of calling system(), the main
process sends the string to the background process. The background process
gets the string, passes it to system() and reports the success/failure back
to the main process.
This solution involves a lot of system calls, but calling system() in the
first place is not cheap either. As long as no realtime thread uses this
mechanism, things should be fine. Time will tell.
dlsim_tm4 was crashing on massive. It was a problem
of misalignment of variables. The generated code by
the compiler was using 'movdqa' which requires alignment
to 16 bytes. Let's put 32, just in case, for avx2 maybe
(maybe not necessary but should not hurt).
Develop integration w11
Summary of changes:
- bug fixes
- RCC/RRU in automatic test setup
- more work on UE/MIMO
- LimeSDR support (5/10MHz)
- compilation under ubuntu 16.04, in particular kernel modules (nasmesh, ue_ip)
See merge request !148
the argument 'coded_bits_per_codeword' has to be an array in
case of several codewords.
The calling sites have been adapted.
Today, only the first index is used, so calling sites where
'coded_bits_per_codeword' is an integer pass the address
of it. It is expected that 'dump_dlsch2' will check in the
future that there is one or two codewords and only access
'coded_bits_per_codeword[1]' when it's sure there are
really two codewords.
for DCI format 2. Temporaryly going back to the previous
version of code.
2. Enabling rate adaptation with multiple HARQ rounds.
(no change inside the rounds).
On some hosts, compilations with the T tracer was failing.
The error was:
common/utils/T/T.h:15:19: fatal error: T_IDs.h: No such file or directory
The problem was that in CMakeLists.txt some targets depend on the
pre-generation of T_IDs.h but this dependancy relation was not set,
so those targets could be generated before the T (it was the case
with HASHTABLE).
This commit fixes that. Basically, we take all the targets found in
"add_executable" and "add_library" and make them depend on the
T if the T is enabled. Almost all existing targets were added,
even those that may not need it.
The problem of this approach is that someone adding a new target
using the T will not necessarily add a dependancy there.
Another solution would be to generate T_IDs.h at "cmake" stage,
not "make" stage and use an "if (NOT EXISTS T_IDs.h)" to generate
the file. We lose the dependancy relation though.
Things may be changed if maintenance cost is too high.
768*8 is too small, in 20MHz, the phy-test mode
(in default mode?) has a buffer of size 6378.
Let's set the buffer size to the input's one plus 4 bytes
(to accomodate for CRC, not sure about this).
New tests: 0186xx for TDD with the huawei 3276 dongle.
All necessary files to configure and use it have been added.
Existing code has been adapted for the TDD tests.
Only the test setup v2 has been adapted.
The file test_case_list.xml has been changed to add tests
0186xx, but only to work with test setup v2. It won't
work with test setup v1. To be completed if needed.
The tests are similar to FDD tests.
Throughputs for TDD have to be adjusted, the throughputs
of FDD are used for the moment.
Bug reported by Bruno Mongazon from Nokia.
"Without this line, the config file parameter is not properly stored and
the FH will always work with compression."
Develop integration w08
Summary of changes:
- various bugs fixed
- pre-commit script for better indentation: see commit 068ce4ca55
For the moment, each contributor has to enable the script (and install astyle) by hand.
Maybe at some point the script will be mandatory.
See merge request !124
Before that the scaling was aplied in precoder.
Now it is done in sqrt_rho_a and sqrt_rho_b.
For TM4 there still remains 1/sqrt(2) instead of
1/2 both at the transmitter and receievr side.
The warning was:
------------------------
In file included from /roux/openairinterface5g/openair2/UTIL/LOG/log.h:306:0,
from /roux/openairinterface5g/openair1/PHY/defs.h:54,
from /roux/openairinterface5g/openair2/LAYER2/MAC/eNB_scheduler_ulsch.c:33:
/roux/openairinterface5g/openair2/UTIL/LOG/log.h: In function 'printMeas':
/roux/openairinterface5g/common/utils/T/T.h:94:26: warning: format not a string literal and no format arguments [-Wformat-security]
#define T_ID(x) ((struct T_header *)(uintptr_t)(x))
^
/roux/openairinterface5g/common/utils/T/T.h:29:22: note: in definition of macro 'T_PUT_int'
int T_PUT_var = (val); \
^
/roux/openairinterface5g/common/utils/T/T.h:269:7: note: in expansion of macro 'T_HEADER'
T_HEADER(t); \
^
/roux/openairinterface5g/common/utils/T/T.h:101:76: note: in expansion of macro 'T3'
n18,n19,n20,n21,n22,n23,n24,n25,n26,n27,n28,n29,n30,n31,n32,n,...) T##n
^
/roux/openairinterface5g/common/utils/T/T.h:102:16: note: in expansion of macro 'TN'
#define T(...) TN(__VA_ARGS__)
^
/roux/openairinterface5g/openair2/UTIL/LOG/log.h:308:28: note: in expansion of macro 'T'
# define LOG_W(c, x...) T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x))
^
/roux/openairinterface5g/common/utils/T/T_IDs.h:71:30: note: in expansion of macro 'T_ID'
#define T_LEGACY_PHY_WARNING T_ID(68)
^
/roux/openairinterface5g/openair2/UTIL/LOG/log.h:308:30: note: in expansion of macro 'T_LEGACY_PHY_WARNING'
# define LOG_W(c, x...) T(T_LEGACY_ ## c ## _WARNING, T_PRINTF(x))
^
/roux/openairinterface5g/openair2/UTIL/LOG/log.h:411:9: note: in expansion of macro 'LOG_W'
LOG_W(PHY,txt2);
------------------------
over and over.
By replacing LOG_W(PHY,txt2) by LOG_W(PHY,"%s",txt2) all the warnings
are removed.
Prior to this commit, the following command failed to build dlsim:
./build_oai --phy_simulators -c
Choice has been made to define it in a .h file as a static inline
function.
We now have 4 versions of T_HEADER:
- bad quality C++ version with time
- good quality C version with time
- bad quality C++ version without time
- good quality C version without time
The compilation line was:
./build_oai --eNB -w USRP
The file openairinterface5g/cmake_targets/log/lte-softmodem.Rel10.txt
has been checked and all LOG_X (and 'msg') warnings have been fixed.
- some cleanup
- thread names to include UE Mod_id
- arg of UE_thread_rxn_txnp4 to be struct rx_tx_thread_data again
- sync in UE_thread_rxn_txnp4 to use instance_cnt_rxtx again
- UE_thread to call itti_send_msg_to_task with UE->Mod_id + NB_eNB_INST
instead of INSTANCE_DEFAULT again
This may break the softmodem UE, to be tested.
The most problematic thing may be the synchronization.
I don't think it will impact the processing at all,
but I won't bet my shirt on it.
- build script has ability to indicate location for downloading uhd images
- one simple wrapper to set environment variables and initiate another program (supposed to be lte-softmodem)
This reverts commit d31634c358.
Laurent Thomas had a problem on one machine with the build_oai
way of checking for nettle.
The problem with the alternative solution of including nettle/bignum.h
is that it is very unclear.
The problem with nettle is that the file nettle/config.h does not
exist for version 2. It was introduced in version 3.
We want to support both versions, but there is an API incompatibility.
So we need an #if #else mechanism.
The file nettle/bignum.h is present in both versions 2 and 3 and it
includes nettle/version.h in the version 3.
So by including this file, we can check for the existence of
NETTLE_VERSION_MAJOR (that comes from nettle/config.h) in the
code.
But as you can see, the reasoning is way too complex.
So it's better to keep the check in cmake_targets/CMakeLists.txt.
As long as we support version 2 this will be the way to go.
It is possible to force a given version in specific non-generic
customized environments.
Memory was allocated which was "lost" because the
address of the block was put in a pointer that is
overwritten just after.
Discussing with Elena, the current commit is the correct
way to do things.
Those functions modify a global char array (a string).
Let's pass a buffer to those functions, so that it's
thread safe. The caller has been modified, with hopefully
a buffer big enough (still bigger than what was there before,
so should not break more than it did).
This commit follows 7d9945e884.
lte-softmodem UE in S1 and lte-softmodem UE in noS1 modes behave
differently here.
This commit fixes the issue for thoses cases.
Other cases (eNB S1, eNB noS1, oaisim S1/noS1) have to be checked.
This commit is a continuation of 614d6bbe2a
(ue_ip: use correct instance).
Now in openair2/NETWORK_DRIVER/UE_IP/common.c the 'inst' is not
forced to 1 anymore, we take the value 'pdcph_p->inst'.
It turns out that 'pdcph_p->inst' is 0 instead of 1 when we
run lte-softmodem as an UE.
So let's modify PDCP to set 'inst' to 1 where it was set to 0 for
the UE softmodem case, and skip the places where it is reset to 0,
still for the UE softmodem case.
This may break things, I am not sure.
For whatever reason, lte-softmodem.c was totally messed up...
We took the version from the branch develop and added
abstraction_flag, which is needed in openair2/LAYER2/MAC/main.c
(this is not clean, previous commit added a comment for this).
This has to be cleaned at some point.
- the option --UE was abused! Let's introduce --UE-conf-nvram and
--UE-gen-nvram
- the option name --UE-OUTPUT was not clear and is now replaced by
--UE-gen-nvram
- the new options are described when running ./build_oai -h
- print_help has been modified (' replaced by ") to print
$conf_nvram_path and $gen_nvram_path
The problem was the following.
Run oaisim with two UEs:
sudo ../cmake_targets/oaisim_build_oai/build/oaisim -O enb.conf -u2 -s15 -AAWGN -y1 -b1 -Q0
Then wait for both UEs to be connected. The interfaces "oip1" and "oip2" are
activated, with IP addresses 192.172.0.2 for the first UE and 192.172.0.3 for
the second.
Then on the EPC machine, do:
ping 192.172.0.3
No reply.
On the oaisim machine, we see that the packets are sent to "oip1" instead
of "oip2".
The fix may break softmodem UE. The inst was forced to "1" for some reason.
To be checked.
The memset was also too big. It should only clear
one subframe.
Only tested without abstraction.
Abstraction does not work for the moment anyway, but just to
keep that in mind.
The idea is as follows.
oaisim waits for all tasks to be done for a TTI.
To do so it waits for last_rx_timestamp == current_rx_timestamp,
for all UEs and eNBs.
When it's done, it increases current_rx_timestamp by samples_per_tti,
to inform UEs and eNBs that a new TTI is ready.
In the functions [UE|eNB]_trx_read, we wait for a new TTI to be ready,
that is we wait for current_rx_timestamp != last_rx_timestamp.
The UE has also to wait for processing threads to be done.
In the eNB it's not necessary because the processing is all
done in one thread, that is: read subframe, process this subframe,
emit subframe+4, and then back to read subframe.
The code is not clean. We should not use usleep but semaphores.
Also, do_[DL|UL]_sig should not read from rxdata and write to txdata,
but use internal buffers.
The functions [UE|eNB]_trx_read should call do_[DL|UL]_sig and then
copy from the internal buffers of the channel simulator into rxdata.
The functions [UE|eNB]_trx_write should write data passed into the
internal buffers of the channel simulator.
Not sure if this is the right thing to do, but it seems to be.
"start_eNB = 1;" is also necessary when the l2l1 task gets INITIALIZE_MESSAGE
otherwise the eNB does not start.
As it is today, I don't think oaisim will work with more than one eNB.
It was probably the result of a bad merge.
At this point eNB_inst is not valid. Plus the T_ENB_MASTER_TICK
is now handled in lte-enb.c, even for oaisim.
We should use ENABLE_USE_MME, not USE_MME.
This code is useless anyway (I think, not sure, that's why I
leave it here), because the other threads wait for 'sync_var'
to become >=0.
It was not setting emm_data->eplmn.plmn[X], only emm_data->eplmn.n_plmns,
leading to the UE to dig for PLMN 00000.
(It's not the end of the story, seems like the PLMN selection
does not work, the UE only tries one from what I've seen, but
I didn't dig much, may be wrong.)
Also included some source files not related to this branch.
modified: openair1/PHY/LTE_ESTIMATION/lte_dl_bf_channel_estimation.c
modified: openair1/PHY/LTE_TRANSPORT/pilots_ue_spec.c
modified: openair1/PHY/MODULATION/beamforming.c
modified: openair1/PHY/TOOLS/twiddle18432.h
modified: openair1/SIMULATION/LTE_PHY/dlsim_tm7.c
modified: openair3/NAS/TOOLS/nvram.c
modified: openair3/NAS/TOOLS/usim.c
modified: openair3/NAS/UE/user_defs.h
In openairinterface5g many definitions in many layers of UE or eNB NB_MAX.
We created a file called openairinterface5g_limits.h
located at openairinterface5g_dir/targets/COMMON/ declaring the number max
of UE and eNB to be used in ALL layers depending on launching conditions
(LARGE_SCALE for example).
When using abstraction mode, layer2_init_UE() and openair_rrc_ue_init()
are called according to first_sync state and only without MME support.
We added the global variable abstraction_flag to allow abstraction mode
when MME is enabled.
Openair2 is also used in lte-softmodem, so it must have a global variable
abstraction_flag. So we moved it out from the main() scope.
This commit reverts behaviour of data generation as before
commit 7207c65b05fd812a18371827f2bfb1431fc58696:
fix .ue* filenames in scripts and documentation
TODO add option to conf2uedata and adapt script
This patch adds the conf2uedata tool for generating .ue.nvram* .ue.emm.nvram*
and .usim.nvram* files from a textual configuration file.
The configuration file define most usefull values like plmns, mnc, mcc, msin, K,
OPc for several users.
The files generated will always ends with a number corresponding to the user
entry in the configuration file.
This breaks oai5g because other script have not be updated for using
conf2uedata.
This breaks also the at_nas_ue command.
Examples of configuration files are in openair3/NAS/TOOLS/
Surprisingly, it touches every part of openair3, and most of the prototype.
Moreover, a special attention have been put to callback review.
However, there are still places to fix or review indicated by FIXME
This patch adds esm_data_t parameter to ESM functions.
This fixes a bug where the old _esm_data was redefined in all .o
Signed-off-by: Frédéric Leroy <frederic.leroy@b-com.com>
This patch merely adds a "user" object in all nas_* functions.
This don't move any data structure.
It allows next patches to be nicely split.
Signed-off-by: Frédéric Leroy <frederic.leroy@b-com.com>
The independent retransmission of TB1 will take data from the last PUSCH
report, when both TB were active and keep it for all the retransmission
rounds.
Now the TPMI for the retransmissions of TB1 is passed from the command
line with -K(tpmi): -K0 for Alamouti, -K5 for PUSCH column1 , etc.
TODO list:
1) check the message handler as if the function is not present it does not return msg not handled
2) use and check return arguments from the functions calling the data req
3) parse the config file for the configuration arguments
4) clean up the messy code
5) define and use other protocols than TCP for the communication between RLC and PDCP
1. in dlsim.c: now we check for the receiver type and, if SIC, proceed through encoding, modulation, LLR compuattion and decoding
of the decoded TB0.
2. Implementing routines for vector-vector multiplication and vector-vector subtraction
3. Adding some printouts for debuging purposes.
4. New functions: modulation_SIC, dlsch_qpsk_llr_SIC
5. In phy_scope.c: changing llr plotting: now for the length of coded_bits_per_cw.
1. Fixing a bug in dlsch_channel_level_TM56.
avg128D = _mm_setzero_si128() must be done inside the rx_antennas loop and not before
2. Cleaning up code in dlsch_demodulation.c
3. Offsets for TM5 and TM6 still must be validated.
4. Right now IA and I-UA receivers for TM4 have the same offset -
validate if any additional penalty/gain is needed.
5. Shortened file names in dlsim.c since matlab can read only 63-characters file names.
6. Tested: TM4 U2 -gS perfect CE works fine for EESM and MIESM abstraction (MCS 4 MSE= 0.007 dB on both streams).
1. Fixing precoder selection criteria for TM4 for tpmi2.
TPMI 2 works now.
2. Temporarily replacing abstraction.c with an old version till fix the bug in init_freq_channel.
3. Commenting some extra printouts.
Copyright (C) 2016 OpenAirInterface Software Alliance, Inc. <http://www.openairinterface.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
LICENSE TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION OF OPENAIR 5G SOFTWARE.
Definitions.
“License” shall mean the terms and conditions for use, reproduction, and distribution set forth in this document.
1. Definitions.
“License” shall mean the terms and conditions for use, reproduction, and distribution set forth
in this document.
“Licensor” shall mean the OpenAirInterface Software Alliance.
“Legal Entity” shall mean the union, at the time an acting entity joins the Alliance, of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, “control” means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
“Legal Entity” shall mean the union, at the time an acting entity joins the Alliance, of the
acting entity and all other entities that control, are controlled by, or are under common control
with that entity. For the purposes of this definition, “control” means (i) the power, direct or
indirect, to cause the direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii)
beneficial ownership of such entity.
“You” (or “Your”) shall mean an individual or Legal Entity exercising permissions granted by this License.
“You” (or “Your”) shall mean an individual or Legal Entity exercising permissions granted by
this License.
“Source” form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
“Source” form shall mean the preferred form for making modifications, including but not
limited to software source code, documentation source, and configuration files.
“Object” form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
“Object” form shall mean any form resulting from mechanical transformation or translation of
a Source form, including but not limited to compiled object code, generated documentation,
and conversions to other media types.
“OpenAirInterface Software Alliance” shall mean the endowment fund established at the initiative of Eurecom, an educational and research establishment located at Campus Sophia Tech, 450 Route des Chappes, 06410 Biot, France, which statutes were signed on 18 November 2014.
“OpenAirInterface Software Alliance” shall mean the endowment fund established at the
initiative of Eurecom, an educational and research establishment located at Campus Sophia
Tech, 450 Route des Chappes, 06410 Biot, France, which statutes were signed on 18
November 2014.
“ “Work” shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
“Work” shall mean the work of authorship, whether in Source or Object form, made available
under the License, as indicated by a copyright notice that is included in or attached to the
work (an example is provided in the Appendix below).
“Derivative Works” shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
“Derivative Works” shall mean any work, whether in Source or Object form, that is based on
(or derived from) the Work and for which the editorial revisions, annotations, elaborations, or
other modifications represent, as a whole, an original work of authorship. For the purposes of
this License, Derivative Works shall not include works that remain separable from, or merely
link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
“Contribution” shall mean any work of authorship that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, “submitted” means any form of electronic, , or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work “Contributor License Agreement” shall mean the agreement signed by any Contributor setting forth the terms and conditions applicable to its Contribution. “Contributor” shall mean any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
“Contribution” shall mean any work of authorship that is intentionally submitted to Licensor
for inclusion in the Work by the copyright owner or by an individual or Legal Entity
authorized to submit on behalf of the copyright owner. For the purposes of this definition,
“submitted” means any form of electronic, , or written communication sent to the Licensor or
its representatives, including but not limited to communication on electronic mailing lists,
source code control systems, and issue tracking systems that are managed by, or on behalf of,
the Licensor for the purpose of discussing and improving the Work
Grant of Copyright License.
Subject to the terms and conditions of this License, Licensor and each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form
“Contributor License Agreement” shall mean the agreement signed by any Contributor setting
forth the terms and conditions applicable to its Contribution.
3. Grant of Patent License.
“Contributor” shall mean any individual or Legal Entity on behalf of whom a Contribution
has been received by Licensor and subsequently incorporated within the Work.
3.1 Grant of Patent License for non-commercial purposes:
2. Grant of Copyright License.
Subject to the terms and conditions of this License, Licensor and each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of, publicly display, publicly
perform, and distribute the Work and such Derivative Works in Source or Object form
Subject to the terms and conditions of this License, Licensor and each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, import, and otherwise transfer the Work, for non-commercial purposes, where such license applies only to those patent claims licensable by such Contributor or Licensor that are necessarily infringed by the Work and/or their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted.
3. Grant of Patent License.
3.2 Grant of Patent License for commercial purposes:
3.1 Grant of Patent License for study, testing and research purposes:
Subject to the terms and conditions of this License, Licensor and each Contributor hereby
grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made, use, and otherwise
transfer (excluding selling) the Work, solely for study, testing and research purposes, where
such license applies only to those patent claims licensable by Licensor or such Contributor
that are necessarily infringed respectively by the Work and/or the said Contributor
Contribution(s) alone or by combination of their Contribution(s) with the Work to which
such Contribution(s) was submitted (“Essential Patents”).
For commercial purposes, and subject to the terms and conditions of this License, You commits to be prepared to negotiate a patent license with each Contributor and/or the Licensor on Fair, Reasonable and Non-Discriminatory (“FRAND”) terms and conditions for the Work or Contribution(s) incorporated within the Work.
Licensor and/or each Contributor, by submitting a Contribution, will identify any patent it owns related to the Work and/or its Contribution.
3.2 Grant of Patent License for purposes other than study and research:
For purposes other than study, testing and research, and subject to the terms and conditions of
this License, You commit to be prepared to negotiate a non-exclusive, non-transferable, non-
assignable license of Essential Patents with each Contributor and/or the Licensor on Fair,
Reasonable and Non-Discriminatory (“FRAND”) terms and conditions for the use of the
Work or Contribution(s) incorporated within the Work.
Licensor and/or each Contributor, by submitting a Contribution, will identify any of its known
Essential Patent it owns related to the Work and/or its Contribution.
3.3 Patent Litigation
If You institute patent litigation against any entity making use of the Work solely for study,
testing and research purposes (including a cross-claim or counterclaim in a lawsuit) alleging
that the Work or a Contribution incorporated within the Work constitutes direct or
contributory patent infringement, then the patent licenses granted to You under section 3.1 of
this License for that Work shall terminate as of the date such litigation is filed.
If You institute patent litigation against any entity making non-commercial use of the Work (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Sublicensing
You may grant sublicenses under the licenses granted under sections 2 and 3.1 provided that
the sublicense is subject to and inclusive of all the terms of and rights under this License to
which the Work is or was distributed by the OpenAirInterface Software Alliance.
4. Redistibution
5. Redistribution
Subject to terms and conditions set forth in sections 2 and 3, You may reproduce and
distribute copies of the Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You meet the following
conditions:
Subject to terms and conditions set forth in articles 2 and 3, You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
1. You must give any other recipients of the Work or Derivative Works a copy of this
License; and
2. You must cause any modified files by You to carry prominent notices stating that You
changed the files; and
3. You must retain, in the Source form of any Derivative Works that You distribute, all
copyright, patent, trademark, and attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of the Derivative Works; and
4. If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative
Works that You distribute must include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not pertain to any part of the
Derivative Works, in at least one of the following places: within a NOTICE text file
distributed as part of the Derivative Works; within the Source form or documentation, if
provided along with the Derivative Works; or, within a display generated by the Derivative
Works, if and wherever such third-party notices normally appear. The contents of the
NOTICE file are for informational purposes only and do not modify the License. You may
add Your own attribution notices within Derivative Works that You distribute, alongside or as
an addendum to the NOTICE text from the Work, provided that such additional attribution
notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide
additional or different license terms and conditions for use, reproduction, or distribution of
Your modifications, or for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with the conditions stated in
this License.
1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
6. Submission of Contributions.
Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be
under the terms and conditions of this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify the terms of any
separate license agreement such as the Contributor License Agreement You may have
executed with Licensor regarding such Contributions.
2. You must cause any modified files by You to carry prominent notices stating that You changed the files; and
7. Trademarks.
This License does not grant permission to use the trade names, trademarks, service marks, or
product names of the Licensor, except as required for reasonable and customary use in
describing the origin of the Work and reproducing the content of the NOTICE file.
3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
8. Disclaimer of Warranty.
Unless required by applicable law or agreed to in writing, Licensor provides the Work (and
each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including,
without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT,
MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely
responsible for determining the appropriateness of using or redistributing the Work and
assume any risks associated with your exercise of permissions under this License.
4. If the Work includes a “NOTICE” text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
9. Limitation of Liability.
In no event and under no legal theory, whether in tort (including negligence), contract, or
otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or
agreed to in writing, shall Licensor and any Contributor, as such, be liable to You for
damages, including any direct, indirect, special, incidental, or consequential damages of any
character arising as a result of this License or out of Your use or inability to use the Work
(including but not limited to damages for loss of goodwill, work stoppage, computer failure or
malfunction, or any and all other commercial damages or losses), even if such Contributor has
been advised of the possibility of such damages.
10. Accepting Warranty or Additional Liability.
While redistributing the Work or Derivative Works thereof, You may choose to offer, and
charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations
and/or rights consistent with this License. However, in accepting such obligations, You may
act only on Your own behalf and on Your sole responsibility, not on behalf of any other
Contributor and/or the Licensor, and only if You agree to indemnify, defend, and hold each
Contributor and/or the Licensor harmless for any liability incurred by, or claims asserted
against, such Contributor and/or Licensor by reason of Your accepting any such warranty or
additional liability.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement such as the Contributor License Agreement You may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an “AS IS” BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall Licensor and any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor and/or the Licensor,and only if You agree to indemnify, defend, and hold each Contributor and/or the Licensor harmless for any liability incurred by, or claims asserted against, such Contributor and/or Licensor by reason of Your accepting any such warranty or additional liability.
10. Applicable law. The present license shall be governed by the laws of France.
11. Applicable law.
The present license shall be governed by the laws of France.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the PRESENT OPENAIR 5G License to your work
To apply the present License to your work, attach the following boilerplate notice, with the fields enclosed by brackets “[]” replaced with your own identifying information. (Don’t include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same “printed page” as the copyright notice for easier identification within third-party archives.
1. APPENDIX: How to apply the PRESENT OPENAIR 5G License to your work
To apply the present License to your work, attach the following boilerplate notice, with the
fields enclosed by brackets “[]” replaced with your own identifying information. (Don’t
include the brackets!) The text should be enclosed in the appropriate comment syntax for the
file format. We also recommend that a file or class name and description of purpose be
included on the same “printed page” as the copyright notice for easier identification within
third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the License terms and conditions for use, reproduction, and distribution of OPENAIR 5G software (the “License”);
you may not use this file except in compliance with the License.You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
Licensed under the License terms and conditions for use, reproduction, and distribution of
OPENAIR 5G software (the “License”);
distributed under the License is distributed on an “AS IS” BASIS,
you may not use this file except in compliance with the License. You may obtain a copy of
the License at
Unless required by applicable law or agreed to in writing, software distributed under the
License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
See the License for the specific language governing permissions and limitations under the
├── LAYER2/RLC/ with the following subdirectories: UM_v9.3.0, TM_v9.3.0, and AM_v9.3.0.
├── LAYER2/PDCP/PDCP_v10.1.0.
├── RRC/LITE
├── LAYER2/PDCP/PDCP_v10.1.0.
├── NETWORK_DRIVER
├── PHY_INTERFACE
├── RRC/LITE
├── UTIL
├── X2AP
├── ENB_APP
├── openair3: 3GPP LTE Rel10 for S1AP, NAS GTPV1-U for both ENB and UE.
├── COMMON
├── DOCS
├── GTPV1-U
├── NAS
├── NAS
├── S1AP
├── SCTP
├── SECU
├── UDP
└── targets: top level wrapper for unitary simulation for PHY channels, system-level emulation (eNB-UE with and without S1), and realtime eNB and UE and RRH GW.
├── UTILS
└── targets: Top-level wrappers for unitary simulation for PHY channels, system-level emulation (eNB-UE with and without S1), and realtime eNB and UE and RRH GW.
RELEASE NOTES:
@@ -39,3 +49,17 @@ v0.3 -> Last stable commit on develop branch before the merge of feature-131-new
v0.4 -> Merge of feature-131-new-license. It closes issue#131 and changes the license to OAI Public License V1.0
v0.5 -> Merge of enhancement-10-harmony-lts. It includes fixes for Ubuntu 16.04 support
v0.5.1 -> Merge of bugfix-137-uplink-fixes. It includes stablity fixes for eNB
v0.5.2 -> Last version with old code for oaisim (abstraction mode works)
echo "No added cppcheck warnings/errors in this merge request"
} else {
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Some modified files in Merge Request MAY have INTRODUCED up to " + ret + " CPPCHECK errors/warnings"
addGitLabMRComment comment: message
}
}
// If the merge request has introduced compilation warnings, notifications in GitLab
sh "./ci-scripts/checkAddedWarnings.sh --src-branch ${env.gitlabSourceBranch} --target-branch ${env.gitlabTargetBranch}"
// Global Parameters. Normally they should be populated when the master job
// triggers the slave job with parameters
def eNB_Repository
def eNB_Branch
def eNB_CommitID
def eNB_AllowMergeRequestProcess = false
def eNB_TargetBranch
pipeline {
agent {
label pythonExecutor
}
options {
disableConcurrentBuilds()
ansiColor('xterm')
lock (ciSmartPhoneResource)
}
// the following parameter options are commented out so it shows the ones
// that you SHALL have to run the job.
// You can use them as template
/*
parameters {
//node-test parameters
string(name: 'pythonExecutor', defaultValue: 'nodea', description: 'Node where the pipeline - python scripts will be executed')
string(name: 'pythonTestXmlFile', defaultValue: 'enb_usrpB210_band7_50PRB.xml', description: 'Location of the Test XML to be run')
string(name: 'pipelineTestStageName', defaultValue: 'Test COTS-UE - OAI eNB - LTEBOX EPC', description: 'Naming of the Test Stage')
booleanParam(name: 'pipelineZipsConsoleLog', defaultValue: 'True', description: 'If true, the pipeline script retrieves the job console log, zips it and archives it as artifact')
string(name: 'smartphonesResource', defaultValue: 'CI-Bench-1-Phones', description: 'Lockeable Resource to prevent multiple jobs to run simultaneously with the same resource')
//eNB parameters
string(name: 'eNB_IPAddress', defaultValue: '192.168.XX.XX', description: 'IP Address of eNB')
credentials(name: 'eNB_Credentials', defaultValue: 'XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX', credentialType: "Username with password", required: true, description: 'Credentials for eNB')
Variables are set in the main script based on the options.
`--unsafe-caching` option is used because our VM instances are throw-away's.
`--template ci-scripts/template-host.xml` is used to duplicate the CPU properties to the VM instance. **VERY IMPORTANT to build OAI**
## 2.2. Lock / Unlock functions ##
There are `acquire_vm_create_lock` and `release_vm_create_lock` functions.
Creating Virtual Machines instances in parallel **creates a lot of stress** on the host server HW. If you launch creations in parallel (Jenkins pipeline could do it) or you are several people working on the same host server, this mechanism atomizes the creation process and wait until the previous VM creation is finished.
$ ./ci-scripts/oai-ci-vm-tool create -jn toto -id 1 -v2
```
The Jenkins pipeline uses the master job name as `job-name` option and the job-build ID.
Try to be unique if you are several developers working on the same host server.
Finally, typically I never use the `create` command. I use directly the build command that checks if VM is created and if not, will create it. See next step.
---
Next step: [how to build an OAI variant](./vm_based_simulator_build.md)
You can also go back to the [CI dev main page](./ci_dev_home.md)
The main script is including a bunch of sub BASH scripts.
* ci-scripts/createVM.sh
* ci-scripts/buildOnVM.sh
* ci-scripts/waitBuildOnVM.sh
* ci-scripts/destroyAllRunningVM.sh
* ci-scripts/runTestOnVM.sh
* ci-scripts/reportBuildLocally.sh
* ci-scripts/reportTestLocally.sh
**NOTE: ci-scripts/runTestOnVM.sh is getting big and will certainly be split to facilate maintenance. Start functions will be also factorized.**
# 3. Main script features #
The main purpose of the main script is decipher the options and launch the requested function.
It is also **testing if uvtool and apt-cacher are installed.**
It finally provides parameters to the requested functions. Parameter definition is centralized there.
For example:
for VM instance creation:
* the instance name: VM_NAME
* the RAM and number of CPUs: VM_MEMORY, VM_CPU
for OAI variant build:
* build options: BUILD_OPTIONS
* build log file to parse: LOG_PATTERN
* the number of log files to parse: NB_PATTERN_FILES
These last 2 variables are very important if you change the build options or if you modify the build system and add more targets to build (especially true for physical simulator).
There are many more variables.
---
Next step: [how to create one or several VM instances](./vm_based_simulator_create.md)
You can also go back to the [CI dev main page](./ci_dev_home.md)
You can also use your current cloned workspace and any `develop`-based branch.
```bash
$ cd /home/raphael/openairinterface5g
$ git fetch
$ git checkout develop-improved-documentation
# CAUTION: the following command will remove any file that has not already been added to GIT
$ sudo git clean -x -d -ff
$ git status
On branch develop-improved-documentation
Your branch is up-to-date with 'origin/develop-improved-documentation'.
nothing to commit, working directory clean
```
You can also have modified files.
**The main point is to have NO ARTIFACTS from a previous build in your workspace.**
Last point, the workspace folder name is not necesseraly `openairinterface5g`. But all the following commands will be run for the root of the workspace.
For clarity, I will always use `/tmp/CI-raphael` as $WORKSPACE.
# 3. Create the ZIP file #
```bash
# go to root of workspace
$ cd /tmp/CI-raphael
$ zip -r -qq localZip.zip .
```
The **Jenkins Pipeline** performs automatically these operations.
In addition, in case of a merge request, it tries to merge with the target branch and might create a dummy local commit.
See [section](https://gitlab.eurecom.fr/oai/openairinterface5g/wikis/ci/enb-master-job#32-verify-guidelines-stage)
---
Next step: [the main scripts](./vm_based_simulator_main_scripts.md)
You can also go back to the [CI dev main page](./ci_dev_home.md)
echo" <strong>CPPCHECK found NO error and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html
fi
if[$MR_TRIG -eq 1]
then
if[$ADDED_WARNINGS -eq 0]
then
echo" <strong>CPPCHECK found NO error and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html
else
echo" <strong>CPPCHECK found NO error and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-warning-sign\"></span></strong>" >> ./build_results.html
echo" <strong>CPPCHECK found $NB_ERRORS errors and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html
fi
if[$MR_TRIG -eq 1]
then
if[$ADDED_ERRORS -eq 0]&&[$ADDED_WARNINGS -eq 0]
then
echo" <strong>CPPCHECK found $NB_ERRORS errors and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-ban-circle\"></span></strong>" >> ./build_results.html
else
echo" <strong>CPPCHECK found $NB_ERRORS errors and $NB_WARNINGS warnings <span class=\"glyphicon glyphicon-ban-circle\"></span>" >> ./build_results.html
echo" <br>" >> ./build_results.html
echo" <br>" >> ./build_results.html
echo" <span class=\"glyphicon glyphicon-alert\"></span> This Merge Request may have introduced up to $ADDED_ERRORS errors and $ADDED_WARNINGS warnings. <span class=\"glyphicon glyphicon-alert\"></span></strong>" >> ./build_results.html
fi
fi
echo" </div>" >> ./build_results.html
fi
fi
if[$PU_TRIG -eq 1]
then
if[ -d ../../cppcheck_archives ]
then
if[ -d ../../cppcheck_archives/$JOB_NAME]
then
cp $1 ../../cppcheck_archives/$JOB_NAME
fi
fi
fi
echo" <button data-toggle=\"collapse\" data-target=\"#oai-cppcheck-details\">More details on CPPCHECK results</button>" >> ./build_results.html
echo" <div class=\"well well-lg\">End of Test Report -- Copyright <span class=\"glyphicon glyphicon-copyright-mark\"></span> 2018 <a href=\"http://www.openairinterface.org/\">OpenAirInterface</a>. All Rights Reserved.</div>" >> ./test_simulator_results.html
Some files were not shown because too many files have changed in this diff
Show More
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.