19

My laptop has capabilities for 802.11n connections.

With my previous router, I could transer data faster than 54Mb/s. Now I have D-Link router and for some reason the maximum connection speed is 54Mb/s, which implies that the connection was established with 802.11g.

How can I check which standard (g or n) has been established? Is there any command to get that information? (nm-applet does not give any information about that in the connection information window).

Ari Fordsham
  • 123
  • 5
idgar
  • 2,820
  • 7
  • 27
  • 28

5 Answers5

21

The utility iw shows the used bitrate and indicates the used IEEE 802.11 standard by its listed capabilities.

Read your interface name from the iw dev output, and use it within <name>.

iw dev <name> link

Example output when associated with a legacy (non-802.11n) AP:

    tx bitrate: 36.0 MBit/s

"MCS index", indicating a 802.11n AP:

    tx bitrate: 300.0 MBit/s MCS 15 40Mhz short GI

"VHT", indicating support for 802.11ac:

    tx bitrate: 86.7 MBit/s VHT-MCS 8 short GI VHT-NSS 1

Compare this with the Linux driver 802.11n table. You'll see how the example "MCS 15 40Mhz short GI" 300 MBit/s corresponds to a row within the "HT40 rates" for the "short 400ns GI" column.

To see what your Wi-Fi adapter is generally capable of, independent of the AP link, run iw phy0 info (synonymous to iw list) and look for keywords like HT (802.11n) / VHT (802.11ac, (Very) High Throughput), MCS (Modulation and Coding Schemes) index number and long/short GI (Guard Interval).

For more explanations, continue with this Super User answer.

Matthias Braun
  • 957
  • 13
  • 19
wbob
  • 469
  • 3
  • 6
  • Nice answer! How would I recognize an [802.11e](https://en.wikipedia.org/wiki/IEEE_802.11e-2005) connection? Does the output contain "QoS"? – Matthias Braun Jul 31 '20 at 17:02
  • [WMM](https://en.wikipedia.org/wiki/Wireless_Multimedia_Extensions) is a subset of 802.11e. `iw dev station dump` will list if WMM is in use for the established link – wbob Aug 01 '20 at 22:07
  • 1
    What about for WiFi 6 (802.11ax) and WiFi 6E? How would you tell if your connection is one of those? – Garrett Feb 10 '22 at 17:33
  • look for the HE (High Efficiency) letters and its MCS index to correlate. See this [spreadsheet link](https://semfionetworks.com/blog/mcs-table-updated-with-80211ax-data-rates/) for theoretical max bitrate per index. For example "HE MCS index 8, 2 spatial streams (depends on your device support), short (0.4µs) Guard Interval and 40Mhz channel width" is a theoretical 360 Mbit/s max – wbob Feb 10 '22 at 19:14
  • This is the only answer, that helped to recognize the connection mode (802.11n, 802.11ac etc.). It was a big disappointment for me to know, that regular Linux means do not allow to easily detect such basic info for WiFi connection! – Exterminator13 Jan 22 '23 at 22:01
  • this answer is for users specifically interested in the standard. Common Linux distributions (with nmcli and network-manager / gnome-settings) will show you the max bitrate per connection and AP – wbob Feb 27 '23 at 14:56
  • And how do you know whether it is Wifi 6 or not? – Mehdi Mar 14 '23 at 17:38
4
  1. try lshw -C network
  2. try iwconfig and search for Bit Rate
  3. try lspci | grep -i wireless
  4. wavemon is the ultimate tool for wireless
  • 1
    first, wavemon is awesome! unfortunately, none of those tools supply which standard the connection using (g or n). 54Mbit can be g and n... does anybody knows what can be the reason that the interface is not lock down the n standard? at my mom's laptop, it is connected at 65Mbit, and my computer has n capabilites (again, with other routers working with n) – idgar Sep 22 '12 at 12:10
0

With sudo lshw -C network you should be able to see which modes you wifi adapter supports. But since your problem seems to be the router find out your wifi adapters name using iwconfig (should be something like wlan0 or eth0). Then try a iwlist wlan0 scan (replace wlan0 with your adapters name). It will list the supported bit rates. If the highest is is 54Mbit/s your router doesn't seem to support the n standard.

This way you can find out if you should be able to connect with the n standard. Sadly I know no way to find out what standard the present connection uses.

André Stannek
  • 4,076
  • 24
  • 40
-1

You can install WiFi Radar which is a utility for managing, scanning, and auto-connecting to WiFi profiles.

https://wifi-radar.tuxfamily.org/

It appears to be in the Ubuntu repository

https://packages.ubuntu.com/search?keywords=wifi-radar

sudo apt install wifi-radar
Raffles
  • 672
  • 4
  • 10
  • WiFi Radar's last release was over five years ago. It seems abandoned. – Matthias Braun Jul 31 '20 at 07:33
  • @MatthiasBraun thanks I wasn't aware. I installed it on my machine running 18.04 and it runs fine and does give some useful information. I don't know if there is any way to remove my post to avoid negative reputation. – Raffles Jul 31 '20 at 10:58
  • If you really want to delete your question (I didn't downvote by the way), there are a couple of actions below your question: share edit delete flag – Matthias Braun Jul 31 '20 at 12:40
-1

this question was already answered: https://unix.stackexchange.com/questions/62265/linux-find-wifi-networks-protocola-b-g-n-version-of-all-available-access-point

in short issue: iw dev wlan0 scan and the output should indicate which access point has what capabilities around you.

More details are in the mentioned link.

Roman Spiak
  • 149
  • 1
  • 5
  • 2
    I'm pretty sure these are two different questions: The question you linked to is about which standards the AP *supports*, while this question wants to know the standard that the AP and the connected host are *actually using*. – Matthias Braun Aug 02 '20 at 08:34
  • if you're very strict about it - then yes these are two different questions. however your equipment can detect only standard it can use - so there's no _real_ practical difference when detecting what can you and the AP negotiate upon - this is de-facto the standard you're going to use when connection to this particular AP. (Or maybe I'm wrong?) – Roman Spiak Aug 02 '20 at 14:58
  • Here's an example: `iw dev wlan0 scan` tells me (indirectly) that the AP supports up to IEEE 802.11ac. Now I'd have to find out which standards the wireless chip in my host supports. How to do that (`iw phy`) is not part of your answer and the answer you linked to. Assuming that I know now that my host supports up to IEEE 802.11n, I'm probably right in thinking that the AP and the host will use IEEE 802.11n. But I want to be *sure* what the actual connection uses. That's the question. Addendum: To my knowledge, the output of `iw dev wlan0 scan` is independent of the host's capabilities. – Matthias Braun Aug 03 '20 at 11:51