Gateway gets stuck Wifi config

Issue:
When I try to config Wifi for gateway it gets stuck after entering SSID and pwd.
Setup:
Install script has been successfully run.
Server:
RAK7246
Details:
Its gets stuck when comming to do_check_if_wifi_mode wifi (see attached image).
I have double checked SSID and pwd.
Eventually it gives client_loop: send disconnect: Broken pipe