Skip to content

struct gsm_modem_counters_t ​

Counters of the modem driver over the sliding last 24 h. More...

#include <modem/gsm_modem.h>

Public Attributes ​

Name
uint32_tspan_s
covered part of the window, at most 86400
uint16_tattaches
device-side attach actions (power-on, pin reset, power cycle, CFUN 0->1)
uint16_tmodem_resets
modem resets
uint16_tpdp_attempts
data session setups (dials)
uint16_tauth_fails
setups rejected by authentication
uint16_trrc
radio connections, see rrc_source
uint16_tpdp_fails
failed data session setups
uint16_trejects
registration rejects (CEREG 3)
uint16_tregistrations
registrations (CEREG 1/5)
uint16_treattaches
device-side detach/re-attach cycles
uint16_tattach_limit
cap for the current access technology
uint8_tattach_level
0, 80, 90 or 100: share of the cap reached
uint8_trrc_source
GSM_MODEM_RRC_*.
uint8_tpdp_state
GSM_MODEM_PDP_*.
uint8_treject_cause
EMM cause of the running reject, 0 = none.
uint32_ttx_bytes
PPP payload sent in 24 h.
uint32_trx_bytes
PPP payload received in 24 h.
uint32_tmonth_bytes_ltem
PPP payload (both directions) in the calendar month (UTC), all but NB-IoT.
uint32_tmonth_bytes_nbiot
the same on NB-IoT

Detailed Description ​

cpp
struct gsm_modem_counters_t;

Counters of the modem driver over the sliding last 24 h.

Kept in hourly buckets, persisted in the KV-FS (key 0xC020) and so surviving reboots and power loss; span_s says how much of the 24 h is covered. Device-side attaches are capped: 24 per 24 h on NB-IoT, 144 otherwise (doubled spacing from 80 %).

Public Attributes Documentation ​

variable span_s ​

cpp
uint32_t gsm_modem_counters_t::span_s

covered part of the window, at most 86400

variable attaches ​

cpp
uint16_t gsm_modem_counters_t::attaches

device-side attach actions (power-on, pin reset, power cycle, CFUN 0->1)

variable modem_resets ​

cpp
uint16_t gsm_modem_counters_t::modem_resets

modem resets

variable pdp_attempts ​

cpp
uint16_t gsm_modem_counters_t::pdp_attempts

data session setups (dials)

variable auth_fails ​

cpp
uint16_t gsm_modem_counters_t::auth_fails

setups rejected by authentication

variable rrc ​

cpp
uint16_t gsm_modem_counters_t::rrc

radio connections, see rrc_source

variable pdp_fails ​

cpp
uint16_t gsm_modem_counters_t::pdp_fails

failed data session setups

variable rejects ​

cpp
uint16_t gsm_modem_counters_t::rejects

registration rejects (CEREG 3)

variable registrations ​

cpp
uint16_t gsm_modem_counters_t::registrations

registrations (CEREG 1/5)

variable reattaches ​

cpp
uint16_t gsm_modem_counters_t::reattaches

device-side detach/re-attach cycles

variable attach_limit ​

cpp
uint16_t gsm_modem_counters_t::attach_limit

cap for the current access technology

variable attach_level ​

cpp
uint8_t gsm_modem_counters_t::attach_level

0, 80, 90 or 100: share of the cap reached

variable rrc_source ​

cpp
uint8_t gsm_modem_counters_t::rrc_source

GSM_MODEM_RRC_*.

variable pdp_state ​

cpp
uint8_t gsm_modem_counters_t::pdp_state

GSM_MODEM_PDP_*.

variable reject_cause ​

cpp
uint8_t gsm_modem_counters_t::reject_cause

EMM cause of the running reject, 0 = none.

variable tx_bytes ​

cpp
uint32_t gsm_modem_counters_t::tx_bytes

PPP payload sent in 24 h.

variable rx_bytes ​

cpp
uint32_t gsm_modem_counters_t::rx_bytes

PPP payload received in 24 h.

variable month_bytes_ltem ​

cpp
uint32_t gsm_modem_counters_t::month_bytes_ltem

PPP payload (both directions) in the calendar month (UTC), all but NB-IoT.

variable month_bytes_nbiot ​

cpp
uint32_t gsm_modem_counters_t::month_bytes_nbiot

the same on NB-IoT