QMI.Codec.NetworkAccess (qmi v0.8.0) View Source

Codec for making network access service requests

Link to this section Summary

Types

Report from requesting the home network

The radio interface that is being reported

Information about an radio interface band

Required fields

Report from requesting the signal strength

Functions

Make the request for getting the home network

Get the radio band information

Make the QMI.request() for getting signal strength

Parse an indication

Link to this section Types

Specs

attach_state() :: :unknown | :attached | :detached

Specs

home_network_report() :: %{mcc: char(), mnc: char(), provider: binary()}

Report from requesting the home network

Specs

network() :: :network_unknown | :network_3gpp2 | :network_3gpp

Specs

radio_interface() ::
  :no_service | :cdma_1x | :cdma_1x_evdo | :amps | :gsm | :umts | :lte

The radio interface that is being reported

Specs

rf_band_information() :: %{
  interface: radio_interface(),
  band: binary(),
  channel: integer()
}

Information about an radio interface band

Link to this type

serving_system_indication()

View Source

Specs

serving_system_indication() :: %{
  :name => :serving_system_indication,
  :service_id => 3,
  :indication_id => 36,
  :serving_system_registration_state => serving_system_registration_state(),
  :serving_system_cs_attach_state => attach_state(),
  :serving_system_ps_attach_state => attach_state(),
  :serving_system_selected_network => network(),
  :serving_system_radio_interfaces => [radio_interface()],
  optional(:cell_id) => integer(),
  optional(:utc_offset) => Calendar.utc_offset(),
  optional(:location_area_code) => integer(),
  optional(:network_datetime) => NaiveDateTime.t(),
  optional(:roaming) => boolean(),
  optional(:std_offset) => Calendar.std_offset()
}

Required fields:

  • :name - the name of the indication
  • :service_id - the service id
  • :indication_id - the indication id
  • :serving_system_registration_state - the state of the registration status to the serving system
  • :serving_system_cs_attach_state - the circuit-switched domain attach state
  • :serving_system_ps_attach_state - the packet-switched domain attach state
  • :serving_system_selected_network - the type of selected radio access network
  • :serving_system_radio_interfaces - a list of raido interfaces currently in use

Optional fields:

  • :cell_id - the id of the cell being used by the connected tower
  • :utc_offset - the UTC offset in seconds
  • :location_area_code - the location area code of a tower
  • :network_datetime - the reported datetime of the network when connecting
  • :roaming - if you are in roaming or not
  • :std_offset - Calendar.std_offset() for daylight savings adjustment
Link to this type

serving_system_registration_state()

View Source

Specs

serving_system_registration_state() ::
  :not_registered | :registered | :registration_denied | :registration_unknown
Link to this type

signal_strength_report()

View Source

Specs

signal_strength_report() :: %{
  rssi_reports: [%{radio: radio_interface(), rssi: integer()}]
}

Report from requesting the signal strength

Link to this section Functions

Specs

get_home_network() :: QMI.request()

Make the request for getting the home network

Specs

get_rf_band_info() :: QMI.request()

Get the radio band information

Specs

get_signal_strength() :: QMI.request()

Make the QMI.request() for getting signal strength

Specs

parse_indication(binary()) ::
  {:ok, serving_system_indication()} | {:error, :invalid_indication}

Parse an indication