Gateway-config: cannot communicate with wpa_supplicant

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.

Could you explain your question in more detail? For example: version, problem screenshot, etc…

Sorry, I only know the product model, but not version. However the tool’s version and error message is shown in screenshots below.

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):

  1. connect PC to the device’s AP (initially it is in AP mode).
  2. ssh to the device, run gateway-config, change to client mode.
  3. before reboot, configure the ssid and password etc. so that the device can connect to another wifi hotspot.
  4. reboot the device to finally switch to client mode.

Yes, when you switch to client mode, you can continue to configure wifi without having to restart it. Then restart the configuration to take effect.
PRD:https://doc.rakwireless.com/rak2245-pi-hat-edition-lorawan-gateway-concentrator-module/accessing-the-internet

how to tell if the device is in client mode or ap mode, right after the change in gateway-config, without reboot?

As I said, the wpa_supplicant problem persist.

Do you manually go through the process of unplugging wpa_supplicant?

ps -ef | grep wpa_supplicant
Does the process still exist?

Yes. wpa_supplicant process still exists, at least prior to running gateway-config.

In order to connect to the device via ethernet, I only changed on configuration: /etc/network/interfaces:

#source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

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
image
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.

the problem is finally solved. thanks!

Good. Thank you for your questions. :fist_right:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.