Bug #4244

Take MS power class into account to calculate appropiate MS Power level

Added by pespin about 1 year ago. Updated about 1 year ago.

A-bis RSL
Target version:
Start date:
Due date:
% Done:


Spec Reference:


osmo-bts.git loops.c ms_power_diff() currently contains:

// FIXME: to go above 1W, we need to know classmark of MS

* pespin trying to find out whether we already retrieve/calculate MS power class in some place
<fixeria> pespin: AFAIR, MS Power Class is a part of the Mobile Station Classmark 1
<fixeria> pespin: so the MSC should know it
<pespin> fixeria, yeah just found it has a "RF power capability"  field in it
<pespin> fixeria, in which message is that IE send? I was expecting to gather it in BTS
<pespin> in order to know the maximum power level we can ask the MS to use in loops.c ms_power_diff()
<fixeria> pespin: it is a part of Location Updating Request and CM Service Request messages
<fixeria> pespin: most likely, a part of Paging Response too
<pespin> ok many thanks
<pespin> fixeria, maybe it should actually be parsed by BSC and taken into account when sending Chan ACT
<fixeria> huh, now it's also interesting to me how to know the MS Power Class from the BTS
<pespin> well if the BSC takes it into account in MS Power Level during CHAN ACT then the BTS doesn't need to know about it
<pespin> it simply applies that power level as maximum
<fixeria> pespin: as far as I can see, the BSC already does parsing of some messages
<fixeria> there is handle_classmark_chg()
<pespin> yeah, looks like that's the intended way
<pespin> I'll check if there's a ticket to implement that and otherwise I'll create it
<fixeria> pespin: the question is how to inform the BTS about the MS Power Class? is there any A-Bis IE for that?
<pespin> fixeria, during CHAN ACT and during MS Power Control messages
<pespin> the MS Power IE contains the maximum power level allowed on that chan
<pespin> it is so far calculated based on "ms max power" param from VTY
<pespin> but we can take into account the rf power capability from classmark1 there too so restrict more the maximum power level
<fixeria> ok, so the MS Power IE coming from the BSC would contain the restricted power level (according to the band and MS Power Class), right?
<pespin> that's my guess indeed
<fixeria> makes sense
<fixeria> pespin: FYI:
Useful links:

Related issues

Related to OsmoBTS - Support #4213: ms-power-controlRejected09/23/2019

Related to OsmoBTS - Feature #1851: generalize power control and TA loop codeResolved11/18/2016


#1 Updated by pespin about 1 year ago

  • Description updated (diff)

#2 Updated by pespin about 1 year ago

  • Status changed from New to In Progress
  • % Done changed from 0 to 50

I submitted several helpers I needed in libosmocore:
remote: cosmetic: gsm_04_08.h: Fix trailing whitespace
remote: gsm_04_08.h: Introduce API osmo_gsm48_rfpowercap2powerclass()
remote: gsm: gsm_utils: Introduce API ms_max_pwr_dbm

And a WIP patch (needs to be tested) in

TODO1: Test patches (add TTCN3 test?)
TODO2: Compare power levels in osmo-bts (power_ctrl.c and loops.c) using dBm instead of Power Ctrl levels, in order to handle correctly DCS1800 power levels 29,30 and 31.

#3 Updated by pespin about 1 year ago

#4 Updated by pespin about 1 year ago bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class

#5 Updated by pespin about 1 year ago

  • % Done changed from 50 to 70 rsl: Assign recv pwr to lchan's max ms power bts-trx: Implement MS Power control loop calculations using dBm instead of ctl levels bts: TC_rsl_ms_pwr_dyn_down: Fix expected MS Power level

  • osmo-bsc: Send MS Power Control if a new ms_power level is calculated as a result of power class change in lchan_update_ms_power_ctrl_level().
  • osmo-bts:
    • Do similar fixed done in loops.c in power_control.c
    • In rsl.c rsl_rx_ms_pwr_ctrl(), Implement the FIXME: "FIXME: only set current to lchan->ms_power if actual value of current in dBm > value in dBm from lchan->ms_power, or if fixed=1."

#6 Updated by pespin about 1 year ago

  • Related to Feature #1851: generalize power control and TA loop code added

#7 Updated by pespin about 1 year ago

  • Status changed from In Progress to Feedback
  • % Done changed from 70 to 90

More related patches:
remote: comsetic: bs11_config: clean trailing whitespace
remote: bsc: Send MS Power Control msg upon max MS power change
remote: bsc: Adapt maximum MS Power Ctrl level based on band and MS Power class

TODO: Apply fixes done in loops.c into power_control.c, but that can be done as part of #1851, so marking this one as Feedback until patches are reviewed/merged.

#8 Updated by pespin about 1 year ago

  • Status changed from Feedback to Resolved
  • % Done changed from 90 to 100

Merged, closing.

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)