2016-06-15 06:22 AM
Hello,
I wrote my software with SPWF01SA.11 Version 140805-3f58d6b to use it as a mini-webserver linked to a wifi router (wifi_mode = 1, no dhcp). My code is working well with this item. Now, we received new modules SPWF01SA.11 Version 150410-c2e37a3 and the module do not work well. I upgraded one of them to Version 160129-c5bf5ce, and my mini-webserver does not have a good behavior : - wifi connection seems OK (i get +WIND:24:Wifi Up) but I can't ping my module from PC (or just a few seconds). My module with 140805-3f58d6b is still working well. First question : - where can I get version SPWF01S-140805-3f58d6b.OTA to downgrade the new modules (and is it a good idea ?) to check if my problem is well a version problem. Second question: Is it a problem of configuration ? I do not find, the differences between my modules status and configuration are below : STATUS version = 140805-3f58d6b / 160129-c5bf5ce wifi_aid = 3 / 2 wifi_chan_activity2 = 0x00003FFF / 0x000001FFF wifi_gf_mode = [absent] / 0 free_heap = 22928 / 18968 min_heap = 22376 / 17688 CONFIGURATION etf_mode = [absent] / 0 console1_delimiter = [absent] / 0x0000002C console1_errs = [absent] / 1 wifi_txfail_thresh = [absent] / 5 wifi_ht_mode = [absent] / 0 wifi_region = [absent] / 1 ip_wait_timeout = [absent] / 12000 ip_sockd_timeout = [absent] / 250 ip_dhcp_lease_time = [absent] / 120 ip_dns_mode = [absent] / 0 ip_use_cgis = [absent] / 0x0000000F ip_use_ssis = [absent] / 0x0000000F ip_use_decoder = [absent] / 0x00000000 I also hav problem with ram, it seems I have less Ram with new versions (free_heap) and maybe my webserver files go over Ram size with new version (I do not met the case with Version 140805-3f58d6b). Thank you for your help.2016-06-21 02:32 AM
Hello,
I received the requested version OTA file (140805-3f58d6b) from ST Support. I checked that the modules with V3.2 work fine with my application. ST support gave me this ''3.2 beta version'' but adviced me to use last 3.5. Now I try to make it work with 3.5. We reduced the size of our Html files size and there is no wifi connexion problem anymore. But we still have some long times to refresh dynamic pages. The module is used as a remote webserver with CSS + javascript to give access to my product. The module is set at+s.ssidtxt=XXSSIDname at+s.scfg=wifi_wpa_psk_text,XXXXXXX at+s.scfg=wifi_priv_mode,2 at+s.scfg=wifi_mode,1 at+s.scfg=ip_use_dhcp,0 at+s.scfg=ip_ipaddr,192.168.1.36 at+s.scfg=ip_gw,192.168.1.1 at+s.scfg=ip_dns,192.168.1.1 at+s.scfg=ip_netmask,255.255.255.0 The files we use are listed below : index.html is a HTML page with 3 frames, that includes menu.html + sm.html + demo.html. sm.html and demo.html are modified dynamically (remove+create+append). D 3087 demo.html (3087 or less) D 1985 sm.html (1985 or less) E 2395 valid.png E 1301 styl.css E 1924 load.gif E 72174 jQuery.min.js E 419 index.html E 2560 menu.html I 174 status.shtml I 614 index,html I 180 message.shtml I 193 config.shtml I 157 peers.shtml I 384 output_demo.html I 461 input_demo.shtml I 3447 firstset.html I 2898 remote.html I 212 404.html Results of tests (done in same place): -------------------------------------- The test consists of measuring the time to refresh the whole index.html page with its 3 frames. with SPWF01S-140805-3f58d6b-RELEASE-main.ota Average Time to show the page = 4,8s Maximum Time for a page = 9s Free Heap = 18000 Min heap = 5200 with 3.5 SPWF01S-160129-c5bf5ce-RELEASE-main.ota The best time I get with 3.5, is setting AT+S.SCFG=ip_wait_timeout,500 This parameter is not set with SPWF01S-140805-3f58d6b-RELEASE-main.ota (not existing). Average Time to show the page = 7,9s Maximum Time for a page = 32s (2 times on 30 attempts) Free Heap = 16400 Min heap = 5400 The most penalizing are the pages that take more than 30s to appear or that I have to refresh several times to get the whole. It seems that there is a RAM problem with new versions, that was not creating such problem in former version.We used to create dynamically menu.html (2360 bytes), that was not a problem with V3.2 but that blocks the wifi connection with V3.5 (too much ram used). The min_heap are quite equals with V3.2 and V3.5, but there is no problem with V3.2. Is there a way to optimize RAM use on the module with v3.5 ? Thanks for your help.2016-07-04 02:31 AM
Hi Vincent,
as a general rule, always use the last available FW. It's the most stable.About RAM problem,ip_wait_timeout is the best way to speedup the download. Just to perform a test, can you use a smaller jQuery, or use another way to render the webpage?
2016-07-06 12:16 AM
Hi Gerardo,
Thank you for your answer, it was very helpful as I did not focus on jQuery before, as it worked well with V3.2. I first tried to use jQuery V1.2.3 (53Ko) instead of jQuery V1.4.2 (71Ko) but it did not make visible change. Then I tried a call to jQuery CDN. I replaced in my pages : local : <script src='/jQuery.min.js'></script> by remote : <script src=''http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js''></script> This solves my problem with v3.5: the refreshing of pages is now average 2s (with max 2.5s) when I used to have average 7.5s (with max 32s). To precise the cause of my problem, I think the problem is due to my Html frameset that call 3 html pages. The 3 html pages, included a link to local ''src=/jQuery.min.js''. V3.2 managed it well and v3.5 encouters problem in this case. We will call jQuery CDN (as we use the module in Station mode, not in miniAP mode) <script src=''http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js''></script> and we will add <script>window.jQuery || document.write('<script src=''/jquery.min.js''>\x3C/script>')</script> in case of server ajax.googleapis.com not available. Just a last question, do you have another way to reduce local jQuery instead the solution I tested, using older jQuery V1.2.3 (53Ko). Regards, Vincent2016-07-06 12:32 AM
Hi Vincent,
I see JQuery ''full'', ''minimal'', ''slim'', and ''slim minimal''. Try (if possible) to use the smallest one.