How to send a large amount of data faster ?

Posted on
Page
of 2
Prev
/ 2
  • Since you are using a NodeMCU the flashing map is described here:

    FlashNodeMCU

    I'm testing on a ESP8266-01 with 1MB of flash, I think the NodeMCU has 4MB.
    The latest test program follows and allows for you to refresh the page to get multiple timings.
    I've also change the HTML script to display data.length instead of data.
    I've added process.memory() to fix a bug in E.toString() and asked for the bug to be examined in another post.

    Once the page is online you might try from a command prompt ping IP address
    example ping 192.168.1.13
    This will give you an idea of the wifi speed and if there is a lot of traffic or errors occurring.

    //WSDesp8266B 28Jan2018
    
    //http//192.168.1.6:8080
    //ESP8266 with Espruino flahed
    
    
    // list of Wifi and passwords
    var SSID="ssid";
    var key="keykey";
    var Startagain=0;
    var myinterval;
    
    var n =4, chk=2*1024;
    var tdata=new Uint8Array(chk);
    var i;
    for(i=0;i<1024;i++){
      tdata[i]=0x30;
      tdata[i+1024]=0x31;
    }//next i
    
    var page = 
    "<html>\r\n<body>\r\n<textarea id=\"demo\" rows=\"32\" cols=\"64\"></textarea>\r\n<script>\r\nv­ar ws;\r\nvar data=\"\";\r\n//setTimeout(function(){\r­\nws = new WebSocket(\"ws://\" + location.host + \"/my_websocket\", \"protocolOne\");\r\nws.onmessage = function (event) { \r\ndata+=event.data;\r\ndocument.getEle­mentById(\"demo\").innerHTML = data.length;\r\nws.send(\"Hello to Espruino!\"); \r\n };\r\n//setTimeout(function() { ws.send(\"Hello to Espruino!\"); }, //1000);}\r\n//,1000);\r\n\r\n</script><­/body>\r\n</html>\r\n"
    ;
    function onPageRequest(req, res) {
      res.writeHead(200, {'Content-Type': 'text/html'});
      res.end(page);
    }
    
    function test(){
    
    console.log("Start connection process");
    var wifi = require("Wifi");
     console.log("Try Connecting to WiFi ",SSID);
     wifi.connect(SSID,{password:key}, function(err) {
      console.log(err);
       if (err){Startagain=1;return;
    }
     console.log("connected? err=", err, "info=", wifi.getIP());
         console.log("Wi-Fi Connected");
         clearInterval( myinterval);
         var t=getTime();
    var server = require('ws').createServer(onPageRequest­);
    server.listen(8080);
    server.on("websocket", function(ws) {
        ws.on('message',function(msg) {
        n--;
      print("n=",n,"t:",(getTime()-t).toFixed(­3),"sec");
          print("[WS] "+JSON.stringify(msg));
          if(n){
            ws.send(E.toString(tdata));
            process.memory();
          }else{
            process.memory();
            n=4;
          }//end else
        });
      t=getTime();
      ws.send(E.toString(tdata));
      process.memory();
      print("n=",n,"t:",(getTime()-t).toFixed(­3),"sec");
    });
     });//end connect
    }//end test
    
    myinterval=setInterval(function () {
      console.log("Test for error");
      if(Startagain){
       Startagain=0;
       test();
      }//end of Startagain
    }, 2000);
    
    test();
    

    Here is some output:

     1v95 Copyright 2017 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 1MB:512/512, manuf 0xe0 chip 0x4014
    >Start connection process
    Try Connecting to WiFi  faux
    =undefined
    Test for error
    Test for error
    null
    connected? err= null info= {
      "ip": "192.168.1.13",
      "netmask": "255.255.255.0",
      "gw": "192.168.1.1",
      "mac": "18:fe:34:cb:2c:23"
     }
    Wi-Fi Connected
    n= 4 t: 0.016 sec
    n= 3 t: 0.098 sec
    [WS] "Hello to Espruino!"
    n= 2 t: 0.169 sec
    [WS] "Hello to Espruino!"
    n= 1 t: 0.239 sec
    [WS] "Hello to Espruino!"
    n= 0 t: 0.309 sec
    [WS] "Hello to Espruino!"
    n= 4 t: 0.012 sec
    n= 3 t: 0.083 sec
    [WS] "Hello to Espruino!"
    n= 2 t: 0.151 sec
    [WS] "Hello to Espruino!"
    n= 1 t: 0.881 sec
    [WS] "Hello to Espruino!"
    n= 0 t: 0.951 sec
    [WS] "Hello to Espruino!"
    n= 4 t: 0.012 sec
    n= 3 t: 0.089 sec
    [WS] "Hello to Espruino!"
    n= 2 t: 0.164 sec
    [WS] "Hello to Espruino!"
    n= 1 t: 0.233 sec
    [WS] "Hello to Espruino!"
    n= 0 t: 0.307 sec
    [WS] "Hello to Espruino!"
    n= 4 t: 0.012 sec
    n= 3 t: 0.089 sec
    [WS] "Hello to Espruino!"
    n= 2 t: 0.846 sec
    [WS] "Hello to Espruino!"
    n= 1 t: 0.909 sec
    [WS] "Hello to Espruino!"
    n= 0 t: 0.994 sec
    [WS
    

    Some variation in the speed
    Here are some ping timings:

    Microsoft Windows [Version 10.0.16299.192]
    (c) 2017 Microsoft Corporation. All rights reserved.
    
    C:\Users\jj>ping 192.168.1.13
    
    Pinging 192.168.1.13 with 32 bytes of data:
    Reply from 192.168.1.13: bytes=32 time=2ms TTL=128
    Reply from 192.168.1.13: bytes=32 time=2ms TTL=128
    Reply from 192.168.1.13: bytes=32 time=3ms TTL=128
    Reply from 192.168.1.13: bytes=32 time=3ms TTL=128
    
    Ping statistics for 192.168.1.13:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 2ms, Maximum = 3ms, Average = 2ms
    
    C:\Users\jj>ping 192.168.1.13
    
    Pinging 192.168.1.13 with 32 bytes of data:
    Reply from 192.168.1.13: bytes=32 time=2ms TTL=128
    Reply from 192.168.1.13: bytes=32 time=1ms TTL=128
    Reply from 192.168.1.13: bytes=32 time=2ms TTL=128
    Reply from 192.168.1.13: bytes=32 time=3ms TTL=128
    
    Ping statistics for 192.168.1.13:
        Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
    Approximate round trip times in milli-seconds:
        Minimum = 1ms, Maximum = 3ms, Average = 2ms
    
  • What is your physical distance to the router? Is it possible the antenna on the board is damaged?

    Try restarting your router.

    Have you tried the arduino software recently? Perhaps the hardware is damaged?

  • What about powesave setting for Wifi, check with require('Wifi').getStatus().powersave, output should be "none".

  • @Wilberforce, I started this conversation after seeing that on arduino my boards were doing ~100kb/sec, while on espruino it was only 1kb/sec, for server a file. In fact, I am using espruino since the v1.91, and all that time I thought it was a hardware limitation of esp8266. But it seems to me that the problem comes from the dSnd buffer sent slowly, every 200m, in small pieces of 256bytes.

    As it works faster on arduino, the board is not defective. It works the same way on the 2 nodemcu-e12 v2 & v3 that I have. I restarted the router, and tried AP alone (at 20cm from my laptop), station alone and AP+ST, still the same damn result !

    @MaBe, I found it at ps-poll even though it was in AP+ST mode. No change when I set it to "none" using with Wifi.setConfig({powersave:"none"}).

    @ClearMemory041063, I tried without improvement also flashing the last expressif firmware with the expressif flashing tool like you did, just in case. I used "esp_init_data_default_v05.bin", because there was no "esp_init_data_default.bin". I could not get it working without also changing addresses of this file and of "blank.bin" to 0x3fc000 and 0x37e000. I got a nice :

    AT+GMR
    AT version:1.4.0.0(May  5 2017 16:10:59)
    SDK version:2.1.0(116b762)
    compile time:May  5 2017 16:37:48
    OK
    

    Then I reflashed espruino, this time with expressif flashing tool. I used the files from this url. I used the addresses from your link and I tried with "blank .bin" at 0x3FE000 like I used to do, both works same way. Still as slow as before.

    I tried other browsers too, older espruino versions (v1.91, v1.94). The strangest that no one else ever have or noticed this problem before.

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v95.155 Copyright 2017 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:1024/1024, manuf 0xef chip 0x4016
    >Start connection process
    Try Connecting to WiFi  Gardening, cheaper than therapy
    =undefined
    Test for error
    Test for error
    Test for error
    null
    connected? err= null info= {
      "ip": "192.168.2.6",
      "netmask": "255.255.255.0",
      "gw": "192.168.2.1",
      "mac": "2c:3a:e8:0e:9f:1c"
     }
    Wi-Fi Connected
    n= 4 t: 0.018 sec
    n= 3 t: 1.711 sec
    [WS] "Hello to Espruino!"
    n= 2 t: 3.186 sec
    [WS] "Hello to Espruino!"
    n= 1 t: 4.691 sec
    [WS] "Hello to Espruino!"
    n= 0 t: 6.165 sec
    [WS] "Hello to Espruino!"
    
  • Finaly got a 4MB ESP8266-12 (AI-Thinker ESP8266 MOD) assembled and working.

    I used 10k pullup resistors on the reset, Enable and GPIO 0 pins and a 10k pulldown resistor on GPIO 15.
    I used three batch files to run the ESPtool.py
    I first copied the batch files to the folder:
    "C:\Users\jj\Documents\espruinoEsp8266Fl­ash\espruino_1v95_esp8266_4mb"
    Run the batch files by clicking on them in file explorer after grounding GPIO 0 and resetting the chip.
    Run ESPinfo.bat and get the following.

    C:\Users\jj\Documents\espruinoEsp8266Fla­sh\espruino_1v95_esp8266_4mb>set /p pport=Enter a Com port
    Enter a Com port com3
    
    C:\Users\jj\Documents\espruinoEsp8266Fla­sh\espruino_1v95_esp8266_4mb>echo com3
    com3
    
    C:\Users\jj\Documents\espruinoEsp8266Fla­sh\espruino_1v95_esp8266_4mb>pause
    Press any key to continue . . .
    
    C:\Users\jj\Documents\espruinoEsp8266Fla­sh\espruino_1v95_esp8266_4mb>esptool.py --port com3 --baud 115200 --no-stub chip_id
    esptool.py v2.2.1
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Enabling default SPI flash mode...
    Chip ID: 0x00134e51
    Hard resetting...
    
    C:\Users\jj\Documents\espruinoEsp8266Fla­sh\espruino_1v95_esp8266_4mb>esptool.py --port com3 --baud 115200 --no-stub read_mac
    esptool.py v2.2.1
    Connecting...
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Enabling default SPI flash mode...
    MAC: 5c:cf:7f:13:4e:51
    Hard resetting...
    
    C:\Users\jj\Documents\espruinoEsp8266Fla­sh\espruino_1v95_esp8266_4mb>esptool.py --port com3 --baud 115200 --no-stub flash_id
    esptool.py v2.2.1
    Connecting...
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Enabling default SPI flash mode...
    Manufacturer: e0
    Device: 4016
    Detected flash size: 4MB
    Hard resetting...
    
    C:\Users\jj\Documents\espruinoEsp8266Fla­sh\espruino_1v95_esp8266_4mb>pause
    Press any key to continue . . .
    

    Then I did a reset of the chip and ran EraseFlash.bat.
    Then I did a reset of the chip and ran
    "C:\Users\jj\Documents\espruinoEsp8266Fl­ash\espruino_1v95_esp8266_4mb\FlashESP82­66_4M_40mhz.bat"
    I un-grounded GPIO 0 and reset the chip.
    Reconnect to WEBIDE and try the test program WSDesp8266C.js
    It connects to my router and serves the HTML page but fails to transmit data via WebSockets.

    Try again

    Put the batch files into the following folder
    "C:\Users\jj\Documents\espruinoEsp8266Fl­ash\espruino_1v95_esp8266"
    Rerun the ESPinfo.bat, EraseFlash.bat and FlashESP8266_4M_40mhz.bat.
    The WSDesp8266C.js program produces the following output:

     1v95 Copyright 2017 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:512/512, manuf 0xe0 chip 0x4016
    >Start connection process
    Try Connecting to WiFi  faux
    =undefined
    Test for error
    null
    connected? err= null info= {
      "ip": "192.168.1.15",
      "netmask": "255.255.255.0",
      "gw": "192.168.1.1",
      "mac": "5c:cf:7f:13:4e:51"
     }
    Wi-Fi Connected
    n= 4 t: 0.018 sec
    n= 3 t: 0.095 sec
    [WS] "2048"
    n= 2 t: 0.179 sec
    [WS] "4096"
    n= 1 t: 0.256 sec
    [WS] "6144"
    n= 0 t: 1.133 sec
    [WS] "8192"
    n= 0 t: 1.135 sec
    n= 3 t: 1.241 sec
    [WS] "10240"
    n= 2 t: 1.312 sec
    [WS] "12288"
    n= 1 t: 1.383 sec
    [WS] "14336"
    n= 0 t: 1.453 sec
    [WS] "16384"
    n= 0 t: 1.455 sec
    n= 3 t: 1.527 sec
    [WS] "18432"
    n= 2 t: 2.325 sec
    [WS] "20480"
    n= 1 t: 2.394 sec
    [WS] "22528"
    n= 0 t: 2.470 sec
    [WS] "24576"
    n= 0 t: 2.473 sec
    n= 3 t: 2.541 sec
    [WS] "26624"
    n= 2 t: 2.617 sec
    [WS] "28672"
    n= 1 t: 2.685 sec
    [WS] "30720"
    n= 0 t: 2.757 sec
    [WS] "32768"
    n= 0 t: 2.759 sec
    n= 3 t: 2.839 sec
    [WS] "34816"
    n= 2 t: 2.940 sec
    [WS] "36864"
    n= 1 t: 3.013 sec
    [WS] "38912"
    n= 0 t: 3.089 sec
    [WS] "40960"
    n= 0 t: 3.092 sec
    n= 3 t: 3.168 sec
    [WS] "43008"
    n= 2 t: 3.243 sec
    [WS] "45056"
    n= 1 t: 3.317 sec
    [WS] "47104"
    n= 0 t: 3.388 sec
    [WS] "49152"
    n= 0 t: 3.391 sec
    n= 3 t: 3.457 sec
    [WS] "51200"
    n= 2 t: 3.526 sec
    [WS] "53248"
    n= 1 t: 4.493 sec
    [WS] "55296"
    n= 0 t: 4.567 sec
    [WS] "57344"
    n= 0 t: 4.569 sec
    n= 3 t: 4.646 sec
    [WS] "59392"
    n= 2 t: 4.715 sec
    [WS] "61440"
    n= 1 t: 4.780 sec
    [WS] "63488"
    n= 0 t: 4.853 sec
    [WS] "65536"
    n= 0 t: 4.855 sec
    n= 3 t: 4.932 sec
    [WS] "67584"
    n= 2 t: 4.998 sec
    [WS] "69632"
    n= 1 t: 5.075 sec
    [WS] "71680"
    n= 0 t: 5.146 sec
    [WS] "73728"
    n= 0 t: 5.148 sec
    n= 3 t: 5.221 sec
    [WS] "75776"
    n= 2 t: 5.294 sec
    [WS] "77824"
    n= 1 t: 5.366 sec
    [WS] "79872"
    n= 0 t: 5.432 sec
    [WS] "81920"
    n= 0 t: 5.434 sec
    n= 3 t: 5.499 sec
    [WS] "83968"
    n= 2 t: 6.244 sec
    [WS] "86016"
    n= 1 t: 6.310 sec
    [WS] "88064"
    n= 0 t: 6.389 sec
    [WS] "90112"
    n= 0 t: 6.391 sec
    n= 3 t: 6.459 sec
    [WS] "92160"
    n= 2 t: 6.528 sec
    [WS] "94208"
    n= 1 t: 6.597 sec
    [WS] "96256"
    n= 0 t: 6.668 sec
    [WS] "98304"
    n= 0 t: 6.669 sec
    n= 3 t: 6.739 sec
    [WS] "100352"
    n= 2 t: 6.810 sec
    [WS] "102400"
    n= 1 t: 7.732 sec
    [WS] "104448"
    n= 0 t: 7.800 sec
    [WS] "106496"
    n= 0 t: 7.802 sec
    n= 3 t: 7.872 sec
    [WS] "108544"
    n= 2 t: 7.944 sec
    [WS] "110592"
    n= 1 t: 8.013 sec
    [WS] "112640"
    n= 0 t: 8.083 sec
    [WS] "114688"
    n= 0 t: 8.085 sec
    n= 3 t: 8.155 sec
    [WS] "116736"
    n= 2 t: 8.233 sec
    [WS] "118784"
    n= 1 t: 8.299 sec
    [WS] "120832"
    n= 0 t: 8.367 sec
    [WS] "122880"
    n= 0 t: 8.369 sec
    n= 3 t: 8.446 sec
    [WS] "124928"
    n= 2 t: 8.513 sec
    [WS] "126976"
    n= 1 t: 8.587 sec
    [WS] "129024"
    n= 0 t: 8.659 sec
    [WS] "131072"
    n= 0 t: 8.662 sec
    n= 3 t: 8.730 sec
    [WS] "133120"
    n= 2 t: 8.797 sec
    [WS] "135168"
    n= 1 t: 8.871 sec
    [WS] "137216"
    n= 0 t: 8.939 sec
    [WS] "139264"
    n= 0 t: 8.941 sec
    n= 3 t: 9.012 sec
    [WS] "141312"
    n= 2 t: 9.079 sec
    [WS] "143360"
    n= 1 t: 9.152 sec
    [WS] "145408"
    n= 0 t: 9.221 sec
    [WS] "147456"
    n= 0 t: 9.224 sec
    n= 3 t: 9.290 sec
    [WS] "149504"
    n= 2 t: 9.363 sec
    [WS] "151552"
    n= 1 t: 9.434 sec
    [WS] "153600"
    n= 0 t: 12.071 sec
    [WS] "155648"
    n= 0 t: 12.073 sec
    n= 3 t: 12.153 sec
    [WS] "157696"
    n= 2 t: 12.229 sec
    [WS] "159744"
    n= 1 t: 12.302 sec
    [WS] "161792"
    n= 0 t: 12.372 sec
    [WS] "163840"
    n= 0 t: 12.374 sec
    n= 3 t: 12.449 sec
    [WS] "165888"
    n= 2 t: 12.513 sec
    [WS] "167936"
    n= 1 t: 12.584 sec
    [WS] "169984"
    n= 0 t: 12.653 sec
    [WS] "172032"
    n= 0 t: 12.655 sec
    n= 3 t: 12.738 sec
    [WS] "174080"
    n= 2 t: 12.821 sec
    [WS] "176128"
    n= 1 t: 12.889 sec
    [WS] "178176"
    n= 0 t: 12.960 sec
    [WS] "180224"
    n= 0 t: 12.963 sec
    n= 3 t: 13.033 sec
    [WS] "182272"
    n= 2 t: 13.104 sec
    [WS] "184320"
    n= 1 t: 13.171 sec
    [WS] "186368"
    n= 0 t: 13.248 sec
    [WS] "188416"
    n= 0 t: 13.250 sec
    n= 3 t: 13.319 sec
    [WS] "190464"
    n= 2 t: 13.385 sec
    [WS] "192512"
    n= 1 t: 14.278 sec
    [WS] "194560"
    n= 0 t: 14.349 sec
    [WS] "196608"
    n= 0 t: 14.352 sec
    n= 3 t: 14.425 sec
    [WS] "198656"
    n= 2 t: 14.500 sec
    [WS] "200704"
    n= 1 t: 14.568 sec
    [WS] "202752"
    n= 0 t: 14.635 sec
    [WS] "204800"
    n= 0 t: 14.637 sec
    n= 3 t: 14.716 sec
    [WS] "206848"
    n= 2 t: 14.792 sec
    [WS] "208896"
    n= 1 t: 14.860 sec
    [WS] "210944"
    n= 0 t: 14.935 sec
    [WS] "212992"
    n= 0 t: 14.938 sec
    n= 3 t: 15.015 sec
    [WS] "215040"
    n= 2 t: 15.079 sec
    [WS] "217088"
    n= 1 t: 15.147 sec
    [WS] "219136"
    n= 0 t: 15.213 sec
    [WS] "221184"
    n= 0 t: 15.215 sec
    n= 3 t: 15.286 sec
    [WS] "223232"
    n= 2 t: 15.355 sec
    [WS] "225280"
    n= 1 t: 16.028 sec
    [WS] "227328"
    n= 0 t: 16.100 sec
    [WS] "229376"
    n= 0 t: 16.103 sec
    n= 3 t: 16.175 sec
    [WS] "231424"
    n= 2 t: 16.249 sec
    [WS] "233472"
    n= 1 t: 16.323 sec
    [WS] "235520"
    n= 0 t: 16.391 sec
    [WS] "237568"
    n= 0 t: 16.393 sec
    n= 3 t: 16.462 sec
    [WS] "239616"
    n= 2 t: 16.535 sec
    [WS] "241664"
    n= 1 t: 16.604 sec
    [WS] "243712"
    n= 0 t: 16.673 sec
    [WS] "245760"
    n= 0 t: 16.675 sec
    n= 3 t: 16.743 sec
    [WS] "247808"
    n= 2 t: 16.810 sec
    [WS] "249856"
    n= 1 t: 16.878 sec
    [WS] "251904"
    n= 0 t: 16.948 sec
    [WS] "253952"
    n= 0 t: 16.950 sec
    n= 3 t: 17.023 sec
    [WS] "256000"
    n= 2 t: 17.089 sec
    [WS] "258048"
    n= 1 t: 17.166 sec
    [WS] "260096"
    n= 0 t: 17.244 sec
    [WS] "262144"
    n= 0 t: 17.246 sec
    n= 3 t: 17.316 sec
    [WS] "264192"
    n= 2 t: 18.124 sec
    [WS] "266240"
    n= 1 t: 18.194 sec
    [WS] "268288"
    n= 0 t: 18.265 sec
    [WS] "270336"
    n= 0 t: 18.268 sec
    n= 3 t: 18.339 sec
    [WS] "272384"
    n= 2 t: 18.407 sec
    [WS] "274432"
    n= 1 t: 18.477 sec
    [WS] "276480"
    n= 0 t: 18.543 sec
    [WS] "278528"
    n= 0 t: 18.546 sec
    n= 3 t: 18.612 sec
    [WS] "280576"
    n= 2 t: 19.313 sec
    [WS] "282624"
    n= 1 t: 19.378 sec
    [WS] "284672"
    n= 0 t: 19.447 sec
    [WS] "286720"
    n= 0 t: 19.449 sec
    n= 3 t: 19.528 sec
    [WS] "288768"
    n= 2 t: 19.599 sec
    [WS] "290816"
    n= 1 t: 19.666 sec
    [WS] "292864"
    n= 0 t: 19.734 sec
    [WS] "294912"
    n= 0 t: 19.736 sec
    n= 3 t: 19.815 sec
    [WS] "296960"
    n= 2 t: 19.886 sec
    [WS] "299008"
    n= 1 t: 19.955 sec
    [WS] "301056"
    n= 0 t: 20.031 sec
    [WS] "303104"
    n= 0 t: 20.034 sec
    n= 3 t: 20.109 sec
    [WS] "305152"
    n= 2 t: 20.179 sec
    [WS] "307200"
    n= 1 t: 20.245 sec
    [WS] "309248"
    n= 0 t: 20.316 sec
    [WS] "311296"
    n= 0 t: 20.318 sec
    n= 3 t: 20.391 sec
    [WS] "313344"
    n= 2 t: 20.464 sec
    [WS] "315392"
    n= 1 t: 20.532 sec
    [WS] "317440"
    n= 0 t: 20.602 sec
    [WS] "319488"
    n= 0 t: 20.604 sec
    n= 3 t: 20.685 sec
    [WS] "321536"
    n= 2 t: 20.753 sec
    [WS] "323584"
    n= 1 t: 20.830 sec
    [WS] "325632"
    n= 0 t: 20.899 sec
    [WS] "327680"
    n= 0 t: 20.901 sec
    n= 3 t: 20.967 sec
    [WS] "329728"
    n= 2 t: 21.037 sec
    [WS] "331776"
    n= 1 t: 21.104 sec
    [WS] "333824"
    n= 0 t: 21.172 sec
    [WS] "335872"
    n= 0 t: 21.174 sec
    n= 3 t: 21.245 sec
    [WS] "337920"
    n= 2 t: 21.345 sec
    [WS] "339968"
    n= 1 t: 21.440 sec
    [WS] "342016"
    n= 0 t: 21.509 sec
    [WS] "344064"
    n= 0 t: 21.512 sec
    n= 3 t: 21.586 sec
    [WS] "346112"
    n= 2 t: 21.661 sec
    [WS] "348160"
    n= 1 t: 21.731 sec
    [WS] "350208"
    n= 0 t: 21.798 sec
    [WS] "352256"
    n= 0 t: 21.801 sec
    n= 3 t: 21.876 sec
    [WS] "354304"
    n= 2 t: 21.971 sec
    [WS] "356352"
    n= 1 t: 22.041 sec
    [WS] "358400"
    n= 0 t: 22.109 sec
    [WS] "360448"
    n= 0 t: 22.112 sec
    n= 3 t: 22.185 sec
    [WS] "362496"
    n= 2 t: 22.253 sec
    [WS] "364544"
    n= 1 t: 22.321 sec
    [WS] "366592"
    n= 0 t: 22.388 sec
    [WS] "368640"
    n= 0 t: 22.389 sec
    n= 3 t: 22.455 sec
    [WS] "370688"
    n= 2 t: 22.522 sec
    [WS] "372736"
    n= 1 t: 22.589 sec
    [WS] "374784"
    n= 0 t: 22.657 sec
    [WS] "376832"
    n= 0 t: 22.659 sec
    n= 3 t: 22.730 sec
    [WS] "378880"
    n= 2 t: 22.801 sec
    [WS] "380928"
    n= 1 t: 22.869 sec
    [WS] "382976"
    n= 0 t: 22.939 sec
    [WS] "385024"
    n= 0 t: 22.941 sec
    n= 3 t: 23.008 sec
    [WS] "387072"
    n= 2 t: 23.078 sec
    [WS] "389120"
    n= 1 t: 23.149 sec
    [WS] "391168"
    n= 0 t: 23.219 sec
    [WS] "393216"
    n= 0 t: 23.221 sec
    n= 3 t: 24.147 sec
    [WS] "395264"
    n= 2 t: 24.227 sec
    [WS] "397312"
    n= 1 t: 24.296 sec
    [WS] "399360"
    n= 0 t: 24.361 sec
    [WS] "401408"
    n= 0 t: 24.364 sec
    n= 3 t: 24.439 sec
    [WS] "403456"
    n= 2 t: 24.518 sec
    [WS] "405504"
    n= 1 t: 25.341 sec
    [WS] "407552"
    n= 0 t: 25.408 sec
    [WS] "409600"
    n= 0 t: 25.410 sec
    n= 3 t: 25.481 sec
    [WS] "411648"
    n= 2 t: 25.556 sec
    [WS] "413696"
    n= 1 t: 25.621 sec
    [WS] "415744"
    n= 0 t: 25.691 sec
    [WS] "417792"
    n= 0 t: 25.693 sec
    n= 3 t: 25.765 sec
    [WS] "419840"
    n= 2 t: 25.830 sec
    [WS] "421888"
    n= 1 t: 28.289 sec
    [WS] "423936"
    n= 0 t: 28.356 sec
    [WS] "425984"
    n= 0 t: 28.358 sec
    n= 3 t: 28.439 sec
    [WS] "428032"
    n= 2 t: 29.252 sec
    [WS] "430080"
    n= 1 t: 29.325 sec
    [WS] "432128"
    n= 0 t: 29.396 sec
    [WS] "434176"
    n= 0 t: 29.398 sec
    n= 3 t: 29.467 sec
    [WS] "436224"
    n= 2 t: 29.541 sec
    [WS] "438272"
    n= 1 t: 29.609 sec
    [WS] "440320"
    n= 0 t: 29.679 sec
    [WS] "442368"
    n= 0 t: 29.682 sec
    n= 3 t: 29.758 sec
    [WS] "444416"
    n= 2 t: 31.375 sec
    [WS] "446464"
    n= 1 t: 31.443 sec
    [WS] "448512"
    n= 0 t: 31.510 sec
    [WS] "450560"
    n= 0 t: 31.512 sec
    n= 3 t: 31.589 sec
    [WS] "452608"
    n= 2 t: 31.655 sec
    [WS] "454656"
    n= 1 t: 31.724 sec
    [WS] "456704"
    n= 0 t: 32.612 sec
    [WS] "458752"
    n= 0 t: 32.614 sec
    n= 3 t: 32.683 sec
    [WS] "460800"
    n= 2 t: 32.757 sec
    [WS] "462848"
    n= 1 t: 32.833 sec
    [WS] "464896"
    n= 0 t: 32.905 sec
    [WS] "466944"
    n= 0 t: 32.907 sec
    n= 3 t: 32.975 sec
    [WS] "468992"
    n= 2 t: 33.041 sec
    [WS] "471040"
    n= 1 t: 33.803 sec
    [WS] "473088"
    n= 0 t: 33.875 sec
    [WS] "475136"
    n= 0 t: 33.877 sec
    n= 3 t: 33.953 sec
    [WS] "477184"
    n= 2 t: 34.017 sec
    [WS] "479232"
    n= 1 t: 34.087 sec
    [WS] "481280"
    n= 0 t: 34.162 sec
    [WS] "483328"
    n= 0 t: 34.164 sec
    n= 3 t: 34.241 sec
    [WS] "485376"
    n= 2 t: 34.307 sec
    [WS] "487424"
    n= 1 t: 34.373 sec
    [WS] "489472"
    n= 0 t: 35.107 sec
    [WS] "491520"
    n= 0 t: 35.109 sec
    n= 3 t: 35.182 sec
    [WS] "493568"
    n= 2 t: 35.251 sec
    [WS] "495616"
    n= 1 t: 35.318 sec
    [WS] "497664"
    n= 0 t: 35.394 sec
    [WS] "499712"
    n= 0 t: 35.397 sec
    n= 3 t: 35.478 sec
    [WS] "501760"
    n= 2 t: 35.545 sec
    [WS] "503808"
    n= 1 t: 35.618 sec
    [WS] "505856"
    n= 0 t: 35.689 sec
    [WS] "507904"
    n= 0 t: 35.691 sec
    n= 3 t: 36.604 sec
    [WS] "509952"
    n= 2 t: 36.672 sec
    [WS] "512000"
    n= 1 t: 36.738 sec
    [WS] "514048"
    n= 0 t: 36.814 sec
    [WS] "516096"
    n= 0 t: 36.816 sec
    n= 3 t: 36.886 sec
    [WS] "518144"
    n= 2 t: 36.951 sec
    [WS] "520192"
    n= 1 t: 37.026 sec
    [WS] "522240"
    n= 0 t: 37.095 sec
    [WS] "524288"
    n= 0 t: 37.097 sec
    n= 3 t: 37.168 sec
    [WS] "526336"
    n= 2 t: 37.240 sec
    [WS] "528384"
    n= 1 t: 37.309 sec
    [WS] "530432"
    n= 0 t: 37.377 sec
    [WS] "532480"
    n= 0 t: 37.379 sec
    n= 3 t: 37.445 sec
    [WS] "534528"
    n= 2 t: 37.518 sec
    [WS] "536576"
    n= 1 t: 37.589 sec
    [WS] "538624"
    n= 0 t: 37.656 sec
    [WS] "540672"
    n= 0 t: 37.658 sec
    n= 3 t: 38.473 sec
    [WS] "542720"
    n= 2 t: 38.547 sec
    [WS] "544768"
    n= 1 t: 38.622 sec
    [WS] "546816"
    n= 0 t: 38.689 sec
    [WS] "548864"
    n= 0 t: 38.691 sec
    n= 3 t: 38.767 sec
    [WS] "550912"
    n= 2 t: 38.835 sec
    [WS] "552960"
    n= 1 t: 38.900 sec
    [WS] "555008"
    n= 0 t: 38.974 sec
    [WS] "557056"
    n= 0 t: 38.977 sec
    n= 3 t: 40.535 sec
    [WS] "559104"
    n= 2 t: 40.609 sec
    [WS] "561152"
    n= 1 t: 40.682 sec
    [WS] "563200"
    n= 0 t: 40.747 sec
    [WS] "565248"
    n= 0 t: 40.749 sec
    n= 3 t: 40.825 sec
    [WS] "567296"
    n= 2 t: 40.905 sec
    [WS] "569344"
    n= 1 t: 40.969 sec
    [WS] "571392"
    n= 0 t: 41.039 sec
    [WS] "573440"
    n= 0 t: 41.041 sec
    n= 3 t: 41.117 sec
    [WS] "575488"
    n= 2 t: 41.185 sec
    [WS] "577536"
    n= 1 t: 41.253 sec
    [WS] "579584"
    n= 0 t: 41.331 sec
    [WS] "581632"
    n= 0 t: 41.333 sec
    n= 3 t: 41.457 sec
    [WS] "583680"
    n= 2 t: 41.524 sec
    [WS] "585728"
    n= 1 t: 41.592 sec
    [WS] "587776"
    n= 0 t: 43.310 sec
    [WS] "589824"
    n= 0 t: 43.312 sec
    n= 3 t: 43.384 sec
    [WS] "591872"
    n= 2 t: 43.464 sec
    [WS] "593920"
    n= 1 t: 43.535 sec
    [WS] "595968"
    n= 0 t: 43.604 sec
    [WS] "598016"
    n= 0 t: 43.607 sec
    n= 3 t: 43.685 sec
    [WS] "600064"
    n= 2 t: 43.749 sec
    [WS] "602112"
    n= 1 t: 43.818 sec
    [WS] "604160"
    n= 0 t: 43.889 sec
    [WS] "606208"
    n= 0 t: 43.892 sec
    n= 3 t: 43.971 sec
    [WS] "608256"
    n= 2 t: 44.038 sec
    [WS] "610304"
    n= 1 t: 44.104 sec
    [WS] "612352"
    n= 0 t: 44.194 sec
    [WS] "614400"
    n= 0 t: 44.196 sec
    n= 3 t: 45.118 sec
    [WS] "616448"
    n= 2 t: 45.184 sec
    [WS] "618496"
    n= 1 t: 45.252 sec
    [WS] "620544"
    n= 0 t: 45.324 sec
    [WS] "622592"
    n= 0 t: 45.326 sec
    n= 3 t: 45.396 sec
    [WS] "624640"
    n= 2 t: 45.471 sec
    [WS] "626688"
    n= 1 t: 45.538 sec
    [WS] "628736"
    n= 0 t: 46.349 sec
    [WS] "630784"
    n= 0 t: 46.352 sec
    n= 3 t: 46.471 sec
    [WS] "632832"
    n= 2 t: 46.549 sec
    [WS] "634880"
    n= 1 t: 46.613 sec
    [WS] "636928"
    n= 0 t: 46.679 sec
    [WS] "638976"
    n= 0 t: 46.681 sec
    n= 3 t: 46.754 sec
    [WS] "641024"
    n= 2 t: 46.821 sec
    [WS] "643072"
    n= 1 t: 47.575 sec
    [WS] "645120"
    n= 0 t: 47.641 sec
    [WS] "647168"
    n= 0 t: 47.643 sec
    n= 3 t: 47.714 sec
    [WS] "649216"
    n= 2 t: 47.787 sec
    [WS] "651264"
    n= 1 t: 47.862 sec
    [WS] "653312"
    n= 0 t: 47.926 sec
    [WS] "655360"
    n= 0 t: 47.928 sec
    n= 3 t: 48.006 sec
    [WS] "657408"
    n= 2 t: 48.079 sec
    [WS] "659456"
    n= 1 t: 48.145 sec
    [WS] "661504"
    >reset();
    =undefined
    

    661,504 * 8 / 48.125 = 109,964 Bits per second


    5 Attachments

  • Thanks, very handy the .bat files. I followed the procedure with no change in speed. I placed the files in the "espruino_1v95_esp8266" directory. I ran info, erase and flash batch files.

    C:\Users\Pok\myfolder\esp\tools\espruino­_1v95_esp8266>esptool.py --port COM20 --
    baud 115200 --no-stub chip_id
    esptool.py v2.0.1
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266
    Enabling default SPI flash mode...
    Chip ID: 0x000e9f1c
    Hard resetting...
    
    C:\Users\Pok\myfolder\esp\tools\espruino­_1v95_esp8266>esptool.py --port COM20 --
    baud 115200 --no-stub read_mac
    esptool.py v2.0.1
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266
    Enabling default SPI flash mode...
    MAC: 2c:3a:e8:0e:9f:1c
    Hard resetting...
    
    C:\Users\Pok\myfolder\esp\tools\espruino­_1v95_esp8266>esptool.py --port COM20 --
    baud 115200 --no-stub flash_id
    esptool.py v2.0.1
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266
    Enabling default SPI flash mode...
    Manufacturer: ef
    Device: 4016
    Detected flash size: 4MB
    Hard resetting...
    
    C:\Users\Pok\myfolder\esp\tools\espruino­_1v95_esp8266>esptool.py --port COM20 er
    ase_flash
    esptool.py v2.0.1
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266
    Uploading stub...
    Running stub...
    Stub running...
    Erasing flash (this may take a while)...
    Chip erase completed successfully in 7.4s
    Hard resetting...
    
    C:\Users\Pok\myfolder\esp\tools\espruino­_1v95_esp8266>esptool.py --port COM20 --
    baud 115200 write_flash --flash_freq 40m --flash_mode qio --flash_size 4MB 0x000
    0 "boot_v1.6.bin" 0x1000 espruino_esp8266_user1.bin 0x3FC000 esp_init_data_defau
    lt.bin 0x3FE000 blank.bin
    esptool.py v2.0.1
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266
    Uploading stub...
    Running stub...
    Stub running...
    Configuring flash size...
    Flash params set to 0x0040
    Compressed 3856 bytes to 2763...
    Wrote 3856 bytes (2763 compressed) at 0x00000000 in 0.2 seconds (effective 124.4
     kbit/s)...
    Hash of data verified.
    Compressed 456756 bytes to 320993...
    Wrote 456756 bytes (320993 compressed) at 0x00001000 in 28.3 seconds (effective
    129.1 kbit/s)...
    Hash of data verified.
    Compressed 128 bytes to 75...
    Wrote 128 bytes (75 compressed) at 0x003fc000 in 0.0 seconds (effective 78.8 kbi
    t/s)...
    Hash of data verified.
    Compressed 4096 bytes to 26...
    Wrote 4096 bytes (26 compressed) at 0x003fe000 in 0.0 seconds (effective 4095.8
    kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting...
    

    I replugged and reflashed the WSdesp8266C. It does not go faster than before.

     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v95 Copyright 2017 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    Flash map 4MB:512/512, manuf 0xef chip 0x4016
    >Start connection process
    Try Connecting to WiFi  Gardening, cheaper than therapy
    =undefined
    Test for error
    Test for error
    Test for error
    null
    connected? err= null info= {
      "ip": "192.168.2.5",
      "netmask": "255.255.255.0",
      "gw": "192.168.2.1",
      "mac": "2c:3a:e8:0e:9f:1c"
     }
    Wi-Fi Connected
    >
    =undefined
    n= 4 t: 0.018 sec
    n= 3 t: 1.688 sec
    [WS] "2048"
    n= 2 t: 3.165 sec
    [WS] "4096"
    n= 1 t: 4.655 sec
    [WS] "6144"
    n= 0 t: 6.156 sec
    [WS] "8192"
    n= 0 t: 6.159 sec
    n= 3 t: 7.659 sec
    [WS] "10240"
    n= 2 t: 9.126 sec
    [WS] "12288"
    n= 1 t: 10.600 sec
    [WS] "14336"
    n= 0 t: 12.089 sec
    [WS] "16384"
    n= 0 t: 12.091 sec
    n= 3 t: 13.568 sec
    [WS] "18432"
    n= 2 t: 15.080 sec
    [WS] "20480"
    n= 1 t: 16.564 sec
    

    1 Attachment

    • photo (3).JPG
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

How to send a large amount of data faster ?

Posted by Avatar for Polypod @Polypod

Actions