View Source VintageNetQMI.ASUCalculator (vintage_net_qmi v0.3.5)

Convert raw ASU values to friendlier units

See https://en.wikipedia.org/wiki/Mobile_phone_signal#ASU for more information.

The following conversions are done:

  • dBm
  • Number of "bars" out of 4 bars

Link to this section Summary

Types

Number of bars out of 4 to show in a UI

dBm

GSM ASU values

LTE ASU values

UMTS ASU values

Functions

Compute signal level numbers from a GSM ASU

Link to this section Types

@type bars() :: 0..4

Number of bars out of 4 to show in a UI

@type dbm() :: neg_integer()

dBm

@type gsm_asu() :: 0..31 | 99

GSM ASU values

ASU values map to RSSI. 99 means unknown

@type lte_asu() :: 0..97

LTE ASU values

ASU values map to RSRP

https://arimas.com/78-rsrp-and-rsrq-measurement-in-lte/

@type umts_asu() :: 0..90 | 255

UMTS ASU values

ASU values map to RSCP

Link to this section Functions

@spec from_gsm_asu(gsm_asu()) :: %{asu: gsm_asu(), dbm: dbm(), bars: bars()}

Compute signal level numbers from a GSM ASU

The AT+CSQ command should report ASU values in this format.

@spec from_lte_rssi(dbm()) :: %{asu: non_neg_integer(), dbm: dbm(), bars: bars()}