I have some problems setting up the SSID config for my WiFi.
It works flawlessly with the STA/AP example by using #define, e.g.:
Code: Select all
wifi_config_t wifi_config = {
.sta = {
.ssid = EXAMPLE_ESP_WIFI_SSID,
.password = EXAMPLE_ESP_WIFI_PASS
},
};
Code: Select all
wifi_config_t wifi_config = {
.sta = {
.ssid = generated_string,
.password = EXAMPLE_ESP_WIFI_PASS
},
};
Code: Select all
../main/wifi_client.c:750:53: warning: initialization of 'unsigned char' from 'char *' makes integer from pointer without a cast [-Wint-conversion]
wifi_config_t wifi_config = {.sta = {.ssid = partner_ssid, .password =WIFI_PASS},};
^~~~~~~~~~~~
../main/wifi_client.c:750:53: note: (near initialization for 'wifi_config.sta.ssid[0]')
../main/wifi_client.c:750:36: error: missing braces around initializer [-Werror=missing-braces]
wifi_config_t wifi_config = {.sta = {.ssid = partner_ssid, .password =WIFI_PASS},};
^
{ }
../main/wifi_client.c:750:36: error: missing braces around initializer [-Werror=missing-braces]
wifi_config_t wifi_config = {.sta = {.ssid = partner_ssid, .password =WIFI_PASS},};
^
{ }
cc1.exe: some warnings being treated as errors
ninja: build stopped: subcommand failed.
ninja failed with exit code 1
Code: Select all
.ssid = generated_string
Code: Select all
.ssid = {generated_string}
PS: Just to avoid confusion, I've shown the STA part of my code and the error, the AP part is the same and is the reason for the faulty WiFi.
Thanks in advance!