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

Codec for making network access service requests

Summary

Types

Cell set

eMBMS coverage status

Whether LTE emergency bearer is supported.

System table index referencing the beginning of the geo in which the current serving system is present. When the system index is not known, 0xFFFF is used.

Cell Location Info

Sys Info

Preference settings for when a device selects a system

Report from requesting the home network

Cell access status for LTE calls

LTE Info - Intrafrequency

LTE registration domain

LTE SMS domain

LTE System Infox

LTE Voice domain

The networking selection preference

How long a system preference change should be applied

The radio interface that is being reported

The network registration restriction preference

Information about an radio interface band

The roaming preference

Required fields

The options to configure the system selection preference

Report from requesting the signal strength

SIM rejection info

Registration restriction

The modem usage preference setting

The voice domain preference setting

Functions

Make the QMI.request() for getting cell location info

Make the request for getting the home network

Get the radio band information

Make the QMI.request() for getting signal strength

Make the QMI.request() for getting cell location info

Make QMI.request() to get the system selection preferences

Parse an indication

Generate the QMI.request() for setting system selection preferences

Types

@type attach_state() :: :unknown | :attached | :detached
@type cell() :: %{
  pci: 0..503,
  rsrq: -200..-30,
  rsrp: -1400..-440,
  rssi: -1200..0,
  srxlev: -128..128
}

Cell set

  • :pci - Physical cell ID
  • :rsrq - Current RSRQ in 1/10 dB as measured by L1
  • :rsrp - Current RSRP in 1/10 dBm as measured by L1
  • :rssi - Current RSSI in 1/10 dBm as measured by L1
  • :srxlev - Cell selection Rx level (Srxlev) value (This field is only valid when ue_in_idle is TRUE.)
Link to this type

embms_coverage_status()

View Source
@type embms_coverage_status() ::
  :not_available
  | :available
  | :not_available_due_to_uemode
  | :not_available_due_to_emergency
  | :unknown

eMBMS coverage status

  • :not_available - Coverage not available
  • :available - Coverage available
  • :not_available_due_to_uemode - Coverage not available due to UE Mode
  • :not_available_due_to_emergency - Coverage not available due to emergency
  • :unknown - Coverage unknown
@type emergency_access() :: boolean() | :unknown

Whether LTE emergency bearer is supported.

  • :true - LTE emergency bearer is supported
  • :false - LTE emergency bearer is NOT supported
  • :unknown - for scenarios where information is not available from the lower layers; e.g., if the UE powers up while acquiring service or in the middle of an attach procedure.
@type geo_sys_idx() :: 0..65535

System table index referencing the beginning of the geo in which the current serving system is present. When the system index is not known, 0xFFFF is used.

Link to this type

get_cell_location_info()

View Source
@type get_cell_location_info() :: %{
  optional(:lte_info_intrafrequency) => lte_info_intrafrequency(),
  optional(:timing_advance) => pos_integer(),
  optional(:doppler_measurement) => 0..400,
  optional(:lte_intra_earfcn) => pos_integer(),
  optional(:lte_inter_earfcn) => pos_integer()
}

Cell Location Info

  • :timing_advance - Timing advance of the LTE cell in microseconds
  • :doppler_measurement - Doppler measurement in Hz
  • :lte_intra_earfcn - LTE intrafrequency EARFCN extended size
  • :lte_inter_earfcn - LTE interfrequency EARFCN extended size
@type get_sys_info() :: %{
  optional(:lte_sys_info) => lte_sys_info(),
  optional(:geo_sys_idx) => geo_sys_idx(),
  optional(:voice_support_on_lte) => boolean(),
  optional(:sim_rej_info) => sim_rej_info(),
  optional(:lte_ims_voice_avail) => boolean(),
  optional(:lte_voice_status) => lte_voice_status(),
  optional(:srv_reg_restriction) => srv_reg_restriction(),
  optional(:lte_reg_domain) => lte_reg_domain(),
  optional(:lte_embms_coverage_trace_id) => -1..32768,
  optional(:lte_sms_status) => lte_sms_status(),
  optional(:lte_is_eb_supported) => emergency_access(),
  optional(:emergency_access_barred) => emergency_access(),
  optional(:lte_cell_status) => lte_cell_status(),
  optional(:embms_coverage_status) => embms_coverage_status()
}

Sys Info

Link to this type

get_system_selection_preference_response()

View Source
@type get_system_selection_preference_response() :: %{
  optional(:emergency_mode) => :off | :on,
  optional(:mode_preference) => [radio_interface()],
  optional(:roaming_preference) => roaming_preference(),
  optional(:network_selection_preference) => network_selection_preference(),
  optional(:acquisition_order) => [radio_interface()],
  optional(:registration_restriction) => registration_restriction_preference(),
  optional(:usage_settings) => usage_setting_preference(),
  optional(:voice_domain) => voice_domain_preference()
}

Preference settings for when a device selects a system

  • :emergency_mode - :on if the device is in emergency mode, :off otherwise
  • :mode_preference - a list of radio access technologies the device will try to use
  • :roaming_preference - the device roaming preference
  • :network_selection_preference - if the device will automatically select a network
  • :acquisition_order - the order in which the device will try to connect to a radio access technology
  • :registration_restriction - the system registration restriction
  • :usage_settings - the modem usage preference
  • :voice_domain_preference - the voice domain preference
@type home_network_report() :: %{mcc: char(), mnc: char(), provider: binary()}

Report from requesting the home network

@type lte_cell_status() ::
  :normal_only | :emergency_only | :no_calls | :all_calls | :unknown

Cell access status for LTE calls

  • :normal_only - Cell access is allowed for normal calls only
  • :emergency_only - Cell access is allowed for emergency calls only
  • :no_calls - Cell access is not allowed for any call type
  • :all_calls - Cell access is allowed for all call types
  • :unknown - Cell access type is unknown
Link to this type

lte_info_intrafrequency()

View Source
@type lte_info_intrafrequency() :: %{
  ue_in_idle: boolean(),
  plmn: pos_integer(),
  tac: pos_integer(),
  global_cell_id: pos_integer(),
  earfcn: 0..65535,
  serving_cell_id: 0..503,
  cell_resel_priority: 0..7,
  s_non_intra_search: 0..31,
  thresh_serving_low: 0..31,
  s_intra_search: 0..31,
  cells: [cell()]
}

LTE Info - Intrafrequency

  • :ue_in_idle - true if the UE is in Idle mode
  • :plmn - coded as octet 3, 4, and 5 in 3GPP TS 24.008Section 10.5.1.3
  • :tac - Tracking area code
  • :global_cell_id - Global cell ID in the system information block
  • :earfcn - E-UTRA absolute radio frequency channel number of the serving cell.
  • :serving_cell_id - LTE serving cell ID. Range: 0 to 503. This is the cell ID of the serving cell and can be found in the cell list.
  • :cell_resel_priority - Priority for serving frequency. Range: 0 to 7. (This field is only valid when ue_in_idle is TRUE.)
  • :s_non_intra_search - S non-intra search threshold to control non-intrafrequency searches. Range: 0 to 31. (This field is only valid when ue_in_idle is TRUE.)
  • :thresh_serving_low - Serving cell low threshold. Range: 0 to 31. (This field is only valid when ue_in_idle is TRUE.)
  • :s_intra_search - S intra search threshold. Range: 0 to 31. The current cell measurement must fall below this threshold to consider intrafrequency for reselection. (This field is only valid when ue_in_idle is TRUE.)
@type lte_reg_domain() ::
  :not_applicable | :cs_only | :ps_only | :cs_ps | :limited_service

LTE registration domain

  • :not_applicable - UE is not in Camp Only mode
  • :cs_only - UE is in Camp Only mode and the PLMN can provide CS service only
  • :ps_only - UE is in Camp Only mode and the PLMN can provide PS service only
  • :cs_ps - UE is in Camp Only mode and the PLMN can provide CS and PS service
  • :limited_service - UE is in Camp Only mode, but the PLMN cannot provide any service
@type lte_sms_status() :: :no_sms | :ims | :"1X" | :"3GPP"

LTE SMS domain

  • :no_sms - No SMS, stay on LTE
  • :ims - SMS is supported over the IMS network
  • :"1X" - SMS is supported over the 1X network *:"3GPP" - SMS is supported over the 3GPP network
@type lte_sys_info() :: %{
  optional(:srv_domain) => :no_service | :cs_only | :ps_only | :cs_ps | :camped,
  optional(:srv_capability) =>
    :no_service | :cs_only | :ps_only | :cs_ps | :camped,
  optional(:roam_status) =>
    :off
    | :on
    | :blink
    | :out_of_neighborhood
    | :out_of_building
    | :preferred_system
    | :available_system
    | :alliance_partner
    | :premium_partner
    | :full_service
    | :partial_service
    | :banner_on,
  optional(:is_sys_forbidden) => boolean(),
  optional(:lac) => pos_integer(),
  optional(:cell_id) => pos_integer(),
  optional(:reg_reject_srv_domain) =>
    :no_service | :cs_only | :ps_only | :cs_ps | :camped,
  optional(:reg_reject_cause) => pos_integer(),
  optional(:mcc) => String.t(),
  optional(:mnc) => String.t(),
  optional(:tac) => pos_integer()
}

LTE System Infox

  • :srv_domain - Service domain registered on the system
  • :srv_capability - Current system’s service capability
  • :roam_status - Current system's roaming status
  • :is_sys_forbidden - Whether the system is forbidden
  • :lac - Location area code (only applicable for 3GPP)
  • :cell_id - Cell ID
  • :reg_reject_srv_domain - Type of service domain in which the registration is rejected
  • :reg_reject_cause - Reject cause
  • :mcc, :mnc - ASCII network ID
  • :tac - Tracking area code (only applicable for LTE)
@type lte_voice_status() :: :no_voice | :ims | :"1X" | :"3GPP"

LTE Voice domain

  • :no_voice - No voice, stay on LTE
  • :ims - Voice is supported over the IMS network
  • :"1X" - Voice is supported over the 1X network *:"3GPP" - Voice is supported over the 3GPP network
@type network() :: :network_unknown | :network_3gpp2 | :network_3gpp
Link to this type

network_selection_preference()

View Source
@type network_selection_preference() :: :automatic | :manual

The networking selection preference

  • :automatic - automatically select the network
  • :manual - manually select the network
Link to this type

operator_name_indication()

View Source
@type operator_name_indication() :: %{
  name: :operator_name_indication,
  long_name: binary(),
  short_name: binary()
}
Link to this type

preference_change_duration()

View Source
@type preference_change_duration() :: :power_cycle | :permanent

How long a system preference change should be applied

  • :power_cycle - only remains active until the next power cycle
  • :permanent - remains active through power cycles until changed by a client
@type radio_interface() ::
  :no_service | :cdma_1x | :cdma_1x_evdo | :amps | :gsm | :umts | :lte

The radio interface that is being reported

Link to this type

registration_restriction_preference()

View Source
@type registration_restriction_preference() ::
  :unrestricted | :camped_only | :limited | non_neg_integer()

The network registration restriction preference

  • :unrestricted - device follows the normal registration process
  • :camped_only - device will camp on a network but not register
  • :limited - device selects the network for limited service

This can also be integer value that is specified by the specific modem provider

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

Information about an radio interface band

@type roaming_preference() :: :off | :not_off | :not_flashing | :any

The roaming preference

  • :off - acquire only systems for which the roaming indicator is off
  • :not_off - acquire a system as long as its roaming indicator is not off
  • :not_flashing - acquire a system as for which the roaming indicator is off or solid on - CDMA only.
  • :any - acquire systems, regardless of their roaming indicator
Link to this type

serving_system_indication()

View Source
@type 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 radio 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
@type serving_system_registration_state() ::
  :not_registered | :registered | :registration_denied | :registration_unknown
Link to this type

set_system_selection_preference_opt()

View Source
@type set_system_selection_preference_opt() ::
  {:mode_preference, [radio_interface()]}
  | {:change_duration, preference_change_duration()}
  | {:roaming_preference, roaming_preference()}

The options to configure the system selection preference

  • :mode_preference - which radio access technologies should the modem use
  • :change_duration - the preference_change_duration() for the applied settings. The default is :permanent.
  • :roaming_preference - the preferred roaming setting
Link to this type

signal_strength_report()

View Source
@type signal_strength_report() :: %{
  rssi_reports: [%{radio: radio_interface(), rssi: integer()}]
}

Report from requesting the signal strength

@type sim_rej_info() ::
  :not_available | :available | :cs_invalid | :ps_invalid | :cs_ps_invalid

SIM rejection info

  • :available - SIM is available
  • :not_available - SIM is not available
  • :cs_invalid - SIM has been marked by the network as invalid for circuit-switched services
  • :ps_invalid - SIM has been marked by the network as invalid for packet-switched services
  • :cs_ps_invalid - SIM has been marked by the network as invalid for circuit-switched and packet-switched services
@type srv_reg_restriction() :: :unrestricted | :camped_only

Registration restriction

  • :unrestricted - Device follows the normal registration process
  • :camped_only - Device follows the camp-only registration process
Link to this type

usage_setting_preference()

View Source
@type usage_setting_preference() :: :unknown | :voice_centric | :data_centric

The modem usage preference setting

:unknown - device does not know the usage preference setting :voice_centric - the device is set for voice centric usage :data_centric - the device is set for data centric

Link to this type

voice_domain_preference()

View Source
@type voice_domain_preference() :: :cs_only | :ps_only | :cs_preferred | :ps_preferred

The voice domain preference setting

  • :cs_only - circuit-switched (CS) voice only
  • :ps_only - packet-switched (PS) voice only
  • :cs_preferred - PS is secondary
  • :ps_preferred - CS is secondary

Functions

Link to this function

get_cell_location_info()

View Source
@spec get_cell_location_info() :: QMI.request()

Make the QMI.request() for getting cell location info

@spec get_home_network() :: QMI.request()

Make the request for getting the home network

@spec get_rf_band_info() :: QMI.request()

Get the radio band information

@spec get_signal_strength() :: QMI.request()

Make the QMI.request() for getting signal strength

@spec get_sys_info() :: QMI.request()

Make the QMI.request() for getting cell location info

Link to this function

get_system_selection_preference()

View Source
@spec get_system_selection_preference() :: QMI.request()

Make QMI.request() to get the system selection preferences

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

Parse an indication

Link to this function

set_system_selection_preference(opts \\ [])

View Source
@spec set_system_selection_preference([set_system_selection_preference_opt()]) ::
  QMI.request()

Generate the QMI.request() for setting system selection preferences