View Source QMI.Codec.NetworkAccess (qmi v0.8.3)
Codec for making network access service requests
Link to this section 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
Link to this section Types
Specs
attach_state() :: :unknown | :attached | :detached
Specs
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-:onif the device is in emergency mode,:offotherwise: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
Specs
Report from requesting the home network
Specs
network() :: :network_unknown | :network_3gpp2 | :network_3gpp
Specs
network_selection_preference() :: :automatic | :manual
The networking selection preference
:automatic- automatically select the network:manual- manually select the network
Specs
Specs
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
Specs
radio_interface() :: :no_service | :cdma_1x | :cdma_1x_evdo | :amps | :gsm | :umts | :lte
The radio interface that is being reported
Specs
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
Specs
rf_band_information() :: %{
interface: radio_interface(),
band: binary(),
channel: integer()
}
Information about an radio interface band
Specs
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
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
Specs
serving_system_registration_state() :: :not_registered | :registered | :registration_denied | :registration_unknown
Specs
set_system_selection_preference_opt() ::
{:mode_preference, [radio_interface()]}
| {:change_duration, preference_change_duration()}
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.
Specs
signal_strength_report() :: %{
rssi_reports: [%{radio: radio_interface(), rssi: integer()}]
}
Report from requesting the signal strength
Specs
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
Specs
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
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
get_system_selection_preference() :: QMI.request()
Make QMI.request() to get the system selection preferences
Specs
parse_indication(binary()) :: {:ok, serving_system_indication()} | {:error, :invalid_indication}
Parse an indication
Specs
set_system_selection_preference([set_system_selection_preference_opt()]) :: QMI.request()
Generate the QMI.request() for setting system selection preferences