QMI.UserIdentity (qmi v0.10.4)

Copy Markdown View Source

Provides commands related to the user identity service

Summary

Functions

Get the status of all cards/SIM slots in the device.

Parse a raw binary ICCID

Provision a UIM session for a specific application on a card slot.

Send a request to read a transparent file

Functions

get_cards_status(qmi)

@spec get_cards_status(QMI.name()) :: {:ok, map()} | {:error, atom()}

Get the status of all cards/SIM slots in the device.

This command retrieves information about all available card slots, including their current state and any applications present.

parse_iccid(binary)

@spec parse_iccid(binary()) :: binary()

Parse a raw binary ICCID

Call read_transparent/3 to get the raw binary CCID.

Examples

iex> raw_binary = <<0x64, 0x73, 0x3, 0x4, 0x0, 0x0, 0x10, 0x52, 0x70, 0x20>> iex> QMI.UserIdentity.parse_iccid(raw_binary) "46373040000001250702"

provision_uim_session(qmi, slot_id, application_id)

@spec provision_uim_session(QMI.name(), non_neg_integer(), binary()) ::
  :ok | {:error, atom()}

Provision a UIM session for a specific application on a card slot.

This creates a session context that can be used for subsequent operations on a specific application.

Parameters

  • slot_id - The physical slot identifier (usually 0 or 1)
  • application_id - The application identifier to provision a session for

read_transparent(qmi, file_id, file_path)

@spec read_transparent(QMI.name(), non_neg_integer(), non_neg_integer()) ::
  {:ok, QMI.Codec.UserIdentity.read_transparent_response()} | {:error, atom()}

Send a request to read a transparent file