Change in ...osmo-remsim[master]: add contrib/remsim-apitool.py to control the REST-interface of osmo-r...

2019-07-26 Thread roh
roh has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-remsim/+/14968


Change subject: add contrib/remsim-apitool.py to control the REST-interface of 
osmo-remsim-server
..

add contrib/remsim-apitool.py to control the REST-interface of 
osmo-remsim-server

Change-Id: Ia01b0a89e21af18b898becd8f5440c32936772b7
---
M Makefile.am
A contrib/remsim-apitool.py
2 files changed, 114 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/68/14968/1

diff --git a/Makefile.am b/Makefile.am
index 4843641..0ff9363 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5,7 +5,7 @@
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libosmo-rspro.pc

-EXTRA_DIST = asn1 .version README.md
+EXTRA_DIST = asn1 .version README.md contrib/remsim-apitool.py

 pkgcofigdir = $(libdir)/pkgconfig

diff --git a/contrib/remsim-apitool.py b/contrib/remsim-apitool.py
new file mode 100755
index 000..8f8f29f
--- /dev/null
+++ b/contrib/remsim-apitool.py
@@ -0,0 +1,113 @@
+#!/usr/bin/env python3
+
+import sys
+import argparse
+import requests
+
+version = "0.1"
+
+#access rest
+def build_url(suffix):
+BASE_PATH = "/api/backend/v1"
+return ("http://; + server_host + ":" + server_port + BASE_PATH + suffix)
+
+def rest_get(suffix):
+if verbose:
+print("GET "+ build_url(suffix))
+resp = requests.get(build_url(suffix))
+if resp.ok:
+try:
+js = resp.json()
+print("%s: %s" % (suffix, js))
+except:
+return
+else:
+return None
+
+def rest_post(suffix, js = None):
+if verbose:
+print("POST "+ build_url(suffix)+ str(js))
+resp = requests.post(build_url(suffix), json=js)
+if not resp.ok:
+print("post failed")
+
+def rest_delete(suffix):
+if verbose:
+print("DELETE "+ build_url(suffix))
+resp = requests.delete(build_url(suffix))
+if not resp.ok:
+print("delete failed")
+
+#rest calls
+def slotmap_create(bank_id, bank_slot, client_id, client_slot):
+js = {
+'bank': {'bankId': bank_id, 'slotNr': bank_slot},
+'client': {'clientId': client_id, 'slotNr': client_slot},
+}
+return rest_post('/slotmaps', js)
+
+def slotmap_delete(bank_id, bank_slot):
+slotmap_id = bank_id * 65536 + bank_slot
+return rest_delete("/slotmaps/%u"%slotmap_id)
+
+def reset_global():
+return rest_post('/global-reset')
+
+def main(argv):
+global server_port, server_host, verbose
+
+parser = argparse.ArgumentParser()
+parser.add_argument("-H", "--host",help="host to connect to",  
  default="127.0.0.1")
+parser.add_argument("-p", "--port",help="port to connect to",  
  default="9997")
+parser.add_argument("-v", "--verbose", help="increase output verbosity", 
action="count", default=0)
+group = parser.add_mutually_exclusive_group()
+group.add_argument("-r", "--reset",help="remove all mappings  (POST 
/global-reset)", action="store_true")
+group.add_argument("-c", "--clients",  help="show clients (GET 
/clients)",nargs='?',const="all",default=None)
+group.add_argument("-b", "--banks",help="show banks   (GET 
/banks)",nargs='?',const="all",default=None)
+group.add_argument("-s", "--slotmaps", help="show slotmaps(GET 
/slotmaps)",nargs='?',const="all",default=None)
+group.add_argument("-m", "--map",  help="create new slotmapping   
(POST /slotmaps)",nargs=4,metavar=('bank_id', 
'bank_slot','client_id','client_slot'))
+group.add_argument("-d", "--delete",   help="delete slotmapping   
(DELETE /slotmaps/:id)", type=int, nargs=2, metavar=('bank_id','bank_slot'))
+group.add_argument("-a", "--all",  help="show all (default if no 
argument given)", action="store_true")
+
+args = parser.parse_args()
+if args.verbose:
+print("verbosity = ", args.verbose)
+
+server_host = args.host
+server_port = args.port
+verbose = args.verbose
+
+if args.reset:
+reset_global()
+return
+if args.clients:
+if args.clients == "all":
+rest_get("/clients")
+else:
+rest_get("/clients/" + str(args.clients))
+return
+if args.banks:
+if args.banks == "all":
+rest_get("/banks")
+else:
+rest_get("/banks/" + str(args.banks))
+return
+if args.slotmaps:
+if args.slotmaps == "all":
+rest_get("/slotmaps")
+else:
+rest_get("/slotmaps/" + str(args.slotmaps))
+return
+if args.map:
+slotmap_create(args.map[0],args.map[1],args.map[2],args.map[3])
+return
+if args.delete:
+slotmap_delete(args.delete[0],args.delete[1])
+return
+rest_get("/clients")
+rest_get("/banks")
+rest_get("/slotmaps")
+
+if __name__ == "__main__":
+ 

Change in ...osmo-sgsn[master]: osmo-gbproxy.cfg: don't conflict with osmo-sgsn.cfg

2019-07-26 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/14957


Change subject: osmo-gbproxy.cfg: don't conflict with osmo-sgsn.cfg
..

osmo-gbproxy.cfg: don't conflict with osmo-sgsn.cfg

Listen on 127.0.0.100 by default, so there is no conflict on
127.0.0.1:23000. This allows starting both services with their default
configuration, like we are doing it in theOsmocom-Debian-install-*
jenkins jobs.

Related: OS#3369
Change-Id: I6e3053de8885a7954296d820c6a069d06276e4df
---
M doc/examples/osmo-gbproxy/osmo-gbproxy.cfg
1 file changed, 1 insertion(+), 0 deletions(-)



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

diff --git a/doc/examples/osmo-gbproxy/osmo-gbproxy.cfg 
b/doc/examples/osmo-gbproxy/osmo-gbproxy.cfg
index 0c3917a..29f698f 100644
--- a/doc/examples/osmo-gbproxy/osmo-gbproxy.cfg
+++ b/doc/examples/osmo-gbproxy/osmo-gbproxy.cfg
@@ -22,4 +22,5 @@
  timer tns-alive-retries 10
  encapsulation framerelay-gre enabled 0
  encapsulation framerelay-gre local-ip 0.0.0.0
+ encapsulation udp local-ip 127.0.0.100
  encapsulation udp local-port 23000

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/14957
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I6e3053de8885a7954296d820c6a069d06276e4df
Gerrit-Change-Number: 14957
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


Change in ...docker-playground[master]: debian-repo-install-test: systemctl status -n 200

2019-07-26 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14958 )

Change subject: debian-repo-install-test: systemctl status -n 200
..


Patch Set 1: Verified+1


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/14958
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ic72dbf1b4c59a259139187b98e74211d57534dc2
Gerrit-Change-Number: 14958
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 26 Jul 2019 06:56:06 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ci[master]: jobs: upload to OBS before debian-install test

2019-07-26 Thread osmith
osmith has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/14959 )

Change subject: jobs: upload to OBS before debian-install test
..


Patch Set 1: Verified+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/14959
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I503058018172d50e9585d4804dfec1b4ece7644a
Gerrit-Change-Number: 14959
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 26 Jul 2019 06:56:25 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ci[master]: jobs: upload to OBS before debian-install test

2019-07-26 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/14959


Change subject: jobs: upload to OBS before debian-install test
..

jobs: upload to OBS before debian-install test

Make sure that we don't test yesterday's packages. Adjust timers to run
the OBS job around 1 o'clock, and the debian-install test around 4
o'clock. Use the H (hash) symbol for minute to spread the load.

Change-Id: I503058018172d50e9585d4804dfec1b4ece7644a
---
M jobs/osmocom-debian-install.yml
M jobs/osmocom-obs.yml
2 files changed, 2 insertions(+), 2 deletions(-)



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

diff --git a/jobs/osmocom-debian-install.yml b/jobs/osmocom-debian-install.yml
index 1f6c62a..26b7fa0 100644
--- a/jobs/osmocom-debian-install.yml
+++ b/jobs/osmocom-debian-install.yml
@@ -35,7 +35,7 @@
   git-config-name: 'Jenkins Builder'
   git-config-email: 'jenk...@osmocom.org'
 triggers:
-  - timed: "@midnight"
+  - timed: "H 04 * * *" # run after osmocom-obs.yml
 publishers:
   - email:
   notify-every-unstable-build: true
diff --git a/jobs/osmocom-obs.yml b/jobs/osmocom-obs.yml
index 023ab0c..fe03f86 100644
--- a/jobs/osmocom-obs.yml
+++ b/jobs/osmocom-obs.yml
@@ -35,7 +35,7 @@
   git-config-name: 'Jenkins Builder'
   git-config-email: 'jenk...@osmocom.org'
 triggers:
-  - timed: "@midnight"
+  - timed: "H 01 * * *" # run before osmocom-debian-install.yml

 publishers:
   - email:

--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/14959
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I503058018172d50e9585d4804dfec1b4ece7644a
Gerrit-Change-Number: 14959
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


Change in ...docker-playground[master]: debian-repo-install-test: systemctl status -n 200

2019-07-26 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14958


Change subject: debian-repo-install-test: systemctl status -n 200
..

debian-repo-install-test: systemctl status -n 200

Show up to 200 log lines instead of the default (10).

Related: OS#3369
Change-Id: Ic72dbf1b4c59a259139187b98e74211d57534dc2
---
M debian-repo-install-test/testdata/repo-install-test.sh
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground 
refs/changes/58/14958/1

diff --git a/debian-repo-install-test/testdata/repo-install-test.sh 
b/debian-repo-install-test/testdata/repo-install-test.sh
index 338fe8d..4fae488 100755
--- a/debian-repo-install-test/testdata/repo-install-test.sh
+++ b/debian-repo-install-test/testdata/repo-install-test.sh
@@ -123,7 +123,7 @@
sleep 2

for service in $services_feed; do
-   if ! systemctl --no-pager -l status $service; then
+   if ! systemctl --no-pager -l -n 200 status $service; then
failed="$failed $service"
fi
done

--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/14958
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ic72dbf1b4c59a259139187b98e74211d57534dc2
Gerrit-Change-Number: 14958
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


Change in ...osmo-sgsn[master]: osmo-gbproxy.cfg: fix conflict with osmo-sgsn.cfg

2019-07-26 Thread osmith
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-sgsn/+/14957

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

Change subject: osmo-gbproxy.cfg: fix conflict with osmo-sgsn.cfg
..

osmo-gbproxy.cfg: fix conflict with osmo-sgsn.cfg

Listen on 127.0.0.100 by default, so there is no conflict on
127.0.0.1:23000. This allows starting both services with their default
configuration, like we are doing it in the Osmocom-Debian-install-*
jenkins jobs.

Related: OS#3369
Change-Id: I6e3053de8885a7954296d820c6a069d06276e4df
---
M doc/examples/osmo-gbproxy/osmo-gbproxy.cfg
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-sgsn refs/changes/57/14957/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/14957
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I6e3053de8885a7954296d820c6a069d06276e4df
Gerrit-Change-Number: 14957
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in ...osmo-ttcn3-hacks[master]: pcu: add osmo-pcu.cfg

2019-07-26 Thread osmith
osmith has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14960


Change subject: pcu: add osmo-pcu.cfg
..

pcu: add osmo-pcu.cfg

Copy from docker-playground.git, change IP to 127.0.0.1, log to stderr
and adjust pcu-socket patch.

Change-Id: Iff3e5e6cf0c608680c8c5f9f83e8bc1032274ea9
---
A pcu/osmo-pcu.cfg
1 file changed, 22 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/60/14960/1

diff --git a/pcu/osmo-pcu.cfg b/pcu/osmo-pcu.cfg
new file mode 100644
index 000..d6213b5
--- /dev/null
+++ b/pcu/osmo-pcu.cfg
@@ -0,0 +1,22 @@
+log gsmtap 127.0.0.1
+ logging level set-all debug
+
+log stderr
+ logging filter all 1
+ logging print level 1
+ logging print category 1
+ logging print category-hex 0
+ logging print file basename last
+ logging print extended-timestamp 1
+ logging level set-all debug
+
+line vty
+ no login
+ bind 127.0.0.1
+pcu
+ flow-control-interval 10
+ cs 2
+ alloc-algorithm dynamic
+ alpha 0
+ gamma 0
+ pcu-socket /tmp/pcu_bts

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14960
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iff3e5e6cf0c608680c8c5f9f83e8bc1032274ea9
Gerrit-Change-Number: 14960
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-MessageType: newchange


Change in ...osmo-ci[master]: jobs: upload to OBS before debian-install test

2019-07-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ci/+/14959 )

Change subject: jobs: upload to OBS before debian-install test
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/14959
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I503058018172d50e9585d4804dfec1b4ece7644a
Gerrit-Change-Number: 14959
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 26 Jul 2019 09:11:24 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...docker-playground[master]: debian-repo-install-test: systemctl status -n 200

2019-07-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/docker-playground/+/14958 )

Change subject: debian-repo-install-test: systemctl status -n 200
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/docker-playground/+/14958
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: Ic72dbf1b4c59a259139187b98e74211d57534dc2
Gerrit-Change-Number: 14958
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: osmith 
Gerrit-Comment-Date: Fri, 26 Jul 2019 09:11:03 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: osmo-gbproxy.cfg: fix conflict with osmo-sgsn.cfg

2019-07-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/14957 )

Change subject: osmo-gbproxy.cfg: fix conflict with osmo-sgsn.cfg
..


Patch Set 2: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/14957
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I6e3053de8885a7954296d820c6a069d06276e4df
Gerrit-Change-Number: 14957
Gerrit-PatchSet: 2
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 26 Jul 2019 09:12:04 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: pcu: add osmo-pcu.cfg

2019-07-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14960 )

Change subject: pcu: add osmo-pcu.cfg
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14960
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Iff3e5e6cf0c608680c8c5f9f83e8bc1032274ea9
Gerrit-Change-Number: 14960
Gerrit-PatchSet: 1
Gerrit-Owner: osmith 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 26 Jul 2019 09:15:13 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: BTS_Tests.ttcn: fix: use reasonable minimum default for C/I

2019-07-26 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14961


Change subject: BTS_Tests.ttcn: fix: use reasonable minimum default for C/I
..

BTS_Tests.ttcn: fix: use reasonable minimum default for C/I

Since [1] we additionally filter Access Bursts by the link quality
(defined by C/I) in L1SAP, and since [2] we do provide the actual
C/I values for osmo-bts-trx, as was received from the transceiver.

[1] https://gerrit.osmocom.org/r/I893ec9c6c2ebad71ea68b2dc5f9f5094dfc43b78
[2] https://gerrit.osmocom.org/r/I8d86dec7ebc039cbfd038c4342ff328b11281865

The default minimum C/I for Access Bursts in OsmoBTS is 50 cB,
while the TTCN-3 test cases configure fake_trx.py to send 0 cB,
so all Access Bursts are getting dropped, as expected.

Let's use 60 cB (or 6 dB) by default. This change makes Access
Bursts pass again, and thus fixes some broken test cases.

Change-Id: Ic345f7995c2553e346590cd851f8857d26e7beb2
---
M bts/BTS_Tests.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-ttcn3-hacks 
refs/changes/61/14961/1

diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index ebe74c0..d3fb958 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -422,8 +422,8 @@
/* Start with a default moderate timing offset equalling TA=2, 
and RSSI=-60 */
ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, 
valueof(ts_TRXC_FAKE_TIMING(2*256)));
ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, 
valueof(ts_TRXC_FAKE_RSSI(-60)));
-   /* FIXME: OsmoBTS may have different AB / NB threshold (see 
MIN_QUAL_NORM, MIN_QUAL_RACH) */
-   ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, 
valueof(ts_TRXC_FAKE_CI(0)));
+   /* OsmoBTS may have different AB / NB threshold (see 
MIN_QUAL_NORM, MIN_QUAL_RACH) */
+   ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, 
valueof(ts_TRXC_FAKE_CI(60)));
}

/* Wait some extra time to make sure the BTS emits a stable carrier.

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14961
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic345f7995c2553e346590cd851f8857d26e7beb2
Gerrit-Change-Number: 14961
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmo-ttcn3-hacks[master]: BTS_Tests.ttcn: fix: use reasonable minimum default for C/I

2019-07-26 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14961 )

Change subject: BTS_Tests.ttcn: fix: use reasonable minimum default for C/I
..


Patch Set 1: Verified+1

Makes broken TTCN-3 test cases green.


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14961
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic345f7995c2553e346590cd851f8857d26e7beb2
Gerrit-Change-Number: 14961
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 26 Jul 2019 09:34:16 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bsc[master]: rest_octets: add Serving Cell Priority Parameters

2019-07-26 Thread dexter
Hello laforge, Jenkins Builder, Hoernchen,

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

https://gerrit.osmocom.org/c/osmo-bsc/+/14678

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

Change subject: rest_octets: add Serving Cell Priority Parameters
..

rest_octets: add Serving Cell Priority Parameters

When we add an EARFCN to to the SI2quater struct we do not add Serving
Cell Priority Parameters. This essentially causes to MS to ignore the
EARFCN because it is still undefined under which conditions the MS
should change to LTE.

Related: SYS#4510
Change-Id: I7eaf7de4386fe8aea404e8a187d8a1f5ed596ead
---
M src/osmo-bsc/rest_octets.c
1 file changed, 19 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/14678/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14678
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7eaf7de4386fe8aea404e8a187d8a1f5ed596ead
Gerrit-Change-Number: 14678
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: newpatchset


Change in ...osmo-ttcn3-hacks[master]: BTS_Tests.ttcn: fix: use reasonable minimum default for C/I

2019-07-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14961 )

Change subject: BTS_Tests.ttcn: fix: use reasonable minimum default for C/I
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14961
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic345f7995c2553e346590cd851f8857d26e7beb2
Gerrit-Change-Number: 14961
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 26 Jul 2019 09:49:48 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-bsc[master]: rest_octets: add Serving Cell Priority Parameters

2019-07-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/14678 )

Change subject: rest_octets: add Serving Cell Priority Parameters
..


Patch Set 2: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14678
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7eaf7de4386fe8aea404e8a187d8a1f5ed596ead
Gerrit-Change-Number: 14678
Gerrit-PatchSet: 2
Gerrit-Owner: dexter 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 26 Jul 2019 09:50:41 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-ttcn3-hacks[master]: BTS_Tests.ttcn: fix: use reasonable minimum default for C/I

2019-07-26 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14961 )

Change subject: BTS_Tests.ttcn: fix: use reasonable minimum default for C/I
..

BTS_Tests.ttcn: fix: use reasonable minimum default for C/I

Since [1] we additionally filter Access Bursts by the link quality
(defined by C/I) in L1SAP, and since [2] we do provide the actual
C/I values for osmo-bts-trx, as was received from the transceiver.

[1] https://gerrit.osmocom.org/r/I893ec9c6c2ebad71ea68b2dc5f9f5094dfc43b78
[2] https://gerrit.osmocom.org/r/I8d86dec7ebc039cbfd038c4342ff328b11281865

The default minimum C/I for Access Bursts in OsmoBTS is 50 cB,
while the TTCN-3 test cases configure fake_trx.py to send 0 cB,
so all Access Bursts are getting dropped, as expected.

Let's use 60 cB (or 6 dB) by default. This change makes Access
Bursts pass again, and thus fixes some broken test cases.

Change-Id: Ic345f7995c2553e346590cd851f8857d26e7beb2
---
M bts/BTS_Tests.ttcn
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified
  fixeria: Verified



diff --git a/bts/BTS_Tests.ttcn b/bts/BTS_Tests.ttcn
index ebe74c0..d3fb958 100644
--- a/bts/BTS_Tests.ttcn
+++ b/bts/BTS_Tests.ttcn
@@ -422,8 +422,8 @@
/* Start with a default moderate timing offset equalling TA=2, 
and RSSI=-60 */
ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, 
valueof(ts_TRXC_FAKE_TIMING(2*256)));
ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, 
valueof(ts_TRXC_FAKE_RSSI(-60)));
-   /* FIXME: OsmoBTS may have different AB / NB threshold (see 
MIN_QUAL_NORM, MIN_QUAL_RACH) */
-   ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, 
valueof(ts_TRXC_FAKE_CI(0)));
+   /* OsmoBTS may have different AB / NB threshold (see 
MIN_QUAL_NORM, MIN_QUAL_RACH) */
+   ret := f_TRXC_transceive(BTS_TRXC, g_bts_trxc_conn_id, 
valueof(ts_TRXC_FAKE_CI(60)));
}

/* Wait some extra time to make sure the BTS emits a stable carrier.

--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14961
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: Ic345f7995c2553e346590cd851f8857d26e7beb2
Gerrit-Change-Number: 14961
Gerrit-PatchSet: 2
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-sgsn[master]: Add/fix help string for version option

2019-07-26 Thread daniel
daniel has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/14962


Change subject: Add/fix help string for version option
..

Add/fix help string for version option

osmo-sgsn was missing the help text of the -V option
gb_proxy still thought of itself as OpenBSC
Omit the name of the program in the help text to avoid such issues in
the future.

Related: OS#1720
Change-Id: Ib57694b6bff7c98a269dc4b4dbb7173349a57b81
---
M src/gprs/gb_proxy_main.c
M src/gprs/gtphub_main.c
M src/gprs/sgsn_main.c
3 files changed, 3 insertions(+), 2 deletions(-)



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

diff --git a/src/gprs/gb_proxy_main.c b/src/gprs/gb_proxy_main.c
index 19fbbba..1e1aeac 100644
--- a/src/gprs/gb_proxy_main.c
+++ b/src/gprs/gb_proxy_main.c
@@ -140,7 +140,7 @@
printf("  -c --config-file filename The config file to use [%s]\n", 
CONFIG_FILE_DEFAULT);
printf("  -s --disable-color\n");
printf("  -T --timestamp Prefix every log line with a timestamp\n");
-   printf("  -V --version. Print the version of OpenBSC.\n");
+   printf("  -V --version. Print the version.\n");
printf("  -e --log-level number. Set a global loglevel.\n");
 }

diff --git a/src/gprs/gtphub_main.c b/src/gprs/gtphub_main.c
index 585a3cb..6d470bd 100644
--- a/src/gprs/gtphub_main.c
+++ b/src/gprs/gtphub_main.c
@@ -238,7 +238,7 @@
printf("  -e,--log-level   Set a global log level.\n");
printf("  -r,--restart-file  File for counting restarts [%s].\n",
   ccfg->restart_counter_file);
-   printf("  -V,--version Print the version number.\n");
+   printf("  -V,--version Print the version.\n");
 }

 static void list_categories(void)
diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c
index f12270d..3543517 100644
--- a/src/gprs/sgsn_main.c
+++ b/src/gprs/sgsn_main.c
@@ -209,6 +209,7 @@
 {
printf("Some useful help...\n");
printf("  -h --help\tthis text\n");
+   printf("  -V --version\tPrint the version\n");
printf("  -D --daemonize\tFork the process into a background daemon\n");
printf("  -d option --debug\tenable Debugging\n");
printf("  -s --disable-color\n");

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/14962
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ib57694b6bff7c98a269dc4b4dbb7173349a57b81
Gerrit-Change-Number: 14962
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-MessageType: newchange


Change in ...osmo-sgsn[master]: osmo-sgsn: Fix outdated information in usermanual

2019-07-26 Thread daniel
daniel has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/14963


Change subject: osmo-sgsn: Fix outdated information in usermanual
..

osmo-sgsn: Fix outdated information in usermanual

Quite a few features that are listed as not-implemented in the overview
section are actually implemented now.

Change-Id: I8d499a25293b69babc2aebb2d697438f8ba8141f
Related: OS#1720
---
M doc/manuals/chapters/overview.adoc
M doc/manuals/chapters/running.adoc
2 files changed, 9 insertions(+), 18 deletions(-)



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

diff --git a/doc/manuals/chapters/overview.adoc 
b/doc/manuals/chapters/overview.adoc
index abc7496..e2c0107 100644
--- a/doc/manuals/chapters/overview.adoc
+++ b/doc/manuals/chapters/overview.adoc
@@ -74,14 +74,13 @@
 non-acknowledged mode, as this is the most common use case in real-world
 GPRS networks.

-Furthermore, it does not support IP header nor payload compression at
-this point.  Addition of those features is subject to customer demand or
-user/customer contributions.
+It does support both TCP/IP header compression according to RFC1144 and
+payload compression according to V.42bis

-The LLC implementation does support LLC encryption.  However, as no HLR
-access is implemented yet, there is no way to enable/configure
-per-subscriber specific keys.
-
+The LLC implementation does support LLC encryption with ciphers GEA3 and GEA4.
+For encryption to work the auth policy needs to be set to remote and the SGSN
+connected to an HLR containing the subscriber data including key material.
+Other auth policys will not work with encryption.

  Session Management Implementation

@@ -93,11 +92,8 @@

 Multiple PDP contexts can be attached by a single MS.

-Currently, all PDP contexts are routed to the same GGSN, irrespective of
-the APN used/configured in the MS.  This is sufficient (and actually
-desirable) for small autonomous networks, but of course not suitable for
-real networks in roaming scenarios.  Please contact sysmocom in case you
-require additional features such as DNS-based APN resolving.
+Multiple GGSNs can be configured and routing to a GGSN can be configured based
+on APN. Dynamic lookup of GGSNs though DNS-based APN resolving is also 
possible.

 === Limitations

@@ -109,10 +105,5 @@

 Known Limitations include:

-* No LLC encryption support
-* No interface to the OsmoNITB HLR
 * No paging coordination between SGSN and MSC
 * No SMS over Ps support
-* No IuPS interface for 3G (in progress)
-* No IP header compression
-* No payload compression
diff --git a/doc/manuals/chapters/running.adoc 
b/doc/manuals/chapters/running.adoc
index d758b28..63c2b27 100644
--- a/doc/manuals/chapters/running.adoc
+++ b/doc/manuals/chapters/running.adoc
@@ -14,7 +14,7 @@
 *-h, --help*::
Print a short help message about the supported options
 *-V, --version*::
-   Print the compile-time version number of the OsmoBTS program
+   Print the compile-time version number of the OsmoSGSN program
 *-d, --debug 'DBGMASK','DBGLEVELS'*::
Set the log subsystems and levels for logging to stderr. This
has mostly been superseded by VTY-based logging configuration,

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/14963
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I8d499a25293b69babc2aebb2d697438f8ba8141f
Gerrit-Change-Number: 14963
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-MessageType: newchange


Change in ...osmo-bsc[master]: rest_octets: add Serving Cell Priority Parameters

2019-07-26 Thread dexter
Hello laforge, Jenkins Builder, Hoernchen,

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

https://gerrit.osmocom.org/c/osmo-bsc/+/14678

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

Change subject: rest_octets: add Serving Cell Priority Parameters
..

rest_octets: add Serving Cell Priority Parameters

When we add an EARFCN to to the SI2quater struct we do not add Serving
Cell Priority Parameters. This essentially causes to MS to ignore the
EARFCN because it is still undefined under which conditions the MS
should change to LTE.

Related: SYS#4510
Change-Id: I7eaf7de4386fe8aea404e8a187d8a1f5ed596ead
---
M src/osmo-bsc/rest_octets.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 87 insertions(+), 70 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/78/14678/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14678
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7eaf7de4386fe8aea404e8a187d8a1f5ed596ead
Gerrit-Change-Number: 14678
Gerrit-PatchSet: 3
Gerrit-Owner: dexter 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-MessageType: newpatchset


Change in ...osmo-hlr[master]: build: fix mess with 'db_test_SOURCES' and 'db_test_LDADD'

2019-07-26 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/14964


Change subject: build: fix mess with 'db_test_SOURCES' and 'db_test_LDADD'
..

build: fix mess with 'db_test_SOURCES' and 'db_test_LDADD'

Somehow both 'db_test_SOURCES' and 'db_test_LDADD' ended up in
'src/Makefile.am'. This causes automake / autoconf to complain.
Let's get rid of both useless declarations.

Furthermore, the actual 'db_test_LDADD' in 'tests/Makefile.am'
contained references to the source files from '$(top_srcdir)'.
Most likely, the original intention was to depend on the object
files in '$(top_builddir)'. Let's also fix this.

Change-Id: Ib2e436ed91d9b7551dc5b205329d468c2b0ced04
---
M src/Makefile.am
M tests/db/Makefile.am
2 files changed, 4 insertions(+), 19 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/64/14964/1

diff --git a/src/Makefile.am b/src/Makefile.am
index 7ee019f..131b44f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -87,21 +87,6 @@
$(SQLITE3_LIBS) \
$(NULL)

-db_test_SOURCES = \
-   auc.c \
-   db.c \
-   db_auc.c \
-   db_test.c \
-   logging.c \
-   rand_fake.c \
-   $(NULL)
-
-db_test_LDADD = \
-   $(LIBOSMOCORE_LIBS) \
-   $(LIBOSMOGSM_LIBS) \
-   $(SQLITE3_LIBS) \
-   $(NULL)
-
 osmo_euse_demo_SOURCES = \
osmo-euse-demo.c \
$(NULL)
diff --git a/tests/db/Makefile.am b/tests/db/Makefile.am
index afda5be..fa925f8 100644
--- a/tests/db/Makefile.am
+++ b/tests/db/Makefile.am
@@ -26,10 +26,10 @@
$(NULL)

 db_test_LDADD = \
-   $(top_srcdir)/src/db.c \
-   $(top_srcdir)/src/db_hlr.c \
-   $(top_srcdir)/src/db_auc.c \
-   $(top_srcdir)/src/logging.c \
+   $(top_builddir)/src/logging.o \
+   $(top_builddir)/src/db_auc.o \
+   $(top_builddir)/src/db_hlr.o \
+   $(top_builddir)/src/db.o \
$(LIBOSMOCORE_LIBS) \
$(LIBOSMOGSM_LIBS) \
$(LIBOSMOABIS_LIBS) \

--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14964
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ib2e436ed91d9b7551dc5b205329d468c2b0ced04
Gerrit-Change-Number: 14964
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmo-hlr[master]: src/db.c: integrate SQLite3 with talloc allocator

2019-07-26 Thread fixeria
Hello pespin, laforge, Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-hlr/+/14939

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

Change subject: src/db.c: integrate SQLite3 with talloc allocator
..

src/db.c: integrate SQLite3 with talloc allocator

This change introduces an optional feature that allows to make
SQLite3 use talloc for all internal allocations. This would
facilitate finding memleaks. OsmoHLR needs to be configured
with '--enable-sqlite-talloc'.

  full talloc report on 'OsmoHLR' (total 292168 bytes in 449 blocks)
struct osmo_gsup_servercontains162 bytes in   3 blocks (ref 0)
  ...
struct db_context  contains 288407 bytes in 420 blocks (ref 0)
  hlr.db   contains  7 bytes in   1 blocks (ref 0)
SQLite3contains 288192 bytes in 418 blocks (ref 0)
  db.c:95  contains 48 bytes in   1 blocks (ref 0)
  db.c:95  contains  2 bytes in   1 blocks (ref 0)
  ...

Unfortunately, old SQLite3 versions (such as 3.8.2) run out
of memory when trying to initialize a new database:

  DDB ERROR  db.c:88 (7) statement aborts at 3: []
  DDB ERROR  db.c:420 Unable to set Write-Ahead Logging: out of memory
  DDB ERROR  db.c:88 (7) statement aborts at 3: []
  DDB ERROR  db.c:238 Unable to prepare SQL statement
 'SELECT name FROM sqlite_master WHERE type='table' AND name=?'
  ...

I've noticed a huge difference in heap usage footprint compared to
generic malloc. At the same time, the recent versions (at least
3.24.0), work just fine.

Change-Id: Icfe67ed0f063b63e6794f9516da3003d01cf20a7
---
M configure.ac
M src/Makefile.am
M src/db.c
M src/db.h
A src/db_debug.c
M tests/db/Makefile.am
6 files changed, 126 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/39/14939/3
--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14939
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Icfe67ed0f063b63e6794f9516da3003d01cf20a7
Gerrit-Change-Number: 14939
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: newpatchset


Change in ...osmo-gsm-tester[master]: resources.conf.prod: Use different ARFCN for sysmocell-5k

2019-07-26 Thread pespin
pespin has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14934 )

Change subject: resources.conf.prod: Use different ARFCN for sysmocell-5k
..

resources.conf.prod: Use different ARFCN for sysmocell-5k

Due to a bug in sysmocell-5K's TRX implementation, it may keep polluting
the air transmitting after the BTS is disconnected. This could cause
interferences with other tests. Correct fix would be to RF lock it after
test finishes (through ccli), but let's simply use a different ARFCN for
now.

Related: OS#4129
Change-Id: I6daa8740b262ee92110987189c076db44f76
---
M example/resources.conf.prod
M src/osmo_gsm_tester/resource.py
2 files changed, 3 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/example/resources.conf.prod b/example/resources.conf.prod
index 8b498d0..b0a679e 100644
--- a/example/resources.conf.prod
+++ b/example/resources.conf.prod
@@ -69,6 +69,8 @@
   addr: 10.42.42.51
   band: GSM-1800
   ciphers: [a5_0, a5_1]
+  trx_list:
+- arfcn: 878
   osmo_trx:
 launch_trx: false
 clock_reference: external
diff --git a/src/osmo_gsm_tester/resource.py b/src/osmo_gsm_tester/resource.py
index 1b18076..aa41b98 100644
--- a/src/osmo_gsm_tester/resource.py
+++ b/src/osmo_gsm_tester/resource.py
@@ -60,6 +60,7 @@
 'bts[].num_trx': schema.UINT,
 'bts[].max_trx': schema.UINT,
 'bts[].trx_list[].addr': schema.IPV4,
+'bts[].trx_list[].arfcn': schema.INT,
 'bts[].trx_list[].hw_addr': schema.HWADDR,
 'bts[].trx_list[].net_device': schema.STR,
 'bts[].trx_list[].nominal_power': schema.UINT,

--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-tester/+/14934
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-tester
Gerrit-Branch: master
Gerrit-Change-Id: I6daa8740b262ee92110987189c076db44f76
Gerrit-Change-Number: 14934
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-hlr[master]: tests/db_test: close the database when test is finished

2019-07-26 Thread fixeria
fixeria has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/14965


Change subject: tests/db_test: close the database when test is finished
..

tests/db_test: close the database when test is finished

Change-Id: I96fedf9181e89e4d68815b04f494a9c2ecc0e057
---
M tests/db/db_test.c
1 file changed, 1 insertion(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-hlr refs/changes/65/14965/1

diff --git a/tests/db/db_test.c b/tests/db/db_test.c
index fdd62c5..57fbf0c 100644
--- a/tests/db/db_test.c
+++ b/tests/db/db_test.c
@@ -903,6 +903,7 @@
test_subscr_sqn();

printf("Done\n");
+   db_close(dbc);
return 0;
 }


--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14965
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I96fedf9181e89e4d68815b04f494a9c2ecc0e057
Gerrit-Change-Number: 14965
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-MessageType: newchange


Change in ...osmo-bsc[master]: rest_octets: add Serving Cell Priority Parameters

2019-07-26 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/14678 )

Change subject: rest_octets: add Serving Cell Priority Parameters
..

rest_octets: add Serving Cell Priority Parameters

When we add an EARFCN to to the SI2quater struct we do not add Serving
Cell Priority Parameters. This essentially causes to MS to ignore the
EARFCN because it is still undefined under which conditions the MS
should change to LTE.

Related: SYS#4510
Change-Id: I7eaf7de4386fe8aea404e8a187d8a1f5ed596ead
---
M src/osmo-bsc/rest_octets.c
M tests/gsm0408/gsm0408_test.ok
2 files changed, 87 insertions(+), 70 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/osmo-bsc/rest_octets.c b/src/osmo-bsc/rest_octets.c
index 9f2b4c0..1d2279b 100644
--- a/src/osmo-bsc/rest_octets.c
+++ b/src/osmo-bsc/rest_octets.c
@@ -190,8 +190,25 @@
/* Priority and E-UTRAN Parameters Description */
bitvec_set_bit(bv, 1);

-   /* No Serving Cell Priority Parameters Descr. */
-   bitvec_set_bit(bv, 0);
+   /* Serving Cell Priority Parameters Descr. is Present,
+* see also: 3GPP TS 44.018, Table 10.5.2.33b.1 */
+   bitvec_set_bit(bv, 1);
+
+   /* GERAN_PRIORITY */
+   bitvec_set_uint(bv, 0, 3);
+
+   /* THRESH_Priority_Search */
+   bitvec_set_uint(bv, 0, 4);
+
+   /* THRESH_GSM_low */
+   bitvec_set_uint(bv, 0, 4);
+
+   /* H_PRIO */
+   bitvec_set_uint(bv, 0, 2);
+
+   /* T_Reselection */
+   bitvec_set_uint(bv, 0, 2);
+
/* No 3G Priority Parameters Description */
bitvec_set_bit(bv, 0);
/* E-UTRAN Parameters Description */
diff --git a/tests/gsm0408/gsm0408_test.ok b/tests/gsm0408/gsm0408_test.ok
index b083f08..e3290b5 100644
--- a/tests/gsm0408/gsm0408_test.ok
+++ b/tests/gsm0408/gsm0408_test.ok
@@ -71,25 +71,25 @@
 generating SI2quater for 0 EARFCNs and 0 UARFCNs...
 generated invalid SI2quater [00/00]: [23] 00 00 00 00 00 00 00 00 00 00 00 00 
00 00 00 00 00 00 00 00 00 00 00
 added EARFCN 1917 - generating SI2quater for 1 EARFCNs and 0 UARFCNs...
-generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 86 59 83 be e8 50 0b 
2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 
+generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 87 00 00 b3 07 7d d0 
a0 2b 2b 2b 2b 2b 2b 2b 2b 2b
 removed EARFCN 1917 - generating SI2quater for 0 EARFCNs and 0 UARFCNs...
-generated invalid SI2quater [00/00]: [23] 59 06 07 40 00 04 86 59 83 be e8 50 
0b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
+generated invalid SI2quater [00/00]: [23] 59 06 07 40 00 04 87 00 00 b3 07 7d 
d0 a0 2b 2b 2b 2b 2b 2b 2b 2b 2b
 added EARFCN 1917 - generating SI2quater for 1 EARFCNs and 0 UARFCNs...
-generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 86 59 83 be c8 50 0b 
2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
+generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 87 00 00 b3 07 7d 90 
a0 2b 2b 2b 2b 2b 2b 2b 2b 2b
 added EARFCN 1932 - generating SI2quater for 2 EARFCNs and 0 UARFCNs...
-generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 86 59 83 be cc 1e 30 
14 03 2b 2b 2b 2b 2b 2b 2b 2b
+generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 87 00 00 b3 07 7d 98 
3c 60 28 0b 2b 2b 2b 2b 2b 2b
 added EARFCN 1937 - generating SI2quater for 3 EARFCNs and 0 UARFCNs...
-generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 86 59 83 be cc 1e 31 
07 91 a0 a0 2b 2b 2b 2b 2b 2b
+generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 87 00 00 b3 07 7d 98 
3c 62 0f 23 41 40 2b 2b 2b 2b
 added EARFCN 1945 - generating SI2quater for 4 EARFCNs and 0 UARFCNs...
-generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 86 59 83 be cc 1e 31 
07 91 a8 3c c8 28 0b 2b 2b 2b
+generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 87 00 00 b3 07 7d 98 
3c 62 0f 23 50 79 90 50 0b 2b
 added EARFCN 1965 - generating SI2quater for 5 EARFCNs and 0 UARFCNs...
-generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 86 59 83 be cc 1e 31 
07 91 a8 3c ca 0f 5a 0a 03 2b
+generated valid SI2quater [00/00]: [23] 59 06 07 40 00 04 87 00 00 b3 07 7d 98 
3c 62 0f 23 50 79 94 1e b4 14
 added EARFCN 1967 - generating SI2quater for 6 EARFCNs and 0 UARFCNs...
-generated valid SI2quater [00/01]: [23] 59 06 07 40 20 04 86 59 83 be cc 1e 31 
07 91 a8 3c ca 0f 5a 0a 03 2b
-generated valid SI2quater [01/01]: [23] 59 06 07 42 20 04 86 59 83 d7 e0 50 0b 
2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
+generated valid SI2quater [00/01]: [23] 59 06 07 40 20 04 87 00 00 b3 07 7d 98 
3c 62 0f 23 50 79 94 1e b4 14
+generated valid SI2quater [01/01]: [23] 59 06 07 42 20 04 87 00 00 b3 07 af c0 
a0 2b 2b 2b 2b 2b 2b 2b 2b 2b
 added EARFCN 1982 - generating SI2quater for 7 EARFCNs and 0 UARFCNs...
-generated valid SI2quater [00/01]: [23] 59 06 07 40 20 04 86 59 83 be cc 1e 31 
07 91 a8 3c ca 0f 5a 0a 03 2b
-generated valid SI2quater [01/01]: [23] 59 06 07 42 20 04 86 59 83 d7 e4 1e fa 
c2 80 2b 2b 

Change in ...osmo-bsc[master]: rest_octets: add Serving Cell Priority Parameters

2019-07-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-bsc/+/14678 )

Change subject: rest_octets: add Serving Cell Priority Parameters
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/14678
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: I7eaf7de4386fe8aea404e8a187d8a1f5ed596ead
Gerrit-Change-Number: 14678
Gerrit-PatchSet: 3
Gerrit-Owner: dexter 
Gerrit-Reviewer: Hoernchen 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 26 Jul 2019 12:02:35 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: Add/fix help string for version option

2019-07-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/14962 )

Change subject: Add/fix help string for version option
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/14962
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ib57694b6bff7c98a269dc4b4dbb7173349a57b81
Gerrit-Change-Number: 14962
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 26 Jul 2019 12:11:01 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: osmo-sgsn: Fix outdated information in usermanual

2019-07-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/14963 )

Change subject: osmo-sgsn: Fix outdated information in usermanual
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/14963
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I8d499a25293b69babc2aebb2d697438f8ba8141f
Gerrit-Change-Number: 14963
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 26 Jul 2019 12:10:40 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-sgsn[master]: Add/fix help string for version option

2019-07-26 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/14962 )

Change subject: Add/fix help string for version option
..

Add/fix help string for version option

osmo-sgsn was missing the help text of the -V option
gb_proxy still thought of itself as OpenBSC
Omit the name of the program in the help text to avoid such issues in
the future.

Related: OS#1720
Change-Id: Ib57694b6bff7c98a269dc4b4dbb7173349a57b81
---
M src/gprs/gb_proxy_main.c
M src/gprs/gtphub_main.c
M src/gprs/sgsn_main.c
3 files changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/gprs/gb_proxy_main.c b/src/gprs/gb_proxy_main.c
index 19fbbba..1e1aeac 100644
--- a/src/gprs/gb_proxy_main.c
+++ b/src/gprs/gb_proxy_main.c
@@ -140,7 +140,7 @@
printf("  -c --config-file filename The config file to use [%s]\n", 
CONFIG_FILE_DEFAULT);
printf("  -s --disable-color\n");
printf("  -T --timestamp Prefix every log line with a timestamp\n");
-   printf("  -V --version. Print the version of OpenBSC.\n");
+   printf("  -V --version. Print the version.\n");
printf("  -e --log-level number. Set a global loglevel.\n");
 }

diff --git a/src/gprs/gtphub_main.c b/src/gprs/gtphub_main.c
index 585a3cb..6d470bd 100644
--- a/src/gprs/gtphub_main.c
+++ b/src/gprs/gtphub_main.c
@@ -238,7 +238,7 @@
printf("  -e,--log-level   Set a global log level.\n");
printf("  -r,--restart-file  File for counting restarts [%s].\n",
   ccfg->restart_counter_file);
-   printf("  -V,--version Print the version number.\n");
+   printf("  -V,--version Print the version.\n");
 }

 static void list_categories(void)
diff --git a/src/gprs/sgsn_main.c b/src/gprs/sgsn_main.c
index f12270d..3543517 100644
--- a/src/gprs/sgsn_main.c
+++ b/src/gprs/sgsn_main.c
@@ -209,6 +209,7 @@
 {
printf("Some useful help...\n");
printf("  -h --help\tthis text\n");
+   printf("  -V --version\tPrint the version\n");
printf("  -D --daemonize\tFork the process into a background daemon\n");
printf("  -d option --debug\tenable Debugging\n");
printf("  -s --disable-color\n");

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/14962
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: Ib57694b6bff7c98a269dc4b4dbb7173349a57b81
Gerrit-Change-Number: 14962
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-sgsn[master]: osmo-sgsn: Fix outdated information in usermanual

2019-07-26 Thread laforge
laforge has submitted this change and it was merged. ( 
https://gerrit.osmocom.org/c/osmo-sgsn/+/14963 )

Change subject: osmo-sgsn: Fix outdated information in usermanual
..

osmo-sgsn: Fix outdated information in usermanual

Quite a few features that are listed as not-implemented in the overview
section are actually implemented now.

Change-Id: I8d499a25293b69babc2aebb2d697438f8ba8141f
Related: OS#1720
---
M doc/manuals/chapters/overview.adoc
M doc/manuals/chapters/running.adoc
2 files changed, 9 insertions(+), 18 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/doc/manuals/chapters/overview.adoc 
b/doc/manuals/chapters/overview.adoc
index abc7496..e2c0107 100644
--- a/doc/manuals/chapters/overview.adoc
+++ b/doc/manuals/chapters/overview.adoc
@@ -74,14 +74,13 @@
 non-acknowledged mode, as this is the most common use case in real-world
 GPRS networks.

-Furthermore, it does not support IP header nor payload compression at
-this point.  Addition of those features is subject to customer demand or
-user/customer contributions.
+It does support both TCP/IP header compression according to RFC1144 and
+payload compression according to V.42bis

-The LLC implementation does support LLC encryption.  However, as no HLR
-access is implemented yet, there is no way to enable/configure
-per-subscriber specific keys.
-
+The LLC implementation does support LLC encryption with ciphers GEA3 and GEA4.
+For encryption to work the auth policy needs to be set to remote and the SGSN
+connected to an HLR containing the subscriber data including key material.
+Other auth policys will not work with encryption.

  Session Management Implementation

@@ -93,11 +92,8 @@

 Multiple PDP contexts can be attached by a single MS.

-Currently, all PDP contexts are routed to the same GGSN, irrespective of
-the APN used/configured in the MS.  This is sufficient (and actually
-desirable) for small autonomous networks, but of course not suitable for
-real networks in roaming scenarios.  Please contact sysmocom in case you
-require additional features such as DNS-based APN resolving.
+Multiple GGSNs can be configured and routing to a GGSN can be configured based
+on APN. Dynamic lookup of GGSNs though DNS-based APN resolving is also 
possible.

 === Limitations

@@ -109,10 +105,5 @@

 Known Limitations include:

-* No LLC encryption support
-* No interface to the OsmoNITB HLR
 * No paging coordination between SGSN and MSC
 * No SMS over Ps support
-* No IuPS interface for 3G (in progress)
-* No IP header compression
-* No payload compression
diff --git a/doc/manuals/chapters/running.adoc 
b/doc/manuals/chapters/running.adoc
index d758b28..63c2b27 100644
--- a/doc/manuals/chapters/running.adoc
+++ b/doc/manuals/chapters/running.adoc
@@ -14,7 +14,7 @@
 *-h, --help*::
Print a short help message about the supported options
 *-V, --version*::
-   Print the compile-time version number of the OsmoBTS program
+   Print the compile-time version number of the OsmoSGSN program
 *-d, --debug 'DBGMASK','DBGLEVELS'*::
Set the log subsystems and levels for logging to stderr. This
has mostly been superseded by VTY-based logging configuration,

--
To view, visit https://gerrit.osmocom.org/c/osmo-sgsn/+/14963
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-sgsn
Gerrit-Branch: master
Gerrit-Change-Id: I8d499a25293b69babc2aebb2d697438f8ba8141f
Gerrit-Change-Number: 14963
Gerrit-PatchSet: 1
Gerrit-Owner: daniel 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-MessageType: merged


Change in ...osmo-hlr[master]: build: fix mess with 'db_test_SOURCES' and 'db_test_LDADD'

2019-07-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/14964 )

Change subject: build: fix mess with 'db_test_SOURCES' and 'db_test_LDADD'
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14964
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Ib2e436ed91d9b7551dc5b205329d468c2b0ced04
Gerrit-Change-Number: 14964
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 26 Jul 2019 12:13:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-hlr[master]: src/db.c: integrate SQLite3 with talloc allocator

2019-07-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/14939 )

Change subject: src/db.c: integrate SQLite3 with talloc allocator
..


Patch Set 3: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14939
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: Icfe67ed0f063b63e6794f9516da3003d01cf20a7
Gerrit-Change-Number: 14939
Gerrit-PatchSet: 3
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Reviewer: pespin 
Gerrit-Comment-Date: Fri, 26 Jul 2019 12:13:59 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-hlr[master]: tests/db_test: close the database when test is finished

2019-07-26 Thread laforge
laforge has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-hlr/+/14965 )

Change subject: tests/db_test: close the database when test is finished
..


Patch Set 1: Code-Review+2


--
To view, visit https://gerrit.osmocom.org/c/osmo-hlr/+/14965
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-hlr
Gerrit-Branch: master
Gerrit-Change-Id: I96fedf9181e89e4d68815b04f494a9c2ecc0e057
Gerrit-Change-Number: 14965
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria 
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 26 Jul 2019 12:12:26 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...osmo-mgw[master]: Fix return variable of strtoul()

2019-07-26 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-mgw/+/14966


Change subject: Fix return variable of strtoul()
..

Fix return variable of strtoul()

Return variable specified by strtoul() is "unsigned long int". If
"unsigned int" is used, according to Coverity the return value can never
be ULONG_MAX:

CID 202173:  Integer handling issues  (CONSTANT_EXPRESSION_RESULT)
"pt == 18446744073709551615UL /* 9223372036854775807L * 2UL + 1UL */" is always 
false regardless of the values of its operands. This occurs as the logical 
second operand of "&&".

Fixes: c5c1430a1c00ad868553df3f106bb2bce1d5 ("Catch unsigned integer MGCP 
parsing errors with strtoul")
Fixes: Coverity CID#202172
FIxes: Coverity CID#202173
Change-Id: Ice9eee6a252fab73dbab5ebf3cfc83c1b354fd08
---
M src/libosmo-mgcp-client/mgcp_client.c
M src/libosmo-mgcp/mgcp_sdp.c
2 files changed, 2 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-mgw refs/changes/66/14966/1

diff --git a/src/libosmo-mgcp-client/mgcp_client.c 
b/src/libosmo-mgcp-client/mgcp_client.c
index 910289e..5af441c 100644
--- a/src/libosmo-mgcp-client/mgcp_client.c
+++ b/src/libosmo-mgcp-client/mgcp_client.c
@@ -268,7 +268,7 @@
 {
char *pt_str;
char *pt_end;
-   unsigned int pt;
+   unsigned long int pt;
unsigned int count = 0;
unsigned int i;

diff --git a/src/libosmo-mgcp/mgcp_sdp.c b/src/libosmo-mgcp/mgcp_sdp.c
index 56fc611..64d038d 100644
--- a/src/libosmo-mgcp/mgcp_sdp.c
+++ b/src/libosmo-mgcp/mgcp_sdp.c
@@ -132,7 +132,7 @@
char *str_ptr;
char *pt_str;
char *pt_end;
-   unsigned int pt;
+   unsigned long int pt;
unsigned int count = 0;
unsigned int i;


--
To view, visit https://gerrit.osmocom.org/c/osmo-mgw/+/14966
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-mgw
Gerrit-Branch: master
Gerrit-Change-Id: Ice9eee6a252fab73dbab5ebf3cfc83c1b354fd08
Gerrit-Change-Number: 14966
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in ...gr-gsm[master]: Fix sub_slot assignment in the universal_ctrl_chans_demapper block

2019-07-26 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/gr-gsm/+/14946 )

Change subject: Fix sub_slot assignment in the universal_ctrl_chans_demapper 
block
..


Patch Set 1: Code-Review+1


--
To view, visit https://gerrit.osmocom.org/c/gr-gsm/+/14946
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: gr-gsm
Gerrit-Branch: master
Gerrit-Change-Id: Idc63407694fd1f7be962ab630d4e8c13b4a5d348
Gerrit-Change-Number: 14946
Gerrit-PatchSet: 1
Gerrit-Owner: vvvelichkov 
Gerrit-Reviewer: Piotr Krysik 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 26 Jul 2019 12:35:22 +
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment


Change in ...gr-gsm[master]: Fix uplink sub_slot and sub_types assignment in the sdcch4 and bcch_c...

2019-07-26 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/gr-gsm/+/14948 )

Change subject: Fix uplink sub_slot and sub_types assignment in the sdcch4 and 
bcch_ccch demappers blocks
..


Patch Set 1:

In general, I am find with the proposed patch set. But instead of having magic 
calculations in the original code, I would rather follow the way of OsmoBTS, 
which I followed in trxcon:

  https://git.osmocom.org/osmocom-bb/tree/src/host/trxcon/sched_mframe.c

Ideally, we need to share this code somewhere in libosmogsm, so then it can be 
used by gr-gsm, and even by OsmoTRX.


--
To view, visit https://gerrit.osmocom.org/c/gr-gsm/+/14948
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: gr-gsm
Gerrit-Branch: master
Gerrit-Change-Id: Ia6b3070c1085bcdda6d98fd94a89c6e0982e2aec
Gerrit-Change-Number: 14948
Gerrit-PatchSet: 1
Gerrit-Owner: vvvelichkov 
Gerrit-Reviewer: Piotr Krysik 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 26 Jul 2019 12:39:23 +
Gerrit-HasComments: No
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...gr-gsm[master]: Add control channels demappers tests

2019-07-26 Thread fixeria
fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/gr-gsm/+/14945 )

Change subject: Add control channels demappers tests
..


Patch Set 1:

(6 comments)

https://gerrit.osmocom.org/#/c/14945/1/python/qa_gsm_bcch_ccch_demapper.py
File python/qa_gsm_bcch_ccch_demapper.py:

https://gerrit.osmocom.org/#/c/14945/1/python/qa_gsm_bcch_ccch_demapper.py@6
PS1, Line 6:
ws


https://gerrit.osmocom.org/#/c/14945/1/python/qa_gsm_bcch_ccch_demapper.py@142
PS1, Line 142: b[  0], b[  1], b[  2], b[  3],
Any benefits of having such sequential notation?
This could be also done in an imperative way:

  a = list(dst.get_burst_data())
  self.assertEqual(len(a), 108)
  for i in range(108):
self.assertEqual(a[i], b[i])


https://gerrit.osmocom.org/#/c/14945/1/python/qa_gsm_bcch_ccch_demapper.py@172
PS1, Line 172: assertEqual
Same here, and even simpler.


https://gerrit.osmocom.org/#/c/14945/1/python/qa_gsm_bcch_ccch_demapper.py@203
PS1, Line 203: assertEqual
Same here.


https://gerrit.osmocom.org/#/c/14945/1/python/qa_gsm_demapper_data.py
File python/qa_gsm_demapper_data.py:

https://gerrit.osmocom.org/#/c/14945/1/python/qa_gsm_demapper_data.py@24
PS1, Line 24: bursts
This list can also be generated using a for loop.


https://gerrit.osmocom.org/#/c/14945/1/python/qa_gsm_demapper_data.py@150
PS1, Line 150: timeslots
Same here, just [0] * X, where X == len(timeslots).



--
To view, visit https://gerrit.osmocom.org/c/gr-gsm/+/14945
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: gr-gsm
Gerrit-Branch: master
Gerrit-Change-Id: I33b0948832a0c2506bffd389cc134c3236c74d27
Gerrit-Change-Number: 14945
Gerrit-PatchSet: 1
Gerrit-Owner: vvvelichkov 
Gerrit-Reviewer: Piotr Krysik 
Gerrit-Reviewer: fixeria 
Gerrit-Reviewer: laforge 
Gerrit-Comment-Date: Fri, 26 Jul 2019 12:34:12 +
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment


Change in ...osmo-gsm-manuals[master]: mgcp_extension_osmux.adoc: Workaround make check failures

2019-07-26 Thread pespin
pespin has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/14967


Change subject: mgcp_extension_osmux.adoc: Workaround make check failures
..

mgcp_extension_osmux.adoc: Workaround make check failures

It seems make check fails on some asciidoc version due to title level
inconsistencies. Have  alook at the redmine Osmocom ticket for more
information.

Related: OS#4131
Change-Id: I57ab562d5976b400085e8a38224b7d28179fc8ef
---
M common/chapters/osmux/mgcp_extension_osmux.adoc
M common/chapters/osmux/osmux.adoc
2 files changed, 6 insertions(+), 4 deletions(-)



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

diff --git a/common/chapters/osmux/mgcp_extension_osmux.adoc 
b/common/chapters/osmux/mgcp_extension_osmux.adoc
index c12e9ef..7d28189 100644
--- a/common/chapters/osmux/mgcp_extension_osmux.adoc
+++ b/common/chapters/osmux/mgcp_extension_osmux.adoc
@@ -1,11 +1,11 @@
 [[mgcp-extension-osmux]]
-=== Osmux and MGCP
+== Osmux and MGCP

 `X-Osmux` indicates to OsmoMGW that a given connection of an `rtpbridge`
 endpoint has to be configured in order to handle Osmux frames instead of RTP
 messages on the data plane.

- `X-Osmux` Format
+=== `X-Osmux` Format

 The value part of `X-Osmux` must be one integer in range [0..255], or
 alternatively only on request messages, an asterisk (*) if the value is not yet
@@ -35,7 +35,7 @@
 X-Osmux: *
 

- `X-Osmux` Considerations
+=== `X-Osmux` Considerations

 If the MGCP client is willing to use Osmux for a given connection, it shall
 specify so during `CRCX` time, and not later. If at `CRCX` time the MGCP client
@@ -89,7 +89,7 @@
 a=ptime:20
 

- `X-Osmux` Support
+=== `X-Osmux` Support

 `X-Osmux` is known to be supported by OsmoMGW on the MGCP server side, and by
 OsmoBSC as well as OsmoMSC on the MGCP client side (through libosmo-mgcp-cli).
diff --git a/common/chapters/osmux/osmux.adoc b/common/chapters/osmux/osmux.adoc
index 5e53b60..5b05abc 100644
--- a/common/chapters/osmux/osmux.adoc
+++ b/common/chapters/osmux/osmux.adoc
@@ -138,4 +138,6 @@
 include::mo_call_osmux_sccplite_nat.msc[]
 

+:leveloffset: 1
 include::mgcp_extension_osmux.adoc[]
+:leveloffset: 0

--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/14967
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I57ab562d5976b400085e8a38224b7d28179fc8ef
Gerrit-Change-Number: 14967
Gerrit-PatchSet: 1
Gerrit-Owner: pespin 
Gerrit-MessageType: newchange


Change in ...osmo-gsm-manuals[master]: mgcp_extension_osmux.adoc: Workaround make check failures

2019-07-26 Thread pespin
Hello Jenkins Builder,

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

https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/14967

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

Change subject: mgcp_extension_osmux.adoc: Workaround make check failures
..

mgcp_extension_osmux.adoc: Workaround make check failures

It seems make check fails on some asciidoc version due to title level
inconsistencies. Have  alook at the redmine Osmocom ticket for more
information.

Related: OS#4131
Change-Id: I57ab562d5976b400085e8a38224b7d28179fc8ef
---
M common/chapters/osmux/mgcp_extension_osmux.adoc
M common/chapters/osmux/osmux.adoc
2 files changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/osmo-gsm-manuals 
refs/changes/67/14967/2
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/14967
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I57ab562d5976b400085e8a38224b7d28179fc8ef
Gerrit-Change-Number: 14967
Gerrit-PatchSet: 2
Gerrit-Owner: pespin 
Gerrit-Reviewer: Jenkins Builder
Gerrit-MessageType: newpatchset


Change in ...simtrace2[master]: add new board and app for gpio testing on octsimtest board

2019-07-26 Thread roh
roh has uploaded this change for review. ( 
https://gerrit.osmocom.org/c/simtrace2/+/14969


Change subject: add new board and app for gpio testing on octsimtest board
..

add new board and app for gpio testing on octsimtest board

Change-Id: I01243044002f51b34e8dc12c1b1f565bbf1740a2
---
A firmware/apps/gpio_test/Makefile
A firmware/apps/gpio_test/gpio_test.c
A firmware/apps/gpio_test/main.c
A firmware/apps/gpio_test/usb_strings.txt
A firmware/libboard/octsimtest/include/board.h
A firmware/libboard/octsimtest/include/i2c.h
A firmware/libboard/octsimtest/include/mcp23017.h
A firmware/libboard/octsimtest/source/board_octsimtest.c
A firmware/libboard/octsimtest/source/i2c.c
A firmware/libboard/octsimtest/source/mcp23017.c
10 files changed, 686 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/simtrace2 refs/changes/69/14969/1

diff --git a/firmware/apps/gpio_test/Makefile b/firmware/apps/gpio_test/Makefile
new file mode 100644
index 000..b2b4707
--- /dev/null
+++ b/firmware/apps/gpio_test/Makefile
@@ -0,0 +1,3 @@
+C_FILES += $(C_LIBUSB_RT)
+
+C_FILES += gpio_test.c
diff --git a/firmware/apps/gpio_test/gpio_test.c 
b/firmware/apps/gpio_test/gpio_test.c
new file mode 100644
index 000..2ab23e7
--- /dev/null
+++ b/firmware/apps/gpio_test/gpio_test.c
@@ -0,0 +1,10 @@
+#include 
+#include "utils.h"
+#include "chip.h"
+
+
+
+void gpio_test_init(void)
+{
+   printf("FIXME run tests here\n\n");
+}
diff --git a/firmware/apps/gpio_test/main.c b/firmware/apps/gpio_test/main.c
new file mode 100644
index 000..8fe68b3
--- /dev/null
+++ b/firmware/apps/gpio_test/main.c
@@ -0,0 +1,54 @@
+
+#include "board.h"
+#include "utils.h"
+#include "osmocom/core/timer.h"
+
+extern void gpio_test_init(void);
+
+/* returns '1' in case we should break any endless loop */
+static void check_exec_dbg_cmd(void)
+{
+   int ch;
+
+   if (!UART_IsRxReady())
+   return;
+
+   ch = UART_GetChar();
+
+   board_exec_dbg_cmd(ch);
+}
+
+
+extern int main(void)
+{
+   led_init();
+   led_blink(LED_RED, BLINK_ALWAYS_ON);
+   led_blink(LED_GREEN, BLINK_ALWAYS_ON);
+
+   /* Enable watchdog for 2000 ms, with no window */
+   WDT_Enable(WDT, WDT_MR_WDRSTEN | WDT_MR_WDDBGHLT | WDT_MR_WDIDLEHLT |
+  (WDT_GetPeriod(2000) << 16) | WDT_GetPeriod(2000));
+
+   PIO_InitializeInterrupts(0);
+
+
+   printf("\n\r\n\r"
+   
"=\n\r"
+   "GPIO Test firmware " GIT_VERSION " (C) 2019 Sysmocom GmbH\n\r"
+   
"=\n\r");
+
+   board_main_top();
+
+   TRACE_INFO("starting gpio test...\n\r");
+   gpio_test_init();
+
+   TRACE_INFO("entering main loop...\n\r");
+   while (1) {
+   WDT_Restart(WDT);
+
+   check_exec_dbg_cmd();
+   osmo_timers_prepare();
+   osmo_timers_update();
+   }
+
+}
diff --git a/firmware/apps/gpio_test/usb_strings.txt 
b/firmware/apps/gpio_test/usb_strings.txt
new file mode 100644
index 000..0e797ac
--- /dev/null
+++ b/firmware/apps/gpio_test/usb_strings.txt
@@ -0,0 +1,10 @@
+sysmocom - s.f.m.c. GmbH
+SIMtrace 2 compatible device
+SIMtrace Sniffer
+SIMtrace CCID
+SIMtrace Phone
+SIMtrace MITM
+CardEmulator Modem 1
+CardEmulator Modem 2
+CardEmulator Modem 3
+CardEmulator Modem 4
diff --git a/firmware/libboard/octsimtest/include/board.h 
b/firmware/libboard/octsimtest/include/board.h
new file mode 100644
index 000..018cfdd
--- /dev/null
+++ b/firmware/libboard/octsimtest/include/board.h
@@ -0,0 +1,155 @@
+/* SIMtrace with SAM3S board definition
+ *
+ * (C) 2016-2017 by Harald Welte 
+ * (C) 2018 by sysmocom -s.f.m.c. GmbH, Author: Kevin Redon 

+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307, USA
+ */
+#pragma once
+#include "board_common.h"
+#include "simtrace_usb.h"
+
+/* Name of the board */
+#define BOARD_NAME "OCTSIMTEST"
+/* Board definition */
+#define octsimtest
+
+/** oscillator used as main clock source (in Hz) */
+#define BOARD_MAINOSC 18432000
+/** desired main clock frequency (in Hz, based on BOARD_MAINOSC) */
+#define BOARD_MCK 58982400