-->
Page 1 of 3

[solved] Configuring SOFTAP in rtos_sdk

PostPosted: Fri Dec 26, 2014 10:35 am
by alonewolfx2
How can i configure softap in rtos?i didnt make it. i am giving always fatal exception(28). i tried this code
Code: Select allstruct softap_config config;
    char password[64];
    wifi_softap_get_config(&config);
    memset(config.password, 0, sizeof(config.password));
    sprintf(password, "%s", "testSifresi123");
    memcpy(config.password, password, strlen(password));
    config.authmode = AUTH_WPA_WPA2_PSK;
    wifi_softap_set_config(&config);

or
Code: Select allchar temp[64];
  int8_t len,passLen;
  struct softap_config *apConfig = (struct softap_config *)zalloc(sizeof(struct softap_config));
  wifi_softap_get_config(apConfig);
  sprintf(apConfig->ssid, "espTestWifi");
  len = sprintf(apConfig->ssid, "espTestWifi");
  apConfig->ssid_len = len;
  passLen = sprintf(apConfig->password, "testSifresi1", 64);
  apConfig->channel =11;
  apConfig->authmode=3;
  wifi_softap_set_config(apConfig);

any help is welcome

Re: Configuring SOFTAP in rtos_sdk

PostPosted: Fri Dec 26, 2014 4:54 pm
by pvvx
alonewolfx2 wrote:How can i configure softap in rtos?i didnt make it. i am giving always fatal exception(28). i tried this code
Code: Select allstruct softap_config config;
    char password[64];
    wifi_softap_get_config(&config);
    memset(config.password, 0, sizeof(config.password));
    sprintf(password, "%s", "testSifresi123");
    memcpy(config.password, password, strlen(password));
    config.authmode = AUTH_WPA_WPA2_PSK;
    wifi_softap_set_config(&config);

or
Code: Select allchar temp[64];
  int8_t len,passLen;
  struct softap_config *apConfig = (struct softap_config *)zalloc(sizeof(struct softap_config));
  wifi_softap_get_config(apConfig);
  sprintf(apConfig->ssid, "espTestWifi");
  len = sprintf(apConfig->ssid, "espTestWifi");
  apConfig->ssid_len = len;
  passLen = sprintf(apConfig->password, "testSifresi1", 64);
  apConfig->channel =11;
  apConfig->authmode=3;
  wifi_softap_set_config(apConfig);

any help is welcome

Set correct IP addreses. In sample IP = bad.

Re: Configuring SOFTAP in rtos_sdk

PostPosted: Sat Dec 27, 2014 3:46 am
by alonewolfx2
it doesnt change anything. its crashing in this line
Code: Select all wifi_softap_set_config(&config);

Re: Configuring SOFTAP in rtos_sdk

PostPosted: Tue Dec 30, 2014 4:45 am
by Athena
Please try to create a new task to do this softap set config things..
Because memory for one task is limited..