Sunday Oct 02, 2022

Change Wpa_supplicant Debug Level? Fix It Immediately

If you see a wpa_supplicant debug level change, this guide will help you. Use wla_cli debug log_level (or any other level) to change the debug level of an already moved wpa_supplicant file. sudo wpa_cli level debug results showing one FAIL message.

change wpa_supplicant debug level

We’ve covered many different aspects of the WPA Supplicant in this blog, but one aspect that hasn’t been covered is what records it stores and how to work with them.

Let’s discuss some valuable information based on my experience with them in the field.

WPA query protocols can be helpful when troubleshooting wireless client connections. Unfortunately, it’s easy to be overwhelmed or sometimes overwhelmed by the amount of information presented to your organization. Let’s start by enabling logging.

One way to configure the WPA Supplicant is described in the /etc/network/interfaces report as follows:

wlan0 carAllow wlan0 hotplugiface wlan0 inet dhcp      wpa-ssid netbeez-enterprise-wireless      pre-up wpa_supplicant -B -Dwext,nl80211 -we all wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -f /var/log/wpa_supplicant.log -t -d      publish wpa_cli -i exit wlan0

As you can see, before the Linux host tries toIf you want to get an IP address, one of the pre-commands starts wpa_supplicant. To learn more about options, your company can visit this post. Then let’s talk about the last two or three options:

-f /var/log/wpa_supplicant.log : tells the file that wpa_supplicant will log all messages

-t: print the part of the epoch in which it occurred for each log message

-d : controls the verbosity of the logs (if this parameter is omitted, the logs will be minimal, -d/-dd/-ddd increases the verbosity)

Minimum Logs

If the “-d” product is omitted and you drag and drop the wireless interface utility, you will find the following logs in /var/log/wpa_supplicant.log:

1555435443.013798: wpa_supplicant initialized successfully1555435444.393362: wlan0: try distributor from 38:3b:c8:3e:d4:31 Freq=2462 (ssid='netbeez' MHz)1555435444.539731: wlan0: connected at 38:3b:c8:3e:d4:311555435444.556641: wlan0: CTRL-EVENT-REGDOM-CHANGE type=COUNTRY init=COUNTRY_IE alpha2=US1555435445.Wlan0: 554016: WPA: key chat ended at 38:3b:c8:3e:d4:31 [PTK=CCMP GTK=TKIP]1555435445.554092: wlan0: CTRL-EVENT-CONNECTED - connected at 38:3b:c8:3e:d4:31 [id=0 id_str=]

Each line begins with the timestamp of the person and the voicemail message theohm you will see the following key events:

  • 1555435443.013798: wpa_supplicant initialized successfully: wpa_supplicant action started
  • 1555435444.Wlan0:393362: attempting to connect at 38:3b:c8:3e:d4:31 (SSID=’netbeez’ freq=2462MHz): wpa_supplicant determines the process of connecting to an access point
  • 1555435444.Wlan0:539731: Connected at 38:3b:c8:3e:d4:31: Connected
  • 1555435445.554016: wlan0: WPA: Key negotiation completed, running from 38:3b:c8:3e:d4:31 [PTK=CCMP GTK=TKIP]: Key negotiation completed
  • With epoch timestamps, we could easily calculate the time required for each step of the process. For example, matching took about 146ms.

    Please note that the terminology displayed in our own logs often does not always match the actual Wi-Fi terminology that is commonly used. For example, when a site visitor tries to join a WiFi program, they are authenticated according to the relevant steps. However, wpa_supplicant calls this process nothing more than “association”.

    Increased Detail

    By increasing the level of detail of a single part with the “-d” option, we get the following:Blowing sample output:

    change wpa_supplicant debug level

    1554225851.374782: wpa_supplicant v2.41554225851.375317: random: Attempted to read the entropy of /dev/random1554225851 of .375399: wpa_supplicant initialized successfully1554225851.375438: port initialization 'wlan0' conf '/etc/wpa_supplicant/wpa_supplicant.conf', driver 'nl80211, wext' ctrl_interface 'N/A' 'N/A'1554225851 bridge.375471: running configuration "/etc/wpa_supplicant/wpa_supplicant.conf" -> "/etc/wpa_supplicant/wpa_supplicant.conf"1554225851.375500: Read configuration entry "/etc/wpa_supplicant/wpa_supplicant.conf"1554225851.375597: ctrl_interface='DIR=/var/run/wpa_supplicant'1554225851.375635: update_config=11554225851.444974: priority group 01554225851.444995: id=0 ssid='netbeez'1554225851.445931: rfkill: source event: idx=0 type=1 op=0 hard=01554225851 soft=0.446353: nl80211: 00-0f-ac:1 cipher supported1554225851.446371:nl80211: supported cipher 00-0f-ac:51554225851.446385: nl80211: supported cipher 00-0f-ac:2….1554225851.494927: wpa_driver_nl80211_set_key: ifindex=3 Alg=0 (wlan0) addr=(nil) key_idx=0 set_tx=0 seq_len=0 key_len=01554225851.495031: wpa_driver_nl80211_set_key: ifindex=3 (wlan0) addr=(nil) alg=0 key_idx=1 set_tx=0 seq_len=0 key_len=01554225851.495088: wpa_driver_nl80211_set_key: ifindex=3 (wlan0) alg=0 key_idx=2 addr=(nil) set_tx=0 seq_len=0 key_len=01554225851.495144: wpa_driver_nl80211_set_key: ifindex=3 Alg=0 (wlan0) addr=(nil) key_idx=3 set_tx=0 seq_len=0 key_len=0…..1554225851.543376: wlan0: Status: DISABLED DISABLED1554225851 ->.543388: Set nl80211: wlan0 state 0->0 (REST)1554225851.543402: Operating state: netlink: ifindex=3 linkmode=-1 (unchanged)Values), operating state=5 (IF_OPER_DORMANT)1554225851.543442: Demonize..1554225851.544360: random: received 20/20 bytes/dev/random1554225851 of .544609: RTM_NEWLINK: ifname=wlan0 ifi_index=3 operstate=2 linkmode=0 ifi_family=0 ifi_flags=0x11003 ([UP][LOWER_UP])1554225851.544710: RTM_NEWLINK: ifi_index=3 ifname=wlan0 linkmode=0 operstate=6 ifi_family=0 ifi_flags=0x11043 ([UP][RUNNING][LOWER_UP])1554225851.544751: RTM_NEWLINK: ifi_index=3 ifname=wlan0 operstate=5 linkmode=0 ifi_flags=0x11003 ifi_family=0 ([UP][LOWER_UP])1554225851.544789: RTM_NEWLINK: ifi_index=3 operstate=5 ifi_index=wlan0 linkmode=1 ifi_family=0 ifi_flags=0x11003 ([UP][LOWER_UP])1554225851.595586: Status: wlan0: DISABLED -> SCAN….1554244747.081250: wlan0:CTRL-EVENT-DISCONNECTED bssid=38:3b:c8:3e:d4:3a, cause=3 local_generated=1

    And it goes on… To give the level of comparison: “-d”, we had less than ten log lines, and if you create the “-d” option, it will help more than 500.

    As you can imagine, the logs contain many different keywords after the timestamp, such as nl80211, wpa_driver_nl80211_set_key, netlin, RTM_NEWLINK, and others. So this level of logging can definitely be used for debugging, in addition to monitoring many different functions of the wpa_supplicant process. These features include, but are not limited to: drivers, internal debugging, and informational messages that are not necessarily related toWe are using the WiFi connection protocol.

    Other times, there will undoubtedly be messages (such as the last line) telling both men and women that a breakup occurred and the reason was “Reason = 3” with no other explanation. Until you look at the source code, you won’t understand what this means. A link to these different reasons can be found here.

    My advice is to focus on messages that start with the keyword “wlan0”, which is the name of the mobile phone in the interface to the Linux host.

    A note about the most interesting log information, the most important of which starts with “wlan0: Status:”. If you follow these target protocols, you will see the following sequence in the file:

    Lucas Kevin

    Back to Top