View Source QMI.Codec.NetworkAccess (qmi v0.8.6)
Codec for making network access service requests
Summary
Types
Preference settings for when a device selects a system
Report from requesting the home network
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
The modem usage preference setting
The voice domain preference setting
Functions
Make the request for getting the home network
Get the radio band information
Make the QMI.request()
for getting signal strength
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 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
Report from requesting the home network
@type network() :: :network_unknown | :network_3gpp2 | :network_3gpp
@type network_selection_preference() :: :automatic | :manual
The networking selection preference
:automatic
- automatically select the network:manual
- manually select the network
@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
@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
@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
@type serving_system_registration_state() ::
:not_registered | :registered | :registration_denied | :registration_unknown
@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
- thepreference_change_duration()
for the applied settings. The default is:permanent
.:roaming_preference
- the preferred roaming setting
@type signal_strength_report() :: %{ rssi_reports: [%{radio: radio_interface(), rssi: integer()}] }
Report from requesting the signal strength
@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
@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
@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_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
@spec set_system_selection_preference([set_system_selection_preference_opt()]) :: QMI.request()
Generate the QMI.request()
for setting system selection preferences