LinuxCommandLibrary

iwinfo

Get wireless interface information

TLDR

List all available wireless interfaces

$ iwinfo
copy

Display detailed information on a specific wireless interface
$ iwinfo [interface] info
copy

Scan for nearby wireless networks visible to the interface
$ iwinfo [interface] scan
copy

List connected devices
$ iwinfo [interface] assoclist
copy

List channels supported by the interface
$ iwinfo [interface] freqlist
copy

List available transmit power levels for the interface
$ iwinfo [interface] txpowerlist
copy

Display help
$ iwinfo h
copy

SYNOPSIS

iwinfo [interface] [info_type]

PARAMETERS

interface
    The name of the wireless interface to query (e.g., wlan0, radio0). If omitted, iwinfo lists all available wireless interfaces.

info_type
    Specific information to retrieve. Common options include:
-a, --assoc: Associated AP (if any)
-c, --channel: Current channel
-f, --frequency: Current frequency
-m, --mac: MAC address
-q, --quality: Link quality
-r, --rate: Current bit rate
-s, --ssid: SSID
-w, --wpa: WPA version
Without info_type: general information

DESCRIPTION

iwinfo is a command-line utility in Linux-based systems, primarily used for retrieving detailed information about wireless network interfaces. It's often found in embedded Linux distributions, such as those used on routers and other networking devices. iwinfo provides an easy way to get details such as SSID, signal strength, noise level, encryption, channel, and associated access points. It's a valuable tool for diagnosing wireless connectivity issues, monitoring network performance, and scripting automated network management tasks.

Unlike `iwconfig` which is deprecated and part of the `wireless-tools` package, iwinfo typically uses the Netlink interface to access wireless information. The information presented by iwinfo is dependent on the capabilities of the underlying wireless driver and the current network configuration. It relies on ubus for retrieving information.

CAVEATS

The information provided by iwinfo is dependent on the wireless driver and its support for Netlink. Some drivers may not expose all available parameters. The presence and format of specific information types can also vary depending on the distribution and kernel version.

OUTPUT FORMAT

The output of iwinfo is generally human-readable, presented as key-value pairs. However, the specific format and the availability of certain fields may differ based on the device and driver.

SCRIPTING

iwinfo is suitable for use in shell scripts for automated network management. Its output can be parsed using tools like awk, sed, or grep to extract specific information. Its lightweight implementation makes it a very fast tool to get information from.

HISTORY

iwinfo emerged as a lightweight alternative to iwconfig, addressing some of the limitations of the older tool. It leverages the Netlink interface, which offers a more modern and flexible way to interact with wireless drivers. iwinfo is commonly found in embedded Linux environments, where resource constraints are a concern. Its development has been driven by the need for a reliable and efficient tool for managing wireless interfaces in resource constrained environments. Its utilization grew due to the deprecation of iwconfig.

SEE ALSO

iwconfig(8), iw(8), ubus(1)

Copied to clipboard