Added the parameter "-i wlan0" in the command "wpa_cli reconfigure". When this block is being used in the first boot, the command "wpa_cli reconfigure" is selecting the interface "p2p-dev-wlan0" and the Raspberry doesn't connect in the WiFi. Using -i wlan0 to force it to use the default interface.
Added the parameter "-i wlan0" in the command "wpa_cli reconfigure". When this block is being used in the first boot, the command "wpa_cli reconfigure" is selecting the interface "p2p-dev-wlan0" and the Raspberry doesn't connect in the WiFi. Using -i wlan0 to force it to use the default interface.