I am currently using OpenWrt 18.06 on a MT7620a chipset with a Ralink RT2800 wireless chip in it. I am running a custom daemon that manages an AP interface as well as a Station interface to allow a mobile app to connect to it and pass wifi credentials. In the perfect flow, the mobile app will connect to the AP interface, pass the credentials, and then the daemon uses wpa_supplicant to attempt to connect the station interface to the wireless network provided by the mobile app.
When connecting to any network via the standard OpenWrt method, i.e. create an interface in /etc/config/wireless and put the credentials in there as well, there is no issue connecting to any network. However, when the daemon attemps to use wpa_supplicant to connect to the network, most of the time wpa_supplicant gives the following error:
Tue Jul 16 00:49[ 48.426019] apcli0: authenticate with 7e:d2:94:35:88:d1 :55 2019 daemon.notice wpa_supplicant: apcli0: SME: Trying to authenticate with 7e:d2:94:35:88:d1 (SSID='Scranton5' freq=2452 MHz) Tue Jul 16 00:49:55 2019 daemon.notice wpa_supplicant: apcli0: SME: Authentication request to the driver failed Tue Jul 16 00:49:55 2019 daemon.notice wpa_supplicant: apcli0: CTRL-EVENT-SSID-TEMP-DISABLED id=0 ssid="Scranton5" auth_failures=1 duration=10 reason=CONN_FAILED
This error occurs most of the time, but sometimes the connection succeeds. What would be causing this error?
Thanks in advance