QMI.WirelessDataAdmin (qmi v0.10.4)

Copy Markdown View Source

Commands for the QMI WDA (Wireless Data Administrative) service.

This service configures the data format used between the modem and the host driver. The key operation is set_data_format/2, which must be called before starting a data session to ensure the modem and driver agree on whether the data path uses raw-IP or 802.3 (Ethernet) framing.

Summary

Functions

Query the modem's current data format.

Set the data format on the modem.

Functions

get_data_format(qmi)

@spec get_data_format(QMI.name()) ::
  {:ok, QMI.Codec.WirelessDataAdmin.data_format()} | {:error, atom()}

Query the modem's current data format.

Example

{:ok, %{link_layer_protocol: :raw_ip}} =
  QMI.WirelessDataAdmin.get_data_format(MyApp.QMI)

set_data_format(qmi, opts)

Set the data format on the modem.

This must be called before QMI.WirelessData.start_network_interface/2 so that the modem sends packets in the format the driver expects.

Options

  • :link_layer_protocol – :raw_ip or :"802.3" (required)
  • :ul_aggregation_protocol – uplink aggregation (default :disabled)
  • :dl_aggregation_protocol – downlink aggregation (default :disabled)
  • :qos_format – include QoS headers (default false)

Example

:ok = QMI.WirelessDataAdmin.set_data_format(MyApp.QMI,
  link_layer_protocol: :raw_ip,
  ul_aggregation_protocol: :disabled,
  dl_aggregation_protocol: :disabled
)