OsmoBSC> enable

OsmoBSC# ### Default configuration
OsmoBSC# show running-config
...
  bs-power-control
   mode static
  ms-power-control
   mode dyn-bts
   ctrl-interval 2
   step-size inc 4 red 2
   rxlev-thresh lower 32 upper 38
   rxlev-thresh-comp lower 10 12 upper 19 20
   rxqual-thresh lower 3 upper 0
   rxqual-thresh-comp lower 5 7 upper 15 18
...

OsmoBSC# ### Check that 'power-ctrl' node and its commands exist
OsmoBSC# configure terminal
OsmoBSC(config)# network
OsmoBSC(config-net)# bts 0
OsmoBSC(config-net-bts)# list with-flags
...
  . ...  (bs-power-control|ms-power-control)
  . ..l  no (bs-power-control|ms-power-control)
...

OsmoBSC(config-net-bts)# bs-power-control
OsmoBSC(config-bs-power-ctrl)# list with-flags
...
  . l.  mode (static|dyn-bts|dyn-bsc) [reset]
  . l.  bs-power (static|dyn-max) <0-30>
  . lv  ctrl-interval <0-31>
  . lv  step-size inc <2-6> red <2-4>
  . lv  rxlev-thresh lower <0-63> upper <0-63>
  . lv  rxqual-thresh lower <0-7> upper <0-7>
  . lv  ci-thresh (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs|all) (enable|disable)
  . lv  ci-thresh (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs) lower <0-30> upper <0-30>
  . lv  rxlev-thresh-comp lower <0-31> <0-31> upper <0-31> <0-31>
  . lv  rxqual-thresh-comp lower <0-31> <0-31> upper <0-31> <0-31>
  . lv  ci-thresh-comp (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs) lower <0-31> <0-31> upper <0-31> <0-31>
  . lv  no (rxlev-avg|rxqual-avg)
  . lv  (rxlev-avg|rxqual-avg) params hreqave <1-31> hreqt <1-31>
  . lv  (rxlev-avg|rxqual-avg) algo (unweighted|weighted|mod-median)
  . lv  (rxlev-avg|rxqual-avg) algo osmo-ewma beta <1-99>
  . lv  no ci-avg (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs)
  . lv  ci-avg (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs) params hreqave <1-31> hreqt <1-31>
  . lv  ci-avg (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs) algo (unweighted|weighted|mod-median)
  . lv  ci-avg (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs) algo osmo-ewma beta <1-99>

OsmoBSC(config-bs-power-ctrl)# bs-power ?
  static   Fixed BS Power reduction value (for static mode)
  dyn-max  Maximum BS Power reduction value (for dynamic mode)
OsmoBSC(config-bs-power-ctrl)# bs-power static ?
  <0-30>  BS Power reduction value (in dB, even numbers only)
OsmoBSC(config-bs-power-ctrl)# bs-power static 3
% Incorrect BS Power reduction value, an even number is expected
OsmoBSC(config-bs-power-ctrl)# bs-power static 6
OsmoBSC(config-bs-power-ctrl)# show running-config
...
  bs-power-control
   mode static
   bs-power static 6
  ms-power-control
   mode dyn-bts
... !bs-power

OsmoBSC(config-bs-power-ctrl)# ### Check default BS Power Parameters
OsmoBSC(config-bs-power-ctrl)# mode dyn-bts
OsmoBSC(config-bs-power-ctrl)# show running-config
...
  bs-power-control
   mode dyn-bts
   bs-power dyn-max 12
   ctrl-interval 1
   step-size inc 4 red 2
   rxlev-thresh lower 32 upper 38
   rxlev-thresh-comp lower 10 12 upper 19 20
   rxqual-thresh lower 3 upper 0
   rxqual-thresh-comp lower 5 7 upper 15 18
  ms-power-control
   mode dyn-bts
...

OsmoBSC(config-bs-power-ctrl)# bs-power dyn-max 30
OsmoBSC(config-bs-power-ctrl)# show running-config
...
  bs-power-control
   mode dyn-bts
   bs-power dyn-max 30
... !bs-power
  ms-power-control
   mode dyn-bts
... !bs-power

OsmoBSC(config-bs-power-ctrl)# ctrl-interval 31
OsmoBSC(config-bs-power-ctrl)# show running-config
...
  bs-power-control
...
   ctrl-interval 31
...
  ms-power-control
...
   ctrl-interval 2
...

OsmoBSC(config-bs-power-ctrl)# exit
OsmoBSC(config-net-bts)# ms-power-control
OsmoBSC(config-ms-power-ctrl)# list with-flags
...
  . l.  mode (static|dyn-bts|dyn-bsc) [reset]
  . l.  bs-power (static|dyn-max) <0-30>
  . lv  ctrl-interval <0-31>
  . lv  step-size inc <2-6> red <2-4>
  . lv  rxlev-thresh lower <0-63> upper <0-63>
  . lv  rxqual-thresh lower <0-7> upper <0-7>
  . lv  ci-thresh (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs|all) (enable|disable)
  . lv  ci-thresh (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs) lower <0-30> upper <0-30>
  . lv  rxlev-thresh-comp lower <0-31> <0-31> upper <0-31> <0-31>
  . lv  rxqual-thresh-comp lower <0-31> <0-31> upper <0-31> <0-31>
  . lv  ci-thresh-comp (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs) lower <0-31> <0-31> upper <0-31> <0-31>
  . lv  no (rxlev-avg|rxqual-avg)
  . lv  (rxlev-avg|rxqual-avg) params hreqave <1-31> hreqt <1-31>
  . lv  (rxlev-avg|rxqual-avg) algo (unweighted|weighted|mod-median)
  . lv  (rxlev-avg|rxqual-avg) algo osmo-ewma beta <1-99>
  . lv  no ci-avg (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs)
  . lv  ci-avg (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs) params hreqave <1-31> hreqt <1-31>
  . lv  ci-avg (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs) algo (unweighted|weighted|mod-median)
  . lv  ci-avg (fr-efr|hr|amr-fr|amr-hr|sdcch|gprs) algo osmo-ewma beta <1-99>

OsmoBSC(config-ms-power-ctrl)# ### Check default MS Power Parameters
OsmoBSC(config-ms-power-ctrl)# show running-config
...
  bs-power-control
   mode dyn-bts
...
  ms-power-control
   mode dyn-bts
   ctrl-interval 2
   step-size inc 4 red 2
   rxlev-thresh lower 32 upper 38
   rxlev-thresh-comp lower 10 12 upper 19 20
   rxqual-thresh lower 3 upper 0
   rxqual-thresh-comp lower 5 7 upper 15 18
   ci-thresh fr-efr disable
   ci-thresh fr-efr lower 13 upper 17
   ci-thresh-comp fr-efr lower 5 7 upper 15 18
   ci-thresh hr disable
   ci-thresh hr lower 16 upper 21
   ci-thresh-comp hr lower 5 7 upper 15 18
   ci-thresh amr-fr disable
   ci-thresh amr-fr lower 7 upper 11
   ci-thresh-comp amr-fr lower 5 7 upper 15 18
   ci-thresh amr-hr disable
   ci-thresh amr-hr lower 13 upper 17
   ci-thresh-comp amr-hr lower 5 7 upper 15 18
   ci-thresh sdcch disable
   ci-thresh sdcch lower 12 upper 16
   ci-thresh-comp sdcch lower 5 7 upper 15 18
   ci-thresh gprs disable
   ci-thresh gprs lower 18 upper 24
   ci-thresh-comp gprs lower 5 7 upper 15 18
...

OsmoBSC(config-ms-power-ctrl)# bs-power static 30
% This command is only valid for 'bs-power-control' node
OsmoBSC(config-ms-power-ctrl)# bs-power dyn-max 30
% This command is only valid for 'bs-power-control' node

OsmoBSC(config-ms-power-ctrl)# ctrl-interval 2
OsmoBSC(config-ms-power-ctrl)# show running-config
...
  bs-power-control
   mode dyn-bts
...
   ctrl-interval 31
... !ctrl-interval
  ms-power-control
   mode dyn-bts
...
   ctrl-interval 2
... !ctrl-interval

OsmoBSC(config-ms-power-ctrl)# step-size inc 5 red 4
% Power change step size must be an even number
OsmoBSC(config-ms-power-ctrl)# step-size inc 2 red 3
% Power change step size must be an even number
OsmoBSC(config-ms-power-ctrl)# step-size inc 2 red 4
% Increase step size (2) should be greater than reduce step size (4), consider changing it

OsmoBSC(config-ms-power-ctrl)# step-size inc 6 red 4
OsmoBSC(config-ms-power-ctrl)# show running-config
...
  bs-power-control
   mode dyn-bts
...
   step-size inc 4 red 2
...
  ms-power-control
   mode dyn-bts
...
   step-size inc 6 red 4
...

OsmoBSC(config-ms-power-ctrl)# rxlev-thresh lower?
  lower  Lower RxLev value (default is 32, i.e. -78 dBm)
OsmoBSC(config-ms-power-ctrl)# rxlev-thresh lower ?
  <0-63>  Lower RxLev value (signal strength, 0 is worst, 63 is best)
OsmoBSC(config-ms-power-ctrl)# rxlev-thresh lower 30 upper?
  upper  Upper RxLev value (default is 38, i.e. -72 dBm)
OsmoBSC(config-ms-power-ctrl)# rxlev-thresh lower 30 upper ?
  <0-63>  Upper RxLev value (signal strength, 0 is worst, 63 is best)
OsmoBSC(config-ms-power-ctrl)# rxlev-thresh lower 30 upper 63
OsmoBSC(config-ms-power-ctrl)# show running-config
...
  bs-power-control
... !rxlev-thresh
   rxlev-thresh lower 32 upper 38
...
  ms-power-control
... !rxlev-thresh
   rxlev-thresh lower 30 upper 63
...

OsmoBSC(config-ms-power-ctrl)# rxqual-thresh lower?
  lower  Lower RxQual value (default is 3, i.e. 0.8% <= BER < 1.6%)
OsmoBSC(config-ms-power-ctrl)# rxqual-thresh lower ?
  <0-7>  Lower RxQual value (signal quality, 0 is best, 7 is worst)
OsmoBSC(config-ms-power-ctrl)# rxqual-thresh lower 7 upper?
  upper  Upper RxQual value (default is 0, i.e. BER < 0.2%)
OsmoBSC(config-ms-power-ctrl)# rxqual-thresh lower 7 upper ?
  <0-7>  Upper RxQual value (signal quality, 0 is best, 7 is worst)
OsmoBSC(config-ms-power-ctrl)# rxqual-thresh lower 7 upper 4
OsmoBSC(config-ms-power-ctrl)# show running-config
...
  bs-power-control
... !rxqual-thresh
   rxqual-thresh lower 3 upper 0
...
  ms-power-control
... !rxqual-thresh
   rxqual-thresh lower 7 upper 4
...

OsmoBSC(config-ms-power-ctrl)# rxlev-avg algo osmo-ewma beta 50
OsmoBSC(config-ms-power-ctrl)# rxqual-avg algo unweighted
OsmoBSC(config-ms-power-ctrl)# show running-config
...
  bs-power-control
... !(rxlev-avg|rxqual-avg)
  ms-power-control
... !(rxlev-avg|rxqual-avg)
   rxlev-avg algo osmo-ewma beta 50
   rxlev-avg params hreqave 4 hreqt 6
... !(rxlev-avg|rxqual-avg)
   rxqual-avg algo unweighted
   rxqual-avg params hreqave 4 hreqt 6
...

OsmoBSC(config-ms-power-ctrl)# rxlev-avg params hreqave 2 hreqt 20
% Hreqave (2) * Hreqt (20) = 40 must be < 32
OsmoBSC(config-ms-power-ctrl)# rxlev-avg params hreqave 2 hreqt 15
OsmoBSC(config-ms-power-ctrl)# show running-config
...
  bs-power-control
... !rxlev-avg params
  ms-power-control
... !rxlev-avg params
   rxlev-avg params hreqave 2 hreqt 15
...

OsmoBSC(config-ms-power-ctrl)# exit
OsmoBSC(config-net-bts)# ### Disable BS/MS Power Control
OsmoBSC(config-net-bts)# no bs-power-control
OsmoBSC(config-net-bts)# no ms-power-control
OsmoBSC(config-net-bts)# show running-config
...
  no bs-power-control
  no ms-power-control
...

OsmoBSC(config-net-bts)# bs-power-control
OsmoBSC(config-bs-power-ctrl)# mode static reset
% Reset to default parameters
OsmoBSC(config-bs-power-ctrl)# exit

OsmoBSC(config-net-bts)# ms-power-control
OsmoBSC(config-ms-power-ctrl)# mode dyn-bts reset
% Reset to default parameters
OsmoBSC(config-ms-power-ctrl)# exit

OsmoBSC(config-net-bts)# show running-config
...
  bs-power-control
   mode static
  ms-power-control
   mode dyn-bts
   ctrl-interval 2
   step-size inc 4 red 2
   rxlev-thresh lower 32 upper 38
   rxlev-thresh-comp lower 10 12 upper 19 20
   rxqual-thresh lower 3 upper 0
   rxqual-thresh-comp lower 5 7 upper 15 18
...

OsmoBSC(config-net-bts)# ### Check 'ci-thresh-comp (enable|disable) all' works properly:
OsmoBSC(config-net-bts)# ms-power-control
OsmoBSC(config-ms-power-ctrl)# show running-config
...
  ms-power-control
...
   ci-thresh fr-efr disable
   ci-thresh fr-efr lower 13 upper 17
   ci-thresh-comp fr-efr lower 5 7 upper 15 18
   ci-thresh hr disable
   ci-thresh hr lower 16 upper 21
   ci-thresh-comp hr lower 5 7 upper 15 18
   ci-thresh amr-fr disable
   ci-thresh amr-fr lower 7 upper 11
   ci-thresh-comp amr-fr lower 5 7 upper 15 18
   ci-thresh amr-hr disable
   ci-thresh amr-hr lower 13 upper 17
   ci-thresh-comp amr-hr lower 5 7 upper 15 18
   ci-thresh sdcch disable
   ci-thresh sdcch lower 12 upper 16
   ci-thresh-comp sdcch lower 5 7 upper 15 18
   ci-thresh gprs disable
   ci-thresh gprs lower 18 upper 24
   ci-thresh-comp gprs lower 5 7 upper 15 18
...

OsmoBSC(config-ms-power-ctrl)# ci-thresh all enable
OsmoBSC(config-ms-power-ctrl)# show running-config
...
  ms-power-control
...
   ci-thresh fr-efr enable
   ci-thresh fr-efr lower 13 upper 17
   ci-thresh-comp fr-efr lower 5 7 upper 15 18
   ci-thresh hr enable
   ci-thresh hr lower 16 upper 21
   ci-thresh-comp hr lower 5 7 upper 15 18
   ci-thresh amr-fr enable
   ci-thresh amr-fr lower 7 upper 11
   ci-thresh-comp amr-fr lower 5 7 upper 15 18
   ci-thresh amr-hr enable
   ci-thresh amr-hr lower 13 upper 17
   ci-thresh-comp amr-hr lower 5 7 upper 15 18
   ci-thresh sdcch enable
   ci-thresh sdcch lower 12 upper 16
   ci-thresh-comp sdcch lower 5 7 upper 15 18
   ci-thresh gprs enable
   ci-thresh gprs lower 18 upper 24
   ci-thresh-comp gprs lower 5 7 upper 15 18
...

OsmoBSC(config-ms-power-ctrl)# ci-thresh all disable
OsmoBSC(config-ms-power-ctrl)# show running-config
...
  ms-power-control
...
   ci-thresh fr-efr disable
   ci-thresh fr-efr lower 13 upper 17
   ci-thresh-comp fr-efr lower 5 7 upper 15 18
   ci-thresh hr disable
   ci-thresh hr lower 16 upper 21
   ci-thresh-comp hr lower 5 7 upper 15 18
   ci-thresh amr-fr disable
   ci-thresh amr-fr lower 7 upper 11
   ci-thresh-comp amr-fr lower 5 7 upper 15 18
   ci-thresh amr-hr disable
   ci-thresh amr-hr lower 13 upper 17
   ci-thresh-comp amr-hr lower 5 7 upper 15 18
   ci-thresh sdcch disable
   ci-thresh sdcch lower 12 upper 16
   ci-thresh-comp sdcch lower 5 7 upper 15 18
   ci-thresh gprs disable
   ci-thresh gprs lower 18 upper 24
   ci-thresh-comp gprs lower 5 7 upper 15 18
...
