View Source VintageNetQMI (vintage_net_qmi v0.3.5)

Use a QMI-enabled cellular modem with VintageNet

This module is not intended to be called directly but via calls to VintageNet. Here's an example:

VintageNet.configure(
  "wwan0",
  %{
    type: VintageNetQMI,
    vintage_net_qmi: %{
      service_providers: [
        %{apn: "favorite_apn", only_iccid_prefixes: ["1234"]},
        %{apn: "second_favorite_apn", only_iccid_prefixes: ["56789"]},
        %{apn: "last_resort_apn"}
      ],
      only_radio_technologies: [:lte]
    }
  }
)

The following keys are supported

  • :service_providers - This is a list of service provider information

The :service_providers key should be set to information provided by each of your service providers.

Information for each service provider is a map with some or all of the following fields:

  • :apn (required) - e.g., "access_point_name"
  • :only_iccid_prefixes (optional) - only use this APN if the one of the strings in the list is a prefix of the ICCID. E.g, ["1234"]

When multiple entries are specified, the first allowed service provider is used.

Your service provider should provide you with the information that you need to connect. Often it is just an APN. The Gnome project provides a database of service provider information that may also be useful.

Link to this section Summary

Functions

Name of the the QMI server that VintageNetQMI uses

Configure a cellular modem using an APN

Link to this section Functions

@spec qmi_name(VintageNet.ifname()) :: atom()

Name of the the QMI server that VintageNetQMI uses

@spec quick_configure(String.t()) :: :ok | {:error, term()}

Configure a cellular modem using an APN

iex> VintageNetQMI.quick_configure("an_apn")
:ok