WIFI sysenv fails

I have a problem with sysenv variables. I have not change my code but I cant charge the values of wifi ssid and password.

My platformio.io file:

build_flags =

My src/main.cpp

#define WIFI_SSID "asd"
#define WIFI_PASS "asd"
  while (WiFi.status() != WL_CONNECTED) {
    Serial.println("Conectando al wifi...");

The result:

Conectando al wifi...
Conectando al wifi...
Conectando al wifi...
Conectando al wifi...

If I build from command line and y do a echo $WIFI_SSID they are correctly setted.

Complete code: GitHub - dbgjerez/iot-esp8266-irrigation-system: System to measure ground humidity
Thanks a lot

How do you change the environment variables?

You do restart VSCode after that too?

I have wrote them into my .bashrc. It was working along some weeks, but today…

$ cat ~/.bashrc | grep WIFI*
export WIFI_SSID="MiFibra-32FD"
export WIFI_PASSWORD="mypassword"

I have restart VSCode, my computer and I have build from command line too. :frowning:

Have you logged out and logged in your user account to apply changes to that file?

Yeah, I put them almost one month ago, and it was working.

For example, in new terminal:

$ echo $WIFI_SSID

Have you removed those lines

otherwise you’re redefining it.

Also per docs you might need to have to shell-escape the environment variable.

Thanks bro!

I have delete those lines and escape the environment variable:

export WIFI_SSID='\"MiFibra-32FD\"'

I dont understand how it was working before, but thanks a lot :wink: