[PATCH] osmo-bts[master]: osmo-bts-trx: Increase a maximum allowed MS power reduction ...

2017-08-18 Thread Alexander Chemeris

Review at  https://gerrit.osmocom.org/3562

osmo-bts-trx: Increase a maximum allowed MS power reduction step from 2dB to 
4dB.

We tend to start MS with high power to make sure distant phones get good QoS,
but this also means that we need to reduce their power rather quickly. OTOH
we can't make this step too high because this may lead to power output
oscilation. From my (manual, limited) testing 2dB look like a reasonable
compromise.

Change-Id: I58785513e5739474b881ed7f2a312ecc690e7e60
---
M src/osmo-bts-trx/loops.h
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/62/3562/1

diff --git a/src/osmo-bts-trx/loops.h b/src/osmo-bts-trx/loops.h
index 613d2d0..c0458c5 100644
--- a/src/osmo-bts-trx/loops.h
+++ b/src/osmo-bts-trx/loops.h
@@ -7,7 +7,7 @@
 
 /* how much power levels do we raise/lower as maximum (1 level = 2 dB) */
 #define MS_RAISE_MAX 4
-#define MS_LOWER_MAX 1
+#define MS_LOWER_MAX 2
 
 /*
  * loops api

-- 
To view, visit https://gerrit.osmocom.org/3562
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58785513e5739474b881ed7f2a312ecc690e7e60
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 


[PATCH] osmo-bts[master]: osmo-bts-trx: Remove an unused variable. Resolves a compiler...

2017-08-18 Thread Alexander Chemeris

Review at  https://gerrit.osmocom.org/3561

osmo-bts-trx: Remove an unused variable. Resolves a compiler warning.

Change-Id: I2464e872f81021cbc3ccbc4e2e32c394d6afcf70
---
M src/osmo-bts-trx/loops.c
1 file changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/61/3561/1

diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c
index 8070e80..5710049 100644
--- a/src/osmo-bts-trx/loops.c
+++ b/src/osmo-bts-trx/loops.c
@@ -251,7 +251,6 @@
struct gsm_bts_trx *trx = l1t->trx;
struct gsm_lchan *lchan = >ts[L1SAP_CHAN2TS(chan_nr)]
.lchan[l1sap_chan2ss(chan_nr)];
-   int c_i;
 
/* check if loop is enabled */
if (!chan_state->amr_loop)
@@ -276,9 +275,6 @@
 
/* calculate average (reuse ber variable) */
ber = chan_state->ber_sum / chan_state->ber_num;
-
-   /* FIXME: calculate C/I from BER */
-   c_i = ber * 100;
 
/* reset bit errors */
chan_state->ber_num = 0;

-- 
To view, visit https://gerrit.osmocom.org/3561
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2464e872f81021cbc3ccbc4e2e32c394d6afcf70
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 


[PATCH] osmo-bts[master]: osmo-bts-trx: Fix MS power control loop.

2017-08-18 Thread Alexander Chemeris

Review at  https://gerrit.osmocom.org/3560

osmo-bts-trx: Fix MS power control loop.

The following two commits from 2014-12-06 introduced a new variable to control
MS power - ms_power_ctrl, but kept the old ms_power variable in place. They
have also changed the meaning of the ms_power variable - it now keeps original
RSL configured value. So when much later osmo-trx-bts code was merged to master
the code was compiling fine and this change in the meaning was overlooked.

In osmo-bts:
579651bf300de002731dfd3bd39985c9fd15616c power/sysmobts: Add a manual ms power 
level control
In OpenBSC:
f6f86b0eec18da165db136b14bf2db87fde4b4ac osmo-bts: Introduce new struct for a 
power loop in the BTS code

Change-Id: I713e39b882db32a0d17aa04790d16fa79afa1fb1
---
M src/osmo-bts-trx/l1_if.c
M src/osmo-bts-trx/loops.c
2 files changed, 12 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/60/3560/1

diff --git a/src/osmo-bts-trx/l1_if.c b/src/osmo-bts-trx/l1_if.c
index f69e587..c629a61 100644
--- a/src/osmo-bts-trx/l1_if.c
+++ b/src/osmo-bts-trx/l1_if.c
@@ -509,7 +509,7 @@
 
LOGP(DMEAS, LOGL_DEBUG, "RX L1 frame %s fn=%u chan_nr=0x%02x MS 
pwr=%ddBm rssi=%.1f dBFS "
"ber=%.2f%% (%d/%d bits) L1_ta=%d rqd_ta=%d toa=%.2f\n",
-   gsm_lchan_name(lchan), fn, chan_nr, 
ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power),
+   gsm_lchan_name(lchan), fn, chan_nr, 
ms_pwr_dbm(lchan->ts->trx->bts->band, lchan->ms_power_ctrl.current),
rssi, ber*100, n_errors, n_bits_total, lchan->meas.l1_info[1], 
lchan->rqd_ta, toa);
 
l1if_fill_meas_res(, chan_nr, lchan->rqd_ta + toa, ber, rssi, fn);
diff --git a/src/osmo-bts-trx/loops.c b/src/osmo-bts-trx/loops.c
index 8070e80..8d6e5d7 100644
--- a/src/osmo-bts-trx/loops.c
+++ b/src/osmo-bts-trx/loops.c
@@ -48,7 +48,7 @@
uint16_t arfcn = trx->arfcn;
int8_t new_power;
 
-   new_power = lchan->ms_power - (diff >> 1);
+   new_power = lchan->ms_power_ctrl.current - (diff >> 1);
 
if (diff == 0)
return 0;
@@ -66,12 +66,12 @@
}
 
/* a higher value means a lower level (and vice versa) */
-   if (new_power > lchan->ms_power + MS_LOWER_MAX)
-   new_power = lchan->ms_power + MS_LOWER_MAX;
-   else if (new_power < lchan->ms_power - MS_RAISE_MAX)
-   new_power = lchan->ms_power - MS_RAISE_MAX;
+   if (new_power > lchan->ms_power_ctrl.current + MS_LOWER_MAX)
+   new_power = lchan->ms_power_ctrl.current + MS_LOWER_MAX;
+   else if (new_power < lchan->ms_power_ctrl.current - MS_RAISE_MAX)
+   new_power = lchan->ms_power_ctrl.current - MS_RAISE_MAX;
 
-   if (lchan->ms_power == new_power) {
+   if (lchan->ms_power_ctrl.current == new_power) {
LOGP(DLOOP, LOGL_INFO, "Keeping MS new_power of trx=%u "
"chan_nr=0x%02x at control level %d (%d dBm)\n",
trx->nr, chan_nr, new_power,
@@ -83,11 +83,11 @@
LOGP(DLOOP, LOGL_INFO, "%s MS new_power of trx=%u chan_nr=0x%02x from "
"control level %d (%d dBm) to %d (%d dBm)\n",
(diff > 0) ? "Raising" : "Lowering",
-   trx->nr, chan_nr, lchan->ms_power,
-   MS_PWR_DBM(arfcn, lchan->ms_power), new_power,
+   trx->nr, chan_nr, lchan->ms_power_ctrl.current,
+   MS_PWR_DBM(arfcn, lchan->ms_power_ctrl.current), new_power,
MS_PWR_DBM(arfcn, new_power));
 
-   lchan->ms_power = new_power;
+   lchan->ms_power_ctrl.current = new_power;
 
return 0;
 }
@@ -159,8 +159,8 @@
/* change RSSI */
LOGP(DLOOP, LOGL_DEBUG, "Lowest RSSI: %d Target RSSI: %d Current "
"MS power: %d (%d dBm) of trx=%u chan_nr=0x%02x\n", rssi,
-   trx_target_rssi, lchan->ms_power,
-   MS_PWR_DBM(trx->arfcn, lchan->ms_power),
+   trx_target_rssi, lchan->ms_power_ctrl.current,
+   MS_PWR_DBM(trx->arfcn, lchan->ms_power_ctrl.current),
trx->nr, chan_nr);
ms_power_diff(lchan, chan_nr, trx_target_rssi - rssi);
 

-- 
To view, visit https://gerrit.osmocom.org/3560
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I713e39b882db32a0d17aa04790d16fa79afa1fb1
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Alexander Chemeris 


osmo-trx[master]: Add -j option to bind to specific address

2017-08-18 Thread Alexander Chemeris

Patch Set 1: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/3539
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9ba184a1251c823e413a9230943ed263e52142ec
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Alexander Chemeris 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[PATCH] osmo-ci[master]: osmocom-nightly-nitb-split.yml: schedule the job to be run a...

2017-08-18 Thread lynxis lazus

Review at  https://gerrit.osmocom.org/3558

osmocom-nightly-nitb-split.yml: schedule the job to be run at midnight

Change-Id: I0d80e7d260f9092f44d4d80471a4dd67b7acc839
---
M scripts/osmocom-nightly-nitb-split.yml
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/58/3558/1

diff --git a/scripts/osmocom-nightly-nitb-split.yml 
b/scripts/osmocom-nightly-nitb-split.yml
index 6c264fd..7dbf46f 100644
--- a/scripts/osmocom-nightly-nitb-split.yml
+++ b/scripts/osmocom-nightly-nitb-split.yml
@@ -17,4 +17,6 @@
   - git:
   url: git://git.osmocom.org/osmo-ci
   git-config-name: 'Jenkins Builder'
-  git-config-email: 'jenk...@osmocom.org
+  git-config-email: 'jenk...@osmocom.org'
+triggers:
+  - timed: "@midnight"

-- 
To view, visit https://gerrit.osmocom.org/3558
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d80e7d260f9092f44d4d80471a4dd67b7acc839
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 


[PATCH] osmo-ci[master]: scripts: add requirements.txt to list jenkins-job-builder

2017-08-18 Thread lynxis lazus

Review at  https://gerrit.osmocom.org/3559

scripts: add requirements.txt to list jenkins-job-builder

Change-Id: If25ce84593bbf6a393928a8f4e1670f320c48ca4
---
A scripts/requirements.txt
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/59/3559/1

diff --git a/scripts/requirements.txt b/scripts/requirements.txt
new file mode 100644
index 000..6b700dc
--- /dev/null
+++ b/scripts/requirements.txt
@@ -0,0 +1 @@
+jenkins-job-builder

-- 
To view, visit https://gerrit.osmocom.org/3559
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If25ce84593bbf6a393928a8f4e1670f320c48ca4
Gerrit-PatchSet: 1
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 


[MERGED] osmo-gsm-tester[master]: esme: Remove temporary workaround for non-implemented delive...

2017-08-18 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: esme: Remove temporary workaround for non-implemented deliver_sm
..


esme: Remove temporary workaround for non-implemented deliver_sm

Openbsc has SMS Delivery Reports since recently, which means we are now
receiving deliver_sm messages and this workaround introduced in commit
db0d8ab4fcfac67e76729241d92ca128d4526240 is not required anymore.

Closes OS-#2353.

Change-Id: Iecf3983bfc24fec8023ba5d589c2d7620ec5d921
---
M src/osmo_gsm_tester/esme.py
1 file changed, 1 insertion(+), 3 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo_gsm_tester/esme.py b/src/osmo_gsm_tester/esme.py
index 9dbc5a3..63a1ded 100644
--- a/src/osmo_gsm_tester/esme.py
+++ b/src/osmo_gsm_tester/esme.py
@@ -126,9 +126,7 @@
 self.references_pending_receipt.remove(umref)
 
 def receipt_was_received(self, umref):
-# return umref not in self.references_pending_receipt
-self.log('FIXME: wait_receipt disabled because receipts are not 
received, see OsmoNITB #2353')
-return True
+return umref not in self.references_pending_receipt
 
 def run_method_expect_failure(self, errcode, method, *args):
 try:

-- 
To view, visit https://gerrit.osmocom.org/3557
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Iecf3983bfc24fec8023ba5d589c2d7620ec5d921
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 


[MERGED] osmo-pcu[master]: EDGE: Fix UL link adaptation.

2017-08-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: EDGE: Fix UL link adaptation.
..


EDGE: Fix UL link adaptation.

We have seen that UL MCS5- MCS9 link adaptation has not been implemented in 
current PCU implementation.
If the MS slowly moves far away from the BTS, the UL MCS will always stick at 
MCS9 no matter UL link quality values leading to poor data service experience.
The UL MCS is expected to adapt from MCS9 -> MCSx due to bad UL quality.

Below PCU traces indicate that UL MCS is quickly increasing to MCS9 (max MCS 9 
was used in this test) and it never changes to other UL MCS due zero thresholds.

<0004> gprs_ms.cpp:670 MS (IMSI ): Link quality 23dB (23dB) left window [0, 0], 
modifying uplink CS level: MCS-6 -> MCS-7
<0004> gprs_ms.cpp:670 MS (IMSI 000): Link quality 23dB (23dB) left window [0, 
0], modifying uplink CS level: MCS-7 -> MCS-8
<0004> gprs_ms.cpp:670 MS (IMSI 000): Link quality 23dB (23dB) left window [0, 
0], modifying uplink CS level: MCS-8 -> MCS-9

Change-Id: I9272c337ad6399da4a47cc6e2736e25f24e099d8
---
M src/bts.h
M src/gprs_ms.cpp
M src/pcu_main.cpp
M src/pcu_vty.c
4 files changed, 100 insertions(+), 5 deletions(-)

Approvals:
  Max: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/bts.h b/src/bts.h
index 1f1dae2..b1fb8cc 100644
--- a/src/bts.h
+++ b/src/bts.h
@@ -221,6 +221,7 @@
uint8_t cs_adj_upper_limit;
uint8_t cs_adj_lower_limit;
struct {int16_t low; int16_t high; } cs_lqual_ranges[MAX_GPRS_CS];
+   struct {int16_t low; int16_t high; } mcs_lqual_ranges[MAX_GPRS_CS];
uint16_t cs_downgrade_threshold; /* downgrade if less packets left (DL) 
*/
uint16_t ws_base;
uint16_t ws_pdch; /* increase WS by this value per PDCH */
diff --git a/src/gprs_ms.cpp b/src/gprs_ms.cpp
index c6b7e34..66312fa 100644
--- a/src/gprs_ms.cpp
+++ b/src/gprs_ms.cpp
@@ -624,7 +624,7 @@
bts_data = m_bts->bts_data();
 
if (!max_cs_ul) {
-   LOGP(DRLCMACDL, LOGL_ERROR,
+   LOGP(DRLCMACMEAS, LOGL_ERROR,
"max_cs_ul cannot be derived (current UL CS: %s)\n",
m_current_cs_ul.name());
return;
@@ -642,11 +642,10 @@
low  = bts_data->cs_lqual_ranges[current_cs_num-1].low;
high = bts_data->cs_lqual_ranges[current_cs_num-1].high;
} else if (m_current_cs_ul.isEgprs()) {
-   /* TODO, use separate table */
if (current_cs_num > MAX_GPRS_CS)
current_cs_num = MAX_GPRS_CS;
-   low  = bts_data->cs_lqual_ranges[current_cs_num-1].low;
-   high = bts_data->cs_lqual_ranges[current_cs_num-1].high;
+   low  = bts_data->mcs_lqual_ranges[current_cs_num-1].low;
+   high = bts_data->mcs_lqual_ranges[current_cs_num-1].high;
} else {
return;
}
@@ -661,7 +660,7 @@
new_cs_ul.inc(mode());
 
if (m_current_cs_ul != new_cs_ul) {
-   LOGP(DRLCMACDL, LOGL_INFO,
+   LOGP(DRLCMACMEAS, LOGL_INFO,
"MS (IMSI %s): "
"Link quality %ddB (%ddB) left window [%d, %d], "
"modifying uplink CS level: %s -> %s\n",
diff --git a/src/pcu_main.cpp b/src/pcu_main.cpp
index 8e7cde8..e909b75 100644
--- a/src/pcu_main.cpp
+++ b/src/pcu_main.cpp
@@ -200,6 +200,28 @@
bts->cs_lqual_ranges[2].high = 13;
bts->cs_lqual_ranges[3].low = 12;
bts->cs_lqual_ranges[3].high = 256;
+
+   /* MCS-1 to MCS-9 */
+   /* Default thresholds are referenced from literature */
+   /* Fig. 2.3, Chapter 2, Optimizing Wireless Communication Systems, 
Springer (2009) */
+   bts->mcs_lqual_ranges[0].low = -256;
+   bts->mcs_lqual_ranges[0].high = 6;
+   bts->mcs_lqual_ranges[1].low = 5;
+   bts->mcs_lqual_ranges[1].high = 8;
+   bts->mcs_lqual_ranges[2].low = 7;
+   bts->mcs_lqual_ranges[2].high = 13;
+   bts->mcs_lqual_ranges[3].low = 12;
+   bts->mcs_lqual_ranges[3].high = 15;
+   bts->mcs_lqual_ranges[4].low = 14;
+   bts->mcs_lqual_ranges[4].high = 17;
+   bts->mcs_lqual_ranges[5].low = 16;
+   bts->mcs_lqual_ranges[5].high = 18;
+   bts->mcs_lqual_ranges[6].low = 17;
+   bts->mcs_lqual_ranges[6].high = 20;
+   bts->mcs_lqual_ranges[7].low = 19;
+   bts->mcs_lqual_ranges[7].high = 24;
+   bts->mcs_lqual_ranges[8].low = 23;
+   bts->mcs_lqual_ranges[8].high = 256;
bts->cs_downgrade_threshold = 200;
 
/* TODO: increase them when CRBB decoding is implemented */
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index 68d2f55..5ec16ea 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -178,6 +178,25 @@
bts->cs_lqual_ranges[3].low,

osmo-pcu[master]: EDGE: Fix UL link adaptation.

2017-08-18 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3538
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9272c337ad6399da4a47cc6e2736e25f24e099d8
Gerrit-PatchSet: 2
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Owner: Minh-Quang Nguyen 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Minh-Quang Nguyen 
Gerrit-HasComments: No


[MERGED] osmo-gsm-manuals[master]: mgw: Fix endpoint names for new MGW

2017-08-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: mgw: Fix endpoint names for new MGW
..


mgw: Fix endpoint names for new MGW

According to RFC3435, an RTP bridge forrwarding packets, transcoding
or otherwise, is a single endpoint with two connections.  Let's treat
it as such.  We introduce the "rtpbridge/" prefix to identify such
special RTP endpoints.

Change-Id: Id1f079307225faf05d298dcb12aa1c421bfa680a
---
M OsmoBSC/mgw/osmo-bsc-new-mgw-e1.msc
M OsmoBSC/mgw/osmo-bsc-new-mgw.msc
2 files changed, 16 insertions(+), 16 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/OsmoBSC/mgw/osmo-bsc-new-mgw-e1.msc 
b/OsmoBSC/mgw/osmo-bsc-new-mgw-e1.msc
index 7912a73..04b114f 100644
--- a/OsmoBSC/mgw/osmo-bsc-new-mgw-e1.msc
+++ b/OsmoBSC/mgw/osmo-bsc-new-mgw-e1.msc
@@ -17,9 +17,9 @@
ms <-> bsc  [label="Assignment"];
...;
 
-   mgcp <- bsc [label="MGCP CRCX ts1/ss2@abis (MSC:4000)"];
+   mgcp <- bsc [label="MGCP CRCX ts1/ss2@mgw (MSC:4000)"];
mgcp box mgcp   [label="Bind to MGW-local RTP Port (3000)\nConnect to 
MSC:4000"];
-   mgcp -> bsc [label="MGCP CRCX ts1/ss2@a OK (MGW:3000)"];
+   mgcp -> bsc [label="MGCP CRCX ts1/ss2@mgw OK (MGW:3000)"];
...;
 
bsc -> m_sc [label="BSSAP ASSGN CMPL (3GPP AoIP MGW:3000)"];
@@ -44,7 +44,7 @@
bsc <- m_sc [label="SCCP RLSD"];
bsc -> m_sc [label="SCCP RLC"];
...;
-   mgcp <- bsc [label="MGCP DLCX ts1/ss2@a"];
+   mgcp <- bsc [label="MGCP DLCX ts1/ss2@mgw"];
mgcp box mgcp   [label="Release MSC-facing local RTP port (3000)"];
-   mgcp -> bsc [label="MGCP DLCX ts1/ss2@a OK"];
+   mgcp -> bsc [label="MGCP DLCX ts1/ss2@mgw OK"];
 }
diff --git a/OsmoBSC/mgw/osmo-bsc-new-mgw.msc b/OsmoBSC/mgw/osmo-bsc-new-mgw.msc
index 2bab84d..e618bb7 100644
--- a/OsmoBSC/mgw/osmo-bsc-new-mgw.msc
+++ b/OsmoBSC/mgw/osmo-bsc-new-mgw.msc
@@ -20,19 +20,19 @@
bts <- bsc  [label="IPA CRCX"];
bts box bts [label="Bind to BTS-local RTP Port (1000)"];
bts -> bsc  [label="IPA CRCX ACK (BTS:1000)"];
-   bsc -> mgcp [label="MGCP CRCX 2@abis (BTS:1000)"];
+   bsc -> mgcp [label="MGCP CRCX rtpbridge/2@mgw (BTS:1000)"];
mgcp box mgcp   [label="Bind to MGW-local RTP Port (2000)\nConnect to 
BTS:1000"];
-   bsc <- mgcp [label="MGCP CRCX 2@abis OK (MGW:2000)"];
-   bts <- bsc  [label="IPA MDCX 2@abis (MGW:2000)"];
+   bsc <- mgcp [label="MGCP CRCX rtpbridge/2@mgw OK (MGW:2000)"];
+   bts <- bsc  [label="IPA MDCX (MGW:2000)"];
bts box bts [label="Connect RTP socket to remote (MGW) RTP Port"];
-   bts -> bsc  [label="IPA MDCX 2@abis ACK"];
-   #bsc -> mgcp[label="MGCP MDCX 2@abis (optional)"];
-   #bsc <- mgcp[label="MGCP MDCX 2@abis OK (optional)"];
+   bts -> bsc  [label="IPA MDCX ACK"];
+   #bsc -> mgcp[label="MGCP MDCX rtpbridge/2@mgw (optional)"];
+   #bsc <- mgcp[label="MGCP MDCX rtpbridge/2@mgw OK (optional)"];
...;
 
-   mgcp <- bsc [label="MGCP CRCX 1@a (MSC:4000)"];
+   mgcp <- bsc [label="MGCP CRCX rtpbridge/2@mgw (MSC:4000)"];
mgcp box mgcp   [label="Bind to MGW-local RTP Port (3000)\nConnect to 
MSC:4000"];
-   mgcp -> bsc [label="MGCP CRCX 1@a OK (MGW:3000)"];
+   mgcp -> bsc [label="MGCP CRCX rtpbridge/2@mgw OK (MGW:3000)"];
...;
 
bsc -> m_sc [label="BSSAP ASSGN CMPL (3GPP AoIP MGW:3000)"];
@@ -57,13 +57,13 @@
bsc <- m_sc [label="SCCP RLSD"];
bsc -> m_sc [label="SCCP RLC"];
...;
-   mgcp <- bsc [label="MGCP DLCX 1@a"];
+   mgcp <- bsc [label="MGCP DLCX rtpbridge/2@mgw"];
mgcp box mgcp   [label="Release MSC-facing local RTP port (3000)"];
-   mgcp -> bsc [label="MGCP DLCX 1@a OK"];
+   mgcp -> bsc [label="MGCP DLCX rtpbridge/2@mgw OK"];
 
-   bsc -> mgcp [label="MGCP DLCX 2@abis"];
+   mgcp <- bsc [label="MGCP DLCX rtpbridge/2@mgw"];
mgcp box mgcp   [label="Release BTS-facing local RTP port (2000)"];
-   bsc <- mgcp [label="MGCP DLCX 2@abis OK"];
+   mgcp -> bsc [label="MGCP DLCX rtpbridge/2@mgw OK"];
 
bts <- bsc  [label="IPA DLCX"];
bts box bts [label="Release BTS-local RTP port (1000)"];

-- 
To view, visit https://gerrit.osmocom.org/3546
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Id1f079307225faf05d298dcb12aa1c421bfa680a
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-bts[master]: Simplify jenkins build scripts

2017-08-18 Thread Max
Max has submitted this change and it was merged.

Change subject: Simplify jenkins build scripts
..


Simplify jenkins build scripts

* move duplicated code into separate functions in jenkins_common.sh
* use that function in individual builds

Change-Id: I4d09c5f2693b5ac0a4d8f2c840971e13d1ec58cf
---
M contrib/jenkins_bts_trx.sh
M contrib/jenkins_common.sh
M contrib/jenkins_lc15.sh
M contrib/jenkins_oct.sh
M contrib/jenkins_oct_and_bts_trx.sh
M contrib/jenkins_sysmobts.sh
6 files changed, 34 insertions(+), 86 deletions(-)

Approvals:
  André Boddenberg: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/contrib/jenkins_bts_trx.sh b/contrib/jenkins_bts_trx.sh
index 9e95809..47ccde3 100755
--- a/contrib/jenkins_bts_trx.sh
+++ b/contrib/jenkins_bts_trx.sh
@@ -16,26 +16,9 @@
 # Get osmo-pcu for pcuif_proto.h
 osmo-deps.sh osmo-pcu
 
-cd "$base"
-
-set +x
-echo
-echo
-echo
-echo " === osmo-bts-trx 
==="
-echo
-set -x
-
-autoreconf --install --force
 configure_flags="\
-  --with-openbsc=$deps/openbsc/openbsc/include \
   --with-osmo-pcu=$deps/osmo-pcu/include \
   --enable-trx \
   "
-./configure $configure_flags
-$MAKE $PARALLEL_MAKE
-$MAKE check \
-  || cat-testlogs.sh
-DISTCHECK_CONFIGURE_FLAGS="$configure_flags" \
-  $MAKE distcheck \
-  || cat-testlogs.sh
+
+build_bts "osmo-bts-trx" "$configure_flags"
diff --git a/contrib/jenkins_common.sh b/contrib/jenkins_common.sh
index bce771d..78ca0af 100644
--- a/contrib/jenkins_common.sh
+++ b/contrib/jenkins_common.sh
@@ -25,9 +25,30 @@
 # Get libosmocore for verify_value_string_arrays_are_terminated.py
 osmo-deps.sh libosmocore
 
-# Get OpenBSC for gsm_data_shared.*
-osmo-deps.sh openbsc
-
 cd "$base"
 
 "$deps"/libosmocore/contrib/verify_value_string_arrays_are_terminated.py 
$(find . -name "*.[hc]")
+
+# generic project build function, usage:
+# build "PROJECT-NAME" "CONFIGURE OPTIONS"
+build_bts() {
+set +x
+echo
+echo
+echo
+echo " === $1 ==="
+echo
+set -x
+
+cd $deps
+osmo-deps.sh openbsc
+conf_flags="--with-openbsc=$deps/openbsc/openbsc/include"
+cd $base
+shift
+conf_flags="$conf_flags $*"
+autoreconf --install --force
+./configure $conf_flags
+$MAKE $PARALLEL_MAKE
+$MAKE check || cat-testlogs.sh
+DISTCHECK_CONFIGURE_FLAGS=$conf_flags $MAKE distcheck || cat-testlogs.sh
+}
diff --git a/contrib/jenkins_lc15.sh b/contrib/jenkins_lc15.sh
index a2d9514..314d85c 100755
--- a/contrib/jenkins_lc15.sh
+++ b/contrib/jenkins_lc15.sh
@@ -13,18 +13,7 @@
 
 cd "$deps"
 osmo-layer1-headers.sh lc15 "$FIRMWARE_VERSION"
-cd "$base"
 
-set +x
-echo
-echo
-echo
-echo " === osmo-bts-lc15 
==="
-echo
-set -x
+configure_flags="--with-litecell15=$deps/layer1-headers/inc/ 
--enable-litecell15"
 
-autoreconf --install --force
-./configure --with-openbsc="$deps/openbsc/openbsc/include" 
--with-litecell15="$deps/layer1-headers/inc/" --enable-litecell15
-$MAKE $PARALLEL_MAKE
-$MAKE check || cat-testlogs.sh
-DISTCHECK_CONFIGURE_FLAGS="--with-litecell15=$deps/layer1-headers/inc/ 
--with-openbsc=$deps/openbsc/openbsc/include --enable-litecell15" $MAKE 
distcheck || cat-testlogs.sh
+build_bts "osmo-bts-lc15" "$configure_flags"
diff --git a/contrib/jenkins_oct.sh b/contrib/jenkins_oct.sh
index b3dc07f..8a351c5 100755
--- a/contrib/jenkins_oct.sh
+++ b/contrib/jenkins_oct.sh
@@ -13,21 +13,7 @@
 
 cd "$deps"
 osmo-layer1-headers.sh oct "$FIRMWARE_VERSION"
-cd "$base"
 
-set +x
-echo
-echo
-echo
-echo " === osmo-bts-octphy 
==="
-echo
-set -x
+configure_flags="--with-octsdr-2g=$deps/layer1-headers/ --enable-octphy"
 
-autoreconf --install --force
-./configure --with-openbsc="$deps/openbsc/openbsc/include" 
--with-octsdr-2g="$deps/layer1-headers/" --enable-octphy
-$MAKE $PARALLEL_MAKE
-$MAKE check \
-  || cat-testlogs.sh
-DISTCHECK_CONFIGURE_FLAGS="--with-octsdr-2g=$deps/layer1-headers/ 
--with-openbsc=$deps/openbsc/openbsc/include --enable-octphy" \
-  $MAKE distcheck \
-  || cat-testlogs.sh
+build_bts "osmo-bts-octphy" "$configure_flags"
diff --git a/contrib/jenkins_oct_and_bts_trx.sh 
b/contrib/jenkins_oct_and_bts_trx.sh
index c23009d..964fb94 100755
--- a/contrib/jenkins_oct_and_bts_trx.sh
+++ b/contrib/jenkins_oct_and_bts_trx.sh
@@ -18,28 +18,11 @@
 
 osmo-layer1-headers.sh oct "$FIRMWARE_VERSION"
 
-cd "$base"
-
-set +x
-echo
-echo
-echo
-echo " === osmo-bts-octphy+trx 
==="
-echo
-set -x
-
-autoreconf --install --force
 configure_flags="\
-  --with-openbsc=$deps/openbsc/openbsc/include \
   --with-osmo-pcu=$deps/osmo-pcu/include \
   --with-octsdr-2g=$deps/layer1-headers/ \
   --enable-octphy 

[MERGED] osmo-gsm-manuals[master]: MGW: Include MGCP endpoint naming scheme of old IPA/SCCPlite...

2017-08-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: MGW: Include MGCP endpoint naming scheme of old IPA/SCCPlite 
approach
..


MGW: Include MGCP endpoint naming scheme of old IPA/SCCPlite approach

Change-Id: Ib1fe96f0041534fa027b70ee67978cb7c6bc5207
---
M OsmoBSC/mgw/osmo-bsc-old-sccplite.msc
1 file changed, 8 insertions(+), 8 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/OsmoBSC/mgw/osmo-bsc-old-sccplite.msc 
b/OsmoBSC/mgw/osmo-bsc-old-sccplite.msc
index f7298bf..067721c 100644
--- a/OsmoBSC/mgw/osmo-bsc-old-sccplite.msc
+++ b/OsmoBSC/mgw/osmo-bsc-old-sccplite.msc
@@ -24,12 +24,12 @@
bts box bts [label="Connect RTP socket to remote (bsc_mgcp) RTP 
Port"];
bts -> bsc  [label="IPA MDCX ACK"];
 
-   mgcp <- m_sc[label="MGCP CRCX"];
+   mgcp <- m_sc[label="MGCP CRCX 1@mgw"];
mgcp box mgcp   [label="Bind to BTS-local RTP Port"];
-   mgcp -> m_sc[label="MGCP CRCX OK"];
-   mgcp <- m_sc[label="MGCP MDCX (recvonly) "];
+   mgcp -> m_sc[label="MGCP CRCX 1@mgw OK"];
+   mgcp <- m_sc[label="MGCP MDCX 1@mgw (recvonly) "];
mgcp box mgcp   [label="Connect RTP socket to remote (MSC) RTP Port"];
-   mgcp -> m_sc[label="MGCP MDCX OK"];
+   mgcp -> m_sc[label="MGCP MDCX 1@mgw OK"];
mgcp <= m_sc[label="RTP Audio"];
bts <= mgcp [label="RTP Audio"];
ms <= bts   [label="Um Audio (unidirectional)"];
@@ -45,9 +45,9 @@
...;
ms <- m_sc  [label="DTAP CC CONNECT"];
ms -> m_sc  [label="DTAP CC CONNECT ACK"];
-   mgcp <- m_sc[label="MGCP MDCX (sndrecv) "];
+   mgcp <- m_sc[label="MGCP MDCX 1@mgw (sndrecv) "];
mgcp box mgcp   [label="Why?"];
-   mgcp -> m_sc[label="MGCP MDCX OK"];
+   mgcp -> m_sc[label="MGCP MDCX 1@mgw OK"];
--- [label="Voice Call in Progress"];
ms <- m_sc  [label="DTAP CC DISCONNET"];
ms <- m_sc  [label="DTAP CC RELEASE"];
@@ -58,7 +58,7 @@
bsc <- m_sc [label="SCCP RLSD"];
bsc -> m_sc [label="SCCP RLC"];
...;
-   mgcp <- m_sc[label="MGCP DLCX"];
+   mgcp <- m_sc[label="MGCP DLCX 1@mgw"];
mgcp box mgcp   [label="Release local RTP port"];
-   mgcp -> m_sc[label="MGCP DLCX OK"];
+   mgcp -> m_sc[label="MGCP DLCX 1@mgw OK"];
 }

-- 
To view, visit https://gerrit.osmocom.org/3547
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib1fe96f0041534fa027b70ee67978cb7c6bc5207
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-gsm-manuals[master]: MGW: Include MGCP endpoint naming scheme of old IPA/SCCPlite...

2017-08-18 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3547
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib1fe96f0041534fa027b70ee67978cb7c6bc5207
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-gsm-manuals[master]: mgw: Fix endpoint names for new MGW

2017-08-18 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3546
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Id1f079307225faf05d298dcb12aa1c421bfa680a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] openbsc[master]: NITB: remove 'help' output about '-a' option that is removed...

2017-08-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: NITB: remove 'help' output about '-a' option that is removed 
for ages
..


NITB: remove 'help' output about '-a' option that is removed for ages

This option was present in very early versions of the NITB, but
at least since 2011 it is no longer supported.  It's still listed
in --help output, which is wrong.

Change-Id: I1d2cceb588ec5fb34ec5e2c05a7d8c93310bee88
---
M openbsc/src/osmo-nitb/bsc_hack.c
1 file changed, 0 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index 17b23b2..c2fe1c9 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -99,7 +99,6 @@
printf("  -c --config-file filename  The config file to use.\n");
printf("  -s --disable-color\n");
printf("  -l --database db-name  The database to use.\n");
-   printf("  -a --authorize-everyoneAuthorize every new subscriber. 
Dangerous!\n");
printf("  -T --timestamp Prefix every log line with a 
timestamp.\n");
printf("  -V --version   Print the version of OpenBSC.\n");
printf("  -P --rtp-proxy Enable the RTP Proxy code inside 
OpenBSC.\n");
@@ -122,7 +121,6 @@
{"config-file", 1, 0, 'c'},
{"disable-color", 0, 0, 's'},
{"database", 1, 0, 'l'},
-   {"authorize-everyone", 0, 0, 'a'},
{"pcap", 1, 0, 'p'},
{"timestamp", 0, 0, 'T'},
{"version", 0, 0, 'V' },

-- 
To view, visit https://gerrit.osmocom.org/3553
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d2cceb588ec5fb34ec5e2c05a7d8c93310bee88
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-ci[master]: Add value string termination check from libosmocore

2017-08-18 Thread Max
Max has submitted this change and it was merged.

Change subject: Add value string termination check from libosmocore
..


Add value string termination check from libosmocore

The script by Neels Hofmeyr  has actually nothing
to do with libosmocore itself - it's a generic build-time check used by
jenkins so it should be part of this repo to avoid extra checkout of
libosmocore just for this script.

Change-Id: I079218b61f512975ec5bfc7dc23503ec369cbb5a
---
A scripts/verify_value_string_arrays_are_terminated.py
1 file changed, 33 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/scripts/verify_value_string_arrays_are_terminated.py 
b/scripts/verify_value_string_arrays_are_terminated.py
new file mode 100755
index 000..020bb4d
--- /dev/null
+++ b/scripts/verify_value_string_arrays_are_terminated.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python3
+# vim: expandtab tabstop=2 shiftwidth=2 nocin
+
+'''
+Usage:
+  verify_value_string_arrays_are_terminated.py PATH [PATH [...]]
+
+e.g.
+libosmocore/contrib/verify_value_string_arrays_are_terminated.py $(find . 
-name "*.[hc]")
+'''
+
+import re
+import sys
+import codecs
+
+value_string_array_re = re.compile(
+  r'((\bstruct\s+value_string\b[^{;]*?)\s*=[^{;]*{[^;]*}\s*;)',
+  re.MULTILINE | re.DOTALL)
+
+members = r'(\.(value|str)\s*=\s*)?'
+terminator_re = re.compile('{\s*' + members + '(0|NULL)\s*,'
+   '\s*' + members + '(0|NULL)\s*}')
+errors_found = 0
+
+for f in sys.argv[1:]:
+  arrays = value_string_array_re.findall(codecs.open(f, "r", "utf-8").read())
+  for array_def, name in arrays:
+if not terminator_re.search(array_def):
+  print('ERROR: file contains unterminated value_string %r: %r'
+% (name, f))
+  errors_found += 1
+
+sys.exit(errors_found)

-- 
To view, visit https://gerrit.osmocom.org/3065
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I079218b61f512975ec5bfc7dc23503ec369cbb5a
Gerrit-PatchSet: 4
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Max 
Gerrit-Reviewer: blobb 
Gerrit-Reviewer: neels 


openbsc[master]: libmsc: Use actual delivery time in delivery reports.

2017-08-18 Thread Harald Welte

Patch Set 3: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3540
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9056429d40bf02731f004b7833f1de45a0d1add8
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-HasComments: No


[MERGED] openbsc[master]: libmsc: Use actual delivery time in delivery reports.

2017-08-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: libmsc: Use actual delivery time in delivery reports.
..


libmsc: Use actual delivery time in delivery reports.

Set the time on the status report to the time the message was delivered, as
this may not be the same as the time when we are delivering the report to the
originating MS.


Change-Id: I9056429d40bf02731f004b7833f1de45a0d1add8
---
M openbsc/include/openbsc/gsm_data.h
M openbsc/src/libmsc/db.c
M openbsc/src/libmsc/gsm_04_11.c
3 files changed, 4 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified
  Pablo Neira Ayuso: Looks good to me, but someone else must approve



diff --git a/openbsc/include/openbsc/gsm_data.h 
b/openbsc/include/openbsc/gsm_data.h
index 6829d22..4035b39 100644
--- a/openbsc/include/openbsc/gsm_data.h
+++ b/openbsc/include/openbsc/gsm_data.h
@@ -456,6 +456,7 @@
} smpp;
 
unsigned long validity_minutes;
+   time_t created;
bool is_report;
uint8_t reply_path_req;
uint8_t status_rep_req;
diff --git a/openbsc/src/libmsc/db.c b/openbsc/src/libmsc/db.c
index 631e05f..4ba12ca 100644
--- a/openbsc/src/libmsc/db.c
+++ b/openbsc/src/libmsc/db.c
@@ -1641,6 +1641,7 @@
 
/* FIXME: validity */
/* FIXME: those should all be get_uchar, but sqlite3 is braindead */
+   sms->created = dbi_result_get_datetime(result, "created");
sms->reply_path_req = dbi_result_get_ulonglong(result, 
"reply_path_req");
sms->status_rep_req = dbi_result_get_ulonglong(result, 
"status_rep_req");
sms->is_report = dbi_result_get_ulonglong(result, "is_report");
diff --git a/openbsc/src/libmsc/gsm_04_11.c b/openbsc/src/libmsc/gsm_04_11.c
index 5e736b3..ddef444 100644
--- a/openbsc/src/libmsc/gsm_04_11.c
+++ b/openbsc/src/libmsc/gsm_04_11.c
@@ -310,11 +310,11 @@
 
/* generate TP-SCTS (Service centre timestamp) */
smsp = msgb_put(msg, 7);
-   gsm340_gen_scts(smsp, time(NULL));
+   gsm340_gen_scts(smsp, sms->created);
 
/* generate TP-DT (Discharge time, in TP-SCTS format). */
smsp = msgb_put(msg, 7);
-   gsm340_gen_scts(smsp, time(NULL));
+   gsm340_gen_scts(smsp, sms->created);
 
/* TP-ST (status) */
smsp = msgb_put(msg, 1);

-- 
To view, visit https://gerrit.osmocom.org/3540
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I9056429d40bf02731f004b7833f1de45a0d1add8
Gerrit-PatchSet: 4
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Pablo Neira Ayuso 


[MERGED] osmo-gsm-manuals[master]: OsmoGSMTester: use proper systemd service names

2017-08-18 Thread Max
Max has submitted this change and it was merged.

Change subject: OsmoGSMTester: use proper systemd service names
..


OsmoGSMTester: use proper systemd service names

* use osmo-bts-sysmo for sysmoBTS systemd service name which is available
  since 114293a414bd5b7c86622ec8c293c4034c80d243
* use osmo-pcu for OsmoPCU systemd service name which is available since
  241f5bcb00f9c6fee4200a3aea9aa497bf0d3eee

Change-Id: Ie017946b9099460ac6758ff84ec7a10df13390a1
---
M OsmoGSMTester/chapters/install.adoc
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, but someone else must approve
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/OsmoGSMTester/chapters/install.adoc 
b/OsmoGSMTester/chapters/install.adoc
index 0c69dcd..f58c611 100644
--- a/OsmoGSMTester/chapters/install.adoc
+++ b/OsmoGSMTester/chapters/install.adoc
@@ -541,7 +541,7 @@
 be disabled:
 
 
-systemctl mask osmo-nitb sysmobts sysmopcu sysmobts-mgr
+systemctl mask osmo-nitb osmo-bts-sysmo osmo-pcu sysmobts-mgr
 
 
 This stops the stock setup keeping the BTS in operation and hence allows the

-- 
To view, visit https://gerrit.osmocom.org/3107
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie017946b9099460ac6758ff84ec7a10df13390a1
Gerrit-PatchSet: 3
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 


[MERGED] openbsc[master]: gbproxy: log signal value as text

2017-08-18 Thread Max
Max has submitted this change and it was merged.

Change subject: gbproxy: log signal value as text
..


gbproxy: log signal value as text

Change-Id: I6ed923f5c60a8d64305f4b8e90d1362d6510e1c5
---
M openbsc/src/gprs/gb_proxy.c
1 file changed, 4 insertions(+), 6 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
index b98a9a5..cd38d23 100644
--- a/openbsc/src/gprs/gb_proxy.c
+++ b/openbsc/src/gprs/gb_proxy.c
@@ -1369,9 +1369,8 @@
/* from BSS to SGSN */
peer = gbproxy_peer_by_nsei(cfg, nsvc->nsei);
if (!peer) {
-   LOGP(DGPRS, LOGL_NOTICE, "signal %u for unknown peer "
-"NSEI=%u/NSVCI=%u\n", signal, nsvc->nsei,
-nsvc->nsvci);
+   LOGP(DGPRS, LOGL_NOTICE, "signal '%s' for unknown peer 
NSEI=%u/NSVCI=%u\n",
+get_value_string(gprs_ns_signal_ns_names, signal), 
nsvc->nsei, nsvc->nsvci);
return 0;
}
switch (signal) {
@@ -1379,9 +1378,8 @@
case S_NS_BLOCK:
if (!peer->blocked)
break;
-   LOGP(DGPRS, LOGL_NOTICE, "Converting NS_RESET from "
-"NSEI=%u/NSVCI=%u into BSSGP_BVC_BLOCK to SGSN\n",
-nsvc->nsei, nsvc->nsvci);
+   LOGP(DGPRS, LOGL_NOTICE, "Converting '%s' from 
NSEI=%u/NSVCI=%u into BSSGP_BVC_BLOCK to SGSN\n",
+get_value_string(gprs_ns_signal_ns_names, signal), 
nsvc->nsei, nsvc->nsvci);
bssgp_tx_simple_bvci(BSSGP_PDUT_BVC_BLOCK, nsvc->nsei,
 peer->bvci, 0);
break;

-- 
To view, visit https://gerrit.osmocom.org/3556
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ed923f5c60a8d64305f4b8e90d1362d6510e1c5
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


[MERGED] openbsc[master]: gbproxy: log unhandled BSSGP PDU as text

2017-08-18 Thread Max
Max has submitted this change and it was merged.

Change subject: gbproxy: log unhandled BSSGP PDU as text
..


gbproxy: log unhandled BSSGP PDU as text

Change-Id: Ibe3c8bd353b3a178e26b0936f25b2e1959f9990c
---
M openbsc/src/gprs/gb_proxy.c
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
index 3603e14..b98a9a5 100644
--- a/openbsc/src/gprs/gb_proxy.c
+++ b/openbsc/src/gprs/gb_proxy.c
@@ -1266,8 +1266,7 @@
rc = bssgp_tx_status(BSSGP_CAUSE_PDU_INCOMP_FEAT, NULL, 
orig_msg);
break;
default:
-   LOGP(DGPRS, LOGL_NOTICE, "BSSGP PDU type 0x%02x unknown\n",
-   pdu_type);
+   LOGP(DGPRS, LOGL_NOTICE, "BSSGP PDU type %s not supported\n", 
bssgp_pdu_str(pdu_type));
rate_ctr_inc(>ctrg->
 ctr[GBPROX_GLOB_CTR_PROTO_ERR_SGSN]);
rc = bssgp_tx_status(BSSGP_CAUSE_PROTO_ERR_UNSPEC, NULL, 
orig_msg);

-- 
To view, visit https://gerrit.osmocom.org/3550
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe3c8bd353b3a178e26b0936f25b2e1959f9990c
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 


openbsc[master]: libmsc: Fix wrong handling of user_message_reference parameter

2017-08-18 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3554
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If748548a4a223e529a1110c89e483b599b406e8b
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-HasComments: No


[MERGED] openbsc[master]: libmsc: Fix wrong handling of user_message_reference parameter

2017-08-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: libmsc: Fix wrong handling of user_message_reference parameter
..


libmsc: Fix wrong handling of user_message_reference parameter

libsmpp34 already converts received TLV integer values to native
endianess in libsmpp34_(un)pack.

Converting them again at receive time swaps the 2 bytes of
user_message_reference, then using a wrong value. As GSM03.40 spec
uses only 1 byte for the id, then only the high byte of the initial
value is used and eventually sent back to the ESME. Again, at that time,
htons() is not needed because libsmpp34 already handles that part.

See OS-#2429 for more details.

Change-Id: If748548a4a223e529a1110c89e483b599b406e8b
---
M openbsc/src/libmsc/smpp_openbsc.c
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified
  Pablo Neira Ayuso: Looks good to me, but someone else must approve



diff --git a/openbsc/src/libmsc/smpp_openbsc.c 
b/openbsc/src/libmsc/smpp_openbsc.c
index e656376..af2d1be 100644
--- a/openbsc/src/libmsc/smpp_openbsc.c
+++ b/openbsc/src/libmsc/smpp_openbsc.c
@@ -120,7 +120,7 @@
}
break;
case TLVID_user_message_reference:
-   msg_ref = ntohs(t->value.val16);
+   msg_ref = t->value.val16;
break;
default:
break;
@@ -436,7 +436,7 @@
memset(, 0, sizeof(tlv));
tlv.tag = tag;
tlv.length = 2;
-   tlv.value.val16 = htons(val);
+   tlv.value.val16 = val;
build_tlv(req_tlv, );
 }
 

-- 
To view, visit https://gerrit.osmocom.org/3554
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If748548a4a223e529a1110c89e483b599b406e8b
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pablo Neira Ayuso 


meta-telephony[201705]: lksctp-tools: Use bb.utils.contains instead of deprecated ba...

2017-08-18 Thread Harald Welte

Patch Set 1: Code-Review+2 Verified+1

-- 
To view, visit https://gerrit.osmocom.org/3555
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic5fb0f35e5c9a3c48748b2941f471f0704a41e75
Gerrit-PatchSet: 1
Gerrit-Project: meta-telephony
Gerrit-Branch: 201705
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-HasComments: No


[MERGED] meta-telephony[201705]: lksctp-tools: Use bb.utils.contains instead of deprecated ba...

2017-08-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: lksctp-tools: Use bb.utils.contains instead of deprecated 
base_contains
..


lksctp-tools: Use bb.utils.contains instead of deprecated base_contains

Change-Id: Ic5fb0f35e5c9a3c48748b2941f471f0704a41e75
---
M recipes-misc/lksctp-tools/lksctp-tools_1.0.16.bb
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/recipes-misc/lksctp-tools/lksctp-tools_1.0.16.bb 
b/recipes-misc/lksctp-tools/lksctp-tools_1.0.16.bb
index d3e6a5d..f69e71c 100644
--- a/recipes-misc/lksctp-tools/lksctp-tools_1.0.16.bb
+++ b/recipes-misc/lksctp-tools/lksctp-tools_1.0.16.bb
@@ -21,7 +21,7 @@
 #| 
/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.0/ld:
 error: symbol sctp_connectx has undefined version
 #| collect2: error: ld returned 1 exit status
 #| make[4]: *** [libsctp.la] Error 1
-PNBLACKLIST[lksctp-tools] ?= "${@base_contains('DISTRO_FEATURES', 
'ld-is-gold', "BROKEN: fails to link against sctp_connectx symbol", '', d)}"
+PNBLACKLIST[lksctp-tools] ?= "${@bb.utils.contains('DISTRO_FEATURES', 
'ld-is-gold', "BROKEN: fails to link against sctp_connectx symbol", '', d)}"
 
 S = "${WORKDIR}/${BP}"
 

-- 
To view, visit https://gerrit.osmocom.org/3555
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic5fb0f35e5c9a3c48748b2941f471f0704a41e75
Gerrit-PatchSet: 1
Gerrit-Project: meta-telephony
Gerrit-Branch: 201705
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 


osmo-bts[master]: Simplify jenkins build scripts

2017-08-18 Thread Harald Welte

Patch Set 8: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3008
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4d09c5f2693b5ac0a4d8f2c840971e13d1ec58cf
Gerrit-PatchSet: 8
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: André Boddenberg 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: blobb 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


osmo-gsm-manuals[master]: OsmoGSMTester: use proper systemd service names

2017-08-18 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3107
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ie017946b9099460ac6758ff84ec7a10df13390a1
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Max 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 
Gerrit-HasComments: No


openbsc[master]: gbproxy: log unhandled BSSGP PDU as text

2017-08-18 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3550
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe3c8bd353b3a178e26b0936f25b2e1959f9990c
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


openbsc[master]: gbproxy: log signal value as text

2017-08-18 Thread Harald Welte

Patch Set 2: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3556
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I6ed923f5c60a8d64305f4b8e90d1362d6510e1c5
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-gsm-tester[master]: esme: Remove temporary workaround for non-implemented delive...

2017-08-18 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3557
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Iecf3983bfc24fec8023ba5d589c2d7620ec5d921
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] libosmocore[master]: gsm0411_utils: GSM03.40 9.2.3.11 SCTS should be local

2017-08-18 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: gsm0411_utils: GSM03.40 9.2.3.11 SCTS should be local
..


gsm0411_utils: GSM03.40 9.2.3.11 SCTS should be local

>From GSM 03.40: "The Service-Centre-Time-Stamp, and any other times
coded in this format that are defined in this specification,
represent the time local to the sending entity."

Change-Id: I4efdb1eaae43aced33961b64d4f14b0040321c10
---
M src/gsm/gsm0411_utils.c
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified
  Pablo Neira Ayuso: Looks good to me, but someone else must approve



diff --git a/src/gsm/gsm0411_utils.c b/src/gsm/gsm0411_utils.c
index 1d3ef49..a4e9d0d 100644
--- a/src/gsm/gsm0411_utils.c
+++ b/src/gsm/gsm0411_utils.c
@@ -89,7 +89,7 @@
  *  \param[in] time to encode */
 void gsm340_gen_scts(uint8_t *scts, time_t time)
 {
-   struct tm *tm = gmtime();
+   struct tm *tm = localtime();
 
*scts++ = gsm411_bcdify(tm->tm_year % 100);
*scts++ = gsm411_bcdify(tm->tm_mon + 1);

-- 
To view, visit https://gerrit.osmocom.org/3551
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I4efdb1eaae43aced33961b64d4f14b0040321c10
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Pablo Neira Ayuso 


libosmocore[master]: gsm0411_utils: GSM03.40 9.2.3.11 SCTS should be local

2017-08-18 Thread Harald Welte

Patch Set 1: Code-Review+2

-- 
To view, visit https://gerrit.osmocom.org/3551
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4efdb1eaae43aced33961b64d4f14b0040321c10
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-HasComments: No


libosmocore[master]: gsm0411_utils: GSM03.40 9.2.3.11 SCTS should be local

2017-08-18 Thread Keith Whyte

Patch Set 1:

> So now you're the GSM03.40
 > 9.2.3.11 SCTS expert ;-). 

I hope I don't come across as:

 "OMG! I found something not compliant with the spec.. we must fix it NOW!!!" 

:-)

-- 
To view, visit https://gerrit.osmocom.org/3551
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4efdb1eaae43aced33961b64d4f14b0040321c10
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-HasComments: No


[PATCH] osmo-gsm-tester[master]: esme: Remove temporary workaround for non-implemented delive...

2017-08-18 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/3557

esme: Remove temporary workaround for non-implemented deliver_sm

Openbsc has SMS Delivery Reports since recently, which means we are now
receiving deliver_sm messages and this workaround introduced in commit
db0d8ab4fcfac67e76729241d92ca128d4526240 is not required anymore.

Closes OS-#2353.

Change-Id: Iecf3983bfc24fec8023ba5d589c2d7620ec5d921
---
M src/osmo_gsm_tester/esme.py
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/57/3557/1

diff --git a/src/osmo_gsm_tester/esme.py b/src/osmo_gsm_tester/esme.py
index 9dbc5a3..63a1ded 100644
--- a/src/osmo_gsm_tester/esme.py
+++ b/src/osmo_gsm_tester/esme.py
@@ -126,9 +126,7 @@
 self.references_pending_receipt.remove(umref)
 
 def receipt_was_received(self, umref):
-# return umref not in self.references_pending_receipt
-self.log('FIXME: wait_receipt disabled because receipts are not 
received, see OsmoNITB #2353')
-return True
+return umref not in self.references_pending_receipt
 
 def run_method_expect_failure(self, errcode, method, *args):
 try:

-- 
To view, visit https://gerrit.osmocom.org/3557
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iecf3983bfc24fec8023ba5d589c2d7620ec5d921
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


[PATCH] openbsc[master]: gbproxy: log signal value as text

2017-08-18 Thread Max
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/3556

to look at the new patch set (#2).

gbproxy: log signal value as text

Change-Id: I6ed923f5c60a8d64305f4b8e90d1362d6510e1c5
---
M openbsc/src/gprs/gb_proxy.c
1 file changed, 4 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/56/3556/2

diff --git a/openbsc/src/gprs/gb_proxy.c b/openbsc/src/gprs/gb_proxy.c
index 3603e14..58f914a 100644
--- a/openbsc/src/gprs/gb_proxy.c
+++ b/openbsc/src/gprs/gb_proxy.c
@@ -1370,9 +1370,8 @@
/* from BSS to SGSN */
peer = gbproxy_peer_by_nsei(cfg, nsvc->nsei);
if (!peer) {
-   LOGP(DGPRS, LOGL_NOTICE, "signal %u for unknown peer "
-"NSEI=%u/NSVCI=%u\n", signal, nsvc->nsei,
-nsvc->nsvci);
+   LOGP(DGPRS, LOGL_NOTICE, "signal '%s' for unknown peer 
NSEI=%u/NSVCI=%u\n",
+get_value_string(gprs_ns_signal_ns_names, signal), 
nsvc->nsei, nsvc->nsvci);
return 0;
}
switch (signal) {
@@ -1380,9 +1379,8 @@
case S_NS_BLOCK:
if (!peer->blocked)
break;
-   LOGP(DGPRS, LOGL_NOTICE, "Converting NS_RESET from "
-"NSEI=%u/NSVCI=%u into BSSGP_BVC_BLOCK to SGSN\n",
-nsvc->nsei, nsvc->nsvci);
+   LOGP(DGPRS, LOGL_NOTICE, "Converting '%s' from 
NSEI=%u/NSVCI=%u into BSSGP_BVC_BLOCK to SGSN\n",
+get_value_string(gprs_ns_signal_ns_names, signal), 
nsvc->nsei, nsvc->nsvci);
bssgp_tx_simple_bvci(BSSGP_PDUT_BVC_BLOCK, nsvc->nsei,
 peer->bvci, 0);
break;

-- 
To view, visit https://gerrit.osmocom.org/3556
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I6ed923f5c60a8d64305f4b8e90d1362d6510e1c5
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Jenkins Builder


[PATCH] meta-telephony[201705]: lksctp-tools: Use bb.utils.contains instead of deprecated ba...

2017-08-18 Thread Pau Espin Pedrol

Review at  https://gerrit.osmocom.org/3555

lksctp-tools: Use bb.utils.contains instead of deprecated base_contains

Change-Id: Ic5fb0f35e5c9a3c48748b2941f471f0704a41e75
---
M recipes-misc/lksctp-tools/lksctp-tools_1.0.16.bb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/meta-telephony refs/changes/55/3555/1

diff --git a/recipes-misc/lksctp-tools/lksctp-tools_1.0.16.bb 
b/recipes-misc/lksctp-tools/lksctp-tools_1.0.16.bb
index d3e6a5d..f69e71c 100644
--- a/recipes-misc/lksctp-tools/lksctp-tools_1.0.16.bb
+++ b/recipes-misc/lksctp-tools/lksctp-tools_1.0.16.bb
@@ -21,7 +21,7 @@
 #| 
/home/jenkins/oe/world/shr-core/tmp-eglibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.0/ld:
 error: symbol sctp_connectx has undefined version
 #| collect2: error: ld returned 1 exit status
 #| make[4]: *** [libsctp.la] Error 1
-PNBLACKLIST[lksctp-tools] ?= "${@base_contains('DISTRO_FEATURES', 
'ld-is-gold', "BROKEN: fails to link against sctp_connectx symbol", '', d)}"
+PNBLACKLIST[lksctp-tools] ?= "${@bb.utils.contains('DISTRO_FEATURES', 
'ld-is-gold', "BROKEN: fails to link against sctp_connectx symbol", '', d)}"
 
 S = "${WORKDIR}/${BP}"
 

-- 
To view, visit https://gerrit.osmocom.org/3555
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5fb0f35e5c9a3c48748b2941f471f0704a41e75
Gerrit-PatchSet: 1
Gerrit-Project: meta-telephony
Gerrit-Branch: 201705
Gerrit-Owner: Pau Espin Pedrol 


openbsc[master]: libmsc: Fix wrong handling of user_message_reference parameter

2017-08-18 Thread Pablo Neira Ayuso

Patch Set 2: Code-Review+1

Thanks a lot for fixing up this Pau.

-- 
To view, visit https://gerrit.osmocom.org/3554
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: If748548a4a223e529a1110c89e483b599b406e8b
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-HasComments: No


libosmocore[master]: gsm0411_utils: GSM03.40 9.2.3.11 SCTS should be local

2017-08-18 Thread Pablo Neira Ayuso

Patch Set 1:

My impression is that noone didn't have the resources/time to have a careful 
look at this so far... So now you're the GSM03.40 9.2.3.11 SCTS expert ;-). 
These small details are a bit non-essencial (in terms of network operation) but 
they can be very time-consuming...

I think follow up patches to polish this would be good if times allows there.

-- 
To view, visit https://gerrit.osmocom.org/3551
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4efdb1eaae43aced33961b64d4f14b0040321c10
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-HasComments: No


[PATCH] openbsc[master]: libmsc: Fix wrong handling of user_message_reference parameter

2017-08-18 Thread Pau Espin Pedrol
Hello Jenkins Builder,

I'd like you to reexamine a change.  Please visit

https://gerrit.osmocom.org/3554

to look at the new patch set (#2).

libmsc: Fix wrong handling of user_message_reference parameter

libsmpp34 already converts received TLV integer values to native
endianess in libsmpp34_(un)pack.

Converting them again at receive time swaps the 2 bytes of
user_message_reference, then using a wrong value. As GSM03.40 spec
uses only 1 byte for the id, then only the high byte of the initial
value is used and eventually sent back to the ESME. Again, at that time,
htons() is not needed because libsmpp34 already handles that part.

See OS-#2429 for more details.

Change-Id: If748548a4a223e529a1110c89e483b599b406e8b
---
M openbsc/src/libmsc/smpp_openbsc.c
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/54/3554/2

diff --git a/openbsc/src/libmsc/smpp_openbsc.c 
b/openbsc/src/libmsc/smpp_openbsc.c
index e656376..af2d1be 100644
--- a/openbsc/src/libmsc/smpp_openbsc.c
+++ b/openbsc/src/libmsc/smpp_openbsc.c
@@ -120,7 +120,7 @@
}
break;
case TLVID_user_message_reference:
-   msg_ref = ntohs(t->value.val16);
+   msg_ref = t->value.val16;
break;
default:
break;
@@ -436,7 +436,7 @@
memset(, 0, sizeof(tlv));
tlv.tag = tag;
tlv.length = 2;
-   tlv.value.val16 = htons(val);
+   tlv.value.val16 = val;
build_tlv(req_tlv, );
 }
 

-- 
To view, visit https://gerrit.osmocom.org/3554
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If748548a4a223e529a1110c89e483b599b406e8b
Gerrit-PatchSet: 2
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pablo Neira Ayuso 


libosmocore[master]: gsm0411_utils: GSM03.40 9.2.3.11 SCTS should be local

2017-08-18 Thread Keith Whyte

Patch Set 1:

> This oneliner LGTM.
 > 
 > Is this fixing up the issue you were observing with Delivery
 > Reports with wrong dates?

wrong dates/times... Yes. 
The phones that actually show the date/time show it as it is placed into the 
SCTS field. The spec is clear that this should be local to SME. 

The spec mentions that the GMT offset /can/ be used by the phone if it is aware 
of it's own timezone. As far as I can make out, with gmtime() the offset is 
ALWAYS going to be 0.

There is another issue, as far as I can see, if the offset is negative, this is 
never going to be encoded correctly by gsm411_bcdify() 

Note that I am very much doing virgoan nitpicking here, nowadays the number of 
phones that actual display this time is minimal, it seems most of them use 
their own clock to timestamp messages. :)

-- 
To view, visit https://gerrit.osmocom.org/3551
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4efdb1eaae43aced33961b64d4f14b0040321c10
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-HasComments: No


libosmo-netif[master]: osmux: Re-write osmux_snprintf

2017-08-18 Thread Pablo Neira Ayuso

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/3537/1/src/osmux.c
File src/osmux.c:

PS1, Line 849:  
I'm still trying to understand this update, not sure what corner case you're 
trying to catch.

Why this code below not just enough to address this?

http://git.netfilter.org/nftables/tree/include/utils.h#n84


-- 
To view, visit https://gerrit.osmocom.org/3537
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I695771d099833842db37a415b636035d17f1bba7
Gerrit-PatchSet: 1
Gerrit-Project: libosmo-netif
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-HasComments: Yes


libosmocore[master]: gsm0411_utils: GSM03.40 9.2.3.11 SCTS should be local

2017-08-18 Thread Pablo Neira Ayuso

Patch Set 1: Code-Review+1

This oneliner LGTM.

Is this fixing up the issue you were observing with Delivery Reports with wrong 
dates?

-- 
To view, visit https://gerrit.osmocom.org/3551
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4efdb1eaae43aced33961b64d4f14b0040321c10
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-HasComments: No


openbsc[master]: libmsc: Use actual delivery time in delivery reports.

2017-08-18 Thread Pablo Neira Ayuso

Patch Set 3: Code-Review+1

-- 
To view, visit https://gerrit.osmocom.org/3540
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9056429d40bf02731f004b7833f1de45a0d1add8
Gerrit-PatchSet: 3
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Keith Whyte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Keith Whyte 
Gerrit-Reviewer: Pablo Neira Ayuso 
Gerrit-HasComments: No


[PATCH] openbsc[master]: NITB: remove 'help' output about '-a' option that is removed...

2017-08-18 Thread Harald Welte

Review at  https://gerrit.osmocom.org/3553

NITB: remove 'help' output about '-a' option that is removed for ages

This option was present in very early versions of the NITB, but
at least since 2011 it is no longer supported.  It's still listed
in --help output, which is wrong.

Change-Id: I1d2cceb588ec5fb34ec5e2c05a7d8c93310bee88
---
M openbsc/src/osmo-nitb/bsc_hack.c
1 file changed, 0 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/openbsc refs/changes/53/3553/1

diff --git a/openbsc/src/osmo-nitb/bsc_hack.c b/openbsc/src/osmo-nitb/bsc_hack.c
index 17b23b2..c2fe1c9 100644
--- a/openbsc/src/osmo-nitb/bsc_hack.c
+++ b/openbsc/src/osmo-nitb/bsc_hack.c
@@ -99,7 +99,6 @@
printf("  -c --config-file filename  The config file to use.\n");
printf("  -s --disable-color\n");
printf("  -l --database db-name  The database to use.\n");
-   printf("  -a --authorize-everyoneAuthorize every new subscriber. 
Dangerous!\n");
printf("  -T --timestamp Prefix every log line with a 
timestamp.\n");
printf("  -V --version   Print the version of OpenBSC.\n");
printf("  -P --rtp-proxy Enable the RTP Proxy code inside 
OpenBSC.\n");
@@ -122,7 +121,6 @@
{"config-file", 1, 0, 'c'},
{"disable-color", 0, 0, 's'},
{"database", 1, 0, 'l'},
-   {"authorize-everyone", 0, 0, 'a'},
{"pcap", 1, 0, 'p'},
{"timestamp", 0, 0, 'T'},
{"version", 0, 0, 'V' },

-- 
To view, visit https://gerrit.osmocom.org/3553
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d2cceb588ec5fb34ec5e2c05a7d8c93310bee88
Gerrit-PatchSet: 1
Gerrit-Project: openbsc
Gerrit-Branch: master
Gerrit-Owner: Harald Welte 


[MERGED] osmo-gsm-tester[master]: Split osmo-trx from osmo-bts-trx

2017-08-18 Thread Pau Espin Pedrol
Pau Espin Pedrol has submitted this change and it was merged.

Change subject: Split osmo-trx from osmo-bts-trx
..


Split osmo-trx from osmo-bts-trx

In the future, some environments/products may come with a trx interface
pre-installed. Start work to easily disable launching it.

Change-Id: I556c3e2ba16753393c7e70800c533a18122daeaa
---
M contrib/jenkins-build-osmo-bts-trx.sh
A contrib/jenkins-build-osmo-trx.sh
M src/osmo_gsm_tester/bts_osmotrx.py
3 files changed, 50 insertions(+), 12 deletions(-)

Approvals:
  Pau Espin Pedrol: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/contrib/jenkins-build-osmo-bts-trx.sh 
b/contrib/jenkins-build-osmo-bts-trx.sh
index c4bdcaf..8664a08 100755
--- a/contrib/jenkins-build-osmo-bts-trx.sh
+++ b/contrib/jenkins-build-osmo-bts-trx.sh
@@ -9,7 +9,6 @@
 
 build_repo libosmocore --disable-doxygen
 build_repo libosmo-abis
-build_repo osmo-trx --without-sse
 build_repo osmo-bts --enable-trx --with-openbsc=$base/openbsc/openbsc/include
 
 create_bin_tgz
diff --git a/contrib/jenkins-build-osmo-trx.sh 
b/contrib/jenkins-build-osmo-trx.sh
new file mode 100755
index 000..7d2a5b6
--- /dev/null
+++ b/contrib/jenkins-build-osmo-trx.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+set -e -x
+base="$PWD"
+name="osmo-trx"
+. "$(dirname "$0")/jenkins-build-common.sh"
+
+build_repo osmo-trx --without-sse
+
+create_bin_tgz
diff --git a/src/osmo_gsm_tester/bts_osmotrx.py 
b/src/osmo_gsm_tester/bts_osmotrx.py
index d8675cb..7496ce8 100644
--- a/src/osmo_gsm_tester/bts_osmotrx.py
+++ b/src/osmo_gsm_tester/bts_osmotrx.py
@@ -27,9 +27,8 @@
 run_dir = None
 inst = None
 env = None
-proc_trx = None
+trx = None
 
-BIN_TRX = 'osmo-trx'
 BIN_BTS_TRX = 'osmo-bts-trx'
 BIN_PCU = 'osmo-pcu'
 
@@ -54,26 +53,22 @@
 self.run_dir = 
util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name()))
 self.configure()
 
+self.trx = OsmoTrx(self.suite_run)
+self.trx.start()
+self.log('Waiting for osmo-trx to start up...')
+event_loop.wait(self, self.trx.trx_ready)
+
 self.inst = 
util.Dir(os.path.abspath(self.suite_run.trial.get_inst(OsmoBtsTrx.BIN_BTS_TRX)))
 lib = self.inst.child('lib')
 if not os.path.isdir(lib):
 raise RuntimeError('No lib/ in %r' % self.inst)
 self.env = { 'LD_LIBRARY_PATH': util.prepend_library_path(lib) }
 
-self.proc_trx = self.launch_process(OsmoBtsTrx.BIN_TRX, '-x')
-self.log('Waiting for osmo-trx to start up...')
-event_loop.wait(self, self.trx_ready)
-self.proc_trx.log(self.proc_trx.get_stdout_tail(1))
 self.launch_process(OsmoBtsTrx.BIN_BTS_TRX, '-r', '1',
 '-c', os.path.abspath(self.config_file),
 '-i', self.bsc.addr())
 #self.launch_process(OsmoBtsTrx.BIN_PCU, '-r', '1')
 self.suite_run.poll()
-
-def trx_ready(self):
-if not self.proc_trx or not self.proc_trx.is_running:
-return False
-return '-- Transceiver active with' in (self.proc_trx.get_stdout() or 
'')
 
 def launch_process(self, binary_name, *args):
 binary = os.path.abspath(self.inst.child('bin', binary_name))
@@ -120,4 +115,39 @@
 def set_bsc(self, bsc):
 self.bsc = bsc
 
+class OsmoTrx(log.Origin):
+suite_run = None
+run_dir = None
+inst = None
+env = None
+proc_trx = None
+
+BIN_TRX = 'osmo-trx'
+
+def __init__(self, suite_run):
+super().__init__(log.C_RUN, OsmoTrx.BIN_TRX)
+self.suite_run = suite_run
+self.env = {}
+
+def start(self):
+self.run_dir = 
util.Dir(self.suite_run.get_test_run_dir().new_dir(self.name()))
+self.inst = 
util.Dir(os.path.abspath(self.suite_run.trial.get_inst(OsmoTrx.BIN_TRX)))
+self.proc_trx = self.launch_process(OsmoTrx.BIN_TRX, '-x')
+
+def launch_process(self, binary_name, *args):
+binary = os.path.abspath(self.inst.child('bin', binary_name))
+run_dir = self.run_dir.new_dir(binary_name)
+if not os.path.isfile(binary):
+raise RuntimeError('Binary missing: %r' % binary)
+proc = process.Process(binary_name, run_dir,
+   (binary,) + args,
+   env=self.env)
+self.suite_run.remember_to_stop(proc)
+proc.launch()
+return proc
+
+def trx_ready(self):
+if not self.proc_trx or not self.proc_trx.is_running:
+return False
+return '-- Transceiver active with' in (self.proc_trx.get_stdout() or 
'')
 # vim: expandtab tabstop=4 shiftwidth=4

-- 
To view, visit https://gerrit.osmocom.org/3528
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I556c3e2ba16753393c7e70800c533a18122daeaa
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master