vty: Allow setting LAC as hexadecimal value

The LAC value currently configured is now printed as hexadecimal value
too.
It can still be entered as a decimal value in order to keep backward
compatibility, though the hexadecimal one is now preferred.

Related: OS#5631
Depends: libosmocore.git Ia2b7fbbf5502c28374c21dbff548232680da27d4
Change-Id: I9090d73ae9d39244b79b9dbafa1b164faebabc52
changes/58/29358/3
Pau Espin 3 months ago committed by pespin
parent 30bdf9a4c7
commit 57c2e68da2
  1. 1
      TODO-RELEASE
  2. 2
      doc/examples/osmo-bsc/ericsson/osmo-bsc.dug20-rus01-4trx.cfg
  3. 2
      doc/examples/osmo-bsc/ericsson/osmo-bsc.dug20-rus02-4trx.cfg
  4. 2
      doc/examples/osmo-bsc/ericsson/osmo-bsc.dug20-rus02-8trx.cfg
  5. 2
      doc/examples/osmo-bsc/ericsson/osmo-bsc.rbs2308.cfg
  6. 2
      doc/examples/osmo-bsc/nokia/osmo-bsc.insite.cfg
  7. 2
      doc/examples/osmo-bsc/osmo-bsc-4trx.cfg
  8. 2
      doc/examples/osmo-bsc/osmo-bsc-minimal.cfg
  9. 2
      doc/examples/osmo-bsc/osmo-bsc.cfg
  10. 2
      doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg
  11. 2
      doc/examples/osmo-bsc/siemens/osmo-bsc.bs11.cfg
  12. 6
      doc/manuals/chapters/bts-examples.adoc
  13. 2
      doc/manuals/chapters/bts.adoc
  14. 24
      doc/manuals/chapters/handover.adoc
  15. 16
      src/osmo-bsc/bts_vty.c
  16. 2
      tests/ctrl/osmo-bsc-apply-config-file.cfg
  17. 4
      tests/ctrl/osmo-bsc-neigh-test.cfg
  18. 2
      tests/handover/handover_test.c
  19. 2
      tests/nanobts_omlattr/nanobts_omlattr_test.c
  20. 12
      tests/neighbor_ident.vty

@ -8,3 +8,4 @@
# If any interfaces have been removed or changed since the last public release: c:r:0.
#library what description / commit summary line
libosmogsm >1.7.0 BTS_FEAT_OSMUX, RSL_IE_OSMO_OSMUX_CID
libosmocore >1.7.0 vty hexadecimal range support (location_area_code)

@ -33,7 +33,7 @@ network
band GSM900
om2000 version-limit oml gen 12 rev 10
cell_identity 0
location_area_code 1
location_area_code 0x0001
training_sequence_code 7
base_station_id_code 63
ms max power 15

@ -33,7 +33,7 @@ network
band GSM900
om2000 version-limit oml gen 12 rev 10
cell_identity 0
location_area_code 1
location_area_code 0x0001
training_sequence_code 7
base_station_id_code 63
ms max power 15

@ -33,7 +33,7 @@ network
band GSM900
om2000 version-limit oml gen 12 rev 10
cell_identity 0
location_area_code 1
location_area_code 0x0001
training_sequence_code 7
base_station_id_code 63
ms max power 15

@ -39,7 +39,7 @@ network
type rbs2000
band PCS1900
cell_identity 0
location_area_code 1
location_area_code 0x0001
training_sequence_code 7
base_station_id_code 63
ms max power 33

@ -27,7 +27,7 @@ network
type nokia_site
band GSM1900
cell_identity 1
location_area_code 1
location_area_code 0x0001
base_station_id_code 63
training_sequence_code 7

@ -11,7 +11,7 @@ network
type osmo-bts
band DCS1800
cell_identity 6969
location_area_code 1
location_area_code 0x0001
base_station_id_code 63
ms max power 15
cell reselection hysteresis 4

@ -4,7 +4,7 @@ network
bts 0
type osmo-bts
band GSM-1800
location_area_code 23
location_area_code 0x0017
ipa unit-id 1800 0
trx 0
rf_locked 0

@ -23,7 +23,7 @@ network
type osmo-bts
band DCS1800
cell_identity 6969
location_area_code 1
location_area_code 0x0001
base_station_id_code 63
ms max power 15
cell reselection hysteresis 4

@ -22,7 +22,7 @@ network
type osmo-bts
band DCS1800
cell_identity 0
location_area_code 1
location_area_code 0x0001
base_station_id_code 63
ms max power 15
cell reselection hysteresis 4

@ -39,7 +39,7 @@ network
type bs11
band GSM900
cell_identity 1
location_area_code 1
location_area_code 0x0001
training_sequence_code 7
base_station_id_code 63
oml e1 line 2 timeslot 1 sub-slot full

@ -26,7 +26,7 @@ network
type nanobts <2>
band DCS1800 <3>
cell_identity 0
location_area_code 1
location_area_code 0x0001
training_sequence_code 7
base_station_id_code 63
ms max power 15
@ -104,7 +104,7 @@ network
type nanobts
band DCS1800
cell_identity 0
location_area_code 1
location_area_code 0x0001
training_sequence_code 7
base_station_id_code 63
ms max power 15
@ -197,7 +197,7 @@ network
band GSM900
om2000 version-limit oml gen 12 rev 10 <2>
cell_identity 0
location_area_code 1
location_area_code 0x0001
training_sequence_code 7
base_station_id_code 63
ms max power 15

@ -108,7 +108,7 @@ network
type osmo-bts
band DCS1800
description The new BTS in Baikonur
location_area_code 2342
location_area_code 0x0926
cell_identity 5
base_station_id_code 63
ip.access unit_id 8888 0

@ -223,15 +223,15 @@ network
network
bts 0
# this cell's LAC=23 CI=5
location_area_code 23
# this cell's LAC=0x0017 CI=5
location_area_code 0x0017
cell_identity 5
# reference bts 1
neighbor lac-ci 23 6
bts 1
# this cell's LAC=23 CI=6
location_area_code 23
# this cell's LAC=0x0017 CI=6
location_area_code 0x0017
cell_identity 6
# reference bts 0
neighbor lac-ci 23 5
@ -252,8 +252,8 @@ desirable to use the `neighbor bts <0-255>` format, or omit the redundant
network
bts 0
# this cell's LAC=23 CI=5
location_area_code 23
# this cell's LAC=0x0017 CI=5
location_area_code 0x0017
cell_identity 5
# this cell's ARFCN=1 BSIC=1
trx 0
@ -263,8 +263,8 @@ network
neighbor lac-ci 23 6 arfcn 2 bsic 2
bts 1
# LAC=23 CI=6
location_area_code 23
# LAC=0x0017 CI=6
location_area_code 0x0017
cell_identity 6
# this cell's ARFCN=2 BSIC=2
trx 0
@ -286,8 +286,8 @@ Indication and 3.2.1.9 HANDOVER REQUIRED).
# BSC Alpha's osmo-bsc.cfg
network
bts 0
# this cell's LAC=23 CI=6
location_area_code 23
# this cell's LAC=0x0017 CI=6
location_area_code 0x0017
cell_identity 6
# this cell's ARFCN=2 BSIC=2
trx 0
@ -299,8 +299,8 @@ network
# BSC Beta's osmo-bsc.cfg
network
bts 0
# this cell's LAC=42 CI=3
location_area_code 42
# this cell's LAC=0x002A CI=3
location_area_code 0x002A
cell_identity 3
# this cell's ARFCN=1 BSIC=3
trx 0

@ -276,17 +276,15 @@ DEFUN_USRATTR(cfg_bts_ci,
DEFUN_USRATTR(cfg_bts_lac,
cfg_bts_lac_cmd,
X(BSC_VTY_ATTR_RESTART_ABIS_RSL_LINK),
"location_area_code <0-65535>",
"Set the Location Area Code (LAC) of this BTS\n" "LAC\n")
"location_area_code (<0-65535>|<0x0000-0xffff>)",
"Set the Location Area Code (LAC) of this BTS\n"
"LAC in decimal format\n"
"LAC in hexadecimal format\n")
{
struct gsm_bts *bts = vty->index;
int lac = atoi(argv[0]);
if (lac < 0 || lac > 0xffff) {
vty_out(vty, "%% LAC %d is not in the valid range (0-65535)%s",
lac, VTY_NEWLINE);
int lac;
if (osmo_str_to_int(&lac, argv[0], 0, 0, 0xffff) < 0)
return CMD_WARNING;
}
if (lac == GSM_LAC_RESERVED_DETACHED || lac == GSM_LAC_RESERVED_ALL_BTS) {
vty_out(vty, "%% LAC %d is reserved by GSM 04.08%s",
@ -4307,7 +4305,7 @@ static void config_write_bts_single(struct vty *vty, struct gsm_bts *bts)
vty_out(vty, " description %s%s", bts->description, VTY_NEWLINE);
vty_out(vty, " band %s%s", gsm_band_name(bts->band), VTY_NEWLINE);
vty_out(vty, " cell_identity %u%s", bts->cell_identity, VTY_NEWLINE);
vty_out(vty, " location_area_code %u%s", bts->location_area_code,
vty_out(vty, " location_area_code 0x%04x%s", bts->location_area_code,
VTY_NEWLINE);
if (bts->dtxu != GSM48_DTX_SHALL_NOT_BE_USED)
vty_out(vty, " dtx uplink%s%s",

@ -3,7 +3,7 @@ network
type osmo-bts
band DCS1800
cell_identity 123
location_area_code 1
location_area_code 0x0001
base_station_id_code 55
ms max power 15
cell reselection hysteresis 4

@ -20,7 +20,7 @@ network
type osmo-bts
band DCS1800
cell_identity 6969
location_area_code 1
location_area_code 0x0001
base_station_id_code 63
ms max power 15
cell reselection hysteresis 4
@ -77,7 +77,7 @@ network
type osmo-bts
band DCS1800
cell_identity 123
location_area_code 1
location_area_code 0x0001
base_station_id_code 55
ms max power 15
cell reselection hysteresis 4

@ -257,7 +257,7 @@ static struct gsm_bts *_create_bts(int num_trx, const char * const *ts_args, int
return NULL;
}
bts->location_area_code = 23;
bts->location_area_code = 0x0017;
bts->cell_identity = ci++;
bts->c0->arfcn = arfcn++;

@ -160,7 +160,7 @@ int main(int argc, char **argv)
bts->c0->arfcn = 866;
bts->cell_identity = 1337;
bts->network->plmn = (struct osmo_plmn_id){ .mcc=1, .mnc=1 };
bts->location_area_code = 1;
bts->location_area_code = 0x0001;
bts->gprs.rac = 0;
uint8_t attr_bts_expected[] =
{ 0x19, 0x73, 0x6d, 0x67, 0x61, 0x5b, 0x55, 0x18, 0x06, 0x0e, 0x00,

@ -21,7 +21,7 @@ OsmoBSC(config-net)# neighbor-resolution bind 1.2.3.4 ?
OsmoBSC(config-net)# bts 0
OsmoBSC(config-net-bts)# type osmo-bts
OsmoBSC(config-net-bts)# base_station_id_code 10
OsmoBSC(config-net-bts)# location_area_code 20
OsmoBSC(config-net-bts)# location_area_code 0x0014
OsmoBSC(config-net-bts)# cell_identity 30
OsmoBSC(config-net-bts)# trx 0
OsmoBSC(config-net-bts-trx)# arfcn 40
@ -31,7 +31,7 @@ OsmoBSC(config-net-bts)# exit
OsmoBSC(config-net)# bts 1
OsmoBSC(config-net-bts)# type osmo-bts
OsmoBSC(config-net-bts)# base_station_id_code 11
OsmoBSC(config-net-bts)# location_area_code 21
OsmoBSC(config-net-bts)# location_area_code 0x0015
OsmoBSC(config-net-bts)# cell_identity 31
OsmoBSC(config-net-bts)# trx 0
OsmoBSC(config-net-bts-trx)# arfcn 41
@ -41,7 +41,7 @@ OsmoBSC(config-net-bts)# exit
OsmoBSC(config-net)# bts 2
OsmoBSC(config-net-bts)# type osmo-bts
OsmoBSC(config-net-bts)# base_station_id_code 12
OsmoBSC(config-net-bts)# location_area_code 22
OsmoBSC(config-net-bts)# location_area_code 0x0016
OsmoBSC(config-net-bts)# cell_identity 65535
OsmoBSC(config-net-bts)# trx 0
OsmoBSC(config-net-bts-trx)# arfcn 42
@ -53,7 +53,7 @@ OsmoBSC(config-net)# show running-config
bts 0
...
cell_identity 30
location_area_code 20
location_area_code 0x0014
base_station_id_code 10
...
trx 0
@ -63,7 +63,7 @@ OsmoBSC(config-net)# show running-config
bts 1
...
cell_identity 31
location_area_code 21
location_area_code 0x0015
base_station_id_code 11
...
trx 0
@ -73,7 +73,7 @@ OsmoBSC(config-net)# show running-config
bts 2
...
cell_identity 65535
location_area_code 22
location_area_code 0x0016
base_station_id_code 12
...
trx 0

Loading…
Cancel
Save