QMI.Codec.WirelessData (qmi v0.10.1)

View Source

Codec for making wireless data service requests

Summary

Types

The type of reasons the call ended

The indication for the wireless data service's event report

Options for the wireless data event report configuration

Response from issuing a modify profile settings request

The indication for a change in the current packet data connection status

The profile settings

The profile technology type

Options for whens starting a network interface

Report from starting the network interface

The type of measurement you are wanting to be reported

Name of the technology

Functions

Modify the QMI profile setting

Try to parse an indication from the wireless data service

Request to set the wireless data services event report options

Send command to request the that the network interface starts to receive data

Types

call_end_reason_type()

@type call_end_reason_type() ::
  :unspecified
  | :mobile_ip
  | :internal
  | :call_manger_defined
  | :three_gpp_specification_defined
  | :ppp
  | :ehrpd
  | :ipv6
  | :handoff

The type of reasons the call ended

event_report_indication()

@type event_report_indication() :: %{
  :name => :event_report_indication,
  optional(:tx_bytes) => integer(),
  optional(:rx_bytes) => integer(),
  optional(:tx_packets) => integer(),
  optional(:rx_packets) => integer(),
  optional(:tx_overflows) => integer(),
  optional(:rx_overflows) => integer(),
  optional(:tx_errors) => integer(),
  optional(:rx_errors) => integer(),
  optional(:tx_drops) => integer(),
  optional(:rx_drops) => integer()
}

The indication for the wireless data service's event report

To configure what information is sent through this indication see set_event_report/1.

event_report_opt()

@type event_report_opt() ::
  {:statistics_interval, non_neg_integer()}
  | {:statistics, [statistic_measurement()] | :all | :none}

Options for the wireless data event report configuration

  • :statistics_interval - an interval in seconds on when to report statistics about transmit and receive operations
  • :statistics - list which statistic measurements to report

For transmit and receive statistics, if no interval is provided the default is 60 seconds. If the :statistics option is not provided it will default to :all. The report is only sent in the interval if there was a change in any of the statistics. So, if no changes took place the report will be skipped for an interval.

To configure event report to not included any stats pass :none to the :statistics option.

modify_profile_settings_response()

@type modify_profile_settings_response() :: %{extended_error_code: integer() | nil}

Response from issuing a modify profile settings request

packet_status_indication()

@type packet_status_indication() :: %{
  name: :packet_status_indication,
  status: :disconnected | :connected | :suspended | :authenticating,
  reconfiguration_required: boolean(),
  call_end_reason: integer() | nil,
  call_end_reason_type: call_end_reason_type() | nil,
  ip_family: 4 | 6 | nil,
  tech_name: tech_name() | nil,
  bearer_id: integer() | nil,
  xlat_capable: boolean() | nil
}

The indication for a change in the current packet data connection status

profile_setting()

@type profile_setting() ::
  {:roaming_disallowed, boolean()} | {:profile_type, profile_type()}

The profile settings

  • :roaming_disallowed - if using roaming is allowed or not
  • :profile_type - the profile type - see profile_type() type docs for more information

profile_type()

@type profile_type() :: :profile_type_3gpp | :profile_type_3gpp2 | :profile_type_epc

The profile technology type

start_network_interface_opt()

@type start_network_interface_opt() ::
  {:apn, String.t()} | {:profile_3gpp_index, integer()}

Options for whens starting a network interface

  • :apn - the name of our APN

start_network_report()

@type start_network_report() :: %{packet_data_handle: non_neg_integer()}

Report from starting the network interface

statistic_measurement()

@type statistic_measurement() ::
  :tx_bytes
  | :rx_bytes
  | :tx_packets
  | :rx_packets
  | :tx_overflows
  | :rx_overflows
  | :tx_errors
  | :rx_errors
  | :tx_drops
  | :rx_drops

The type of measurement you are wanting to be reported

  • :tx_bytes - number of bytes transmitted
  • :rx_bytes - number of bytes received
  • :tx_packets - number of transmit packets sent without error
  • :rx_packets - number of packets received without error
  • :tx_overflows - number of packets dropped due to tx buffer overflowed (out of memory)
  • :rx_overflows - number of packets dropped due to rx buffer overflowed (out of memory)
  • :tx_errors - number of outgoing packets with framing errors
  • :rx_errors - number of incoming packets with framing errors
  • :tx_drops - number outgoing packets dropped
  • :rx_drops - number incoming packets dropped

tech_name()

@type tech_name() ::
  :cdma
  | :umts
  | :wlan_local_brkout
  | :iwlan_s2b
  | :epc
  | :embms
  | :modem_link_local

Name of the technology

Functions

modify_profile_settings(index, settings)

@spec modify_profile_settings(profile_index :: integer(), [profile_setting()]) ::
  QMI.request()

Modify the QMI profile setting

When providing the profile settings if :profile_type is not included this function will default to :profile_type_3gpp

parse_event_report_indication(event_report_indication, arg)

@spec parse_event_report_indication(event_report_indication(), binary()) ::
  event_report_indication()

parse_indication(arg1)

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

Try to parse an indication from the wireless data service

set_event_report(opts \\ [])

@spec set_event_report([event_report_opt()]) :: QMI.request()

Request to set the wireless data services event report options

start_network_interface(opts \\ [])

@spec start_network_interface([start_network_interface_opt()]) :: QMI.request()

Send command to request the that the network interface starts to receive data

stat_to_integer(atom)

@spec stat_to_integer(statistic_measurement()) ::
  1 | 2 | 4 | 8 | 16 | 32 | 64 | 128 | 256 | 512

statistics_mask(stats)

@spec statistics_mask(:all | [statistic_measurement()]) :: non_neg_integer()