Wpa_cli can't connect to hotspot

I use UI → Settings to connect to a hotspot, works fine.

But if I forget the hotspot from UI(otherwise the app will reconnect to it after a few seconds), then try wpa_cli, it connected then deauthentication immediately, reason code is 3.

wpa_cli -i wlan0

add_network
0
set_network 0 ssid “test”
set_network 0 psk “12345678”
enable_network 0
select_network 0
status
DISCONNECTED

Anyone met with this issue? Thanks.


logs as below:
2802 07-12 20:18:15.580 3141 3141 D wpa_supplicant: wlan0: State: GROUP_HANDSHAKE → COMPLETED
2805 07-12 20:18:15.580 3141 3141 I wpa_supplicant: wlan0: CTRL-EVENT-CONNECTED - Connection to 40:4e:36:8a:7c:3e completed [id=0 id_str=]
2824 07-12 20:18:15.589 3141 3141 D wpa_supplicant: wlan0: Cancelling scan request
2825 07-12 20:18:15.589 3141 3141 D wpa_supplicant: wlan0: Request to deauthenticate - bssid=40:4e:36:8a:7c:3e pending_bssid=00:00:00:00:00:00 reason=3 state=COMPLETED
2833 07-12 20:18:15.634 3141 3141 I wpa_supplicant: wlan0: CTRL-EVENT-DISCONNECTED bssid=40:4e:36:8a:7c:3e reason=3 locally_generated=1