Commit Graph

378 Commits

Author SHA1 Message Date
Pau Espin bfd0b2310c modem: get IMSI from ofono
There's no need to specify the IMSI manually in resource config
and it's also prone to errors. Let's take it from ofono.
Add a 'sim' feature to allow modem to auto-discover it,
otherwise if not supported leave that feature out of the config for that
modem and an imsi can still be manually providen.

Change-Id: I20f9e8d97775293925205e4ea576d814214bf1a8
2018-03-13 18:32:59 +01:00
Pau Espin e5a7a40faa contrib: build-osmo-bsc: Add aibsip-find and ipaccess-config binaries to archive
They will be required by Nanobts class.

Change-Id: Ib0e003f74603c3146aa76d581ab493f960f73ab5
2018-03-09 18:54:28 +01:00
Pau Espin 274c8bd637 contrib: build-osmo-bts: Remove dropped dependency openbsc
Since osmo-bts ec33b0397f5d71248c5834513d4be7b9b0e46366, it doesn't
require openbsc anymore to build.

Change-Id: I8a1918971388afad41308629c1851614d1381f25
2018-03-09 18:54:28 +01:00
Alexander Couzens 89da3704bc jenkins: update poky version 2.3.2
The sysmobts 2017 releases are using poky 2.3.2

Change-Id: If6e8a5702e4c9b24e758e3aa5f390e786c51c384
2018-03-06 15:10:24 +01:00
Alexander Couzens 9695a1cbc1 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
2018-03-06 15:09:26 +01:00
Pau Espin edcc8d2624 osmo-trx: Add cfg template
Since commit 3da1f8352e337fb032bf7a58c2909d3ba918e237, osmo-trx requires
a cfg file to start successfully.

Change-Id: I8f0e0d0a9fa849f41c3cccc4059431f62f956eac
2018-03-04 20:17:26 +01:00
Pau Espin 86ea02f305 osmo-msc: Use osmo-mgw instead of osmo-bsc_mgcp
osmo-msc now requires osmo-mgw and it's not expected to work properly
anymore with old mgcp code.

Change-Id: I93033f7b6133a4914f12f37511ad870b3dea3201
2018-02-26 12:14:48 +01:00
Pau Espin 2c48c34998 pcap_recorder: log printing pcap file name as dbg
The log message is quite long and makes it difficult to read the log
even with debug disabled.

Change-Id: I593c0ce02bf7a3a9d26cf1fcc7d523a313cb72eb
2018-02-23 17:25:41 +01:00
Pau Espin e25cf04aeb modem: Identify modems by sysfs path instead of ofono dbus path
ofono dbus paths are non-deterministic and can change over time for a
given modem. For instance when ofono is restartd or if a modem crashes
and the object is destroyed and re-announced by udev.

Requires at least ofono 1df92289d4e09a1e2db0b189b5153a4c238f98f1, which
implemented the feature to export the sysfs path to modem properties.

Related: OS#2509

Change-Id: Ibc45a196abadded2706dc9d57b6a3a796b43a201
2018-02-23 17:14:37 +01:00
Pau Espin b2a94e8430 contrib: build-osmo-trx: build new dep libosmocore
Since 8b843e5bed6e3dab1068b86805e557a196f9aa4c, osmo-trx depends on
libosmocore.

Change-Id: I63d09339da5be7af638efe9e07f0c0ed31738ed1
2018-02-23 12:33:39 +01:00
Pau Espin cdac297b89 modem: Remove ctx after deactivating it
Change-Id: Ib0e2a8ae8d9885fa44c9cc1f7dc7c7948abd683c
2018-02-16 15:14:32 +01:00
Pau Espin b05aa3cea2 modem: deactive_context: Log when context is successfully deactivated
Change-Id: Ibe40a954aa4548e54b48c444014d7dbd2da9d956
2018-02-16 15:03:50 +01:00
Pau Espin b17295bb21 templates: osmo-msc: Remove unused option auth policy
Commit osmo-msc 098aa71e83a86200a18088927b4753909f5ed518 removes this
option from default configuration as it is really not used in osmo-msc,
it comes from osmo-nitb times.

Change-Id: I928379ebabfc776f33b9f345d92a7a4a533fe25f
2018-02-14 11:26:43 +01:00
Pau Espin 342694150e templates: osmo-msc: Remove unused option reject cause
Commit osmo-msc 27b40c601c41fde70446ad553629494234c07662 removes this
option from default configuration as it is really not used in osmo-msc,
it comes from osmo-nitb times.

Change-Id: Iac1948113514414e7573f3bbfb3ce82e6c49adb6
2018-02-14 11:26:11 +01:00
Pau Espin 263dd3b600 modem: deactivate_context: Fix dbg message
Change-Id: Ib3cb72ebcbfbf53693a2d76ca1592ef7d394dd87
2018-02-13 22:27:46 +01:00
Holger Hans Peter Freyther 257ee10967 log: Use sys._getframe() to avoid stat(2) calls
The Osmo MS driver is launching many many processes and I would
like to use the logging framework for the code as well.
Unfortunately the inspect/traceback code will use a linecache which
will execute stat(2) on one or more python files.

Related: OS#2927
Change-Id: I8f6bacadcf74d3aa25db1e1f41644f64aa19cf92
2018-02-13 10:49:00 +00:00
Pau Espin 4792f40f6a resources.conf: Update octphy net_device
Interface naming model changed after switching to debian9. eth1 is now
named enp2s0.

Change-Id: I86422452e6fd52015361d9e8508b7c74e20847a4
2018-02-07 14:29:05 +01:00
Pau Espin 668d42f775 aoip_smpp: Since recent osmo-msc, we accept all sms in store&forward mode
Change-Id: Ieb5656f3ca93f4343441d90e30fbe904382c44e3
2018-01-30 12:31:37 +01:00
Pau Espin 031f46476c Revert "aoip_smpp: Disable check in esme_ms_sms_storeforward due to known issue"
This reverts commit 4a22ac7d2c.

Issue has been fixed in OS#2354, osmo-msc
1e67fea7ba5c6336066b78f98a28ab33b05c36c4.

Change-Id: I83d857c639db35abcd05bc87db9962d092c10eca
2018-01-29 10:56:31 +01:00
Harald Welte ab4a1f7074 osmo-bsc.cfg.tmpl: Remove bogus VTY commands
There are plenty of VTY commands that were inherited from OsmoNITB,
but which make no sense in a BSC.  Upstream OsmoBSC has removed them in
change-ids Ib626f43a3a3ca69dfc127afe5832eb58f7fb6a38,
c499e5c62e9bef0db219e4658ffeb3292d6e6a5b and
8311a81bae85618302273c3f769275893161a7d7

Change-Id: I79ff48983d9cb7b875c1859870d5e3bce2c0ef22
2017-12-19 18:55:26 +01:00
Neels Hofmeyr c6cd68ee63 cosmetic: adjust resource_test to comp128v1
Since libosmocore doesn't support XOR at all, it seems weird to use it in the
test, even though it's just a selftest without libosmocore involved...

Change-Id: I51edec255e7ef277907817b3187c2f492465467f
2017-12-18 02:28:58 +00:00
Neels Hofmeyr 0af893c79d osmo_hlr.py: fix auth algo mapping, properly indicate COMP128v1
So far the resources.conf says we're using XOR, but we wrongly map 'xor' to 1,
which is actually comp128v1 in enum osmo_auth_algo from libosmocore (which
osmo-hlr uses to interpret the numbers from the hlr.db).

This explains why our "xor" tests are succeeding even though libosmocore
doesn't support XOR at all: we were using comp128v1 all the while.

Fix the auth algo mapping:
- define correct mappings, copying enum osmo_auth_algo, in util.py
- add a function to get the enum value from name, in util.py
- use this in osmo_hlr.py

Change subscriber_add() API to take the algorithm string instead of a number.
The number is libosmocore internal and we should not expose it within our API
beyond above dict. There are no callers using this parameter yet anyway.

Adjust resources.conf to indicate COMP128v1 which we are actually using and
which means we're still using algorithm number 1 after this change.

BTW, osmo-nitb uses the ctrl interface which interprets the names, so is not
vulnerable to mapping wrong numbers and needs no fix. (If osmo-hlr featured
similar CTRL, which it doesn't yet, this code could be more robust.)

Related: OS#2758
Change-Id: I7a6ce92468a6ae46136ad4f62381da261fd196c8
2017-12-18 02:28:58 +00:00
Pau Espin b05e36aa38 modem: activate_context: print protocol too in dbg log
Change-Id: I5c2df196b924bb0cf74aadabb4544ca1fecc1eba
2017-12-15 12:40:18 +01:00
Max bee13719a3 Add git-review config
Change-Id: Icca72ab36db2a646b17abaf7c95fcd5be9527f50
2017-12-15 11:29:21 +00:00
Pau Espin 6641994d8d Set osmo-ggsn ipv6 link-local addr and enable ipv6 ctx activate test
osmo-ggsn requires a link-local IPv6 address to be added to the
tun interface, otherwise the apn will not be configured correctly and it
won't be able to allocate addresses from the ipv6 pool later on.
Some OS don't support autoconfiguring link-local IPv6 addresses when the
interface is brought up (some linux versions are known to fail at it).
This is the case for our Prod osmo-gsm-tester setup (running debian8
with kernel 3.16.51).

Make sure we configure correctly the interface by forcing osmo-ggsn to
set on the interface and use a specific IPv6 link-local address. This is
done by using the "ipv6 link-local" vty cmd in osmo-ggsn.

After this modification, we can re-enable ipv6 gprs context creation as
it will work in Prod setup.

Related: OS#2746

Change-Id: Ib291c02a3c57a4189f9c4b1b856109be97ad2a34
2017-12-15 12:08:47 +01:00
Pau Espin c1b3278af8 bts_osmo: Use correct parameters for create_pcu
Commit c9817a50ff moved code from
different BTS into a shared base class, and create_pcu method was
created to be implemented by subclasses to get a new pcu object.
However, parameters where wrongly copied over from pcu() method during
refactoring. create_pcu() has no parameters.

Change-Id: I1e95f2e658a870f86dd9d9d25f446b8efa4107a4
2017-12-15 11:49:04 +01:00
Pau Espin 81aaeefb7b cosmetic: bts_sysmo: Sort members according to scope
Change-Id: Ifc19b34660cc8d20b8db2dcf245eeb2173cd7a6a
2017-12-14 19:18:58 +01:00
Pau Espin 2e54295bbf cosmetic: bts_osmotrx: Sort members according to scope
Change-Id: I2a0771331a98b377a79aa0770c753d04a1e88db1
2017-12-14 19:18:58 +01:00
Pau Espin 4b475be9d8 cosmetic: bts_octphy: Sort members according to scope
Change-Id: I42c19bf6f5a2f9d13d60e6ce8f1bbc1cad159b4b
2017-12-14 19:18:57 +01:00
Pau Espin c9817a50ff Create bts abstract classes to avoid code duplication and ease development
A lot of code can be shared by all osmocom related BTS we currently use
(sysmo, octphy, trx). This commits moves all this easily shareable code
to an abstract class OsmoBts which all (osmocom) BTS use.

Some bits of code do not apply for osmo-bts-sysmo but it's still shared
by BTS running in the main unit (octphy, trx), for instance the pcu
socket handling. Those are put together in OsmoBtsMainUnit.

This way we have:
log.Origin<-OsmoBts<-OsmoBtsMainUnit<-OsmoBtsOctphy
log.Origin<-OsmoBts<-OsmoBtsMainUnit<-OsmoBtsTrx
log.Origin<-OsmoBts<-OsmoBtsSysmo

Also take the chance to categorize the different APIs in the new
abstract class based on their use and scope.

Some code changes while moving which were required:
- A new protected abstract API "create_pcu", which returns an object of
"pcu" interface. Subclasses implement this API returning either a
PcySysmo or a PcuOsmo object. This is needed to abstract the pcu()
getter into the base class.
- For BTS running in the main unit, pcu_sk_tmp_dir object is allocated
when first used (API pcu_socket_path()) instead of doing it in the
constructor. This is moved into OsmoBtsMainUnit

Change-Id: I86db35a7f2497d37360b2c56affa8bf6bf704ee2
2017-12-14 19:18:50 +01:00
Pau Espin f973b3d605 gprs: ping.py: Disable ipv6 ctx activate test
osmo-ggsn is failing to create tun ipv6 device in Prod main unit.
Afterwards, as the iface is not created, it cannot find its link-local
ip and it doesn't configure the ipv6 pool. Later on, when an ipv4v6 ctx
is requested, it fails because apn doesn't support ipv6 (because the
pool is not created).

Related: OS#2746

Change-Id: I018c525a8a3d108233740ee1376b2671fefbbb59
2017-12-13 19:55:35 +01:00
Pau Espin f0b8e37f32 osmo-ggsn: set cap CAP_NET_ADMIN to be able to set up tun devices
This is a temporary workaround to be able to test gprs signalling until
we set up all required bits to run osmo-ggsn in its own namespace.

Change-Id: I0a3ce16218f0274e0be09bbf2881bc21636acdf9
2017-12-13 16:08:38 +01:00
Pau Espin 1e19151867 suites: Wait for BTS to connect to BSC before continuing
Change-Id: I027e3bfb8f470a811e65e718e2a8c46809fe6396
2017-12-13 14:09:19 +00:00
Pau Espin 7bd7103736 OsmoBsc: Introduce bts_is_connected API
This can be used by tests to wait until bts is successfully connected to
BSC.

Change-Id: I2dc2be7fd802e0e77a5e6bf23c9ca03d4c4b28f2
2017-12-13 14:09:19 +00:00
Pau Espin c859eb37ad OsmoNitb: Introduce bts_is_connected API
This can be used by tests to wait until bts is successfully connected to
NITB.

Change-Id: Idb9b7087e38f638d8b8acbad6dd8ab4218746832
2017-12-13 14:09:19 +00:00
Pau Espin fd150fbb66 suites: gprs: Use inet46 APN due to ofono using IPv4v6 ctx request
Otherwise osmo-ggsn tries to allocate one IP of each type but fails
because the other APNs are ipv4-only or ipv6-only.

Change-Id: I53baa63dc1b83616a35af182cb6f56ee3d7fe38b
2017-12-12 16:44:00 +01:00
Pau Espin d22b8460e5 Revert "resources.conf: EC20 doesn't support SupplementaryServices"
This reverts commit 31b7f0f9de.

EC20 actually supports the feature. I was wrong mainly due to 2 reasons:
- I somehow failed to set the modem Online before checking for the
interface, and in that case it is not shown.
- The test I saw failing in prod is due to /gobi_0 being actually a
gobi2000 there, and the once failing was actually the gobi2000 and not
the EC20.

Change-Id: I31ad35b718e20168a75930498901015ca2015a52
2017-12-05 19:45:40 +01:00
Pau Espin fb8c6958b1 resources.conf: sierra modems support gprs
At least the signalling support we are currently running, so let's add
the gprs feature to them as they can be used to run the current tests.

Change-Id: I04459786ba76813ebaa7867bcc86afb4fa9700b9
2017-12-05 18:29:05 +01:00
Pau Espin 31b7f0f9de resources.conf: EC20 doesn't support SupplementaryServices
As the interface never appears, tests using the modem fail because we
wait for all the interfaces to be available based on the features
attribute.

Change-Id: I68fcf2b9083966ad42940e1629abe2a1a6b74095
2017-12-05 18:26:06 +01:00
Pau Espin 7ec53f5531 resources.conf: Label modems according to their type
It's difficult to know which path is which, and actually in the prod env
gobi_0 is given to gobi 2000 instead of EC20, which means the attributes
would be applying to the wrong resource.

Change-Id: If17ff9f3d9c4c74bf0aa7966b1dd2f878175a8f0
2017-12-05 18:23:54 +01:00
Pau Espin 7a4c17b661 bts_octphy: Use OsmoPcu instead of OsmoPcuSysmo
Change-Id: I81751d774ec1f61b01ccef6c21c9d38807d5d1fc
2017-12-05 17:05:27 +01:00
Pau Espin 1450436dd5 default-suites.conf: Add gprs suite
Change-Id: I6cc71529fd6e3b99b8a53c0b91377df6d3a636d3
2017-12-05 15:06:53 +01:00
Pau Espin 38523981cb default-suites.conf: Use same order for sysmocell5000 as for other bts
Change-Id: Ie9b294ef35e35a5951b72e86e8b967d2a612f177
2017-12-05 15:06:53 +01:00
Pau Espin 3c9b80d53b suites: gprs: Introduce suite with ping test
Only GPRS signalling setup is supported so far by osmo-gsm-tester, thus
we don't test sending data yet here, but at least we can already test
pdp context activation.

This test will be extended to run ping once we support setting up the
GPRS data plane in osmo-gsm-tester.

Change-Id: I8695029cb7a43cd48f650c88f38b4c054da0bc6b
2017-12-05 15:06:53 +01:00
Pau Espin a5ed18ac7e suites: aoip_debug: Start GPRS services
Change-Id: I991d0329ff068aaa7c101a5f55ad40616faac121
2017-12-05 15:06:53 +01:00
Pau Espin de899619cf modem: Add minimal GPRS support
Up to this point we can test signalling plane: attaching to GPRS network and activating a
context.

Data plane (sending IP packets through the network) is still not
implemented as it requires setting up the network interface provided by
ofono as well as routing, and most probably move osmo-ggsn to its own
network namespace.

Change-Id: I605ba1bb1103a045a9b5d0e7215c05dfc1fe575f
2017-12-05 15:06:52 +01:00
Pau Espin 8a3a7b5146 bts_*: Add incrementing bvci and rac values
Change-Id: Ie65d7d33322c775a1040b5c81f367d882a7c2c5b
2017-12-05 15:06:52 +01:00
Pau Espin 05314b4633 OsmoBtsOctphy: Integrate with OsmoPcu and OsmoSgsn
Change-Id: I54780971d711d47b23976dd044a4a53134dd4299
2017-12-05 15:06:52 +01:00
Pau Espin 5936d8f4b1 OsmoBtsTrx: Integrate with OsmoPcu and OsmoSgsn
Change-Id: I777835345355538a945599fb088630af63dc9140
2017-12-05 15:06:51 +01:00
Pau Espin ce35d91592 OsmoPcuSysmo: Integrate with Sysmobts and OsmoSgsn
Change-Id: I01485c5d74e5fe62d0ffea9eb1fad29041426eef
2017-12-05 13:36:46 +00:00