Issue: setup wifi client parameters get an error " cannot communicate with wpa_supplicant "
Setup:
Server:
Details:
use ssh to enter the pi console of “Ali Pilot Gateway”, then run gateway-config, got the above error message while configuring wifi client. Confirmed wpa_supplicant is under /sbin and can be executed directly.
You are currently in AP mode, so you cannot configure wifi. Before configuring wifi, you must switch AP mode to Client mode. In the second screenshot, select 2 to switch before configuring wifi.
Sorry, but after I switch to client mode and reboot the device, it still shows same error.
Also, I think the tool’s logic is somewhat flawed. After I switch to client mode, the device no longer offers an AP and I can only connect my PC to it via the LAN or console. If so, what’s the benefit of offering the AP mode? I presume the procedure should be (if the gateway is to connect to the Internet via WIFI):
connect PC to the device’s AP (initially it is in AP mode).
ssh to the device, run gateway-config, change to client mode.
before reboot, configure the ssid and password etc. so that the device can connect to another wifi hotspot.
reboot the device to finally switch to client mode.
There is something wrong with the file you modified. If you want to complete the DHCP assignment, just follow the following command and comment out the contents in the red box.
sudo nano /etc/dhcpcd.conf
By the way, for the convenience of users, we have two connection modes, AP mode connection and wired connection, and the switch can be done according to the steps you just mentioned.