Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lizhongxiao
OpenXG-RAN
Commits
d08675d8
Commit
d08675d8
authored
Mar 28, 2017
by
rdoost
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes for ue-scan-carrier mode
parent
956dba6b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
29 deletions
+29
-29
openair2/UTIL/LOG/log.h
openair2/UTIL/LOG/log.h
+1
-1
targets/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
targets/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
+15
-14
targets/RT/USER/lte-ue.c
targets/RT/USER/lte-ue.c
+13
-14
No files found.
openair2/UTIL/LOG/log.h
View file @
d08675d8
...
...
@@ -159,7 +159,7 @@ extern "C" {
# define LOG_W(c, x...) logIt(c, LOG_WARNING, x)
# define LOG_N(c, x...) logIt(c, LOG_NOTICE, x)
# define LOG_I(c, x...) logIt(c, LOG_INFO, x)
# define LOG_D(c, x...) logIt(c, LOG_DEBUG, x)
# define LOG_D(c, x...)
//
logIt(c, LOG_DEBUG, x)
# define LOG_F(c, x...) logIt(c, LOG_FILE, x) // log to a file, useful for the MSC chart generation
# define LOG_T(c, x...) logIt(c, LOG_TRACE, x)
# endif
/* T_TRACER */
...
...
targets/ARCH/IRIS/USERSPACE/LIB/iris_lib.cpp
View file @
d08675d8
...
...
@@ -74,9 +74,10 @@ typedef struct
static
int
trx_iris_start
(
openair0_device
*
device
)
{
iris_state_t
*
s
=
(
iris_state_t
*
)
device
->
priv
;
long
long
timeNs
=
s
->
iris
->
getHardwareTime
(
""
)
+
500000
;
int
flags
=
0
;
flags
|=
SOAPY_SDR_HAS_TIME
;
//
flags |= SOAPY_SDR_HAS_TIME;
int
ret
=
s
->
iris
->
activateStream
(
s
->
rxStream
,
flags
,
timeNs
,
0
);
int
ret2
=
s
->
iris
->
activateStream
(
s
->
txStream
);
if
(
ret
<
0
|
ret2
<
0
)
...
...
@@ -496,19 +497,6 @@ extern "C" {
int
samples
=
openair0_cfg
[
0
].
sample_rate
;
samples
/=
24000
;
// create tx & rx streamer
const
SoapySDR
::
Kwargs
&
arg
=
SoapySDR
::
Kwargs
();
std
::
vector
<
size_t
>
channels
=
{};
for
(
i
=
0
;
i
<
openair0_cfg
[
0
].
rx_num_channels
;
i
++
)
if
(
i
<
s
->
iris
->
getNumChannels
(
SOAPY_SDR_RX
))
channels
.
push_back
(
i
);
s
->
rxStream
=
s
->
iris
->
setupStream
(
SOAPY_SDR_RX
,
SOAPY_SDR_CS16
,
channels
,
arg
);
std
::
vector
<
size_t
>
tx_channels
=
{};
for
(
i
=
0
;
i
<
openair0_cfg
[
0
].
tx_num_channels
;
i
++
)
if
(
i
<
s
->
iris
->
getNumChannels
(
SOAPY_SDR_TX
))
tx_channels
.
push_back
(
i
);
s
->
txStream
=
s
->
iris
->
setupStream
(
SOAPY_SDR_TX
,
SOAPY_SDR_CS16
,
tx_channels
,
arg
);
/* Setting TX/RX BW after streamers are created due to iris calibration issue */
for
(
i
=
0
;
i
<
openair0_cfg
[
0
].
tx_num_channels
;
i
++
)
{
...
...
@@ -524,6 +512,19 @@ extern "C" {
}
}
// create tx & rx streamer
const
SoapySDR
::
Kwargs
&
arg
=
SoapySDR
::
Kwargs
();
std
::
vector
<
size_t
>
channels
=
{};
for
(
i
=
0
;
i
<
openair0_cfg
[
0
].
rx_num_channels
;
i
++
)
if
(
i
<
s
->
iris
->
getNumChannels
(
SOAPY_SDR_RX
))
channels
.
push_back
(
i
);
s
->
rxStream
=
s
->
iris
->
setupStream
(
SOAPY_SDR_RX
,
SOAPY_SDR_CS16
,
channels
,
arg
);
std
::
vector
<
size_t
>
tx_channels
=
{};
for
(
i
=
0
;
i
<
openair0_cfg
[
0
].
tx_num_channels
;
i
++
)
if
(
i
<
s
->
iris
->
getNumChannels
(
SOAPY_SDR_TX
))
tx_channels
.
push_back
(
i
);
s
->
txStream
=
s
->
iris
->
setupStream
(
SOAPY_SDR_TX
,
SOAPY_SDR_CS16
,
tx_channels
,
arg
);
s
->
iris
->
setHardwareTime
(
0
,
""
);
...
...
targets/RT/USER/lte-ue.c
View file @
d08675d8
...
...
@@ -448,9 +448,9 @@ static void *UE_thread_synch(void *arg)
for
(
i
=
0
;
i
<
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_num_channels
;
i
++
)
{
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_gain
[
UE
->
rf_map
.
chain
+
i
]
=
UE
->
rx_total_gain_dB
;
//-USRP_GAIN_OFFSET;
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
UE
->
rf_map
.
chain
+
i
]
-=
UE
->
common_vars
.
freq_offset
;
openair0_cfg
[
UE
->
rf_map
.
card
].
tx_freq
[
UE
->
rf_map
.
chain
+
i
]
=
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
UE
->
rf_map
.
chain
+
i
]
+
uplink_frequency_offset
[
CC_id
][
i
];
openair0_cfg
[
UE
->
rf_map
.
card
].
tx_freq
[
UE
->
rf_map
.
chain
+
i
]
=
openair0_cfg
[
UE
->
rf_map
.
card
].
rx_freq
[
UE
->
rf_map
.
chain
+
i
]
+
uplink_frequency_offset
[
CC_id
][
i
];
downlink_frequency
[
CC_id
][
i
]
=
openair0_cfg
[
CC_id
].
rx_freq
[
i
];
freq_offset
=
0
;
freq_offset
=
0
;
}
// reconfigure for potentially different bandwidth
...
...
@@ -483,13 +483,13 @@ static void *UE_thread_synch(void *arg)
UE
->
rfdevice
.
trx_set_freq_func
(
&
UE
->
rfdevice
,
&
openair0_cfg
[
0
],
0
);
//UE->rfdevice.trx_set_gains_func(&openair0,&openair0_cfg[0]);
UE
->
rfdevice
.
trx_stop_func
(
&
UE
->
rfdevice
);
sleep
(
1
);
//
UE->rfdevice.trx_stop_func(&UE->rfdevice);
//usleep(100
);
init_frame_parms
(
&
UE
->
frame_parms
,
1
);
if
(
UE
->
rfdevice
.
trx_start_func
(
&
UE
->
rfdevice
)
!=
0
)
{
LOG_E
(
HW
,
"Could not start the device
\n
"
);
oai_exit
=
1
;
}
//
if (UE->rfdevice.trx_start_func(&UE->rfdevice) != 0 ) {
//
LOG_E(HW,"Could not start the device\n");
//
oai_exit=1;
//
}
}
else
{
UE
->
is_synchronized
=
1
;
...
...
@@ -521,13 +521,13 @@ static void *UE_thread_synch(void *arg)
// calculate new offset and try again
if
(
UE
->
UE_scan_carrier
==
1
)
{
if
(
freq_offset
>=
0
)
{
freq_offset
+=
10
0
;
freq_offset
+=
2
0
;
freq_offset
*=
-
1
;
}
else
{
freq_offset
*=
-
1
;
}
if
(
abs
(
freq_offset
)
>
75
00
)
{
if
(
abs
(
freq_offset
)
>
200
00
)
{
LOG_I
(
PHY
,
"[initial_sync] No cell synchronization found, abandoning
\n
"
);
FILE
*
fd
;
if
((
fd
=
fopen
(
"rxsig_frame0.dat"
,
"w"
))
!=
NULL
)
{
...
...
@@ -543,9 +543,8 @@ static void *UE_thread_synch(void *arg)
return
&
UE_thread_synch_retval
;
// not reached
}
}
else
{
}
if
(
freq_offset
%
100
==
0
)
{
LOG_I
(
PHY
,
"[initial_sync] trying carrier off %d Hz, rxgain %d (DL %u, UL %u)
\n
"
,
freq_offset
,
UE
->
rx_total_gain_dB
,
...
...
@@ -564,7 +563,7 @@ static void *UE_thread_synch(void *arg)
}
UE
->
rfdevice
.
trx_set_freq_func
(
&
UE
->
rfdevice
,
&
openair0_cfg
[
0
],
0
);
}
}
// initial_sync=0
break
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment