osmo-bsc[master]: handover_test: explicitly wrap abis_rsl_sendmsg()

2018-03-06 Thread Harald Welte

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/7121/1//COMMIT_MSG
Commit Message:

Line 11: magic (aka luck).
> but this only works when the other implementation is in a library? Can we b
I think it doesn't matter whether library or not.  It works as both the 
function caller and the function itself are in the same .c/.o file.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I05ce33a4e42bc82b9ce5060e2f811033f5a1f8d8
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[MERGED] osmo-msc[master]: VLR: fix potential NULL dereference

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: VLR: fix potential NULL dereference
..


VLR: fix potential NULL dereference

The vlr_subscr_get() can return NULL if its argument is NULL
(which isn't checked for) so before dereferencing it's result
we should check for it.

Change-Id: I13632908d0b67323202effa9dd6f29732a12cc91
---
M src/libmsc/gsm_04_08.c
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/src/libmsc/gsm_04_08.c b/src/libmsc/gsm_04_08.c
index 995bbf6..f87a4c6 100644
--- a/src/libmsc/gsm_04_08.c
+++ b/src/libmsc/gsm_04_08.c
@@ -3721,8 +3721,10 @@
 struct vlr_subscr *vsub)
 {
struct gsm_subscriber_connection *conn = msc_conn_ref;
+   OSMO_ASSERT(vsub);
OSMO_ASSERT(!conn->vsub);
conn->vsub = vlr_subscr_get(vsub);
+   OSMO_ASSERT(conn->vsub);
conn->vsub->cs.attached_via_ran = conn->via_ran;
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13632908d0b67323202effa9dd6f29732a12cc91
Gerrit-PatchSet: 3
Gerrit-Project: osmo-msc
Gerrit-Branch: master
Gerrit-Owner: Max 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: neels 


[MERGED] osmo-bts[master]: common/vty.c: remove unused variables

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: common/vty.c: remove unused variables
..


common/vty.c: remove unused variables

Change-Id: I289dda64228e81ca4c608121e50146a71e19f1e2
---
M src/common/vty.c
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/src/common/vty.c b/src/common/vty.c
index 5c5ac6e..f3f846b 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -632,7 +632,6 @@
"Report the TOA in 1/256th symbol periods\n")
 {
struct gsm_bts *bts = vty->index;
-   struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
 
bts->supp_meas_toa256 = true;
return CMD_SUCCESS;
@@ -644,7 +643,6 @@
"Report the TOA in 1/256th symbol periods\n")
 {
struct gsm_bts *bts = vty->index;
-   struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
 
bts->supp_meas_toa256 = false;
return CMD_SUCCESS;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I289dda64228e81ca4c608121e50146a71e19f1e2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-bts[master]: common/vty.c: remove unused variables

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I289dda64228e81ca4c608121e50146a71e19f1e2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-bsc[master]: libbsc/bsc_vty.c: prevent uninitialized access

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: libbsc/bsc_vty.c: prevent uninitialized access
..


libbsc/bsc_vty.c: prevent uninitialized access

If an out of range 'Last Valid Block' value for 'smscb-command'
is passed, a 'last_block' of the 'rsl_ie_cb_cmd_type' struct
could be uninitialized. Let's prevent this.

Found using Clang Static Analyzer.

Change-Id: I57635f2f482ff476ab697b1b9e872ce90aafb999
---
M src/libbsc/bsc_vty.c
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 3dac29e..47bc514 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -4258,6 +4258,9 @@
case 4:
cb_cmd.last_block = RSL_CB_CMD_LASTBLOCK_4;
break;
+   default:
+   vty_out(vty, "Error parsing LASTBLOCK%s", VTY_NEWLINE);
+   return CMD_WARNING;
}
 
rsl_sms_cb_command(bts, RSL_CHAN_SDCCH4_ACCH, cb_cmd, buf, rc);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57635f2f482ff476ab697b1b9e872ce90aafb999
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-bsc[master]: libbsc/bsc_vty.c: prevent uninitialized access

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I57635f2f482ff476ab697b1b9e872ce90aafb999
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


osmo-sgsn[master]: vty: absorb command explanations from osmo-gsm-manuals

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I35984014424412e91437b7ed71576aef3819cb1e
Gerrit-PatchSet: 1
Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-HasComments: No


[MERGED] osmo-sgsn[master]: vty: absorb command explanations from osmo-gsm-manuals

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: vty: absorb command explanations from osmo-gsm-manuals
..


vty: absorb command explanations from osmo-gsm-manuals

The osmo-gsm-manuals/vty/sgsn_vty_additions.xml contained many command
explanations that are redundant with the VTY online doc. Some however are more
verbose / easier to understand. Absorb these into the online VTY doc here.

This matches the removal in osmo-gsm-manuals change-id
I71863e5056ad369d2055e9882a52a00fa999ab04.

Change-Id: I35984014424412e91437b7ed71576aef3819cb1e
---
M src/gprs/sgsn_vty.c
1 file changed, 38 insertions(+), 15 deletions(-)

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



diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index c2c03b5..9d1d86d 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -301,7 +301,12 @@
 DEFUN(cfg_sgsn_bind_addr, cfg_sgsn_bind_addr_cmd,
"gtp local-ip A.B.C.D",
"GTP Parameters\n"
-   "Set the IP address for the local GTP bind\n"
+   "Set the IP address for the local GTP bind for the Gp interface 
(towards the GGSNs)."
+   " Note: in case you would like to run the GGSN on the same machine as 
the SGSN, you can not run"
+   " both on the same IP address, since both sides are specified to use 
the same GTP port numbers"
+   " (" OSMO_STRINGIFY_VAL(GTP1C_PORT) " and " 
OSMO_STRINGIFY_VAL(GTP1U_PORT) ")."
+   " For example, you could use 127.0.0.1 for the SGSN and 127.0.0.2 for 
the GGSN in such"
+   " situations.\n"
"IPv4 Address\n")
 {
inet_aton(argv[0], _cfg->gtp_listenaddr.sin_addr);
@@ -311,7 +316,9 @@
 
 DEFUN(cfg_ggsn_remote_ip, cfg_ggsn_remote_ip_cmd,
"ggsn <0-255> remote-ip A.B.C.D",
-   GGSN_STR "GGSN Number\n" IP_STR "IPv4 Address\n")
+   GGSN_STR "GGSN Number\n"
+   "Configure this static GGSN to use the specified remote IP address.\n"
+   "IPv4 Address\n")
 {
uint32_t id = atoi(argv[0]);
struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(id);
@@ -351,7 +358,9 @@
 
 DEFUN(cfg_ggsn_dynamic_lookup, cfg_ggsn_dynamic_lookup_cmd,
"ggsn dynamic",
-   GGSN_STR "Enable dynamic GRX based look-up (requires restart)\n")
+   GGSN_STR
+   "Enable dynamic resolving of GGSNs based on DNS resolving the APN name 
like in a GRX-style setup."
+   " Changing this setting requires a restart.\n")
 {
sgsn->cfg.dynamic_lookup = 1;
return CMD_SUCCESS;
@@ -359,7 +368,8 @@
 
 DEFUN(cfg_grx_ggsn, cfg_grx_ggsn_cmd,
"grx-dns-add A.B.C.D",
-   "Add DNS server\nIPv4 address\n")
+   "Use the specified IP address for DNS-resolving the AP names to GGSN IP 
addresses\n"
+   "IPv4 address\n")
 {
struct ares_addr_node *node = talloc_zero(tall_bsc_ctx, struct 
ares_addr_node);
node->family = AF_INET;
@@ -401,7 +411,7 @@
 DEFUN(cfg_apn_ggsn, cfg_apn_ggsn_cmd,
"apn APNAME ggsn <0-255>",
APN_STR APN_GW_STR
-   "Select the GGSN to use when the APN gateway prefix matches\n"
+   "Select the GGSN to use for the given APN gateway prefix\n"
"The GGSN id")
 {
 
@@ -411,7 +421,8 @@
 DEFUN(cfg_apn_imsi_ggsn, cfg_apn_imsi_ggsn_cmd,
"apn APNAME imsi-prefix IMSIPRE ggsn <0-255>",
APN_STR APN_GW_STR
-   "Restrict rule to a certain IMSI prefix\n"
+   "Select the GGSN to use for the given APN gateway prefix if and only if 
the IMSI matches the"
+   " given prefix.\n"
"An IMSI prefix\n"
"Select the GGSN to use when APN gateway and IMSI prefix match\n"
"The GGSN id")
@@ -634,7 +645,8 @@
 
 DEFUN(cfg_auth_policy, cfg_auth_policy_cmd,
"auth-policy (accept-all|closed|acl-only|remote)",
-   "Autorization Policy of SGSN\n"
+   "Configure the Authorization policy of the SGSN. This setting 
determines which subscribers are"
+   " permitted to register to the network.\n"
"Accept all IMSIs (DANGEROUS)\n"
"Accept only home network subscribers or those in the ACL\n"
"Accept only subscribers in the ACL\n"
@@ -986,7 +998,8 @@
 DEFUN(cfg_gsup_remote_ip, cfg_gsup_remote_ip_cmd,
"gsup remote-ip A.B.C.D",
"GSUP Parameters\n"
-   "Set the IP address of the remote GSUP server\n"
+   "Set the IP address of the remote GSUP server (e.g. OsmoHLR)."
+   " This setting only applies if 'auth-policy remote' is used.\n"
"IPv4 Address\n")
 {
inet_aton(argv[0], _cfg->gsup_server_addr.sin_addr);
@@ -997,7 +1010,7 @@
 DEFUN(cfg_gsup_remote_port, cfg_gsup_remote_port_cmd,
"gsup remote-port <0-65535>",
"GSUP Parameters\n"
-   "Set the TCP port of the remote GSUP server\n"
+   "Set the TCP port of the remote GSUP server, see also 'gsup 
remote-ip'\n"
"Remote TCP port\n")
 {
g_cfg->gsup_server_port = atoi(argv[0]);
@@ -1008,7 +1021,9 @@
 

[MERGED] osmo-gsm-tester[master]: jenkins: update poky version 2.3.2

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: jenkins: update poky version 2.3.2
..


jenkins: update poky version 2.3.2

The sysmobts 2017 releases are using poky 2.3.2

Change-Id: If6e8a5702e4c9b24e758e3aa5f390e786c51c384
---
M contrib/jenkins-build-osmo-bts-sysmo.sh
M contrib/jenkins-build-osmo-pcu-sysmo.sh
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh 
b/contrib/jenkins-build-osmo-bts-sysmo.sh
index 1a8876d..98f8249 100755
--- a/contrib/jenkins-build-osmo-bts-sysmo.sh
+++ b/contrib/jenkins-build-osmo-bts-sysmo.sh
@@ -4,7 +4,7 @@
 _poky_version="$POKY_VERSION"
 _poky_path="$POKY_PATH"
 
-[ -z "$_poky_version" ] && _poky_version="1.5.4"
+[ -z "$_poky_version" ] && _poky_version="2.3.2"
 [ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version"
 
 . "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi"
diff --git a/contrib/jenkins-build-osmo-pcu-sysmo.sh 
b/contrib/jenkins-build-osmo-pcu-sysmo.sh
index 2ed3426..4dc7704 100755
--- a/contrib/jenkins-build-osmo-pcu-sysmo.sh
+++ b/contrib/jenkins-build-osmo-pcu-sysmo.sh
@@ -4,7 +4,7 @@
 _poky_version="$POKY_VERSION"
 _poky_path="$POKY_PATH"
 
-[ -z "$_poky_version" ] && _poky_version="1.5.4"
+[ -z "$_poky_version" ] && _poky_version="2.3.2"
 [ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version"
 
 . "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If6e8a5702e4c9b24e758e3aa5f390e786c51c384
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 


[MERGED] osmo-gsm-manuals[master]: OsmoBSC: update VTY reference

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoBSC: update VTY reference
..


OsmoBSC: update VTY reference

This is the first update since the libosmocore changes to the 'show
online-help' generated output. Hence the produced document now benefits from
the structural improvements:
- not repeating common commands for every node;
- using section names that match the VTY prompt.

Update bsc_vty_additions.xml to match the new node ID scheme.

Change-Id: I0d856563eee88527fda4c6940aa6cea779175aaa
---
M OsmoBSC/vty/bsc_vty_additions.xml
M OsmoBSC/vty/bsc_vty_reference.xml
2 files changed, 4,790 insertions(+), 3,065 deletions(-)

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




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

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


[MERGED] osmo-gsm-manuals[master]: OsmoSTP: update VTY reference

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoSTP: update VTY reference
..


OsmoSTP: update VTY reference

This is the first update since the libosmocore changes to the 'show
online-help' generated output. Hence the produced document now benefits from
the structural improvements:
- not repeating common commands for every node;
- using section names that match the VTY prompt.

Change-Id: I98cdfcb6c1c7db49ab106e775be92e4c6adeab17
---
M OsmoSTP/vty/osmo-stp_vty_reference.xml
1 file changed, 1,359 insertions(+), 1,742 deletions(-)

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



diff --git a/OsmoSTP/vty/osmo-stp_vty_reference.xml 
b/OsmoSTP/vty/osmo-stp_vty_reference.xml
index 9d25d44..4ab24f5 100644
--- a/OsmoSTP/vty/osmo-stp_vty_reference.xml
+++ b/OsmoSTP/vty/osmo-stp_vty_reference.xml
@@ -1,1742 +1,1359 @@
-
-  
-  
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-  
-
-
-  
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-  
-
-  
-  
-  
-  
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-  
-
-
-  
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-   

[MERGED] osmo-gsm-manuals[master]: INSTALL.txt: update VTY reference how-to to new osmo_interac...

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: INSTALL.txt: update VTY reference how-to to new 
osmo_interact_vty.py
..


INSTALL.txt: update VTY reference how-to to new osmo_interact_vty.py

Change-Id: I5bf1fea83354049f4157ee9ac8b40f673597f908
---
M INSTALL.txt
1 file changed, 17 insertions(+), 16 deletions(-)

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



diff --git a/INSTALL.txt b/INSTALL.txt
index c06248a..d250750 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -18,23 +18,24 @@
 or for a parallel build using more CPU cores:
   make -j 5
 
-To update the VTY reference for a given program, use osmodumpdoc.py, available
-from git.osmocom.org/python/osmo-python-tests -- for example, for osmo-msc:
+To update the VTY reference for a given program, use 'osmo_interact_vty.py -X',
+available from git.osmocom.org/python/osmo-python-tests:
 
   cd ~/osmo-python-tests
-  ./setup.py install
+  python3 setup.py install
 
-  cd ~/osmo-msc
-  mkdir build
-  cd build
-  ../configure --enable-smpp
-  make
-  osmodumpdoc.py -p ~/osmo-msc
+  osmo_interact_vty.py -X -p $VTY_PORT > vty/*_vty_reference.xml
 
-  cp doc/msc_vty_reference.xml ~/osmo-gsm-manuals/OsmoMSC/vty/
-  cd ~/osmo-gsm-manuals/OsmoMSC
-  git status
-  git diff
-  make
-  git commit -a -m "OsmoMSC: update VTY reference"
-  git push origin HEAD:refs/for/master/msc_vty
+Find the VTY port number at
+https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers
+
+For example, for osmo-msc, which has VTY port 4254:
+
+a) with an osmo-msc already running:
+
+  osmo_interact_vty.py -X -p 4254 > OsmoMSC/vty/msc_vty_reference.xml
+
+b) launching an osmo-msc along:
+
+  osmo_interact_vty.py -r "osmo-msc -c 
~/src/osmo-msc/doc/examples/osmo-msc/osmo-msc.cfg" \
+-X -p 4254 > OsmoMSC/vty/msc_vty_reference.xml

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5bf1fea83354049f4157ee9ac8b40f673597f908
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 


[MERGED] osmo-gsm-manuals[master]: OsmoHLR: update vty reference

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoHLR: update vty reference
..


OsmoHLR: update vty reference

Add new (generic) logging commands, talloc context print commands.
Add the jitter buffer logging category.

Remove the common commands from the individual sections.

Change-Id: I8e92c821b26908d4baa37745c57b9e15bda2a373
---
M OsmoHLR/vty/hlr_vty_reference.xml
1 file changed, 376 insertions(+), 511 deletions(-)

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



diff --git a/OsmoHLR/vty/hlr_vty_reference.xml 
b/OsmoHLR/vty/hlr_vty_reference.xml
index 31b95a1..8d161d4 100644
--- a/OsmoHLR/vty/hlr_vty_reference.xml
+++ b/OsmoHLR/vty/hlr_vty_reference.xml
@@ -1,201 +1,7 @@
 
-  
-  
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-  
-
-
-  
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-
-
-
-  
-
-  
-  
-  
-  
+  
+Common Commands
+These commands are available on all VTY nodes. They are 
listed here only once, to unclutter the VTY reference.
 
   
 
@@ -240,6 +46,258 @@
 
   
 
+
+  
+
+  
+
+  
+  
+view
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+  
+
+
+  
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
+  
+  
+enable
 
   
 
@@ -322,19 +380,19 @@
 
 
   
-
+
 
   
 
 
   
-
+
 
   

[MERGED] osmo-gsm-manuals[master]: OsmoGGSN: update vty reference

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoGGSN: update vty reference
..


OsmoGGSN: update vty reference

Add new (generic) logging commands, talloc context print commands.
Add the jitter buffer logging category.

Change-Id: Ifdc735df6221bf6e9b6247912f2958974dcfc4f2
---
M OsmoGGSN/vty/ggsn_vty_reference.xml
1 file changed, 174 insertions(+), 6 deletions(-)

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



diff --git a/OsmoGGSN/vty/ggsn_vty_reference.xml 
b/OsmoGGSN/vty/ggsn_vty_reference.xml
index 76a55c1..7a43263 100644
--- a/OsmoGGSN/vty/ggsn_vty_reference.xml
+++ b/OsmoGGSN/vty/ggsn_vty_reference.xml
@@ -157,6 +157,34 @@
 
   
 
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
 
   
 
@@ -173,7 +201,7 @@
 
   
 
-
+
   
 
 
@@ -200,6 +228,7 @@
 
 
 
+
 
 
 
@@ -219,6 +248,43 @@
   
 
 
+  
+
+
+  
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
   
 
 
@@ -408,6 +474,34 @@
 
   
 
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
 
   
 
@@ -424,7 +518,7 @@
 
   
 
-
+
   
 
 
@@ -451,6 +545,7 @@
 
 
 
+
 
 
 
@@ -470,6 +565,43 @@
   
 
 
+  
+
+
+  
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
   
 
 
@@ -816,14 +948,35 @@
 
   
 
-
+
   
 
-
-
+
+
+
+
   
 
-
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
+
   
 
 
@@ -850,6 +1003,7 @@
 
 
 
+
 
 
 
@@ -1188,6 +1342,20 @@
 
   
 
+
+  
+
+
+
+  
+
+
+  
+
+
+
+  
+
 
   
 

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

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


[MERGED] osmo-gsm-tester[master]: jenkins: use env POKY_VERSION POKY_PATH to find poky

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: jenkins: use env POKY_VERSION POKY_PATH to find poky
..


jenkins: use env POKY_VERSION POKY_PATH to find poky

Instead of hardcoded values, use defaults and allow jenkins to override
the defaults.

Change-Id: I1403b32cdf30420f3b02c41c2627b71fcbeae9ab
---
M contrib/jenkins-build-osmo-bts-sysmo.sh
M contrib/jenkins-build-osmo-pcu-sysmo.sh
2 files changed, 16 insertions(+), 6 deletions(-)

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



diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh 
b/contrib/jenkins-build-osmo-bts-sysmo.sh
index 59ba85d..1a8876d 100755
--- a/contrib/jenkins-build-osmo-bts-sysmo.sh
+++ b/contrib/jenkins-build-osmo-bts-sysmo.sh
@@ -1,11 +1,16 @@
 #!/bin/sh
 set -e -x
 
-poky="/opt/poky/1.5.4"
-. "$poky/environment-setup-armv5te-poky-linux-gnueabi"
+_poky_version="$POKY_VERSION"
+_poky_path="$POKY_PATH"
+
+[ -z "$_poky_version" ] && _poky_version="1.5.4"
+[ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version"
+
+. "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi"
 
 # Cross-compilation: all installations need to be put in the sysmo SDK sysroot
-export DESTDIR="$poky/sysroots/armv5te-poky-linux-gnueabi"
+export DESTDIR="$_poky_path/sysroots/armv5te-poky-linux-gnueabi"
 
 base="$PWD"
 name="osmo-bts-sysmo"
diff --git a/contrib/jenkins-build-osmo-pcu-sysmo.sh 
b/contrib/jenkins-build-osmo-pcu-sysmo.sh
index 7cd1142..2ed3426 100755
--- a/contrib/jenkins-build-osmo-pcu-sysmo.sh
+++ b/contrib/jenkins-build-osmo-pcu-sysmo.sh
@@ -1,11 +1,16 @@
 #!/bin/sh
 set -e -x
 
-poky="/opt/poky/1.5.4"
-. "$poky/environment-setup-armv5te-poky-linux-gnueabi"
+_poky_version="$POKY_VERSION"
+_poky_path="$POKY_PATH"
+
+[ -z "$_poky_version" ] && _poky_version="1.5.4"
+[ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version"
+
+. "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi"
 
 # Cross-compilation: all installations need to be put in the sysmo SDK sysroot
-export DESTDIR="$poky/sysroots/armv5te-poky-linux-gnueabi"
+export DESTDIR="$_poky_path/sysroots/armv5te-poky-linux-gnueabi"
 
 base="$PWD"
 name="osmo-pcu-sysmo"

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

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


osmo-gsm-manuals[master]: OsmoGGSN: update vty reference

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-gsm-manuals[master]: OsmoMGW: update VTY reference

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-gsm-manuals[master]: OsmoSGSN: update VTY reference

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-gsm-manuals[master]: OsmoHLR: update vty reference

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-gsm-manuals[master]: INSTALL.txt: update VTY reference how-to to new osmo_interac...

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-gsm-manuals[master]: OsmoSTP: update VTY reference

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-gsm-manuals[master]: OsmoMSC: update VTY reference

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-gsm-manuals[master]: OsmoBSC: update VTY reference

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-gsm-manuals[master]: Introduce chapter trx_if.adoc and add it to OsmoTRX and OsmoBTS

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Introduce chapter trx_if.adoc and add it to OsmoTRX and OsmoBTS
..


Introduce chapter trx_if.adoc and add it to OsmoTRX and OsmoBTS

This chapter defines the protocol used between osmo-trx and
osmo-bts-trx.

Most of the text comes originally from osmo-trx.git/README, as it's the
only known documentation of the protocol other than the code itself.

Change-Id: I56c418eef0f826ae1aadbed5b151fbed241c7885
---
M OsmoBTS/osmobts-usermanual.adoc
M OsmoTRX/osmotrx-usermanual.adoc
A common/chapters/trx_if.adoc
3 files changed, 160 insertions(+), 1 deletion(-)

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



diff --git a/OsmoBTS/osmobts-usermanual.adoc b/OsmoBTS/osmobts-usermanual.adoc
index d746d85..07f88e2 100644
--- a/OsmoBTS/osmobts-usermanual.adoc
+++ b/OsmoBTS/osmobts-usermanual.adoc
@@ -26,6 +26,8 @@
 
 include::chapters/architecture.adoc[]
 
+include::../common/chapters/trx_if.adoc[]
+
 include::../common/chapters/control_if.adoc[]
 
 include::../common/chapters/port_numbers.adoc[]
@@ -35,4 +37,3 @@
 include::../common/chapters/glossary.adoc[]
 
 include::../common/chapters/gfdl.adoc[]
-
diff --git a/OsmoTRX/osmotrx-usermanual.adoc b/OsmoTRX/osmotrx-usermanual.adoc
index 249a21c..3b2e991 100644
--- a/OsmoTRX/osmotrx-usermanual.adoc
+++ b/OsmoTRX/osmotrx-usermanual.adoc
@@ -23,6 +23,8 @@
 
 include::chapters/configuration.adoc[]
 
+include::../common/chapters/trx_if.adoc[]
+
 include::../common/chapters/port_numbers.adoc[]
 
 include::../common/chapters/bibliography.adoc[]
diff --git a/common/chapters/trx_if.adoc b/common/chapters/trx_if.adoc
new file mode 100644
index 000..4fb8f9b
--- /dev/null
+++ b/common/chapters/trx_if.adoc
@@ -0,0 +1,156 @@
+[[trx_if]]
+== TRX Manager UDP socket interface
+
+This is the protocol used between `osmo-trx` and `osmo-bts-trx`.
+
+Each TRX Manager UDP socket interface represents a single ARFCN. Each of these
+per-ARFCN interfaces is a pair of UDP sockets, one for control and one for 
data.
+Given a base port B (5700), the master clock interface is at port P=B. The
+TRX-side control interface for C(N) is on  port P=B+2N+1 and the data interface
+is on an odd numbered port P=B+2N+2. The corresponding core-side interface for
+every socket is at P+100. For any given build, the number of ARFCN interfaces
+can be fixed.
+
+=== Indications on the Master Clock Interface
+
+The master clock interface is output only (from the radio).
+Messages are "indications".
+
+CLOCK gives the current value of the transceiver clock to be used by the core.
+This message is sent whenever a trasmission packet arrives that is too late or
+too early.  The clock value is NOT the current transceiver time.  It is a time
+setting the the core should use to give better packet arrival times.
+
+IND CLOCK 
+
+
+=== Commands on the Per-ARFCN Control Interface
+
+The per-ARFCN control interface uses a command-reponse protocol. Commands are
+NULL-terminated ASCII strings, one per UDP socket. Each command has a
+corresponding response.
+
+Every command is of the form:
+
+CMD  [params]
+
+
+The `` is the actual command.
+Parameters are optional depending on the commands type.
+Every response is of the form:
+
+RSP   [result]
+
+The `` is 0 for success and a non-zero error code for failure.
+Successful responses may include results, depending on the command type.
+
+
+ Power Control
+
+`POWEROFF` shuts off transmitter power and stops the demodulator.
+
+CMD POWEROFF
+RSP POWEROFF 
+
+
+`POWERON` starts the transmitter and starts the demodulator.  Initial power
+level is very low. This command fails if the transmitter and receiver are not
+yet tuned. This command fails if the transmit or receive frequency creates a
+conflict with another ARFCN that is already running. If the transceiver is
+already on, it response with success to this command.
+
+CMD POWERON
+RSP POWERON 
+
+
+`SETPOWER` sets output power in dB wrt full scale.
+This command fails if the transmitter and receiver are not running.
+
+CMD SETPOWER 
+RSP SETPOWER  
+
+
+`ADJPOWER` adjusts power by the given dB step.  Response returns resulting 
power
+level wrt full scale. This command fails if the transmitter and receiver are 
not
+running.
+
+CMD ADJPOWER 
+RSP ADJPOWER  
+
+
+ Tuning Control
+
+`RXTUNE` tunes the receiver to a given frequency in kHz. This command fails if 
the
+receiver is already running. (To re-tune you stop the radio, re-tune, and
+restart.) This command fails if the transmit or receive frequency creates a
+conflict with another ARFCN that is already running.
+
+CMD RXTUNE 
+RSP RXTUNE  
+
+
+`TXTUNE` tunes the transmitter to a given frequency in kHz. This command fails 
if
+the transmitter is already running. (To re-tune you stop the radio, re-tune, 
and
+restart.) This command 

osmo-gsm-manuals[master]: Introduce chapter trx_if.adoc and add it to OsmoTRX and OsmoBTS

2018-03-06 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


[MERGED] osmo-gsm-manuals[master]: Introduce OsmoTRX manual

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Introduce OsmoTRX manual
..


Introduce OsmoTRX manual

Change-Id: I19ee9d6cda02fb7200c96c0ac129e69825b096cd
---
M Makefile
A OsmoTRX/Makefile
A OsmoTRX/chapters/configuration.adoc
A OsmoTRX/chapters/control.adoc
A OsmoTRX/chapters/counters.adoc
A OsmoTRX/chapters/counters_generated.adoc
A OsmoTRX/chapters/overview.adoc
A OsmoTRX/chapters/running.adoc
A OsmoTRX/osmotrx-usermanual-docinfo.xml
A OsmoTRX/osmotrx-usermanual.adoc
A OsmoTRX/osmotrx-vty-reference.xml
A OsmoTRX/vty/trx_vty_additions.xml
A OsmoTRX/vty/trx_vty_reference.xml
13 files changed, 1,451 insertions(+), 0 deletions(-)

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



diff --git a/Makefile b/Makefile
index 45fe129..4e821f5 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@
cd OsmoSTP; $(MAKE)
cd OsmocomBB; $(MAKE)
cd OsmoMGW; $(MAKE)
+   cd OsmoTRX; $(MAKE)
 
 clean:
cd OsmoBTS; $(MAKE) clean
@@ -31,6 +32,7 @@
cd OsmoSTP; $(MAKE) clean
cd OsmocomBB; $(MAKE) clean
cd OsmoMGW; $(MAKE) clean
+   cd OsmoTRX; $(MAKE) clean
 
 upload:
cd OsmoBTS; $(MAKE) upload
@@ -47,6 +49,7 @@
cd OsmoSTP; $(MAKE) upload
cd OsmocomBB; $(MAKE) upload
cd OsmoMGW; $(MAKE) upload
+   cd OsmoTRX; $(MAKE) upload
 
 check:
cd OsmoBTS; $(MAKE) check
@@ -65,6 +68,7 @@
cd OsmoHLR; $(MAKE) check
cd OsmoSTP; $(MAKE) check
cd OsmocomBB; $(MAKE) check
+   cd OsmoTRX; $(MAKE) check
 
 define check_dep_bin
 @type $(1) >/dev/null 2>&1 || { echo >&2 "Binary '$(1)' not found in path, 
please install $(2)."; exit 1; }
diff --git a/OsmoTRX/Makefile b/OsmoTRX/Makefile
new file mode 100644
index 000..81aec9a
--- /dev/null
+++ b/OsmoTRX/Makefile
@@ -0,0 +1,10 @@
+TOPDIR = ..
+
+ASCIIDOC = osmotrx-usermanual.adoc
+ASCIIDOC_DEPS = chapters/*.adoc
+include $(TOPDIR)/build/Makefile.asciidoc.inc
+
+VTY_REFERENCE = osmotrx-vty-reference.xml
+include $(TOPDIR)/build/Makefile.vty-reference.inc
+
+include $(TOPDIR)/build/Makefile.common.inc
diff --git a/OsmoTRX/chapters/configuration.adoc 
b/OsmoTRX/chapters/configuration.adoc
new file mode 100644
index 000..cdde366
--- /dev/null
+++ b/OsmoTRX/chapters/configuration.adoc
@@ -0,0 +1,36 @@
+== Configuring OsmTRX
+
+OsmoTRX will read the configuration at startup time and configure the
+transceiver accordingly after validating the configuration.
+
+OsmoTRX can handle several TRX channels, but at least one must be configured in
+order to be able to start it successfully. Channels must be present in the
+configuration file in incremental order, starting from 0 and be consecutive.
+
+Example configuration files for different devices and setups can be found in
+`doc/examples/` in 'osmo-trx' git repository.
+
+=== Documented example
+
+.Example: Static GGSN/APN configuration (single catch-all GGSN)
+
+trx
+ bind-ip 127.0.0.1 <1>
+ remote-ip 127.0.0.1 <2>
+ base-port 5700 <3>
+ egprs disable <4>
+ tx-sps 4 <5>
+ rx-sps 4 <6>
+ chan 0 <7>
+  tx-path BAND1 <8>
+  rx-path LNAW <9>
+
+<1> Configure the local IP address at the TRX used for the connection against 
`osmo-bts-trx`.
+<2> Specify the IP address of `osmo-bts-trx` to connect to.
+<3> Specify the reference base UDP port to use for communication.
+<4> Don't enable EDGE support.
+<5> Use 4 TX samples per symbol. This is device specific.
+<6> Use 4 RX samples per symbol. This is device specific.
+<7> Configure the first channel. As no other channels are specified, 
`osmo-trx` assumes it is using only one channel.
+<8> Configure the device to use `BAND1` Tx antenna path from all the available 
ones (device specific).
+<9> Configure the device to use `LNAW` Rx antenna path from all the available 
ones (device specific).
diff --git a/OsmoTRX/chapters/control.adoc b/OsmoTRX/chapters/control.adoc
new file mode 100644
index 000..168769a
--- /dev/null
+++ b/OsmoTRX/chapters/control.adoc
@@ -0,0 +1,12 @@
+[[control]]
+== Control interface
+
+The actual protocol is described in <>, the variables
+common to all programs using it are described in <>. Here we
+describe variables specific to OsmoTRX.
+
+.Variables available over control interface
+[options="header",width="100%",cols="20%,5%,5%,50%,20%"]
+|===
+|Name|Access|Trap|Value|Comment
+|===
diff --git a/OsmoTRX/chapters/counters.adoc b/OsmoTRX/chapters/counters.adoc
new file mode 100644
index 000..7fbb10c
--- /dev/null
+++ b/OsmoTRX/chapters/counters.adoc
@@ -0,0 +1,4 @@
+[[counters]]
+== Counters
+
+include::./counters_generated.adoc[]
diff --git a/OsmoTRX/chapters/counters_generated.adoc 
b/OsmoTRX/chapters/counters_generated.adoc
new file mode 100644
index 000..b40dc37
--- /dev/null
+++ b/OsmoTRX/chapters/counters_generated.adoc
@@ -0,0 +1,7 @@
+// autogenerated by show asciidoc counters
+These counters and 

osmo-gsm-manuals[master]: Introduce OsmoTRX manual

2018-03-06 Thread Harald Welte

Patch Set 2: Code-Review+2

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

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


[MERGED] osmo-gsm-manuals[master]: OsmoSGSN: overview: Fix typo and reference OpenGGSN->OsmoGGSN

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoSGSN: overview: Fix typo and reference OpenGGSN->OsmoGGSN
..


OsmoSGSN: overview: Fix typo and reference OpenGGSN->OsmoGGSN

Change-Id: I94cc362a4f52e6bd9f93299665e73dc4fd75a2c6
---
M OsmoSGSN/chapters/overview.adoc
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/OsmoSGSN/chapters/overview.adoc b/OsmoSGSN/chapters/overview.adoc
index 2ff92fa..abc7496 100644
--- a/OsmoSGSN/chapters/overview.adoc
+++ b/OsmoSGSN/chapters/overview.adoc
@@ -38,7 +38,7 @@
 
 === Software Components
 
-OsmoNITB contains a variety of different software components, which
+OsmoSGSN contains a variety of different software components, which
 we'll quickly describe in this section.
 
  Gb Implementation
@@ -58,7 +58,7 @@
 
  GTP Implementation
 
-OsmoSGSN uses the libgtp implementation originating from OpenGGSN. It
+OsmoSGSN uses the libgtp implementation originating from OsmoGGSN. It
 supports both GTPv0 and GTPv1.
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94cc362a4f52e6bd9f93299665e73dc4fd75a2c6
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-gsm-manuals[master]: common: port_numbers: Add OsmoTRX and OsmoBTS missing ports

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: common: port_numbers: Add OsmoTRX and OsmoBTS missing ports
..


common: port_numbers: Add OsmoTRX and OsmoBTS missing ports

Change-Id: Idc34aa2d4241945e80c07e4e5660451a016f0117
---
M common/chapters/port_numbers.adoc
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/common/chapters/port_numbers.adoc 
b/common/chapters/port_numbers.adoc
index fd2cf8c..3efa179 100644
--- a/common/chapters/port_numbers.adoc
+++ b/common/chapters/port_numbers.adoc
@@ -14,6 +14,9 @@
 |TCP|2775|SMPP (SMS interface for external programs)|osmo-nitb
 |TCP|3002|A-bis/IP OML|osmo-bts, osmo-bsc, osmo-nitb
 |TCP|3003|A-bis/IP RSL|osmo-bts, osmo-bsc, osmo-nitb
+|TCP|4236|Control Interface|osmo-trx
+|TCP|4237|telnet (VTY)|osmo-trx
+|TCP|4238|Control Interface|osmo-bts
 |TCP|4239|telnet (VTY)|osmo-stp
 |TCP|4240|telnet (VTY)|osmo-pcu
 |TCP|4241|telnet (VTY)|osmo-bts

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc34aa2d4241945e80c07e4e5660451a016f0117
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-gsm-manuals[master]: common: port_numbers: Add OsmoTRX and OsmoBTS missing ports

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


osmo-gsm-manuals[master]: OsmoSGSN: overview: Fix typo and reference OpenGGSN->OsmoGGSN

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-gsm-manuals[master]: OsmoBTS: bts-models: Add Lime Microsystems devices as suppor...

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: OsmoBTS: bts-models: Add Lime Microsystems devices as supported 
osmo-trx
..


OsmoBTS: bts-models: Add Lime Microsystems devices as supported osmo-trx

Also take the chance to remove uneeded extra whitespace in surrounding
text.

Change-Id: I739e4dfba7c649a74cf67d6bbe6f74b22e7e24f0
---
M OsmoBTS/chapters/bts-models.adoc
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/OsmoBTS/chapters/bts-models.adoc b/OsmoBTS/chapters/bts-models.adoc
index 5e51009..fe06c04 100644
--- a/OsmoBTS/chapters/bts-models.adoc
+++ b/OsmoBTS/chapters/bts-models.adoc
@@ -182,7 +182,7 @@
 == `osmo-bts-trx` for OsmoTRX
 
 OsmoTRX is a C-language implementation of the GSM radio modem,
-originally developed as the 'Transceiver' part of OpenBTS.  This radio
+originally developed as the 'Transceiver' part of OpenBTS. This radio
 modem offers an interface based on top of UDP streams.
 
 The OsmoBTS bts_model code for OsmoTRX is called
@@ -190,10 +190,10 @@
 OsmoTRX, so both parts can be used together to implement a complete GSM
 BTS based on general-purpose computing SDR.
 
-As OsmoTRX is general-purpose software running on top of Linux, it is
-thus not tied to any specific physical hardware.   At the time of this
-writing, OsmoTRX supports a variety of Ettus USRP SDRs via the UHD
-driver, as well as the Fairwaves UmTRX and derived products.
+As OsmoTRX is general-purpose software running on top of Linux, it is thus not
+tied to any specific physical hardware. At the time of this writing, OsmoTRX
+supports a variety of Lime Microsystems and Ettus USRP SDRs via the UHD driver,
+as well as the Fairwaves UmTRX and derived products.
 
 OsmoTRX is not a complete GSM PHY but 'just' the radio modem.  This
 means that all of the Layer 1 functionality such as scheduling,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I739e4dfba7c649a74cf67d6bbe6f74b22e7e24f0
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-gsm-manuals[master]: OsmoBTS: bts-models: Add Lime Microsystems devices as suppor...

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-trx[master]: osmo-trx: Re-introduce -l cmd line parameter

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: osmo-trx: Re-introduce -l cmd line parameter
..


osmo-trx: Re-introduce -l cmd line parameter

Parameter -l to set the terminal logging levle was removed in
3da1f8352e337fb032bf7a58c2909d3ba918e237, but afterwards it was decided
to keep the cmd line options for a bit more to easy migration to VTY
cfg.

The command line no longer accepts keywords ("DEBUG", "INFO", etc.) but
log level numbers, due to libosmocore APIs log_parse_level and
log_level_str being marked as deprecated and for internal use only.

Keep in mind the log level is overridden by VTY cfg if any line sets log
levels for log stderr in there.

Explicit cast to unsigned int for loglvel is issued to avoid iostream
printing it as a char.

Change-Id: I91c35ecded177b7976045d9b693855adb9e18f8a
---
M Transceiver52M/osmo-trx.cpp
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index f975500..2eb8309 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -211,7 +211,7 @@
std::vector rx_paths, tx_paths;
bool rx_paths_set = false, tx_paths_set = false;
 
-   while ((option = getopt(argc, argv, 
"ha:i:j:p:c:dmxgfo:s:b:r:A:R:Set:y:z:C:")) != -1) {
+   while ((option = getopt(argc, argv, 
"ha:l:i:j:p:c:dmxgfo:s:b:r:A:R:Set:y:z:C:")) != -1) {
switch (option) {
case 'h':
print_help();
@@ -220,6 +220,10 @@
case 'a':
print_deprecated(option);
osmo_talloc_replace_string(trx, >cfg.dev_args, 
optarg);
+   break;
+   case 'l':
+   print_deprecated(option);
+   log_set_log_level(osmo_stderr_target, atoi(optarg));
break;
case 'i':
print_deprecated(option);
@@ -377,6 +381,7 @@
std::ostringstream ost("");
 
ost << "Config Settings" << std::endl;
+   ost << "   Log Level... " << (unsigned int) 
osmo_stderr_target->loglevel << std::endl;
ost << "   Device args. " << charp2str(trx->cfg.dev_args) 
<< std::endl;
ost << "   TRX Base Port... " << trx->cfg.base_port << 
std::endl;
ost << "   TRX Address. " << charp2str(trx->cfg.bind_addr) 
<< std::endl;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91c35ecded177b7976045d9b693855adb9e18f8a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


[MERGED] osmo-trx[master]: osmo-trx.cpp: Move trx start and stop to helper functions

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: osmo-trx.cpp: Move trx start and stop to helper functions
..


osmo-trx.cpp: Move trx start and stop to helper functions

Make main() smaller, and make it easier to replace cmdline parameters in
following commits.

Change-Id: I10eaaafe38ace2b7bb095a0ad1db70d6c06ee03b
---
M Transceiver52M/osmo-trx.cpp
1 file changed, 66 insertions(+), 52 deletions(-)

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



diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 5f4e286..db0a813 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -108,6 +108,10 @@
 static struct trx_ctx *g_trx_ctx;
 static struct ctrl_handle *g_ctrlh;
 
+static RadioDevice *usrp;
+static RadioInterface *radio;
+static Transceiver *transceiver;
+
 /* Setup configuration values
  * Don't query the existence of the Log.Level because it's a
  * mandatory value. That is, if it doesn't exist, the configuration
@@ -227,33 +231,30 @@
  * and decoding schemes. Also included are the socket interfaces for
  * connecting to the upper layer stack.
  */
-Transceiver *makeTransceiver(struct trx_config *config, RadioInterface *radio)
+int makeTransceiver(struct trx_config *config, RadioInterface *radio)
 {
-   Transceiver *trx;
VectorFIFO *fifo;
 
-   trx = new Transceiver(config->port, config->local_addr.c_str(),
+   transceiver = new Transceiver(config->port, config->local_addr.c_str(),
  config->remote_addr.c_str(), config->tx_sps,
  config->rx_sps, config->chans, GSM::Time(3,0),
  radio, config->rssi_offset);
-   if (!trx->init(config->filler, config->rtsc,
+   if (!transceiver->init(config->filler, config->rtsc,
   config->rach_delay, config->edge)) {
LOG(ALERT) << "Failed to initialize transceiver";
-   delete trx;
-   return NULL;
+   return -1;
}
 
for (size_t i = 0; i < config->chans; i++) {
fifo = radio->receiveFIFO(i);
-   if (fifo && trx->receiveFIFO(fifo, i))
+   if (fifo && transceiver->receiveFIFO(fifo, i))
continue;
 
LOG(ALERT) << "Could not attach FIFO to channel " << i;
-   delete trx;
-   return NULL;
+   return -1;
}
 
-   return trx;
+   return 0;
 }
 
 static void sig_handler(int signo)
@@ -501,13 +502,61 @@
return 0;
 }
 
-int main(int argc, char *argv[])
+static void trx_stop()
+{
+   std::cout << "Shutting down transceiver..." << std::endl;
+
+   delete transceiver;
+   delete radio;
+   delete usrp;
+}
+
+static int trx_start(struct trx_config *config)
 {
int type, chans, ref;
-   RadioDevice *usrp;
-   RadioInterface *radio = NULL;
-   Transceiver *trx = NULL;
RadioDevice::InterfaceType iface = RadioDevice::NORMAL;
+
+   /* Create the low level device object */
+   if (config->mcbts)
+   iface = RadioDevice::MULTI_ARFCN;
+
+   if (config->extref)
+   ref = RadioDevice::REF_EXTERNAL;
+   else if (config->gpsref)
+   ref = RadioDevice::REF_GPS;
+   else
+   ref = RadioDevice::REF_INTERNAL;
+
+   usrp = RadioDevice::make(config->tx_sps, config->rx_sps, iface,
+config->chans, config->offset, 
config->tx_paths, config->rx_paths);
+   type = usrp->open(config->dev_args, ref, config->swap_channels);
+   if (type < 0) {
+   LOG(ALERT) << "Failed to create radio device" << std::endl;
+   goto shutdown;
+   }
+
+   /* Setup the appropriate device interface */
+   radio = makeRadioInterface(config, usrp, type);
+   if (!radio)
+   goto shutdown;
+
+   /* Create the transceiver core */
+   if(makeTransceiver(config, radio) < 0)
+   goto shutdown;
+
+   chans = transceiver->numChans();
+   std::cout << "-- Transceiver active with "
+ << chans << " channel(s)" << std::endl;
+
+   return 0;
+
+shutdown:
+   trx_stop();
+   return -1;
+}
+
+int main(int argc, char *argv[])
+{
struct trx_config config;
int rc;
 
@@ -589,48 +638,13 @@
 
srandom(time(NULL));
 
-   /* Create the low level device object */
-   if (config.mcbts)
-   iface = RadioDevice::MULTI_ARFCN;
-
-   if (config.extref)
-   ref = RadioDevice::REF_EXTERNAL;
-   else if (config.gpsref)
-   ref = RadioDevice::REF_GPS;
-   else
-   ref = RadioDevice::REF_INTERNAL;
-
-   usrp = RadioDevice::make(config.tx_sps, config.rx_sps, iface,
-

[MERGED] osmo-trx[master]: Move enums required by VTY to a separate header

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: Move enums required by VTY to a separate header
..


Move enums required by VTY to a separate header

This patch is a preparation for next patches, which add full VTY cfg
support.

Change-Id: I3d5b0576aa96869756f1629a40306c0043b6304b
---
M CommonLibs/Makefile.am
A CommonLibs/config_defs.h
M Transceiver52M/Transceiver.cpp
M Transceiver52M/Transceiver.h
M Transceiver52M/osmo-trx.cpp
M Transceiver52M/radioDevice.h
6 files changed, 56 insertions(+), 41 deletions(-)

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

Objections:
  Vadim Yanitskiy: I would prefer this is not merged as is



diff --git a/CommonLibs/Makefile.am b/CommonLibs/Makefile.am
index 5d116f9..613af1e 100644
--- a/CommonLibs/Makefile.am
+++ b/CommonLibs/Makefile.am
@@ -52,4 +52,5 @@
Vector.h \
Logger.h \
trx_vty.h \
-   debug.h
+   debug.h \
+   config_defs.h
diff --git a/CommonLibs/config_defs.h b/CommonLibs/config_defs.h
new file mode 100644
index 000..8626166
--- /dev/null
+++ b/CommonLibs/config_defs.h
@@ -0,0 +1,20 @@
+#pragma once
+
+/*
+ * This file contains structures used by both VTY (C, dir CommonLibs) and
+ * osmo-trx (CXX, dir Transceiver52)
+ */
+
+enum FillerType {
+  FILLER_DUMMY,
+  FILLER_ZERO,
+  FILLER_NORM_RAND,
+  FILLER_EDGE_RAND,
+  FILLER_ACCESS_RAND,
+};
+
+enum ReferenceType {
+  REF_INTERNAL,
+  REF_EXTERNAL,
+  REF_GPS,
+};
diff --git a/Transceiver52M/Transceiver.cpp b/Transceiver52M/Transceiver.cpp
index d9c231d..8ebd9ed 100644
--- a/Transceiver52M/Transceiver.cpp
+++ b/Transceiver52M/Transceiver.cpp
@@ -71,7 +71,7 @@
   }
 }
 
-bool TransceiverState::init(int filler, size_t sps, float scale, size_t rtsc, 
unsigned rach_delay)
+bool TransceiverState::init(FillerType filler, size_t sps, float scale, size_t 
rtsc, unsigned rach_delay)
 {
   signalVector *burst;
 
@@ -81,19 +81,19 @@
   for (size_t n = 0; n < 8; n++) {
 for (size_t i = 0; i < 102; i++) {
   switch (filler) {
-  case Transceiver::FILLER_DUMMY:
+  case FILLER_DUMMY:
 burst = generateDummyBurst(sps, n);
 break;
-  case Transceiver::FILLER_NORM_RAND:
+  case FILLER_NORM_RAND:
 burst = genRandNormalBurst(rtsc, sps, n);
 break;
-  case Transceiver::FILLER_EDGE_RAND:
+  case FILLER_EDGE_RAND:
 burst = generateEdgeBurst(rtsc);
 break;
-  case Transceiver::FILLER_ACCESS_RAND:
+  case FILLER_ACCESS_RAND:
 burst = genRandAccessBurst(rach_delay, sps, n);
 break;
-  case Transceiver::FILLER_ZERO:
+  case FILLER_ZERO:
   default:
 burst = generateEmptyBurst(sps, n);
   }
@@ -102,8 +102,8 @@
   fillerTable[i][n] = burst;
 }
 
-if ((filler == Transceiver::FILLER_NORM_RAND) ||
-(filler == Transceiver::FILLER_EDGE_RAND)) {
+if ((filler == FILLER_NORM_RAND) ||
+(filler == FILLER_EDGE_RAND)) {
 chanType[n] = TSC;
 }
   }
@@ -161,7 +161,7 @@
  * are still expected to report clock indications through control channel
  * activity.
  */
-bool Transceiver::init(int filler, size_t rtsc, unsigned rach_delay, bool edge)
+bool Transceiver::init(FillerType filler, size_t rtsc, unsigned rach_delay, 
bool edge)
 {
   int d_srcport, d_dstport, c_srcport, c_dstport;
 
diff --git a/Transceiver52M/Transceiver.h b/Transceiver52M/Transceiver.h
index ad7a469..f9b54f0 100644
--- a/Transceiver52M/Transceiver.h
+++ b/Transceiver52M/Transceiver.h
@@ -30,6 +30,10 @@
 #include 
 #include 
 
+extern "C" {
+#include "config_defs.h"
+}
+
 class Transceiver;
 
 /** Channel descriptor for transceiver object and channel number pair */
@@ -54,7 +58,7 @@
   ~TransceiverState();
 
   /* Initialize a multiframe slot in the filler table */
-  bool init(int filler, size_t sps, float scale, size_t rtsc, unsigned 
rach_delay);
+  bool init(FillerType filler, size_t sps, float scale, size_t rtsc, unsigned 
rach_delay);
 
   int chanType[8];
 
@@ -109,7 +113,7 @@
   ~Transceiver();
 
   /** Start the control loop */
-  bool init(int filler, size_t rtsc, unsigned rach_delay, bool edge);
+  bool init(FillerType filler, size_t rtsc, unsigned rach_delay, bool edge);
 
   /** attach the radioInterface receive FIFO */
   bool receiveFIFO(VectorFIFO *wFIFO, size_t chan)
@@ -143,14 +147,6 @@
 NONE,   ///< Channel is inactive, default
 LOOPBACK///< similar go VII, used in loopback testing
   } ChannelCombination;
-
-  enum FillerType {
-FILLER_DUMMY,
-FILLER_ZERO,
-FILLER_NORM_RAND,
-FILLER_EDGE_RAND,
-FILLER_ACCESS_RAND,
-  };
 
 private:
   int mBasePort;
diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index db0a813..dc4e1c8 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -91,7 +91,7 @@
unsigned rach_delay;
bool 

[MERGED] osmo-trx[master]: vty: Implement VTY cfg parsing for current parameters

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: vty: Implement VTY cfg parsing for current parameters
..


vty: Implement VTY cfg parsing for current parameters

At this stage, osmo-trx still uses the cmdline parameters top run the
device, but it is already able to parse all the same parameters from a
cfg file through the VTY and filling a trx_ctx structure which will be
later used to drive the device. Device config can be printed in the VTY
with "show trx".

Change-Id: Ie084c1b30b63f91c6e7640832ec1797d9e813832
---
M CommonLibs/trx_vty.c
M CommonLibs/trx_vty.h
M Transceiver52M/osmo-trx.cpp
3 files changed, 469 insertions(+), 2 deletions(-)

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



diff --git a/CommonLibs/trx_vty.c b/CommonLibs/trx_vty.c
index b16cd24..843d19f 100644
--- a/CommonLibs/trx_vty.c
+++ b/CommonLibs/trx_vty.c
@@ -36,6 +36,22 @@
 
 static struct trx_ctx* g_trx_ctx;
 
+static const struct value_string clock_ref_names[] = {
+   { REF_INTERNAL, "internal" },
+   { REF_EXTERNAL, "external" },
+   { REF_GPS,  "gspdo" },
+   { 0,NULL }
+};
+
+static const struct value_string filler_names[] = {
+   { FILLER_DUMMY, "Dummy bursts" },
+   { FILLER_ZERO,  "Disabled" },
+   { FILLER_NORM_RAND, "Normal bursts with random payload" },
+   { FILLER_EDGE_RAND, "EDGE bursts with random payload" },
+   { FILLER_ACCESS_RAND,   "Access bursts with random payload" },
+   { 0,NULL }
+};
+
 struct trx_ctx *trx_from_vty(struct vty *v)
 {
 /* It can't hurt to force callers to continue to pass the vty instance
@@ -50,11 +66,18 @@
 
 enum trx_vty_node {
TRX_NODE = _LAST_OSMOVTY_NODE + 1,
+   CHAN_NODE,
 };
 
 static struct cmd_node trx_node = {
TRX_NODE,
"%s(config-trx)# ",
+   1,
+};
+
+static struct cmd_node chan_node = {
+   CHAN_NODE,
+   "%s(config-trx-chan)# ",
1,
 };
 
@@ -84,15 +107,364 @@
return CMD_SUCCESS;
 }
 
+DEFUN(cfg_remote_ip, cfg_remote_ip_cmd,
+   "remote-ip A.B.C.D",
+   "Set the IP address for the remote BTS\n"
+   "IPv4 Address\n")
+{
+   struct trx_ctx *trx = trx_from_vty(vty);
+
+   osmo_talloc_replace_string(trx, >cfg.remote_addr, argv[0]);
+
+   return CMD_SUCCESS;
+}
+
+DEFUN(cfg_base_port, cfg_base_port_cmd,
+   "base-port <1-65535>",
+   "Set the TRX Base Port\n"
+   "TRX Base Port\n")
+{
+   struct trx_ctx *trx = trx_from_vty(vty);
+
+   trx->cfg.base_port = atoi(argv[0]);
+
+   return CMD_SUCCESS;
+}
+
+DEFUN(cfg_dev_args, cfg_dev_args_cmd,
+   "dev-args DESC",
+   "Set the device-specific arguments to pass to the device\n"
+   "Device-specific arguments\n")
+{
+   struct trx_ctx *trx = trx_from_vty(vty);
+
+   osmo_talloc_replace_string(trx, >cfg.dev_args, argv[0]);
+
+   return CMD_SUCCESS;
+}
+
+DEFUN(cfg_tx_sps, cfg_tx_sps_cmd,
+   "tx-sps (1|4)",
+   "Set the Tx Samples-per-Symbol\n"
+   "Tx Samples-per-Symbol\n")
+{
+   struct trx_ctx *trx = trx_from_vty(vty);
+
+   trx->cfg.tx_sps = atoi(argv[0]);
+
+   return CMD_SUCCESS;
+}
+
+DEFUN(cfg_rx_sps, cfg_rx_sps_cmd,
+   "rx-sps (1|4)",
+   "Set the Rx Samples-per-Symbol\n"
+   "Rx Samples-per-Symbol\n")
+{
+   struct trx_ctx *trx = trx_from_vty(vty);
+
+   trx->cfg.rx_sps = atoi(argv[0]);
+
+   return CMD_SUCCESS;
+}
+
+DEFUN(cfg_test_rtsc, cfg_test_rtsc_cmd,
+   "test rtsc <0-7>",
+   "Set the Random Normal Burst test mode with TSC\n"
+   "TSC\n")
+{
+   struct trx_ctx *trx = trx_from_vty(vty);
+
+   if (trx->cfg.rach_delay_set) {
+   vty_out(vty, "rach-delay and rtsc options are 
mutual-exclusive%s",
+   VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   trx->cfg.rtsc_set = true;
+   trx->cfg.rtsc = atoi(argv[0]);
+   if (!trx->cfg.egprs) /* Don't override egprs which sets different 
filler */
+   trx->cfg.filler = FILLER_NORM_RAND;
+
+   return CMD_SUCCESS;
+}
+
+DEFUN(cfg_test_rach_delay, cfg_test_rach_delay_cmd,
+   "test rach-delay <0-68>",
+   "Set the Random Access Burst test mode with delay\n"
+   "RACH delay\n")
+{
+   struct trx_ctx *trx = trx_from_vty(vty);
+
+   if (trx->cfg.rtsc_set) {
+   vty_out(vty, "rach-delay and rtsc options are 
mutual-exclusive%s",
+   VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   if (trx->cfg.egprs) {
+   vty_out(vty, "rach-delay and egprs options are 
mutual-exclusive%s",
+   VTY_NEWLINE);
+   return CMD_WARNING;
+   }
+
+   trx->cfg.rach_delay_set = true;
+   trx->cfg.rach_delay = atoi(argv[0]);
+   trx->cfg.filler = FILLER_ACCESS_RAND;
+
+   return 

osmo-trx[master]: osmo-trx: Re-introduce -l cmd line parameter

2018-03-06 Thread Harald Welte

Patch Set 1: Code-Review+2

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

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


[MERGED] osmo-trx[master]: osmo-trx: Use VTY cfg structures while still allowing cmd li...

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: osmo-trx: Use VTY cfg structures while still allowing cmd line 
options
..


osmo-trx: Use VTY cfg structures while still allowing cmd line options

Existing cmd line options are kept for a while to give people some time
to move to use VTY cfg. All new cfg options should be set only through
VTY. VTY options take preference (override) over cmd line options.
Deprecated options are removed from help message to dissuade users from
keep using them.

Steps to drop cmd line options in the future:
- Drop comma_delimited_to_vector, print_deprecated
- Drop all options in handle_options marked with print_deprecated.
- Set "-c" param to do the same as "-C", to keep compatibility with old
param and still use same naming as all other osmocom projects.
- Remove the hack in main() to set 1 channel implicitly by default.

Change-Id: Ib8de1a5da4b3c0b6a49e00033f616e1d66656adf
---
M Transceiver52M/osmo-trx.cpp
1 file changed, 187 insertions(+), 269 deletions(-)

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



diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index 7bc025f..f975500 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -55,52 +55,11 @@
 #include "debug.h"
 }
 
-/* Samples-per-symbol for downlink path
- * 4 - Uses precision modulator (more computation, less distortion)
- * 1 - Uses minimized modulator (less computation, more distortion)
- *
- * Other values are invalid. Receive path (uplink) is always
- * downsampled to 1 sps. Default to 4 sps for all cases.
- */
-#define DEFAULT_TX_SPS 4
-
-/*
- * Samples-per-symbol for uplink (receiver) path
- * Do not modify this value. EDGE configures 4 sps automatically on
- * B200/B210 devices only. Use of 4 sps on the receive path for other
- * configurations is not supported.
- */
-#define DEFAULT_RX_SPS 1
-
-/* Default configuration parameters */
-#define DEFAULT_TRX_PORT   5700
-#define DEFAULT_TRX_IP "127.0.0.1"
-#define DEFAULT_CHANS  1
 #define DEFAULT_CONFIG_FILE"osmo-trx.cfg"
 
-struct trx_config {
-   std::string local_addr;
-   std::string remote_addr;
-   std::string dev_args;
-   char* config_file;
-   unsigned port;
-   unsigned tx_sps;
-   unsigned rx_sps;
-   unsigned chans;
-   unsigned rtsc;
-   unsigned rach_delay;
-   bool extref;
-   bool gpsref;
-   FillerType filler;
-   bool mcbts;
-   double offset;
-   double rssi_offset;
-   bool swap_channels;
-   bool edge;
-   int sched_rr;
-   std::vector rx_paths;
-   std::vector tx_paths;
-};
+#define charp2str(a) ((a) ? std::string(a) : std::string(""))
+
+static char* config_file = (char*)DEFAULT_CONFIG_FILE;
 
 volatile bool gshutdown = false;
 
@@ -112,80 +71,6 @@
 static RadioInterface *radio;
 static Transceiver *transceiver;
 
-/* Setup configuration values
- * Don't query the existence of the Log.Level because it's a
- * mandatory value. That is, if it doesn't exist, the configuration
- * table will crash or will have already crashed. Everything else we
- * can survive without and use default values if the database entries
- * are empty.
- */
-bool trx_setup_config(struct trx_config *config)
-{
-   std::string refstr, fillstr, divstr, mcstr, edgestr;
-   std::vector::const_iterator si;
-
-   if (config->mcbts && config->chans > 5) {
-   std::cout << "Unsupported number of channels" << std::endl;
-   return false;
-   }
-
-   edgestr = config->edge ? "Enabled" : "Disabled";
-   mcstr = config->mcbts ? "Enabled" : "Disabled";
-
-   if (config->extref)
-   refstr = "External";
-   else if (config->gpsref)
-   refstr = "GPS";
-   else
-   refstr = "Internal";
-
-   switch (config->filler) {
-   case FILLER_DUMMY:
-   fillstr = "Dummy bursts";
-   break;
-   case FILLER_ZERO:
-   fillstr = "Disabled";
-   break;
-   case FILLER_NORM_RAND:
-   fillstr = "Normal busrts with random payload";
-   break;
-   case FILLER_EDGE_RAND:
-   fillstr = "EDGE busrts with random payload";
-   break;
-   case FILLER_ACCESS_RAND:
-   fillstr = "Access busrts with random payload";
-   break;
-   }
-
-   std::ostringstream ost("");
-   ost << "Config Settings" << std::endl;
-   ost << "   Device args. " << config->dev_args << std::endl;
-   ost << "   TRX Base Port... " << config->port << std::endl;
-   ost << "   TRX Address. " << config->local_addr << 
std::endl;
-   ost << "   GSM Core Address." << config->remote_addr << 

[MERGED] osmo-trx[master]: doc: Add sample cfg file for LimeSDR

2018-03-06 Thread Harald Welte
Harald Welte has submitted this change and it was merged.

Change subject: doc: Add sample cfg file for LimeSDR
..


doc: Add sample cfg file for LimeSDR

Change-Id: I16de70eac0fd79107b8317af37201e6da834c169
---
A doc/examples/osmo-trx-limesdr.cfg
1 file changed, 20 insertions(+), 0 deletions(-)

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



diff --git a/doc/examples/osmo-trx-limesdr.cfg 
b/doc/examples/osmo-trx-limesdr.cfg
new file mode 100644
index 000..c7e6b23
--- /dev/null
+++ b/doc/examples/osmo-trx-limesdr.cfg
@@ -0,0 +1,20 @@
+log stderr
+  logging filter all 1
+  logging color 1
+  logging print category 1
+  logging timestamp 1
+  logging level all info
+!
+line vty
+ no login
+!
+trx
+ bind-ip 127.0.0.1
+ remote-ip 127.0.0.1
+ base-port 5700
+ egprs disable
+ tx-sps 4
+ rx-sps 4
+ chan 0
+  tx-path BAND1
+  rx-path LNAW

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I16de70eac0fd79107b8317af37201e6da834c169
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder


osmo-gsm-tester[master]: ms: Create a starter for virtphy and mobile application

2018-03-06 Thread Pau Espin Pedrol

Patch Set 5:

(1 comment)

https://gerrit.osmocom.org/#/c/6917/5/src/osmo_ms_driver/starter.py
File src/osmo_ms_driver/starter.py:

Line 107: def start_mobile(self, loop):
> You are the maintainer but I wouldn't do it:
* What's the issue with it being generic given that is called from a known 
class? Usually you have 1 class per file, so if you know the object, just grep 
for "start(" in the class file.

* I asked you to call it start() because it was already being called 
start_mobile(), if you had called it launch_process_mobile() I would have 
pointed out that it would make more sense to have it called launch_process(), 
because imho if you are in class Foo, it doesn't make sense to have a method 
do_foo() but better call it do(), as foo is already known from the object. In 
our objects used for tests we usually have a public API called start() because 
we don't care about whether it creates a process or not underneath, everything 
is managed internally by the object. Even more, in the Modem (ofono) class, we 
only have a connect() signal which does all the initialization and starts 
registration, because so far we didn't need other steps (basically because the 
modem attempts to connect to the network as quick as it is powered on). That 
being said, if other implementations require more fine grained actions/steps, 
we can improve the API used in osmo-gsm-tester tests.

So, to keep it in a similar fashion with other existing objects (bts, bsc, 
msc), for future inclusion it would be nice to have it called start() too, and 
add that API to the Modem object (in ofono we'd probably keep doing everything 
in the connect() anyway).

As it's not yet merged with the other osmo-gsm-tester stuff (different 
directory) there no hard requirement on how to call it, but for later inclusion 
it may ease already providing similar naming.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5c6d742842d7f3e0a1858436ef3f8634d8c0582d
Gerrit-PatchSet: 5
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 
Gerrit-HasComments: Yes


[PATCH] osmo-trx[master]: osmo-trx: Re-introduce -l cmd line parameter

2018-03-06 Thread Pau Espin Pedrol

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

osmo-trx: Re-introduce -l cmd line parameter

Parameter -l to set the terminal logging levle was removed in
3da1f8352e337fb032bf7a58c2909d3ba918e237, but afterwards it was decided
to keep the cmd line options for a bit more to easy migration to VTY
cfg.

The command line no longer accepts keywords ("DEBUG", "INFO", etc.) but
log level numbers, due to libosmocore APIs log_parse_level and
log_level_str being marked as deprecated and for internal use only.

Keep in mind the log level is overridden by VTY cfg if any line sets log
levels for log stderr in there.

Explicit cast to unsigned int for loglvel is issued to avoid iostream
printing it as a char.

Change-Id: I91c35ecded177b7976045d9b693855adb9e18f8a
---
M Transceiver52M/osmo-trx.cpp
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-trx refs/changes/41/7141/1

diff --git a/Transceiver52M/osmo-trx.cpp b/Transceiver52M/osmo-trx.cpp
index f975500..2eb8309 100644
--- a/Transceiver52M/osmo-trx.cpp
+++ b/Transceiver52M/osmo-trx.cpp
@@ -211,7 +211,7 @@
std::vector rx_paths, tx_paths;
bool rx_paths_set = false, tx_paths_set = false;
 
-   while ((option = getopt(argc, argv, 
"ha:i:j:p:c:dmxgfo:s:b:r:A:R:Set:y:z:C:")) != -1) {
+   while ((option = getopt(argc, argv, 
"ha:l:i:j:p:c:dmxgfo:s:b:r:A:R:Set:y:z:C:")) != -1) {
switch (option) {
case 'h':
print_help();
@@ -220,6 +220,10 @@
case 'a':
print_deprecated(option);
osmo_talloc_replace_string(trx, >cfg.dev_args, 
optarg);
+   break;
+   case 'l':
+   print_deprecated(option);
+   log_set_log_level(osmo_stderr_target, atoi(optarg));
break;
case 'i':
print_deprecated(option);
@@ -377,6 +381,7 @@
std::ostringstream ost("");
 
ost << "Config Settings" << std::endl;
+   ost << "   Log Level... " << (unsigned int) 
osmo_stderr_target->loglevel << std::endl;
ost << "   Device args. " << charp2str(trx->cfg.dev_args) 
<< std::endl;
ost << "   TRX Base Port... " << trx->cfg.base_port << 
std::endl;
ost << "   TRX Address. " << charp2str(trx->cfg.bind_addr) 
<< std::endl;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91c35ecded177b7976045d9b693855adb9e18f8a
Gerrit-PatchSet: 1
Gerrit-Project: osmo-trx
Gerrit-Branch: master
Gerrit-Owner: Pau Espin Pedrol 


osmo-gsm-tester[master]: ms: Create a starter for virtphy and mobile application

2018-03-06 Thread Holger Freyther

Patch Set 5:

(1 comment)

https://gerrit.osmocom.org/#/c/6917/5/src/osmo_ms_driver/starter.py
File src/osmo_ms_driver/starter.py:

Line 107: def start_mobile(self, loop):
> Can now be called start(), as it's already in the mobile class.
You are the maintainer but I wouldn't do it:

* start is too generic. Good luck finding the right method with git grep. ;)
* As you pointed out the virtphy and mob are two very different things (and 
launched at two different phases of the test process) and we don't benefit from 
the "start" polymorphism. By definition they are not compatible/the same (in 
terms of duck typing) and by not having the same methods it will fail with an 
exception..

If you want to pick a common name I would pick: launch_process. It describes 
what it is done (launch a process), one can git grep for it, and most likely it 
will stay the same (we continue to launch processes).


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5c6d742842d7f3e0a1858436ef3f8634d8c0582d
Gerrit-PatchSet: 5
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: Holger Freyther 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Holger Freyther 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: neels 
Gerrit-HasComments: Yes


osmo-gsm-manuals[master]: INSTALL.txt: update VTY reference how-to to new osmo_interac...

2018-03-06 Thread Pau Espin Pedrol

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/7125/1/INSTALL.txt
File INSTALL.txt:

Line 27:   osmo_interact_vty.py -X -p $VTY_PORT > vty/*_vty_reference.xml
Is this asterisk expected to be evaluated by the shell? Otherwise better use 
${FOO}_vty_reference.xml as example


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I5bf1fea83354049f4157ee9ac8b40f673597f908
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


osmo-trx[master]: osmo-trx: Use VTY cfg structures while still allowing cmd li...

2018-03-06 Thread Pau Espin Pedrol

Patch Set 6:

Manual submitted in https://gerrit.osmocom.org/#/c/7139/

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

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


[PATCH] osmo-gsm-manuals[master]: Introduce OsmoTRX manual

2018-03-06 Thread Pau Espin Pedrol
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/7139

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

Introduce OsmoTRX manual

Change-Id: I19ee9d6cda02fb7200c96c0ac129e69825b096cd
---
M Makefile
A OsmoTRX/Makefile
A OsmoTRX/chapters/configuration.adoc
A OsmoTRX/chapters/control.adoc
A OsmoTRX/chapters/counters.adoc
A OsmoTRX/chapters/counters_generated.adoc
A OsmoTRX/chapters/overview.adoc
A OsmoTRX/chapters/running.adoc
A OsmoTRX/osmotrx-usermanual-docinfo.xml
A OsmoTRX/osmotrx-usermanual.adoc
A OsmoTRX/osmotrx-vty-reference.xml
A OsmoTRX/vty/trx_vty_additions.xml
A OsmoTRX/vty/trx_vty_reference.xml
13 files changed, 1,451 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/39/7139/2

diff --git a/Makefile b/Makefile
index 45fe129..4e821f5 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@
cd OsmoSTP; $(MAKE)
cd OsmocomBB; $(MAKE)
cd OsmoMGW; $(MAKE)
+   cd OsmoTRX; $(MAKE)
 
 clean:
cd OsmoBTS; $(MAKE) clean
@@ -31,6 +32,7 @@
cd OsmoSTP; $(MAKE) clean
cd OsmocomBB; $(MAKE) clean
cd OsmoMGW; $(MAKE) clean
+   cd OsmoTRX; $(MAKE) clean
 
 upload:
cd OsmoBTS; $(MAKE) upload
@@ -47,6 +49,7 @@
cd OsmoSTP; $(MAKE) upload
cd OsmocomBB; $(MAKE) upload
cd OsmoMGW; $(MAKE) upload
+   cd OsmoTRX; $(MAKE) upload
 
 check:
cd OsmoBTS; $(MAKE) check
@@ -65,6 +68,7 @@
cd OsmoHLR; $(MAKE) check
cd OsmoSTP; $(MAKE) check
cd OsmocomBB; $(MAKE) check
+   cd OsmoTRX; $(MAKE) check
 
 define check_dep_bin
 @type $(1) >/dev/null 2>&1 || { echo >&2 "Binary '$(1)' not found in path, 
please install $(2)."; exit 1; }
diff --git a/OsmoTRX/Makefile b/OsmoTRX/Makefile
new file mode 100644
index 000..81aec9a
--- /dev/null
+++ b/OsmoTRX/Makefile
@@ -0,0 +1,10 @@
+TOPDIR = ..
+
+ASCIIDOC = osmotrx-usermanual.adoc
+ASCIIDOC_DEPS = chapters/*.adoc
+include $(TOPDIR)/build/Makefile.asciidoc.inc
+
+VTY_REFERENCE = osmotrx-vty-reference.xml
+include $(TOPDIR)/build/Makefile.vty-reference.inc
+
+include $(TOPDIR)/build/Makefile.common.inc
diff --git a/OsmoTRX/chapters/configuration.adoc 
b/OsmoTRX/chapters/configuration.adoc
new file mode 100644
index 000..cdde366
--- /dev/null
+++ b/OsmoTRX/chapters/configuration.adoc
@@ -0,0 +1,36 @@
+== Configuring OsmTRX
+
+OsmoTRX will read the configuration at startup time and configure the
+transceiver accordingly after validating the configuration.
+
+OsmoTRX can handle several TRX channels, but at least one must be configured in
+order to be able to start it successfully. Channels must be present in the
+configuration file in incremental order, starting from 0 and be consecutive.
+
+Example configuration files for different devices and setups can be found in
+`doc/examples/` in 'osmo-trx' git repository.
+
+=== Documented example
+
+.Example: Static GGSN/APN configuration (single catch-all GGSN)
+
+trx
+ bind-ip 127.0.0.1 <1>
+ remote-ip 127.0.0.1 <2>
+ base-port 5700 <3>
+ egprs disable <4>
+ tx-sps 4 <5>
+ rx-sps 4 <6>
+ chan 0 <7>
+  tx-path BAND1 <8>
+  rx-path LNAW <9>
+
+<1> Configure the local IP address at the TRX used for the connection against 
`osmo-bts-trx`.
+<2> Specify the IP address of `osmo-bts-trx` to connect to.
+<3> Specify the reference base UDP port to use for communication.
+<4> Don't enable EDGE support.
+<5> Use 4 TX samples per symbol. This is device specific.
+<6> Use 4 RX samples per symbol. This is device specific.
+<7> Configure the first channel. As no other channels are specified, 
`osmo-trx` assumes it is using only one channel.
+<8> Configure the device to use `BAND1` Tx antenna path from all the available 
ones (device specific).
+<9> Configure the device to use `LNAW` Rx antenna path from all the available 
ones (device specific).
diff --git a/OsmoTRX/chapters/control.adoc b/OsmoTRX/chapters/control.adoc
new file mode 100644
index 000..168769a
--- /dev/null
+++ b/OsmoTRX/chapters/control.adoc
@@ -0,0 +1,12 @@
+[[control]]
+== Control interface
+
+The actual protocol is described in <>, the variables
+common to all programs using it are described in <>. Here we
+describe variables specific to OsmoTRX.
+
+.Variables available over control interface
+[options="header",width="100%",cols="20%,5%,5%,50%,20%"]
+|===
+|Name|Access|Trap|Value|Comment
+|===
diff --git a/OsmoTRX/chapters/counters.adoc b/OsmoTRX/chapters/counters.adoc
new file mode 100644
index 000..7fbb10c
--- /dev/null
+++ b/OsmoTRX/chapters/counters.adoc
@@ -0,0 +1,4 @@
+[[counters]]
+== Counters
+
+include::./counters_generated.adoc[]
diff --git a/OsmoTRX/chapters/counters_generated.adoc 
b/OsmoTRX/chapters/counters_generated.adoc
new file mode 100644
index 000..b40dc37
--- /dev/null
+++ b/OsmoTRX/chapters/counters_generated.adoc
@@ -0,0 +1,7 @@
+// autogenerated by show asciidoc counters
+These counters and their description based on 

[PATCH] osmo-gsm-manuals[master]: Introduce chapter trx_if.adoc and add it to OsmoTRX and OsmoBTS

2018-03-06 Thread Pau Espin Pedrol

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

Introduce chapter trx_if.adoc and add it to OsmoTRX and OsmoBTS

This chapter defines the protocol used between osmo-trx and
osmo-bts-trx.

Most of the text comes originally from osmo-trx.git/README, as it's the
only known documentation of the protocol other than the code itself.

Change-Id: I56c418eef0f826ae1aadbed5b151fbed241c7885
---
M OsmoBTS/osmobts-usermanual.adoc
M OsmoTRX/osmotrx-usermanual.adoc
A common/chapters/trx_if.adoc
3 files changed, 160 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/40/7140/1

diff --git a/OsmoBTS/osmobts-usermanual.adoc b/OsmoBTS/osmobts-usermanual.adoc
index d746d85..07f88e2 100644
--- a/OsmoBTS/osmobts-usermanual.adoc
+++ b/OsmoBTS/osmobts-usermanual.adoc
@@ -26,6 +26,8 @@
 
 include::chapters/architecture.adoc[]
 
+include::../common/chapters/trx_if.adoc[]
+
 include::../common/chapters/control_if.adoc[]
 
 include::../common/chapters/port_numbers.adoc[]
@@ -35,4 +37,3 @@
 include::../common/chapters/glossary.adoc[]
 
 include::../common/chapters/gfdl.adoc[]
-
diff --git a/OsmoTRX/osmotrx-usermanual.adoc b/OsmoTRX/osmotrx-usermanual.adoc
index 249a21c..3b2e991 100644
--- a/OsmoTRX/osmotrx-usermanual.adoc
+++ b/OsmoTRX/osmotrx-usermanual.adoc
@@ -23,6 +23,8 @@
 
 include::chapters/configuration.adoc[]
 
+include::../common/chapters/trx_if.adoc[]
+
 include::../common/chapters/port_numbers.adoc[]
 
 include::../common/chapters/bibliography.adoc[]
diff --git a/common/chapters/trx_if.adoc b/common/chapters/trx_if.adoc
new file mode 100644
index 000..4fb8f9b
--- /dev/null
+++ b/common/chapters/trx_if.adoc
@@ -0,0 +1,156 @@
+[[trx_if]]
+== TRX Manager UDP socket interface
+
+This is the protocol used between `osmo-trx` and `osmo-bts-trx`.
+
+Each TRX Manager UDP socket interface represents a single ARFCN. Each of these
+per-ARFCN interfaces is a pair of UDP sockets, one for control and one for 
data.
+Given a base port B (5700), the master clock interface is at port P=B. The
+TRX-side control interface for C(N) is on  port P=B+2N+1 and the data interface
+is on an odd numbered port P=B+2N+2. The corresponding core-side interface for
+every socket is at P+100. For any given build, the number of ARFCN interfaces
+can be fixed.
+
+=== Indications on the Master Clock Interface
+
+The master clock interface is output only (from the radio).
+Messages are "indications".
+
+CLOCK gives the current value of the transceiver clock to be used by the core.
+This message is sent whenever a trasmission packet arrives that is too late or
+too early.  The clock value is NOT the current transceiver time.  It is a time
+setting the the core should use to give better packet arrival times.
+
+IND CLOCK 
+
+
+=== Commands on the Per-ARFCN Control Interface
+
+The per-ARFCN control interface uses a command-reponse protocol. Commands are
+NULL-terminated ASCII strings, one per UDP socket. Each command has a
+corresponding response.
+
+Every command is of the form:
+
+CMD  [params]
+
+
+The `` is the actual command.
+Parameters are optional depending on the commands type.
+Every response is of the form:
+
+RSP   [result]
+
+The `` is 0 for success and a non-zero error code for failure.
+Successful responses may include results, depending on the command type.
+
+
+ Power Control
+
+`POWEROFF` shuts off transmitter power and stops the demodulator.
+
+CMD POWEROFF
+RSP POWEROFF 
+
+
+`POWERON` starts the transmitter and starts the demodulator.  Initial power
+level is very low. This command fails if the transmitter and receiver are not
+yet tuned. This command fails if the transmit or receive frequency creates a
+conflict with another ARFCN that is already running. If the transceiver is
+already on, it response with success to this command.
+
+CMD POWERON
+RSP POWERON 
+
+
+`SETPOWER` sets output power in dB wrt full scale.
+This command fails if the transmitter and receiver are not running.
+
+CMD SETPOWER 
+RSP SETPOWER  
+
+
+`ADJPOWER` adjusts power by the given dB step.  Response returns resulting 
power
+level wrt full scale. This command fails if the transmitter and receiver are 
not
+running.
+
+CMD ADJPOWER 
+RSP ADJPOWER  
+
+
+ Tuning Control
+
+`RXTUNE` tunes the receiver to a given frequency in kHz. This command fails if 
the
+receiver is already running. (To re-tune you stop the radio, re-tune, and
+restart.) This command fails if the transmit or receive frequency creates a
+conflict with another ARFCN that is already running.
+
+CMD RXTUNE 
+RSP RXTUNE  
+
+
+`TXTUNE` tunes the transmitter to a given frequency in kHz. This command fails 
if
+the transmitter is already running. (To re-tune you stop the radio, re-tune, 
and
+restart.) This command fails if the transmit or receive frequency creates a
+conflict with another ARFCN that is already running.
+
+CMD TXTUNE 
+RSP TXTUNE  
+
+
+ Timeslot 

[PATCH] osmo-gsm-manuals[master]: OsmoBTS: bts-models: Add Lime Microsystems devices as suppor...

2018-03-06 Thread Pau Espin Pedrol

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

OsmoBTS: bts-models: Add Lime Microsystems devices as supported osmo-trx

Also take the chance to remove uneeded extra whitespace in surrounding
text.

Change-Id: I739e4dfba7c649a74cf67d6bbe6f74b22e7e24f0
---
M OsmoBTS/chapters/bts-models.adoc
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/36/7136/1

diff --git a/OsmoBTS/chapters/bts-models.adoc b/OsmoBTS/chapters/bts-models.adoc
index 5e51009..fe06c04 100644
--- a/OsmoBTS/chapters/bts-models.adoc
+++ b/OsmoBTS/chapters/bts-models.adoc
@@ -182,7 +182,7 @@
 == `osmo-bts-trx` for OsmoTRX
 
 OsmoTRX is a C-language implementation of the GSM radio modem,
-originally developed as the 'Transceiver' part of OpenBTS.  This radio
+originally developed as the 'Transceiver' part of OpenBTS. This radio
 modem offers an interface based on top of UDP streams.
 
 The OsmoBTS bts_model code for OsmoTRX is called
@@ -190,10 +190,10 @@
 OsmoTRX, so both parts can be used together to implement a complete GSM
 BTS based on general-purpose computing SDR.
 
-As OsmoTRX is general-purpose software running on top of Linux, it is
-thus not tied to any specific physical hardware.   At the time of this
-writing, OsmoTRX supports a variety of Ettus USRP SDRs via the UHD
-driver, as well as the Fairwaves UmTRX and derived products.
+As OsmoTRX is general-purpose software running on top of Linux, it is thus not
+tied to any specific physical hardware. At the time of this writing, OsmoTRX
+supports a variety of Lime Microsystems and Ettus USRP SDRs via the UHD driver,
+as well as the Fairwaves UmTRX and derived products.
 
 OsmoTRX is not a complete GSM PHY but 'just' the radio modem.  This
 means that all of the Layer 1 functionality such as scheduling,

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

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


[PATCH] osmo-gsm-manuals[master]: OsmoSGSN: overview: Fix typo and reference OpenGGSN->OsmoGGSN

2018-03-06 Thread Pau Espin Pedrol

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

OsmoSGSN: overview: Fix typo and reference OpenGGSN->OsmoGGSN

Change-Id: I94cc362a4f52e6bd9f93299665e73dc4fd75a2c6
---
M OsmoSGSN/chapters/overview.adoc
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/37/7137/1

diff --git a/OsmoSGSN/chapters/overview.adoc b/OsmoSGSN/chapters/overview.adoc
index 2ff92fa..abc7496 100644
--- a/OsmoSGSN/chapters/overview.adoc
+++ b/OsmoSGSN/chapters/overview.adoc
@@ -38,7 +38,7 @@
 
 === Software Components
 
-OsmoNITB contains a variety of different software components, which
+OsmoSGSN contains a variety of different software components, which
 we'll quickly describe in this section.
 
  Gb Implementation
@@ -58,7 +58,7 @@
 
  GTP Implementation
 
-OsmoSGSN uses the libgtp implementation originating from OpenGGSN. It
+OsmoSGSN uses the libgtp implementation originating from OsmoGGSN. It
 supports both GTPv0 and GTPv1.
 
 

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

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


[PATCH] osmo-gsm-manuals[master]: Introduce OsmoTRX manual

2018-03-06 Thread Pau Espin Pedrol

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

Introduce OsmoTRX manual

Change-Id: I19ee9d6cda02fb7200c96c0ac129e69825b096cd
---
M Makefile
A OsmoTRX/Makefile
A OsmoTRX/chapters/configuration.adoc
A OsmoTRX/chapters/control.adoc
A OsmoTRX/chapters/counters.adoc
A OsmoTRX/chapters/counters_generated.adoc
A OsmoTRX/chapters/overview.adoc
A OsmoTRX/chapters/running.adoc
A OsmoTRX/osmotrx-usermanual-docinfo.xml
A OsmoTRX/osmotrx-usermanual.adoc
A OsmoTRX/osmotrx-vty-reference.xml
A OsmoTRX/vty/trx_vty_additions.xml
A OsmoTRX/vty/trx_vty_reference.xml
13 files changed, 1,451 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/39/7139/1

diff --git a/Makefile b/Makefile
index 45fe129..4e821f5 100644
--- a/Makefile
+++ b/Makefile
@@ -15,6 +15,7 @@
cd OsmoSTP; $(MAKE)
cd OsmocomBB; $(MAKE)
cd OsmoMGW; $(MAKE)
+   cd OsmoTRX; $(MAKE)
 
 clean:
cd OsmoBTS; $(MAKE) clean
@@ -31,6 +32,7 @@
cd OsmoSTP; $(MAKE) clean
cd OsmocomBB; $(MAKE) clean
cd OsmoMGW; $(MAKE) clean
+   cd OsmoTRX; $(MAKE) clean
 
 upload:
cd OsmoBTS; $(MAKE) upload
@@ -47,6 +49,7 @@
cd OsmoSTP; $(MAKE) upload
cd OsmocomBB; $(MAKE) upload
cd OsmoMGW; $(MAKE) upload
+   cd OsmoTRX; $(MAKE) upload
 
 check:
cd OsmoBTS; $(MAKE) check
@@ -65,6 +68,7 @@
cd OsmoHLR; $(MAKE) check
cd OsmoSTP; $(MAKE) check
cd OsmocomBB; $(MAKE) check
+   cd OsmoTRX; $(MAKE) check
 
 define check_dep_bin
 @type $(1) >/dev/null 2>&1 || { echo >&2 "Binary '$(1)' not found in path, 
please install $(2)."; exit 1; }
diff --git a/OsmoTRX/Makefile b/OsmoTRX/Makefile
new file mode 100644
index 000..81aec9a
--- /dev/null
+++ b/OsmoTRX/Makefile
@@ -0,0 +1,10 @@
+TOPDIR = ..
+
+ASCIIDOC = osmotrx-usermanual.adoc
+ASCIIDOC_DEPS = chapters/*.adoc
+include $(TOPDIR)/build/Makefile.asciidoc.inc
+
+VTY_REFERENCE = osmotrx-vty-reference.xml
+include $(TOPDIR)/build/Makefile.vty-reference.inc
+
+include $(TOPDIR)/build/Makefile.common.inc
diff --git a/OsmoTRX/chapters/configuration.adoc 
b/OsmoTRX/chapters/configuration.adoc
new file mode 100644
index 000..5a93e75
--- /dev/null
+++ b/OsmoTRX/chapters/configuration.adoc
@@ -0,0 +1,36 @@
+== Configuring OsmTRX
+
+OsmoTRX will read the configuration at startup time and configure the
+transceiver accordingly after validating the configuration.
+
+OsmoTRX can handle several TRX channels, but at least one must be configured in
+order to be able to start it successfully. Channels must be present in the
+configuration file in incremental order, starting from 0 and be consecutive.
+
+Example configuration files for different devices and setups can be found in
+`doc/examples/` in 'osmo-trx' git repository.
+
+ Documented example
+
+.Example: Static GGSN/APN configuration (single catch-all GGSN)
+
+trx
+ bind-ip 127.0.0.1 <1>
+ remote-ip 127.0.0.1 <2>
+ base-port 5700 <3>
+ egprs disable <4>
+ tx-sps 4 <5>
+ rx-sps 4 <6>
+ chan 0 <7>
+  tx-path BAND1 <8>
+  rx-path LNAW <9>
+
+<1> Configure the local IP address at the TRX used for the connection against 
`osmo-bts-trx`.
+<2> Specify the IP address of `osmo-bts-trx` to connect to.
+<3> Specify the reference base UDP port to use for communication.
+<4> Don't enable EDGE support.
+<5> Use 4 TX samples per symbol. This is device specific.
+<6> Use 4 RX samples per symbol. This is device specific.
+<7> Configure the first channel. As no other channels are specified, 
`osmo-trx` assumes it is using only one channel.
+<8> Configure the device to use `BAND1` Tx antenna path from all the available 
ones (device specific).
+<9> Configure the device to use `LNAW` Rx antenna path from all the available 
ones (device specific).
diff --git a/OsmoTRX/chapters/control.adoc b/OsmoTRX/chapters/control.adoc
new file mode 100644
index 000..168769a
--- /dev/null
+++ b/OsmoTRX/chapters/control.adoc
@@ -0,0 +1,12 @@
+[[control]]
+== Control interface
+
+The actual protocol is described in <>, the variables
+common to all programs using it are described in <>. Here we
+describe variables specific to OsmoTRX.
+
+.Variables available over control interface
+[options="header",width="100%",cols="20%,5%,5%,50%,20%"]
+|===
+|Name|Access|Trap|Value|Comment
+|===
diff --git a/OsmoTRX/chapters/counters.adoc b/OsmoTRX/chapters/counters.adoc
new file mode 100644
index 000..7fbb10c
--- /dev/null
+++ b/OsmoTRX/chapters/counters.adoc
@@ -0,0 +1,4 @@
+[[counters]]
+== Counters
+
+include::./counters_generated.adoc[]
diff --git a/OsmoTRX/chapters/counters_generated.adoc 
b/OsmoTRX/chapters/counters_generated.adoc
new file mode 100644
index 000..b40dc37
--- /dev/null
+++ b/OsmoTRX/chapters/counters_generated.adoc
@@ -0,0 +1,7 @@
+// autogenerated by show asciidoc counters
+These counters and their description based on OsmoTRX 0.2.0.61-408f (OsmoTRX).
+
+// generating tables for rate_ctr_group
+// generating tables for 

[PATCH] osmo-gsm-manuals[master]: common: port_numbers: Add OsmoTRX and OsmoBTS missing ports

2018-03-06 Thread Pau Espin Pedrol

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

common: port_numbers: Add OsmoTRX and OsmoBTS missing ports

Change-Id: Idc34aa2d4241945e80c07e4e5660451a016f0117
---
M common/chapters/port_numbers.adoc
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/38/7138/1

diff --git a/common/chapters/port_numbers.adoc 
b/common/chapters/port_numbers.adoc
index fd2cf8c..3efa179 100644
--- a/common/chapters/port_numbers.adoc
+++ b/common/chapters/port_numbers.adoc
@@ -14,6 +14,9 @@
 |TCP|2775|SMPP (SMS interface for external programs)|osmo-nitb
 |TCP|3002|A-bis/IP OML|osmo-bts, osmo-bsc, osmo-nitb
 |TCP|3003|A-bis/IP RSL|osmo-bts, osmo-bsc, osmo-nitb
+|TCP|4236|Control Interface|osmo-trx
+|TCP|4237|telnet (VTY)|osmo-trx
+|TCP|4238|Control Interface|osmo-bts
 |TCP|4239|telnet (VTY)|osmo-stp
 |TCP|4240|telnet (VTY)|osmo-pcu
 |TCP|4241|telnet (VTY)|osmo-bts

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

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


libasn1c[master]: configure: add --enable-werror

2018-03-06 Thread Pau Espin Pedrol

Patch Set 1: -Code-Review

Why do you need each of this?
-Wno-error=deprecated -Wno-error=deprecated-declarations -Wno-error=cpp

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibcc8238584a585434b39a046cd2d7e18ddaf7f8c
Gerrit-PatchSet: 1
Gerrit-Project: libasn1c
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


libasn1c[master]: configure: add --enable-werror

2018-03-06 Thread Neels Hofmeyr

Patch Set 1:

> I would really hope there is another method than to add a
 > configure.ac flag for every compiler option / CFLAG we ever want to
 > sue from our continuous integration setup.

It's not just one CFLAG here, there is a "fine-tuned" combination of warnings 
we don't want to see as errors:

-Werror -Wno-error=deprecated -Wno-error=deprecated-declarations 
-Wno-error=cpp

We can put it in all the jenkins.sh files, sure. But I also want to be able to 
conveniently test this locally. So what do I do, copy-paste from the jenkins.sh?

For me what works best is the explicit ./configure argument, since (personally) 
I already have some infrastructure around to manage configure arguments (in 
osmo-dev.git).

So I think yes, this is the right place.

* It's about compilation = the realm of configure.ac
* We already adjust a lot of CFLAGS in configure.ac.
* I can conveniently run the exact -Werror definitions that we use to pass or 
reject a new patch, by just remembering --enable-werror.
* ./configure --help provides "online doc" for -Werror and gives an explanation 
of why certain flags are set.
* It's not harmful to have that option.

(I'd actually prefer to have them defined only once, like in libosmocore, for 
all other projects, but we don't have a configure.ac sharing mechanism in 
place.)

Do you guys have another suggestion that gets me similar convenience?

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibcc8238584a585434b39a046cd2d7e18ddaf7f8c
Gerrit-PatchSet: 1
Gerrit-Project: libasn1c
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[PATCH] osmo-gsm-manuals[master]: OsmoBSC: update VTY reference

2018-03-06 Thread Neels Hofmeyr

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

OsmoBSC: update VTY reference

This is the first update since the libosmocore changes to the 'show
online-help' generated output. Hence the produced document now benefits from
the structural improvements:
- not repeating common commands for every node;
- using section names that match the VTY prompt.

Update bsc_vty_additions.xml to match the new node ID scheme.

Change-Id: I0d856563eee88527fda4c6940aa6cea779175aaa
---
M OsmoBSC/vty/bsc_vty_additions.xml
M OsmoBSC/vty/bsc_vty_reference.xml
2 files changed, 4,790 insertions(+), 3,065 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/29/7129/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d856563eee88527fda4c6940aa6cea779175aaa
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] osmo-gsm-manuals[master]: OsmoHLR: update vty reference

2018-03-06 Thread Neels Hofmeyr

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

OsmoHLR: update vty reference

Add new (generic) logging commands, talloc context print commands.
Add the jitter buffer logging category.

Remove the common commands from the individual sections.

Change-Id: I8e92c821b26908d4baa37745c57b9e15bda2a373
---
M OsmoHLR/vty/hlr_vty_reference.xml
1 file changed, 376 insertions(+), 511 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/32/7132/1

diff --git a/OsmoHLR/vty/hlr_vty_reference.xml 
b/OsmoHLR/vty/hlr_vty_reference.xml
index 31b95a1..8d161d4 100644
--- a/OsmoHLR/vty/hlr_vty_reference.xml
+++ b/OsmoHLR/vty/hlr_vty_reference.xml
@@ -1,201 +1,7 @@
 
-  
-  
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-  
-
-
-  
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-
-
-
-  
-
-  
-  
-  
-  
+  
+Common Commands
+These commands are available on all VTY nodes. They are 
listed here only once, to unclutter the VTY reference.
 
   
 
@@ -240,6 +46,258 @@
 
   
 
+
+  
+
+  
+
+  
+  
+view
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+  
+
+
+  
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+  
+
+
+  
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
+  
+  
+enable
 
   
 
@@ -322,19 +380,19 @@
 
 
   
-
+
 
   
 
 
   
-
+
 
   
 
 
   
-
+
 
 
 
@@ -343,7 +401,7 @@
 
 
   
-
+
   

[PATCH] osmo-gsm-manuals[master]: OsmoSTP: update VTY reference

2018-03-06 Thread Neels Hofmeyr

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

OsmoSTP: update VTY reference

This is the first update since the libosmocore changes to the 'show
online-help' generated output. Hence the produced document now benefits from
the structural improvements:
- not repeating common commands for every node;
- using section names that match the VTY prompt.

Change-Id: I98cdfcb6c1c7db49ab106e775be92e4c6adeab17
---
M OsmoSTP/vty/osmo-stp_vty_reference.xml
1 file changed, 1,359 insertions(+), 1,742 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/35/7135/1

diff --git a/OsmoSTP/vty/osmo-stp_vty_reference.xml 
b/OsmoSTP/vty/osmo-stp_vty_reference.xml
index 9d25d44..4ab24f5 100644
--- a/OsmoSTP/vty/osmo-stp_vty_reference.xml
+++ b/OsmoSTP/vty/osmo-stp_vty_reference.xml
@@ -1,1742 +1,1359 @@
-
-  
-  
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-  
-
-
-  
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-  
-
-  
-  
-  
-  
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-  
-
-
-  
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-
-  
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-  
-
-
-  
-
-
-
-  
-
-
-  
-
-
-  
-
-
-  
-
-
-
-
-
-  
-
-

[PATCH] osmo-gsm-manuals[master]: OsmoGGSN: update vty reference

2018-03-06 Thread Neels Hofmeyr

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

OsmoGGSN: update vty reference

Add new (generic) logging commands, talloc context print commands.
Add the jitter buffer logging category.

Change-Id: Ifdc735df6221bf6e9b6247912f2958974dcfc4f2
---
M OsmoGGSN/vty/ggsn_vty_reference.xml
1 file changed, 174 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/31/7131/1

diff --git a/OsmoGGSN/vty/ggsn_vty_reference.xml 
b/OsmoGGSN/vty/ggsn_vty_reference.xml
index 76a55c1..7a43263 100644
--- a/OsmoGGSN/vty/ggsn_vty_reference.xml
+++ b/OsmoGGSN/vty/ggsn_vty_reference.xml
@@ -157,6 +157,34 @@
 
   
 
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
 
   
 
@@ -173,7 +201,7 @@
 
   
 
-
+
   
 
 
@@ -200,6 +228,7 @@
 
 
 
+
 
 
 
@@ -219,6 +248,43 @@
   
 
 
+  
+
+
+  
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
   
 
 
@@ -408,6 +474,34 @@
 
   
 
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
 
   
 
@@ -424,7 +518,7 @@
 
   
 
-
+
   
 
 
@@ -451,6 +545,7 @@
 
 
 
+
 
 
 
@@ -470,6 +565,43 @@
   
 
 
+  
+
+
+  
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+
+
+
   
 
 
@@ -816,14 +948,35 @@
 
   
 
-
+
   
 
-
-
+
+
+
+
   
 
-
+
+  
+
+
+
+
+
+  
+
+
+  
+
+
+
+
+
+
+  
+
+
   
 
 
@@ -850,6 +1003,7 @@
 
 
 
+
 
 
 
@@ -1188,6 +1342,20 @@
 
   
 
+
+  
+
+
+
+  
+
+
+  
+
+
+
+  
+
 
   
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdc735df6221bf6e9b6247912f2958974dcfc4f2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


[PATCH] osmo-sgsn[master]: vty: absorb command explanations from osmo-gsm-manuals

2018-03-06 Thread Neels Hofmeyr

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

vty: absorb command explanations from osmo-gsm-manuals

The osmo-gsm-manuals/vty/sgsn_vty_additions.xml contained many command
explanations that are redundant with the VTY online doc. Some however are more
verbose / easier to understand. Absorb these into the online VTY doc here.

This matches the removal in osmo-gsm-manuals change-id
I71863e5056ad369d2055e9882a52a00fa999ab04.

Change-Id: I35984014424412e91437b7ed71576aef3819cb1e
---
M src/gprs/sgsn_vty.c
1 file changed, 38 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/28/7128/1

diff --git a/src/gprs/sgsn_vty.c b/src/gprs/sgsn_vty.c
index c2c03b5..9d1d86d 100644
--- a/src/gprs/sgsn_vty.c
+++ b/src/gprs/sgsn_vty.c
@@ -301,7 +301,12 @@
 DEFUN(cfg_sgsn_bind_addr, cfg_sgsn_bind_addr_cmd,
"gtp local-ip A.B.C.D",
"GTP Parameters\n"
-   "Set the IP address for the local GTP bind\n"
+   "Set the IP address for the local GTP bind for the Gp interface 
(towards the GGSNs)."
+   " Note: in case you would like to run the GGSN on the same machine as 
the SGSN, you can not run"
+   " both on the same IP address, since both sides are specified to use 
the same GTP port numbers"
+   " (" OSMO_STRINGIFY_VAL(GTP1C_PORT) " and " 
OSMO_STRINGIFY_VAL(GTP1U_PORT) ")."
+   " For example, you could use 127.0.0.1 for the SGSN and 127.0.0.2 for 
the GGSN in such"
+   " situations.\n"
"IPv4 Address\n")
 {
inet_aton(argv[0], _cfg->gtp_listenaddr.sin_addr);
@@ -311,7 +316,9 @@
 
 DEFUN(cfg_ggsn_remote_ip, cfg_ggsn_remote_ip_cmd,
"ggsn <0-255> remote-ip A.B.C.D",
-   GGSN_STR "GGSN Number\n" IP_STR "IPv4 Address\n")
+   GGSN_STR "GGSN Number\n"
+   "Configure this static GGSN to use the specified remote IP address.\n"
+   "IPv4 Address\n")
 {
uint32_t id = atoi(argv[0]);
struct sgsn_ggsn_ctx *ggc = sgsn_ggsn_ctx_find_alloc(id);
@@ -351,7 +358,9 @@
 
 DEFUN(cfg_ggsn_dynamic_lookup, cfg_ggsn_dynamic_lookup_cmd,
"ggsn dynamic",
-   GGSN_STR "Enable dynamic GRX based look-up (requires restart)\n")
+   GGSN_STR
+   "Enable dynamic resolving of GGSNs based on DNS resolving the APN name 
like in a GRX-style setup."
+   " Changing this setting requires a restart.\n")
 {
sgsn->cfg.dynamic_lookup = 1;
return CMD_SUCCESS;
@@ -359,7 +368,8 @@
 
 DEFUN(cfg_grx_ggsn, cfg_grx_ggsn_cmd,
"grx-dns-add A.B.C.D",
-   "Add DNS server\nIPv4 address\n")
+   "Use the specified IP address for DNS-resolving the AP names to GGSN IP 
addresses\n"
+   "IPv4 address\n")
 {
struct ares_addr_node *node = talloc_zero(tall_bsc_ctx, struct 
ares_addr_node);
node->family = AF_INET;
@@ -401,7 +411,7 @@
 DEFUN(cfg_apn_ggsn, cfg_apn_ggsn_cmd,
"apn APNAME ggsn <0-255>",
APN_STR APN_GW_STR
-   "Select the GGSN to use when the APN gateway prefix matches\n"
+   "Select the GGSN to use for the given APN gateway prefix\n"
"The GGSN id")
 {
 
@@ -411,7 +421,8 @@
 DEFUN(cfg_apn_imsi_ggsn, cfg_apn_imsi_ggsn_cmd,
"apn APNAME imsi-prefix IMSIPRE ggsn <0-255>",
APN_STR APN_GW_STR
-   "Restrict rule to a certain IMSI prefix\n"
+   "Select the GGSN to use for the given APN gateway prefix if and only if 
the IMSI matches the"
+   " given prefix.\n"
"An IMSI prefix\n"
"Select the GGSN to use when APN gateway and IMSI prefix match\n"
"The GGSN id")
@@ -634,7 +645,8 @@
 
 DEFUN(cfg_auth_policy, cfg_auth_policy_cmd,
"auth-policy (accept-all|closed|acl-only|remote)",
-   "Autorization Policy of SGSN\n"
+   "Configure the Authorization policy of the SGSN. This setting 
determines which subscribers are"
+   " permitted to register to the network.\n"
"Accept all IMSIs (DANGEROUS)\n"
"Accept only home network subscribers or those in the ACL\n"
"Accept only subscribers in the ACL\n"
@@ -986,7 +998,8 @@
 DEFUN(cfg_gsup_remote_ip, cfg_gsup_remote_ip_cmd,
"gsup remote-ip A.B.C.D",
"GSUP Parameters\n"
-   "Set the IP address of the remote GSUP server\n"
+   "Set the IP address of the remote GSUP server (e.g. OsmoHLR)."
+   " This setting only applies if 'auth-policy remote' is used.\n"
"IPv4 Address\n")
 {
inet_aton(argv[0], _cfg->gsup_server_addr.sin_addr);
@@ -997,7 +1010,7 @@
 DEFUN(cfg_gsup_remote_port, cfg_gsup_remote_port_cmd,
"gsup remote-port <0-65535>",
"GSUP Parameters\n"
-   "Set the TCP port of the remote GSUP server\n"
+   "Set the TCP port of the remote GSUP server, see also 'gsup 
remote-ip'\n"
"Remote TCP port\n")
 {
g_cfg->gsup_server_port = atoi(argv[0]);
@@ -1008,7 +1021,9 @@
 DEFUN(cfg_gsup_oap_id, cfg_gsup_oap_id_cmd,
"gsup oap-id <0-65535>",
"GSUP Parameters\n"
-   "Set the SGSN's OAP client ID\nOAP client ID (0 == disabled)\n")
+

osmo-gsm-tester[master]: jenkins: update poky version 2.3.2

2018-03-06 Thread Pau Espin Pedrol

Patch Set 1: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If6e8a5702e4c9b24e758e3aa5f390e786c51c384
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-gsm-tester[master]: jenkins: use env POKY_VERSION POKY_PATH to find poky

2018-03-06 Thread Pau Espin Pedrol

Patch Set 2: Code-Review+2

(1 comment)

https://gerrit.osmocom.org/#/c/7124/1/contrib/jenkins-build-osmo-bts-sysmo.sh
File contrib/jenkins-build-osmo-bts-sysmo.sh:

Line 7: [ -z "$_poky_version" ] && _poky_version="1.5.4"
> both are not exported. So it's local to this file.
By local I mean as in "local" keyword for bash, but I'm not willing to discuss 
about this detail, it's fine.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1403b32cdf30420f3b02c41c2627b71fcbeae9ab
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: lynxis lazus 
Gerrit-HasComments: Yes


[PATCH] osmo-ci[master]: add ansible playbooks

2018-03-06 Thread lynxis lazus

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

add ansible playbooks

Introduce playbooks to do:
- setup-jenkins-slave - setup a usualy or special jenkins-slave
- setup-gsm-tester - setup the gsm-tester

Change-Id: I7007a4e6c38f73843390ec2b3b91133aff21e36a
---
A ansible/.gitignore
A ansible/files/README.md
A ansible/hosts
A ansible/roles/docker/README.md
A ansible/roles/docker/defaults/main.yml
A ansible/roles/docker/tasks/main.yml
A ansible/roles/gsm-tester-modems/README.md
A ansible/roles/gsm-tester-modems/tasks/main.yml
A ansible/roles/gsm-tester-network/README.md
A ansible/roles/gsm-tester-network/defaults/main.yml
A ansible/roles/gsm-tester-network/tasks/main.yml
A ansible/roles/gsm-tester-network/templates/interface.j2
A ansible/roles/gsm-tester/defaults/main.yml
A ansible/roles/gsm-tester/files/dbus_osmo-gsm-tester.conf
A ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_admin.sh
A ansible/roles/gsm-tester/files/osmo-gsm-tester_setcap_net_raw.sh
A ansible/roles/gsm-tester/tasks/main.yml
A ansible/roles/gsm-tester/templates/quad_modem_power_cycle.sh
A ansible/roles/install-coverity/README.md
A ansible/roles/install-coverity/defaults/main.yml
A ansible/roles/install-coverity/tasks/main.yml
A ansible/roles/install-poky-sdk/README.md
A ansible/roles/install-poky-sdk/defaults/main.yml
A ansible/roles/install-poky-sdk/tasks/main.yml
A ansible/roles/osmocom-jenkins-slave/README.md
A ansible/roles/osmocom-jenkins-slave/defaults/main.yml
A ansible/roles/osmocom-jenkins-slave/files/gitconfig
A ansible/roles/osmocom-jenkins-slave/files/jenkins.osmocom.org.pub
A ansible/roles/osmocom-jenkins-slave/tasks/debian.yml
A ansible/roles/osmocom-jenkins-slave/tasks/generic-slave.yml
A ansible/roles/osmocom-jenkins-slave/tasks/main.yml
A ansible/setup-gsm-tester.md
A ansible/setup-gsm-tester.yml
A ansible/setup-jenkins-slave.yml
34 files changed, 843 insertions(+), 0 deletions(-)


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

diff --git a/ansible/.gitignore b/ansible/.gitignore
new file mode 100644
index 000..2fa603c
--- /dev/null
+++ b/ansible/.gitignore
@@ -0,0 +1,5 @@
+poky-*
+cov-analysis-*.tar.gz
+*.retry
+*.swo
+*.swp
diff --git a/ansible/files/README.md b/ansible/files/README.md
new file mode 100644
index 000..c3c631d
--- /dev/null
+++ b/ansible/files/README.md
@@ -0,0 +1,23 @@
+Place 3rd party firmware/sdk files here.
+
+# role: gsm-tester-modems
+
+```
+./gobi
+./gobi/UQCN.mbn
+./gobi/amss.mbn
+./gobi/apps.mbn
+```
+
+# role: install-coverity
+
+The filename depends on the variable `coverity_version`.
+`coverity_version: 2017.07`
+
+E.g: `./cov-analysis-linux64-2017.07.tar.gz`
+
+# role: install-poky-sdk
+
+The filename depends on the variable `poky_installer_file`.
+
+`./poky-glibc-x86_64-meta-toolchain-osmo-armv5te-toolchain-osmo-2.3.2.sh`
diff --git a/ansible/hosts b/ansible/hosts
new file mode 100644
index 000..4f12cdf
--- /dev/null
+++ b/ansible/hosts
@@ -0,0 +1,11 @@
+[gsm-tester]
+# rnd
+10.9.25.101
+# production
+10.9.25.107
+
+[jenkins-slaves]
+# admin2-deb9build
+2a01:4f8:13b:828::1:300
+# admin2-deb8build
+2a01:4f8:13b:828::1:400
diff --git a/ansible/roles/docker/README.md b/ansible/roles/docker/README.md
new file mode 100644
index 000..878ddb5
--- /dev/null
+++ b/ansible/roles/docker/README.md
@@ -0,0 +1 @@
+# Install docker for debian
diff --git a/ansible/roles/docker/defaults/main.yml 
b/ansible/roles/docker/defaults/main.yml
new file mode 100644
index 000..2c03d90
--- /dev/null
+++ b/ansible/roles/docker/defaults/main.yml
@@ -0,0 +1,4 @@
+---
+
+# Adds this user to the group docker which is allowed to access docker
+jenkins_user: jenkins
diff --git a/ansible/roles/docker/tasks/main.yml 
b/ansible/roles/docker/tasks/main.yml
new file mode 100644
index 000..1603175
--- /dev/null
+++ b/ansible/roles/docker/tasks/main.yml
@@ -0,0 +1,28 @@
+---
+
+- name: add https support
+  apt:
+name: apt-transport-https
+cache_valid_time: 3600
+update_cache: yes
+
+- name: add docker gpg key to apt keyring
+  apt_key:
+id: 9DC858229FC7DD38854AE2D88D81803C0EBFCD88
+url: https://download.docker.com/linux/debian/gpg
+
+- apt_repository:
+repo: "deb https://download.docker.com/linux/debian {{ 
ansible_distribution_release }} stable"
+state: present
+update_cache: yes
+  when: ansible_distribution == "Debian"
+
+- name: install docker
+  apt:
+name: docker-ce
+
+- name: add jenkins to the docker group
+  user:
+name: "{{ jenkins_user }}"
+groups: docker
+append: yes
diff --git a/ansible/roles/gsm-tester-modems/README.md 
b/ansible/roles/gsm-tester-modems/README.md
new file mode 100644
index 000..9f5f29b
--- /dev/null
+++ b/ansible/roles/gsm-tester-modems/README.md
@@ -0,0 +1 @@
+# Install drivers for multiple modems or BTS's
diff --git a/ansible/roles/gsm-tester-modems/tasks/main.yml 
b/ansible/roles/gsm-tester-modems/tasks/main.yml
new file mode 100644
index 000..b766c73
--- /dev/null
+++ 

osmo-gsm-tester[master]: jenkins: use env POKY_VERSION POKY_PATH to find poky

2018-03-06 Thread lynxis lazus

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/7124/1/contrib/jenkins-build-osmo-bts-sysmo.sh
File contrib/jenkins-build-osmo-bts-sysmo.sh:

Line 7: [ -z "$_poky_version" ] && _poky_version="2.3.2"
> Using _ as prefix here looks at bit ugly, specially since this variables ar
both are not exported. So it's local to this file.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1403b32cdf30420f3b02c41c2627b71fcbeae9ab
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: lynxis lazus 
Gerrit-HasComments: Yes


[PATCH] osmo-gsm-tester[master]: jenkins: update poky version 2.3.2

2018-03-06 Thread lynxis lazus

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

jenkins: update poky version 2.3.2

The sysmobts 2017 releases are using poky 2.3.2

Change-Id: If6e8a5702e4c9b24e758e3aa5f390e786c51c384
---
M contrib/jenkins-build-osmo-bts-sysmo.sh
M contrib/jenkins-build-osmo-pcu-sysmo.sh
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh 
b/contrib/jenkins-build-osmo-bts-sysmo.sh
index 1a8876d..98f8249 100755
--- a/contrib/jenkins-build-osmo-bts-sysmo.sh
+++ b/contrib/jenkins-build-osmo-bts-sysmo.sh
@@ -4,7 +4,7 @@
 _poky_version="$POKY_VERSION"
 _poky_path="$POKY_PATH"
 
-[ -z "$_poky_version" ] && _poky_version="1.5.4"
+[ -z "$_poky_version" ] && _poky_version="2.3.2"
 [ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version"
 
 . "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi"
diff --git a/contrib/jenkins-build-osmo-pcu-sysmo.sh 
b/contrib/jenkins-build-osmo-pcu-sysmo.sh
index 2ed3426..4dc7704 100755
--- a/contrib/jenkins-build-osmo-pcu-sysmo.sh
+++ b/contrib/jenkins-build-osmo-pcu-sysmo.sh
@@ -4,7 +4,7 @@
 _poky_version="$POKY_VERSION"
 _poky_path="$POKY_PATH"
 
-[ -z "$_poky_version" ] && _poky_version="1.5.4"
+[ -z "$_poky_version" ] && _poky_version="2.3.2"
 [ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version"
 
 . "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If6e8a5702e4c9b24e758e3aa5f390e786c51c384
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 


[PATCH] osmo-gsm-tester[master]: jenkins: use env POKY_VERSION POKY_PATH to find poky

2018-03-06 Thread lynxis lazus

jenkins: use env POKY_VERSION POKY_PATH to find poky

Instead of hardcoded values, use defaults and allow jenkins to override
the defaults.

Change-Id: I1403b32cdf30420f3b02c41c2627b71fcbeae9ab
---
M contrib/jenkins-build-osmo-bts-sysmo.sh
M contrib/jenkins-build-osmo-pcu-sysmo.sh
2 files changed, 16 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-tester refs/changes/24/7124/2

diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh 
b/contrib/jenkins-build-osmo-bts-sysmo.sh
index 59ba85d..1a8876d 100755
--- a/contrib/jenkins-build-osmo-bts-sysmo.sh
+++ b/contrib/jenkins-build-osmo-bts-sysmo.sh
@@ -1,11 +1,16 @@
 #!/bin/sh
 set -e -x
 
-poky="/opt/poky/1.5.4"
-. "$poky/environment-setup-armv5te-poky-linux-gnueabi"
+_poky_version="$POKY_VERSION"
+_poky_path="$POKY_PATH"
+
+[ -z "$_poky_version" ] && _poky_version="1.5.4"
+[ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version"
+
+. "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi"
 
 # Cross-compilation: all installations need to be put in the sysmo SDK sysroot
-export DESTDIR="$poky/sysroots/armv5te-poky-linux-gnueabi"
+export DESTDIR="$_poky_path/sysroots/armv5te-poky-linux-gnueabi"
 
 base="$PWD"
 name="osmo-bts-sysmo"
diff --git a/contrib/jenkins-build-osmo-pcu-sysmo.sh 
b/contrib/jenkins-build-osmo-pcu-sysmo.sh
index 7cd1142..2ed3426 100755
--- a/contrib/jenkins-build-osmo-pcu-sysmo.sh
+++ b/contrib/jenkins-build-osmo-pcu-sysmo.sh
@@ -1,11 +1,16 @@
 #!/bin/sh
 set -e -x
 
-poky="/opt/poky/1.5.4"
-. "$poky/environment-setup-armv5te-poky-linux-gnueabi"
+_poky_version="$POKY_VERSION"
+_poky_path="$POKY_PATH"
+
+[ -z "$_poky_version" ] && _poky_version="1.5.4"
+[ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version"
+
+. "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi"
 
 # Cross-compilation: all installations need to be put in the sysmo SDK sysroot
-export DESTDIR="$poky/sysroots/armv5te-poky-linux-gnueabi"
+export DESTDIR="$_poky_path/sysroots/armv5te-poky-linux-gnueabi"
 
 base="$PWD"
 name="osmo-pcu-sysmo"

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I1403b32cdf30420f3b02c41c2627b71fcbeae9ab
Gerrit-PatchSet: 2
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Pau Espin Pedrol 


[PATCH] osmo-gsm-manuals[master]: INSTALL.txt: update VTY reference how-to to new osmo_interac...

2018-03-06 Thread Neels Hofmeyr

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

INSTALL.txt: update VTY reference how-to to new osmo_interact_vty.py

Change-Id: I5bf1fea83354049f4157ee9ac8b40f673597f908
---
M INSTALL.txt
1 file changed, 17 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/25/7125/1

diff --git a/INSTALL.txt b/INSTALL.txt
index c06248a..d250750 100644
--- a/INSTALL.txt
+++ b/INSTALL.txt
@@ -18,23 +18,24 @@
 or for a parallel build using more CPU cores:
   make -j 5
 
-To update the VTY reference for a given program, use osmodumpdoc.py, available
-from git.osmocom.org/python/osmo-python-tests -- for example, for osmo-msc:
+To update the VTY reference for a given program, use 'osmo_interact_vty.py -X',
+available from git.osmocom.org/python/osmo-python-tests:
 
   cd ~/osmo-python-tests
-  ./setup.py install
+  python3 setup.py install
 
-  cd ~/osmo-msc
-  mkdir build
-  cd build
-  ../configure --enable-smpp
-  make
-  osmodumpdoc.py -p ~/osmo-msc
+  osmo_interact_vty.py -X -p $VTY_PORT > vty/*_vty_reference.xml
 
-  cp doc/msc_vty_reference.xml ~/osmo-gsm-manuals/OsmoMSC/vty/
-  cd ~/osmo-gsm-manuals/OsmoMSC
-  git status
-  git diff
-  make
-  git commit -a -m "OsmoMSC: update VTY reference"
-  git push origin HEAD:refs/for/master/msc_vty
+Find the VTY port number at
+https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers
+
+For example, for osmo-msc, which has VTY port 4254:
+
+a) with an osmo-msc already running:
+
+  osmo_interact_vty.py -X -p 4254 > OsmoMSC/vty/msc_vty_reference.xml
+
+b) launching an osmo-msc along:
+
+  osmo_interact_vty.py -r "osmo-msc -c 
~/src/osmo-msc/doc/examples/osmo-msc/osmo-msc.cfg" \
+-X -p 4254 > OsmoMSC/vty/msc_vty_reference.xml

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5bf1fea83354049f4157ee9ac8b40f673597f908
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 


osmo-gsm-tester[master]: jenkins: use env POKY_VERSION POKY_PATH to find poky

2018-03-06 Thread Pau Espin Pedrol

Patch Set 1:

(1 comment)

https://gerrit.osmocom.org/#/c/7124/1/contrib/jenkins-build-osmo-bts-sysmo.sh
File contrib/jenkins-build-osmo-bts-sysmo.sh:

Line 7: [ -z "$_poky_version" ] && _poky_version="2.3.2"
Using _ as prefix here looks at bit ugly, specially since this variables are 
actually not local.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I1403b32cdf30420f3b02c41c2627b71fcbeae9ab
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: Yes


[PATCH] osmo-gsm-tester[master]: jenkins: use env POKY_VERSION POKY_PATH to find poky

2018-03-06 Thread lynxis lazus

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

jenkins: use env POKY_VERSION POKY_PATH to find poky

Instead of hardcoded values, use defaults and allow jenkins to override
the defaults.

Change-Id: I1403b32cdf30420f3b02c41c2627b71fcbeae9ab
---
M contrib/jenkins-build-osmo-bts-sysmo.sh
M contrib/jenkins-build-osmo-pcu-sysmo.sh
2 files changed, 16 insertions(+), 6 deletions(-)


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

diff --git a/contrib/jenkins-build-osmo-bts-sysmo.sh 
b/contrib/jenkins-build-osmo-bts-sysmo.sh
index 59ba85d..98f8249 100755
--- a/contrib/jenkins-build-osmo-bts-sysmo.sh
+++ b/contrib/jenkins-build-osmo-bts-sysmo.sh
@@ -1,11 +1,16 @@
 #!/bin/sh
 set -e -x
 
-poky="/opt/poky/1.5.4"
-. "$poky/environment-setup-armv5te-poky-linux-gnueabi"
+_poky_version="$POKY_VERSION"
+_poky_path="$POKY_PATH"
+
+[ -z "$_poky_version" ] && _poky_version="2.3.2"
+[ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version"
+
+. "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi"
 
 # Cross-compilation: all installations need to be put in the sysmo SDK sysroot
-export DESTDIR="$poky/sysroots/armv5te-poky-linux-gnueabi"
+export DESTDIR="$_poky_path/sysroots/armv5te-poky-linux-gnueabi"
 
 base="$PWD"
 name="osmo-bts-sysmo"
diff --git a/contrib/jenkins-build-osmo-pcu-sysmo.sh 
b/contrib/jenkins-build-osmo-pcu-sysmo.sh
index 7cd1142..4dc7704 100755
--- a/contrib/jenkins-build-osmo-pcu-sysmo.sh
+++ b/contrib/jenkins-build-osmo-pcu-sysmo.sh
@@ -1,11 +1,16 @@
 #!/bin/sh
 set -e -x
 
-poky="/opt/poky/1.5.4"
-. "$poky/environment-setup-armv5te-poky-linux-gnueabi"
+_poky_version="$POKY_VERSION"
+_poky_path="$POKY_PATH"
+
+[ -z "$_poky_version" ] && _poky_version="2.3.2"
+[ -z "$_poky_path" ] && _poky_path="/opt/poky/$_poky_version"
+
+. "$_poky_path/environment-setup-armv5te-poky-linux-gnueabi"
 
 # Cross-compilation: all installations need to be put in the sysmo SDK sysroot
-export DESTDIR="$poky/sysroots/armv5te-poky-linux-gnueabi"
+export DESTDIR="$_poky_path/sysroots/armv5te-poky-linux-gnueabi"
 
 base="$PWD"
 name="osmo-pcu-sysmo"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1403b32cdf30420f3b02c41c2627b71fcbeae9ab
Gerrit-PatchSet: 1
Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 


osmo-ci[master]: jenkins: add job osmo-gsm-tester_gerrit

2018-03-06 Thread Pau Espin Pedrol

Patch Set 5: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If661675528059bc8a95d39a6489a5a9381f52677
Gerrit-PatchSet: 5
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: lynxis lazus 
Gerrit-HasComments: No


osmo-ci[master]: jenkins: add osmo-gsm-tester_run-{prod,rnd}

2018-03-06 Thread Pau Espin Pedrol

Patch Set 4: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1c4babc547f48402b0bcfaf38e2734e87e565f0
Gerrit-PatchSet: 4
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: lynxis lazus 
Gerrit-HasComments: No


osmo-ci[master]: jenkins: add job osmo-gsm-tester_build-trigger-all

2018-03-06 Thread Pau Espin Pedrol

Patch Set 3: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8dcf2a6fa2991cb73b4807f8a10d251f3dca77dd
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


Build failure of network:osmocom:nightly/openbsc in Debian_9.0/armv7l

2018-03-06 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/armv7l

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/armv7l

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  446s] | configure:12820: result: yes
[  446s] | configure:12826: checking for LIBOSMOABIS
[  446s] | configure:12833: $PKG_CONFIG --exists --print-errors "libosmoabis >= 
0.2.0"
[  446s] | configure:12836: $? = 0
[  446s] | configure:12850: $PKG_CONFIG --exists --print-errors "libosmoabis >= 
0.2.0"
[  446s] | configure:12853: $? = 0
[  446s] | configure:12911: result: yes
[  446s] | configure:12917: checking for LIBOSMOGB
[  446s] | configure:12924: $PKG_CONFIG --exists --print-errors "libosmogb >= 
0.6.4"
[  446s] | configure:12927: $? = 0
[  446s] | configure:12941: $PKG_CONFIG --exists --print-errors "libosmogb >= 
0.6.4"
[  446s] | configure:12944: $? = 0
[  446s] | configure:13002: result: yes
[  447s] | configure:13008: checking for LIBOSMONETIF
[  447s] | configure:13015: $PKG_CONFIG --exists --print-errors "libosmo-netif 
>= 0.0.1"
[  447s] | configure:13018: $? = 0
[  447s] | configure:13032: $PKG_CONFIG --exists --print-errors "libosmo-netif 
>= 0.0.1"
[  447s] | configure:13035: $? = 0
[  447s] | configure:13093: result: yes
[  447s] | configure:13099: checking for LIBCRYPTO
[  447s] | configure:13106: $PKG_CONFIG --exists --print-errors "libcrypto >= 
0.9.5"
[  447s] | configure:13109: $? = 0
[  449s] | configure:13123: $PKG_CONFIG --exists --pr[  409.403751] sysrq: 
SysRq : Power Off
[  449s] [  409.406199] reboot: Power down
[  449s] qemu-system-arm: Failed to unlink socket 
/var/cache/obs/worker/root_2/root.monitor: Permission denied
[  449s] ### VM INTERACTION END ###
[  449s] 
[  449s] armbuild15 failed "build openbsc_1.0.0.20180305.dsc" at Tue Mar  6 
11:56:53 UTC 2018.
[  449s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.04/i586

2018-03-06 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.04/i586

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.04/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  201s] | #define HAVE_INTTYPES_H 1
[  201s] | #define HAVE_STDINT_H 1
[  201s] | #define HAVE_UNISTD_H 1
[  201s] | #define HAVE_DLFCN_H 1
[  201s] | #define LT_OBJDIR ".libs/"
[  201s] | #define BUILD_SMPP 1
[  201s] | #define STDC_HEADERS 1
[  201s] | #define HAVE_DBI_DBD_H 1
[  201s] | #define HAVE_PCAP_PCAP_H 1
[  201s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  201s] | 
[  201s] | configure: exit 0
[  201s] 
[  201s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  201s] make[1]: *** [override_dh_auto_test] Error 1
[  201s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  201s] debian/rules:13: recipe for target 'build' failed
[  201s] make: *** [build] Error 2
[  201s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  201s] 
[  201s] cloud125 failed "build openbsc_1.0.0.20180305.dsc" at Tue Mar  6 
11:41:20 UTC 2018.
[  201s] 
[  201s] ### VM INTERACTION START ###
[  204s] [  184.887876] reboot: Power down
[  207s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_1/root.monitor: Permission denied
[  207s] ### VM INTERACTION END ###
[  207s] 
[  207s] cloud125 failed "build openbsc_1.0.0.20180305.dsc" at Tue Mar  6 
11:41:27 UTC 2018.
[  207s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/openbsc in xUbuntu_17.10/x86_64

2018-03-06 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_17.10/x86_64

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_17.10/x86_64

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  220s] -
[  220s] -Testing nanobts_attr_nscv_get()...
[  220s] -result=  2d0b0500020362
[  220s] -expected=2d0b0500020362
[  220s] -ok.
[  220s] -
[  220s] -Done
[  220s] +backtrace() returned 4 addresses
[  220s] 
+/usr/src/packages/BUILD/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test(+0x3a7f)
 [0x55bcd8d4da7f]
[  220s] +/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf1) 
[0x7f77f8d951c1]
[  220s] 
+/usr/src/packages/BUILD/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test(+0x3b0a)
 [0x55bcd8d4db0a]
[  220s] ./testsuite.at:104: exit code was 134, expected 0
[  220s] 15. testsuite.at:101: 15. nanobts_omlattr (testsuite.at:101): FAILED 
(testsuite.at:104)
[  220s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  220s] make[1]: *** [override_dh_auto_test] Error 1
[  220s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  220s] debian/rules:13: recipe for target 'build' failed
[  220s] make: *** [build] Error 2
[  220s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  220s] 
[  220s] cloud116 failed "build openbsc_1.0.0.20180305.dsc" at Tue Mar  6 
11:42:03 UTC 2018.
[  220s] 
[  220s] ### VM INTERACTION START ###
[  223s] [  206.527292] reboot: Power down
[  224s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_2/root.monitor: Permission denied
[  224s] ### VM INTERACTION END ###
[  224s] 
[  224s] cloud116 failed "build openbsc_1.0.0.20180305.dsc" at Tue Mar  6 
11:42:09 UTC 2018.
[  224s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/openbsc in Debian_9.0/aarch64

2018-03-06 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/aarch64

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/aarch64

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  252s] -expected=9f00020065a2000859d80a0901655a3c
[  252s] -ok.
[  252s] -
[  252s] -Testing nanobts_attr_nscv_get()...
[  252s] -result=  2d0b0500020362
[  252s] -expected=2d0b0500020362
[  252s] -ok.
[  252s] -
[  252s] -Done
[  252s] +backtrace() returned 1 addresses
[  252s] ./testsuite.at:104: exit code was 134, expected 0
[  252s] 15. testsuite.at:101: 15. nanobts_omlattr (testsuite.at:101): FAILED 
(testsuite.at:104)
[  252s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  252s] make[1]: *** [override_dh_auto_test] Error 1
[  252s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  252s] debian/rules:13: recipe for target 'build' failed
[  252s] make: *** [build] Error 2
[  252s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  252s] 
[  252s] obs-arm-5 failed "build openbsc_1.0.0.20180305.dsc" at Tue Mar  6 
11:42:27 UTC 2018.
[  252s] 
[  252s] ### VM INTERACTION START ###
[  256s] [  233.228130] sysrq: SysRq : Power Off
[  256s] [  233.236814] reboot: Power down
[  256s] qemu-system-aarch64: Failed to unlink socket 
/var/cache/obs/worker/root_24/root.monitor: Permission denied
[  256s] ### VM INTERACTION END ###
[  256s] 
[  256s] obs-arm-5 failed "build openbsc_1.0.0.20180305.dsc" at Tue Mar  6 
11:42:31 UTC 2018.
[  256s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/openbsc in xUbuntu_16.10/i586

2018-03-06 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/xUbuntu_16.10/i586

Package network:osmocom:nightly/openbsc failed to build in xUbuntu_16.10/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  205s] -
[  205s] -Testing nanobts_attr_nscv_get()...
[  205s] -result=  2d0b0500020362
[  205s] -expected=2d0b0500020362
[  205s] -ok.
[  205s] -
[  205s] -Done
[  205s] +backtrace() returned 4 addresses
[  205s] 
+/usr/src/packages/BUILD/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test(main+0x892)
 [0x565d25e2]
[  205s] +/lib/i386-linux-gnu/libc.so.6(__libc_start_main+0xf6) [0xf757b276]
[  205s] 
+/usr/src/packages/BUILD/openbsc/tests/nanobts_omlattr/nanobts_omlattr_test(+0x2686)
 [0x565d2686]
[  205s] ./testsuite.at:104: exit code was 134, expected 0
[  205s] 15. testsuite.at:101: 15. nanobts_omlattr (testsuite.at:101): FAILED 
(testsuite.at:104)
[  205s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  205s] make[1]: *** [override_dh_auto_test] Error 1
[  205s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  205s] debian/rules:13: recipe for target 'build' failed
[  205s] make: *** [build] Error 2
[  205s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  205s] 
[  205s] cloud130 failed "build openbsc_1.0.0.20180305.dsc" at Tue Mar  6 
11:41:20 UTC 2018.
[  205s] 
[  205s] ### VM INTERACTION START ###
[  208s] [  192.182134] reboot: Power down
[  210s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_1/root.monitor: Permission denied
[  210s] ### VM INTERACTION END ###
[  210s] 
[  210s] cloud130 failed "build openbsc_1.0.0.20180305.dsc" at Tue Mar  6 
11:41:26 UTC 2018.
[  210s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


Build failure of network:osmocom:nightly/openbsc in Debian_9.0/i586

2018-03-06 Thread OBS Notification
Visit 
https://build.opensuse.org/package/live_build_log/network:osmocom:nightly/openbsc/Debian_9.0/i586

Package network:osmocom:nightly/openbsc failed to build in Debian_9.0/i586

Check out the package for editing:
  osc checkout network:osmocom:nightly openbsc

Last lines of build log:
[  215s] | #define HAVE_DBI_DBD_H 1
[  215s] | #define HAVE_PCAP_PCAP_H 1
[  215s] | #define HAVE_TM_GMTOFF_IN_TM 1
[  215s] | 
[  215s] | configure: exit 0
[  215s] 
[  215s] debian/rules:32: recipe for target 'override_dh_auto_test' failed
[  215s] make[1]: *** [override_dh_auto_test] Error 1
[  215s] make[1]: Leaving directory '/usr/src/packages/BUILD'
[  215s] debian/rules:13: recipe for target 'build' failed
[  215s] make: *** [build] Error 2
[  215s] dpkg-buildpackage: error: debian/rules build gave error exit status 2
[  215s] 
[  215s] cloud129 failed "build openbsc_1.0.0.20180305.dsc" at Tue Mar  6 
11:41:25 UTC 2018.
[  215s] 
[  215s] ### VM INTERACTION START ###
[  215s] [  197.268132] serial8250: too much work for irq4
[  215s] [  197.456102] serial8250: too much work for irq4
[  215s] [  197.588164] serial8250: too much work for irq4
[  215s] [  197.720239] serial8250: too much work for irq4
[  215s] [  197.852217] serial8250: too much work for irq4
[  215s] [  197.984214] serial8250: too much work for irq4
[  215s] [  198.116215] serial8250: too much work for irq4
[  218s] [  200.858061] reboot: Power down
[  219s] qemu-system-x86_64: Failed to unlink socket 
/var/cache/obs/worker/root_1/root.monitor: Permission denied
[  219s] ### VM INTERACTION END ###
[  219s] 
[  219s] cloud129 failed "build openbsc_1.0.0.20180305.dsc" at Tue Mar  6 
11:41:29 UTC 2018.
[  219s] 

-- 
Configure notifications at https://build.opensuse.org/user/notifications
openSUSE Build Service (https://build.opensuse.org/)


[PATCH] osmo-ci[master]: jenkins: add osmo-gsm-tester_run-{prod,rnd}

2018-03-06 Thread lynxis lazus
Hello Pau Espin Pedrol,

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

https://gerrit.osmocom.org/7021

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

jenkins: add osmo-gsm-tester_run-{prod,rnd}

Both jobs doing the actual test run on the prod or rnd tester.

Change-Id: Ic1c4babc547f48402b0bcfaf38e2734e87e565f0
---
M jobs/osmo-gsm-tester.yml
A jobs/osmo-gsm-tester_run-prod.sh
A jobs/osmo-gsm-tester_run-rnd.sh
3 files changed, 138 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/21/7021/4

diff --git a/jobs/osmo-gsm-tester.yml b/jobs/osmo-gsm-tester.yml
index e10dc23..7d6d7f9 100644
--- a/jobs/osmo-gsm-tester.yml
+++ b/jobs/osmo-gsm-tester.yml
@@ -1,6 +1,5 @@
 ---
 #TODO:
-#  - run
 #  - gerrit
 #  - manual-run
 #
@@ -111,3 +110,109 @@
   # hopefully the trigger will support lists in the future
   - trigger:
   project: 
'osmo-gsm-tester_build-osmo-bsc,osmo-gsm-tester_build-osmo-bts,osmo-gsm-tester_build-osmo-ggsn,osmo-gsm-tester_build-osmo-hlr,osmo-gsm-tester_build-osmo-mgw,osmo-gsm-tester_build-osmo-msc,osmo-gsm-tester_build-osmo-pcu,osmo-gsm-tester_build-osmo-sgsn,osmo-gsm-tester_build-osmo-trx,osmo-gsm-tester_build-osmo-nitb,osmo-gsm-tester_build-osmo-stp,osmo-gsm-tester_build-osmo-bts-sysmo,osmo-gsm-tester_build-osmo-pcu-sysmo'
+
+## run jobs
+- project:
+name: osmo-gsm-testers-runner
+stage:
+  - prod
+  - rnd
+jobs:
+  - 'osmo-gsm-tester_run-{stage}'
+
+- builder:
+name: osmo_gsm_copy_artifact
+builders:
+  - copyartifact:
+  project: '{repo}'
+  filter: '*.tgz, *.md5'
+  which-build: last-successful
+  stable: true
+
+# all artifact in one place
+- builder:
+name: osmo_gsm_copy_artifact_all
+builders:
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-bsc
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-bts
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-ggsn
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-hlr
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-mgw
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-msc
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-pcu
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-sgsn
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-trx
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-nitb
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-stp
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-bts-sysmo
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-pcu-sysmo
+
+- defaults:
+name: runner
+description: 'Run an actual GSM hardware test using the binaries from the 
osmo-gsm-tester_build* jobs'
+node: 'osmo-gsm-tester-prod'
+project-type: freestyle
+properties:
+  - build-discarder:
+  num-to-keep: 60
+parameters:
+  - string:
+  name: "OSMO_GSM_TESTER_BRANCH"
+  default: "origin/master"
+  description: "Which branch/sha should be used for testing"
+  - string:
+  name: "OSMO_GSM_TESTER_OPTS"
+  default: ""
+  description: "pass additional command line options to 
osmo-gsm-tester.py, e.g. to select specific suites:scenarios. Default: leave 
empty."
+
+- job-template:
+name: 'osmo-gsm-tester_run-{stage}'
+defaults: runner
+node: 'osmo-gsm-tester-{stage}'
+triggers:
+  - timed: "H H/2 * * *"
+  - pollscm:
+  cron: "H/5 * * * *"
+  - reverse:
+jobs:
+- osmo-gsm-tester_build-osmo-bsc
+- osmo-gsm-tester_build-osmo-bts
+- osmo-gsm-tester_build-osmo-ggsn
+- osmo-gsm-tester_build-osmo-hlr
+- osmo-gsm-tester_build-osmo-mgw
+- osmo-gsm-tester_build-osmo-msc
+- osmo-gsm-tester_build-osmo-pcu
+- osmo-gsm-tester_build-osmo-sgsn
+- osmo-gsm-tester_build-osmo-trx
+- osmo-gsm-tester_build-osmo-nitb
+- osmo-gsm-tester_build-osmo-stp
+- osmo-gsm-tester_build-osmo-bts-sysmo
+- osmo-gsm-tester_build-osmo-pcu-sysmo
+builders:
+  - osmo_gsm_copy_artifact_all
+  - shell: !include-raw osmo-gsm-tester_run-{stage}.sh
+publishers:
+  - archive:
+  artifacts: '*-run.tgz, *-bin.tgz'
+  default-excludes: false
+  - junit:
+  results: 'trial-*/last_run/trial-*.xml'
+  allow-empty-results: true
+  - email:
+  recipients: 'pes...@sysmocom.de'
+  notify-every-unstable-build: true
+scm:
+  - 'osmo-gsm-tester-repo'
diff --git a/jobs/osmo-gsm-tester_run-prod.sh b/jobs/osmo-gsm-tester_run-prod.sh
new file 

[PATCH] osmo-ci[master]: jenkins: add osmo-gsm-tester_run-{prod,rnd}

2018-03-06 Thread lynxis lazus
Hello Pau Espin Pedrol,

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

https://gerrit.osmocom.org/7021

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

jenkins: add osmo-gsm-tester_run-{prod,rnd}

Both jobs doing the actual test run on the prod or rnd tester.

Change-Id: Ic1c4babc547f48402b0bcfaf38e2734e87e565f0
---
M jobs/osmo-gsm-tester.yml
A jobs/osmo-gsm-tester_run-prod.sh
A jobs/osmo-gsm-tester_run-rnd.sh
3 files changed, 138 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/21/7021/3

diff --git a/jobs/osmo-gsm-tester.yml b/jobs/osmo-gsm-tester.yml
index e10dc23..42c2f83 100644
--- a/jobs/osmo-gsm-tester.yml
+++ b/jobs/osmo-gsm-tester.yml
@@ -1,6 +1,5 @@
 ---
 #TODO:
-#  - run
 #  - gerrit
 #  - manual-run
 #
@@ -111,3 +110,109 @@
   # hopefully the trigger will support lists in the future
   - trigger:
   project: 
'osmo-gsm-tester_build-osmo-bsc,osmo-gsm-tester_build-osmo-bts,osmo-gsm-tester_build-osmo-ggsn,osmo-gsm-tester_build-osmo-hlr,osmo-gsm-tester_build-osmo-mgw,osmo-gsm-tester_build-osmo-msc,osmo-gsm-tester_build-osmo-pcu,osmo-gsm-tester_build-osmo-sgsn,osmo-gsm-tester_build-osmo-trx,osmo-gsm-tester_build-osmo-nitb,osmo-gsm-tester_build-osmo-stp,osmo-gsm-tester_build-osmo-bts-sysmo,osmo-gsm-tester_build-osmo-pcu-sysmo'
+
+## run jobs
+- project:
+name: osmo-gsm-testers-runner
+stage:
+  - prod
+  - rnd:
+  node: 'osmo-gsm-tester-rnd'
+jobs:
+  - 'osmo-gsm-tester_run-{stage}'
+
+- builder:
+name: osmo_gsm_copy_artifact
+builders:
+  - copyartifact:
+  project: '{repo}'
+  filter: '*.tgz, *.md5'
+  which-build: last-successful
+  stable: true
+
+# all artifact in one place
+- builder:
+name: osmo_gsm_copy_artifact_all
+builders:
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-bsc
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-bts
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-ggsn
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-hlr
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-mgw
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-msc
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-pcu
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-sgsn
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-trx
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-nitb
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-stp
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-bts-sysmo
+  - osmo_gsm_copy_artifact:
+ repo: osmo-gsm-tester_build-osmo-pcu-sysmo
+
+- defaults:
+name: runner
+description: 'Run an actual GSM hardware test using the binaries from the 
osmo-gsm-tester_build* jobs'
+node: 'osmo-gsm-tester-prod'
+project-type: freestyle
+properties:
+  - build-discarder:
+  num-to-keep: 60
+parameters:
+  - string:
+  name: "OSMO_GSM_TESTER_BRANCH"
+  default: "origin/master"
+  description: "Which branch/sha should be used for testing"
+  - string:
+  name: "OSMO_GSM_TESTER_OPTS"
+  default: ""
+  description: "pass additional command line options to 
osmo-gsm-tester.py, e.g. to select specific suites:scenarios. Default: leave 
empty."
+
+- job-template:
+name: 'osmo-gsm-tester_run-{stage}'
+defaults: runner
+triggers:
+  - timed: "H H/2 * * *"
+  - pollscm:
+  cron: "H/5 * * * *"
+  - reverse:
+jobs:
+- osmo-gsm-tester_build-osmo-bsc
+- osmo-gsm-tester_build-osmo-bts
+- osmo-gsm-tester_build-osmo-ggsn
+- osmo-gsm-tester_build-osmo-hlr
+- osmo-gsm-tester_build-osmo-mgw
+- osmo-gsm-tester_build-osmo-msc
+- osmo-gsm-tester_build-osmo-pcu
+- osmo-gsm-tester_build-osmo-sgsn
+- osmo-gsm-tester_build-osmo-trx
+- osmo-gsm-tester_build-osmo-nitb
+- osmo-gsm-tester_build-osmo-stp
+- osmo-gsm-tester_build-osmo-bts-sysmo
+- osmo-gsm-tester_build-osmo-pcu-sysmo
+builders:
+  - osmo_gsm_copy_artifact_all
+  - shell: !include-raw osmo-gsm-tester_run-{stage}.sh
+publishers:
+  - archive:
+  artifacts: '*-run.tgz, *-bin.tgz'
+  default-excludes: false
+  - junit:
+  results: 'trial-*/last_run/trial-*.xml'
+  allow-empty-results: true
+  - email:
+  recipients: 'pes...@sysmocom.de'
+  notify-every-unstable-build: true
+scm:
+  - 'osmo-gsm-tester-repo'
diff --git a/jobs/osmo-gsm-tester_run-prod.sh b/jobs/osmo-gsm-tester_run-prod.sh
new 

[PATCH] osmo-ci[master]: jenkins: add job osmo-gsm-tester_gerrit

2018-03-06 Thread lynxis lazus
Hello Pau Espin Pedrol,

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

https://gerrit.osmocom.org/7022

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

jenkins: add job osmo-gsm-tester_gerrit

The job verifies the gerrit patchset.

Change-Id: If661675528059bc8a95d39a6489a5a9381f52677
---
M jobs/osmo-gsm-tester.yml
A jobs/osmo-gsm-tester_gerrit.sh
2 files changed, 63 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/22/7022/4

diff --git a/jobs/osmo-gsm-tester.yml b/jobs/osmo-gsm-tester.yml
index 42c2f83..7db05c0 100644
--- a/jobs/osmo-gsm-tester.yml
+++ b/jobs/osmo-gsm-tester.yml
@@ -1,6 +1,5 @@
 ---
 #TODO:
-#  - gerrit
 #  - manual-run
 #
 - project:
@@ -99,6 +98,19 @@
   wipe-workspace: false
   skip-tag: true
   basedir: osmo-gsm-tester
+- scm:
+name: osmo-gsm-tester-gerrit
+scm:
+  - git:
+  url: ssh://jenk...@gerrit.osmocom.org:29418/osmo-gsm-tester
+  credentials-id: jenkins
+  branches:
+- $GERRIT_BRANCH
+  wipe-workspace: false
+  skip-tag: true
+  basedir: osmo-gsm-tester
+  clean:  true
+  choosing-strategy: 'gerrit'
 
 ## trigger build job
 - job:
@@ -120,6 +132,7 @@
   node: 'osmo-gsm-tester-rnd'
 jobs:
   - 'osmo-gsm-tester_run-{stage}'
+  - 'osmo-gsm-tester_gerrit'
 
 - builder:
 name: osmo_gsm_copy_artifact
@@ -179,6 +192,36 @@
   default: ""
   description: "pass additional command line options to 
osmo-gsm-tester.py, e.g. to select specific suites:scenarios. Default: leave 
empty."
 
+- job:
+name: 'osmo-gsm-tester_gerrit'
+defaults: runner
+triggers:
+  - gerrit:
+  server-name: 'gerrit.osmocom.org'
+  trigger-on:
+- patchset-created-event:
+exclude-no-code-change: true
+- draft-published-event
+  projects:
+- project-compare-type: 'PLAIN'
+  project-pattern: 'osmo-gsm-tester'
+  branches:
+- branch-compare-type: 'ANT'
+  branch-pattern: '**'
+builders:
+  - shell: |
+  # make sure no bin artifacts from a previous run remain
+  rm -f *.tgz *.md5
+  - osmo_gsm_copy_artifact_all
+  - shell: !include-raw osmo-gsm-tester_gerrit.sh
+publishers:
+  - archive:
+  artifacts: '*-run.tgz, *-bin.tgz'
+  default-excludes: false
+  - junit:
+  results: 'trial-*/last_run/trial-*.xml'
+  allow-empty-results: true
+
 - job-template:
 name: 'osmo-gsm-tester_run-{stage}'
 defaults: runner
diff --git a/jobs/osmo-gsm-tester_gerrit.sh b/jobs/osmo-gsm-tester_gerrit.sh
new file mode 100644
index 000..b07207f
--- /dev/null
+++ b/jobs/osmo-gsm-tester_gerrit.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+set -e -x
+
+# On our hardware, we actually use the example configuration as-is.
+export OSMO_GSM_TESTER_CONF="$PWD/osmo-gsm-tester/example"
+
+# debug: provoke a failure
+#export OSMO_GSM_TESTER_OPTS="-s debug -t fail"
+
+# TMP fix: prod main unit has sierra_2 and _3 instead of _1 and _2
+sed -i 
"s#/sys/devices/pci:00/:00:12.2/usb1/1-1/1-1.3#/sys/devices/pci:00/:00:12.2/usb1/1-1/1-1.7/1-1.7.3#g"
 "$OSMO_GSM_TESTER_CONF/resources.conf"
+sed -i 
"s#/sys/devices/pci:00/:00:12.2/usb1/1-1/1-1.2#/sys/devices/pci:00/:00:12.2/usb1/1-1/1-1.7/1-1.7.2#g"
 "$OSMO_GSM_TESTER_CONF/resources.conf"
+sed -i "s#90170009031#90170015252#g" 
"$OSMO_GSM_TESTER_CONF/resources.conf"
+sed -i "s#90170009029#90170015253#g" 
"$OSMO_GSM_TESTER_CONF/resources.conf"
+sed -i "s#80A37E6FDEA931EAC92FFA5F671EFEAD#EBAB63D06C3F546A16C977CB40E57C68#g" 
"$OSMO_GSM_TESTER_CONF/resources.conf"
+sed -i "s#00969E283349D354A8239E877F2E0866#EBD2B5F6CF3374106D0A66C11F922001#g" 
"$OSMO_GSM_TESTER_CONF/resources.conf"
+
+export OSMO_GSM_TESTER_OPTS="-s sms:sysmo -s aoip_sms:sysmo -s gprs:sysmo"
+./osmo-gsm-tester/contrib/jenkins-make-check-and-run.sh

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: If661675528059bc8a95d39a6489a5a9381f52677
Gerrit-PatchSet: 4
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: lynxis lazus 


[PATCH] osmo-ci[master]: jenkins: add job osmo-gsm-tester_build-trigger-all

2018-03-06 Thread lynxis lazus
Hello Pau Espin Pedrol,

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

https://gerrit.osmocom.org/7020

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

jenkins: add job osmo-gsm-tester_build-trigger-all

osmo-gsm-tester_build-trigger-all triggers a new build of all
osmo-gsm-tester build jobs.

Change-Id: I8dcf2a6fa2991cb73b4807f8a10d251f3dca77dd
---
M jobs/osmo-gsm-tester.yml
1 file changed, 12 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-ci refs/changes/20/7020/3

diff --git a/jobs/osmo-gsm-tester.yml b/jobs/osmo-gsm-tester.yml
index 85523d0..e10dc23 100644
--- a/jobs/osmo-gsm-tester.yml
+++ b/jobs/osmo-gsm-tester.yml
@@ -1,7 +1,6 @@
 ---
 #TODO:
 #  - run
-#  - trigger
 #  - gerrit
 #  - manual-run
 #
@@ -30,6 +29,7 @@
 
 jobs:
   - 'osmo-gsm-tester_build-{repo}'
+  - 'osmo-gsm-tester_build-trigger-all'
 
 - parameter:
 name: gsmtester_build_branch
@@ -100,3 +100,14 @@
   wipe-workspace: false
   skip-tag: true
   basedir: osmo-gsm-tester
+
+## trigger build job
+- job:
+name: 'osmo-gsm-tester_build-trigger-all'
+description: 'Manually kick off all osmo-gsm-tester_build-osmo-* builds at 
once.'
+project-type: freestyle
+node: osmo-gsm-tester-build
+publishers:
+  # hopefully the trigger will support lists in the future
+  - trigger:
+  project: 
'osmo-gsm-tester_build-osmo-bsc,osmo-gsm-tester_build-osmo-bts,osmo-gsm-tester_build-osmo-ggsn,osmo-gsm-tester_build-osmo-hlr,osmo-gsm-tester_build-osmo-mgw,osmo-gsm-tester_build-osmo-msc,osmo-gsm-tester_build-osmo-pcu,osmo-gsm-tester_build-osmo-sgsn,osmo-gsm-tester_build-osmo-trx,osmo-gsm-tester_build-osmo-nitb,osmo-gsm-tester_build-osmo-stp,osmo-gsm-tester_build-osmo-bts-sysmo,osmo-gsm-tester_build-osmo-pcu-sysmo'

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

Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I8dcf2a6fa2991cb73b4807f8a10d251f3dca77dd
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Pau Espin Pedrol 


osmo-ci[master]: jenkins: add job osmo-gsm-tester_gerrit

2018-03-06 Thread Pau Espin Pedrol

Patch Set 3: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: If661675528059bc8a95d39a6489a5a9381f52677
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: lynxis lazus 
Gerrit-HasComments: No


osmo-ci[master]: jenkins: add osmo-gsm-tester_run-{prod,rnd}

2018-03-06 Thread Pau Espin Pedrol

Patch Set 2: Code-Review-1

(1 comment)

https://gerrit.osmocom.org/#/c/7021/2/jobs/osmo-gsm-tester.yml
File jobs/osmo-gsm-tester.yml:

Line 105: name: osmo-gsm-tester-repo-clean
As discussed, I think we can drop this one completely.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic1c4babc547f48402b0bcfaf38e2734e87e565f0
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-Reviewer: lynxis lazus 
Gerrit-HasComments: Yes


osmo-ci[master]: jenkins: add osmo-gsm-tester-build jobs

2018-03-06 Thread Pau Espin Pedrol

Patch Set 3: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic49c94e9e6639e43f6ae14b868bc826af3ce2085
Gerrit-PatchSet: 3
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-ci[master]: jenkins: add job osmo-gsm-tester_build-trigger-all

2018-03-06 Thread Pau Espin Pedrol

Patch Set 2: Code-Review+1

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8dcf2a6fa2991cb73b4807f8a10d251f3dca77dd
Gerrit-PatchSet: 2
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Owner: lynxis lazus 
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


[PATCH] osmo-bsc[master]: libbsc/bsc_vty.c: prevent uninitialized access

2018-03-06 Thread Vadim Yanitskiy

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

libbsc/bsc_vty.c: prevent uninitialized access

If an out of range 'Last Valid Block' value for 'smscb-command'
is passed, a 'last_block' of the 'rsl_ie_cb_cmd_type' struct
could be uninitialized. Let's prevent this.

Found using Clang Static Analyzer.

Change-Id: I57635f2f482ff476ab697b1b9e872ce90aafb999
---
M src/libbsc/bsc_vty.c
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/23/7123/1

diff --git a/src/libbsc/bsc_vty.c b/src/libbsc/bsc_vty.c
index 3dac29e..47bc514 100644
--- a/src/libbsc/bsc_vty.c
+++ b/src/libbsc/bsc_vty.c
@@ -4258,6 +4258,9 @@
case 4:
cb_cmd.last_block = RSL_CB_CMD_LASTBLOCK_4;
break;
+   default:
+   vty_out(vty, "Error parsing LASTBLOCK%s", VTY_NEWLINE);
+   return CMD_WARNING;
}
 
rsl_sms_cb_command(bts, RSL_CHAN_SDCCH4_ACCH, cb_cmd, buf, rc);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57635f2f482ff476ab697b1b9e872ce90aafb999
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy 


libasn1c[master]: configure: add --enable-werror

2018-03-06 Thread Pau Espin Pedrol

Patch Set 1: Code-Review-1

I think using:
CFLAGS="..." ./configure
instead of 
./configure CFLAGS="..."

should fix the overwritting issue.

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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibcc8238584a585434b39a046cd2d7e18ddaf7f8c
Gerrit-PatchSet: 1
Gerrit-Project: libasn1c
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Pau Espin Pedrol 
Gerrit-HasComments: No


osmo-bsc[master]: implement support for 3-digit MNC with leading zeros

2018-03-06 Thread Neels Hofmeyr

Patch Set 11: Code-Review+2

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e722103344186fde118b26d8353db95a4581daa
Gerrit-PatchSet: 11
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: No


[PATCH] osmo-bsc[master]: implement support for 3-digit MNC with leading zeros

2018-03-06 Thread Neels Hofmeyr
Hello Harald Welte, Jenkins Builder,

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

https://gerrit.osmocom.org/6668

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

implement support for 3-digit MNC with leading zeros

Add 3-digit flags and use the new RAI and LAI API from libosmocore throughout
the code base to be able to handle an MNC < 100 that has three digits (leading
zeros).

The changes to abis_test and gsm0408_test show that this code now handles
3-digit MNC correctly, by not dropping the leading zero as 0xf in the encoded
PLMN.

Re-implement CTRL commands 'mcc', 'mnc' and 'mcc-mnc-apply' to preserve the
presence of the third digit of the MNC. Always reply with all leading zeros.
Adjust the expected results in ctrl_test_runner.py, to show that it works.

In VTY and CTRL, the parsing of MCC and MNC is inherently made stricter by use
of osmo_{mcc,mnc}_from_str() -- they will no longer allow surplus characters
and detect errno returned by strtol() (in contrast to atoi()).

Depends: Id2240f7f518494c9df6c8bda52c0d5092f90f221 (libosmocore),
 Ib7176b1d65a03b76f41f94bc9d3293a8a07d24c6 (libosmocore),
 I020a4f11791c61742a3d795f782805f7b7e8733e (libosmocore)
Change-Id: I8e722103344186fde118b26d8353db95a4581daa
---
M include/osmocom/bsc/bsc_msc_data.h
M include/osmocom/bsc/gsm_data.h
M src/libbsc/bsc_ctrl_commands.c
M src/libbsc/bsc_init.c
M src/libbsc/bsc_vty.c
M src/libbsc/gsm_data.c
M src/libbsc/net_init.c
M src/libbsc/pcu_sock.c
M src/libbsc/system_information.c
M src/osmo-bsc/osmo_bsc_api.c
M src/osmo-bsc/osmo_bsc_bssap.c
M src/osmo-bsc/osmo_bsc_ctrl.c
M src/osmo-bsc/osmo_bsc_filter.c
M src/osmo-bsc/osmo_bsc_msc.c
M src/osmo-bsc/osmo_bsc_vty.c
M tests/abis/abis_test.c
M tests/abis/abis_test.ok
M tests/bssap/bssap_test.err
M tests/ctrl_test_runner.py
M tests/gsm0408/gsm0408_test.c
M tests/gsm0408/gsm0408_test.ok
M tests/nanobts_omlattr/nanobts_omlattr_test.c
22 files changed, 225 insertions(+), 171 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/68/6668/11

diff --git a/include/osmocom/bsc/bsc_msc_data.h 
b/include/osmocom/bsc/bsc_msc_data.h
index a3e0106..a04e632 100644
--- a/include/osmocom/bsc/bsc_msc_data.h
+++ b/include/osmocom/bsc/bsc_msc_data.h
@@ -39,6 +39,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -78,8 +79,7 @@
struct osmo_timer_list pong_timer;
int advanced_ping;
struct bsc_msc_connection *msc_con;
-   int core_mnc;
-   int core_mcc;
+   struct osmo_plmn_id core_plmn;
int core_lac;
int core_ci;
int rtp_base;
diff --git a/include/osmocom/bsc/gsm_data.h b/include/osmocom/bsc/gsm_data.h
index 8692469..27aa261 100644
--- a/include/osmocom/bsc/gsm_data.h
+++ b/include/osmocom/bsc/gsm_data.h
@@ -13,6 +13,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -1197,9 +1198,8 @@
 * these have in common, like country and network code, put in yet
 * separate structs and placed as members in osmo_bsc and osmo_msc. */
 
-   /* global parameters */
-   uint16_t country_code;
-   uint16_t network_code;
+   struct osmo_plmn_id plmn;
+
/* bit-mask of permitted encryption algorithms. LSB=A5/0, MSB=A5/7 */
uint8_t a5_encryption_mask;
int neci;
@@ -1275,6 +1275,16 @@
} mgw;
 };
 
+static inline const struct osmo_location_area_id *bts_lai(struct gsm_bts *bts)
+{
+   static struct osmo_location_area_id lai;
+   lai = (struct osmo_location_area_id){
+   .plmn = bts->network->plmn,
+   .lac = bts->location_area_code,
+   };
+   return 
+}
+
 extern void talloc_ctx_init(void *ctx_root);
 
 int gsm_set_bts_type(struct gsm_bts *bts, enum gsm_bts_type type);
diff --git a/src/libbsc/bsc_ctrl_commands.c b/src/libbsc/bsc_ctrl_commands.c
index 41d2361..64f4589 100644
--- a/src/libbsc/bsc_ctrl_commands.c
+++ b/src/libbsc/bsc_ctrl_commands.c
@@ -22,6 +22,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -30,8 +31,61 @@
 #include 
 #include 
 
-CTRL_CMD_DEFINE_RANGE(net_mnc, "mnc", struct gsm_network, network_code, 0, 
999);
-CTRL_CMD_DEFINE_RANGE(net_mcc, "mcc", struct gsm_network, country_code, 1, 
999);
+CTRL_CMD_DEFINE(net_mcc, "mcc");
+static int get_net_mcc(struct ctrl_cmd *cmd, void *_data)
+{
+   struct gsm_network *net = cmd->node;
+   cmd->reply = talloc_asprintf(cmd, "%s", osmo_mcc_name(net->plmn.mcc));
+   if (!cmd->reply) {
+   cmd->reply = "OOM";
+   return CTRL_CMD_ERROR;
+   }
+   return CTRL_CMD_REPLY;
+}
+static int set_net_mcc(struct ctrl_cmd *cmd, void *_data)
+{
+   struct gsm_network *net = cmd->node;
+   uint16_t mcc;
+   if (osmo_mcc_from_str(cmd->value, ))
+   return -1;
+   net->plmn.mcc = mcc;
+   return get_net_mcc(cmd, _data);
+}
+static int verify_net_mcc(struct ctrl_cmd *cmd, const char *value, void *_data)
+{
+   if (osmo_mcc_from_str(value, NULL))
+   

osmo-bsc[master]: implement support for 3-digit MNC with leading zeros

2018-03-06 Thread Neels Hofmeyr

Patch Set 10:

(1 comment)

https://gerrit.osmocom.org/#/c/6668/10/include/osmocom/bsc/gsm_data.h
File include/osmocom/bsc/gsm_data.h:

PS10, Line 1280: ;
   :lai = (struct osmo_location_area_id)
> weird, makes me wonder "what was my motivation"
NOW I remember: the lai is static. If I init on the static definition, I fear 
that it will not be updated in each function call but only once. Maybe it 
doesn't even work to init statics with function args.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e722103344186fde118b26d8353db95a4581daa
Gerrit-PatchSet: 10
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


osmo-bsc[master]: implement support for 3-digit MNC with leading zeros

2018-03-06 Thread Neels Hofmeyr

Patch Set 10:

(2 comments)

https://gerrit.osmocom.org/#/c/6668/10/include/osmocom/bsc/gsm_data.h
File include/osmocom/bsc/gsm_data.h:

PS10, Line 1280: ;
   :lai = (struct osmo_location_area_id)
> why not simply have the '=' one line above, no typecast and no need to rest
weird, makes me wonder "what was my motivation"


https://gerrit.osmocom.org/#/c/6668/10/src/osmo-bsc/osmo_bsc_vty.c
File src/osmo-bsc/osmo_bsc_vty.c:

Line 242:   
> whitespace, not critical
vim has a way of removing these obsolete tabs, but for some reason it doesn't 
always work. That in combination with my external patch colorizer .. I should 
teach it to also mark whitespace errors.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e722103344186fde118b26d8353db95a4581daa
Gerrit-PatchSet: 10
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr 
Gerrit-Reviewer: Harald Welte 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: Neels Hofmeyr 
Gerrit-HasComments: Yes


[PATCH] osmo-bts[master]: common/vty.c: remove unused variables

2018-03-06 Thread Vadim Yanitskiy

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

common/vty.c: remove unused variables

Change-Id: I289dda64228e81ca4c608121e50146a71e19f1e2
---
M src/common/vty.c
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/src/common/vty.c b/src/common/vty.c
index 5c5ac6e..f3f846b 100644
--- a/src/common/vty.c
+++ b/src/common/vty.c
@@ -632,7 +632,6 @@
"Report the TOA in 1/256th symbol periods\n")
 {
struct gsm_bts *bts = vty->index;
-   struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
 
bts->supp_meas_toa256 = true;
return CMD_SUCCESS;
@@ -644,7 +643,6 @@
"Report the TOA in 1/256th symbol periods\n")
 {
struct gsm_bts *bts = vty->index;
-   struct gsm_bts_role_bts *btsb = bts_role_bts(bts);
 
bts->supp_meas_toa256 = false;
return CMD_SUCCESS;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I289dda64228e81ca4c608121e50146a71e19f1e2
Gerrit-PatchSet: 1
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Owner: Vadim Yanitskiy