Hi all,
I’m hoping to get some help resolving an issue I’m finding with the struct mgos_config_wifi_ap.
I’m attempting to programmatically turn AP and STA on and off at different stages of my program depending on the system state. I followed an example I saw here and have come across some strangeness with the struct mgos_config_wifi_ap.
Looking at the mongoose os docs, the mgos_wifi.h library says the mgos_config_wifi_ap should look like:
struct mgos_config_wifi_ap {
int enable;
char *ssid;
char *pass;
int hidden;
int channel;
int max_connections;
char *ip;
char *netmask;
char *gw;
char *dhcp_start;
char *dhcp_end;
int trigger_on_gpio;
int disable_after;
int keep_enabled;
};
But when (from VS code) I follow the source of the struct I find in mgos_config.h a struct that looks like this:
struct mgos_config_wifi_ap {
const char * ssid;
const char * pass;
int channel;
const char * dhcp_end;
};
Stranger yet is when I follow the source of mgos_wifi.h and I see that there are definitions all over the place that are showing up as errors due to missing struct parameters. But it all seems to compile.
I’m guessing I’m looking in the wrong place for the mgos_config_wifi_ap struct, but I’ve looked everywhere I can think of and can’t find any source that has the extra parameters shown in mgos_wifi.h
At the end of the day I just want to be able to programmatically turn off AP when STA has connected, but it would be great to learn to fish.
Thanks.