How do you enable WiFi (wpa_supplicant) logging?

Help setting up WiFi
Post Reply
K1UH
Posts: 6
Joined: Fri Apr 03, 2020 5:59 pm

How do you enable WiFi (wpa_supplicant) logging?

Post by K1UH »

I am running Pi-Star:4.1.0 / Dashboard: 20200706 on a Pi Zero W Rev 1.1

I am trying to debug some WiFi / router connection issues.
How do you enable WiFi (wpa_supplicant) logging?

I tried: sudo wpa_cli -i wlan0 log_level debug
but nothing was written when forcing a reassociation.

Thanks
Greg K1UH
K1UH
Posts: 6
Joined: Fri Apr 03, 2020 5:59 pm

Re: How do you enable WiFi (wpa_supplicant) logging?

Post by K1UH »

Thanks

It’s complicated in my case because I am using a Pi Zero W without a physical console (or wired LAN) so restarting wpa_supplicant will kill my SSH console session.

I am hoping to find a place or config file where I can add the debug file parameters.

-f /var/log/wpa_supplicant.log -t -d

and restart. But I am becoming lost in the chain of startup scripts, systemd, subdirectories, network manager, etc.

Greg K1UH
K1UH
Posts: 6
Joined: Fri Apr 03, 2020 5:59 pm

Re: How do you enable WiFi (wpa_supplicant) logging?

Post by K1UH »

Thanks again for your help.

To explain further, I am assisting some other hams in our club that are using Pi-Star Pi Zero W hotspots over WiFi tethered to their smartphones for mobile operation. They are having frequent issues switching between their tethered smartphone WiFi and their home WiFi networks. They also have issues when they walk away taking their smartphone and leave the hotspot in the car powered by a USB Li-On battery. Upon return, the WiFi connection does not resume normally. Obviously, the hotspot is headless in these cases.

Without some kind of WiFi activity log, it’s difficult to know what the Pi Zero and wpa_supplicant are doing when the connection is broken.

I will try your suggestion for getting the wpa messages to syslog so I can help the other hams.

Greg K1UH
AF6VN
Posts: 821
Joined: Fri Jul 20, 2018 1:15 am

Re: How do you enable WiFi (wpa_supplicant) logging?

Post by AF6VN »

May be a problem in that Pi-Star writes logs to RAM disk -- if the device has to be repowered to get a fresh WiFi in order to read the log, the log will be empty.

NOTE: for the described situation of having the WiFi AP (cellphone) go out of range, is it possible that Pi-Star did scan for memorized WiFi connections, didn't find them, and reverted to the setup access point mode (which sits waiting for some other client to connect to IT to configure settings and reboot).

--
AF6VN
Dennis L Bieber
AF6VN
Posts: 821
Joined: Fri Jul 20, 2018 1:15 am

Re: How do you enable WiFi (wpa_supplicant) logging?

Post by AF6VN »

KE7FNS wrote: Tue Aug 11, 2020 6:54 pm But you bring up a good point, if the Access Point software is set to trigger off of 5 minutes of inactivity it could be starting, and waiting like you said.
Which should be easy to identify -- all one needs is a device that is scanning for access points (eg: turn off the cellphone access point, let it look for WiFi access points that /it/ can connect to... If Pi-star-setup shows up, the unit is waiting to be configured).

--
AF6VN
Dennis L Bieber
Post Reply