how to use the CTRL interface to set TRAPs.

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Max msuraev at sysmocom.de
Wed May 24 08:14:04 UTC 2017


Hi.

Comments/answers are inline.

On 24.05.2017 03:48, emily mcmilin wrote:
> In the OsmoBSC user manual (for example), the example provided doesn't
> specify an option to set for the 'var' I might be particularly
> interested in monitoring:
> `$ ./bsc_control.py -d localhost -m`
>
> Is this the default to monitor all? Can I go about narrowing this?

We don't have pub/sub mechanism - the volume of TRAP messages is rather low so
there's been no need for added complexity so far. The receiver just get all possible
TRAP messages and takes care of filtering those she's not interested in.

>
> Also, I don't feel like I quite understand the TRAP portion of "Table
> 2: Variables available over control interface" in the OsmoBSC user
> manual:

Think of it this way: if you want to get certain variable, than you send GET command
and receive response back with the variable name and value (see chapter §13 in
OsmoBSC User Manual). If that variable is marked as Trap = Yes in Table 2 chapter §6,
than you can get the same response without issuing explicit GET command - you connect
in monitor mode to CTRL interface and receive message with variable name and value
when it's changed.

> For example, the 'name' column seems to generally indicate the 'var'
> that one would pass in a GET/SET command, so I'm assuming the 'name'
> associated with the TRAP-enabled rows has the same significance. But
> these 'names' have no real meaning to me in terms of my experience
> with VTY, for example 'notification'.

There's no 1:1 correspondence between CTRL and VTY, both ways: there might be
variables available only via vty and variables available only via ctrl.

>
> I have tried to look toward the osmo-nitb unit tests for inspiration,
> as there is fantastic coverage for GET/SET, out haven't seen similar
> for TRAP.
>
> Can someone please point me in the right direction?

The easiest way to quickstart would be to compile OsmoBSC ("./configure
--enable-osmo-bsc" in OpenBSC repo) and than start it
(./openbsc/src/osmo-bsc/osmo-bsc -c ~/.config/osmocom/osmo-bsc.cfg) and start OsmoBTS
(./src/osmo-bts-trx/osmo-bts-trx -c ~/.config/osmocom/osmo-bts.cfg). After that you
can play with ctrl interface using GET (./bsc_control.py -d localhost -g
bts_connection_status) and TRAP (./bsc_control.py -d localhost -m) messages.

That way you don't even have to have functional network - all you've got to do is to
make sure that "ip.access unit-id" parameter matches in both BSC and BTS config. The
TRAP would be generated when OML connection between BSC and BTS is
established/dropped, even in the absence of actual MSC and TRX.

-- 
Max Suraev <msuraev at sysmocom.de> http://www.sysmocom.de/
======================================================================= 
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93 
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B 
* Geschaeftsfuehrer / Managing Director: Harald Welte 







More information about the OpenBSC mailing list