AnsweredAssumed Answered

SPWF01SA1 http connection drops while accessing RAM file

Question asked by bhanot.rishi on Sep 19, 2017
Latest reply on Apr 24, 2018 by Elio Cometti

I am using SPWF01SA (ver :160129-c5bf5ce-SPWF01S) with CubeExpansion_WIFI1_V3.0.2 with custom hardware.

Trying a simple test of adding a html file to RAM using wifi_file_create(). File is added as i confirmed this with wifi_file_list(). I am starting the module in miniAP mode and when i try to access this html file from wifi client laptop, http connection drops. But if i try to access any other html file i can get it in my browser. 

 

//code for file creation and module startup....

WiFi_Status_t status = WiFi_MODULE_SUCCESS;
uint8_t ssid[11] = {'R','L','C','_','C','O','N','F','I','G',0};
uint8_t tmp[85];

sprintf((char*)tmp,"%s","<!DOCTYPE html><html><head><title>testpage</title></head><body>testpage</body></html>");
InitWiFi_GPIO();
StartWiFiHardware();
status = SET_Configuration_Addr(WIFI_IP_APDOMAINNAME, "domain.net");
if(status != WiFi_MODULE_SUCCESS)
   LOG("failed to set domain name...\n");
wifi_ap_start(ssid,6);
status = wifi_file_create("test.html",sizeof(tmp),(char*)tmp);
if(status != WiFi_MODULE_SUCCESS)
   LOG("failed to create file...\n");
else
   LOG("file created...\n");
status = wifi_file_list();

 wifi_file_show((uint8_t*)"test.html");

while(1){};

 

///// Output from teraterm log window

Initializing SPWF01SA1 Interface..
+WIND:1:Poweron (160129-c5bf5ce-SPWF01S)

+WIND:13:ST SPWF01S IWM: Copyright (c) 2012-2015 STMicroelectronics, Inc. All rights Reserved.

+WIND:3:Watchdog Running

+WIND:0:Console active

+WIND:32:WiFi Hardware Started

WiFi Module started...

+WIND:26:WiFi Started AP with network 'RLC_CONFIG'

+WIND:24:WiFi Up:172.24.62.1
Connected to network now, ready for TCP communication ...

>>Soft Reset Wi-Fi module

+WIND:2:Reset

+WIND:1:Poweron (160129-c5bf5ce-SPWF01S)

+WIND:13:ST SPWF01S IWM: Copyright (c) 2012-2015 STMicroelectronics, Inc. All rights Reserved.

+WIND:3:Watchdog Running

+WIND:0:Console active

+WIND:32:WiFi Hardware Started

WiFi Initialised and Ready..
file created...

+WIND:26:WiFi Started AP with network 'RLC_CONFIG'

+WIND:24:WiFi Up:172.24.62.1

OK
D 85 /test.html
I 461 /input_demo.shtml
I 384 /output_demo.html
I 614 /index.html
I 157 /peers.shtml
I 193 /config.shtml
I 180 /message.shtml
I 174 /status.shtml
I 5496 /remote.html
I 3447 /firstset.html
I 212 /404.html

OK

 

OK
<!DOCTYPE html><html><head><title>testpage</title></head><body>testpage</body></html>
OK
.....................

Outcomes