Error while loading code ESP32

Posted on
  • Good day! The problem is this, when I begin to ship in esp32 code starts to take off error the port. If loading and not hung or not started endless reboot, give the command save(). The module then runs erratically or not work at all. What could be wrong?
    I connected SIM800l on usart2.

    
    What does it all mean?
     _____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| http://espruino.com
     1v94 Copyright 2016 G.Williams
    Espruino is Open Source. Our work is supported
    only by sales of official boards and donations:
    http://espruino.com/Donate
    >E (143702) uart: uart_read_bytes(857): uart driver error
    E (144755) uart: uart_read_bytes(857): uart driver error
    E (145676) uart: uart_read_bytes(857): uart driver error
    E (146572) uart: uart_read_bytes(857): uart driver error
    E (147501) uart: uart_read_bytes(857): uart driver error
    E (148399) uart: uart_read_bytes(857): uart driver error
    E (149339) uart: uart_read_bytes(857): uart driver error
    E (150298) uart: uart_read_bytes(857): uart driver error
    E (151186) uart: uart_read_bytes(857): uart driver error
    E (152153) uart: uart_read_bytes(857): uart driver error
    E (153113) uart: uart_read_bytes(857): uart driver error
    E (154031) uart: uart_read_bytes(857): uart driver error
    E (154953) uart: uart_read_bytes(857): uart driver error
    E (155851) uart: uart_read_bytes(857): uart driver error
    E (156752) uart: uart_read_bytes(857): uart driver error
    E (157726) uart: uart_read_bytes(857): uart driver error
    E (158715) uart: uart_read_bytes(857): uart driver error
    E (159663) uart: uart_read_bytes(857): uart driver error
    E (160610) uart: uart_read_bytes(857): uart driver error
    E (161517) uart: uart_read_bytes(857): uart driver error
    E (162416) uart: uart_read_bytes(857): uart driver error
    E (163313) uart: uart_read_bytes(857): uart driver error
    E (164250) uart: uart_read_bytes(857): uart driver error
    E (165169) uart: uart_read_bytes(857): uart driver error
    E (166059) uart: uart_read_bytes(857): uart driver error
    E (166962) uart: uart_read_bytes(857): uart driver error
    E (167873) uart: uart_read_bytes(857): uart driver error
    E (168808) uart: uart_read_bytes(857): uart driver error
    E (169747) uart: uart_read_bytes(857): uart driver error
    E (170654) uart: uart_read_bytes(857): uart driver error
    E (171576) uart: uart_read_bytes(857): uart driver error
    E (172596) uart: uart_read_bytes(857): uart driver error
    E (173577) uart: uart_read_bytes(857): uart driver error
    E (174530) uart: uart_read_bytes(857): uart driver error
    E (175461) uart: uart_read_bytes(857): uart driver error
    E (175878) uart: uart_read_bytes(857): uart driver error
    E (176863) uart: uart_read_bytes(857): uart driver error
    E (177771) uart: uart_read_bytes(857): uart driver error
    E (178677) uart: uart_read_bytes(857): uart driver error
    E (179636) uart: uart_read_bytes(857): uart driver error
    E (180594) uart: uart_read_bytes(857): uart driver error
    E (181495) uart: uart_read_bytes(857): uart driver error
    E (182449) uart: uart_read_bytes(857): uart driver error
    E (183385) uart: uart_read_bytes(857): uart driver error
    E (184302) uart: uart_read_bytes(857): uart driver error
    E (185223) uart: uart_read_bytes(857): uart driver error
    E (186129) uart: uart_read_bytes(857): uart driver error
    E (187039) uart: uart_read_bytes(857): uart driver error
    E (188013) uart: uart_read_bytes(857): uart driver error
    E (188986) uart: uart_read_bytes(857): uart driver error
    E (189928) uart: uart_read_bytes(857): uart driver error
    E (190994) uart: uart_read_bytes(857): uart driver error
    =undefined
    >save()
    =undefined
    Erasing Flash..................
    Writing.................................­................
    Compressed 80000 bytes to 47658
    Checking...
    Done!
    E (212612) uart: uart_read_bytes(857): uart driver error
    Running onInit()...
    >
    OK
    

    CODE:

    var server = "m14.cloudmqtt.com";
     var options = {
        client_id : "random",
        keep_alive: 60,
        clean_session: true,
        port: 15577,
        username: "ciugiy**",
        password: "eYV1ivUWk***",
        protocol_name: "MQTT",
        protocol_level: 4,
      };
    var mqtt = require("MQTT").create(server, options);
    Serial2.setup(115200, { tx: D4, rx: D15 });
    var ATSMS;
    var sms;
    function sms_send_data(text){
     var i=0;
      var number =['+79216444***'];
      var interval_init = setInterval(function(){
            if(i<number.length){
              sms.send(number[i],text);
              print("send number : "+number[i]);
              i++;
            }
        if(i == number.length){
          clearInterval(interval_init);
        }
      }, 5000);
    }
    function Start_MQTT(){
      console.log("Connecting to SIM900 module and MQTT");
      var i = 20;
      var reboot_i = setInterval(function () {
       i--;
       console.log("Reboot time: "+i);
        if(i<0){
        clearInterval(reboot_i);
        console.log("Reboot ESP32!>>>");
        ESP32.reboot();
      }
       }, 2000);
    var gprs = require('SIM900').connect(Serial2, D22, function(err) {
      if (err) throw err;
      gprs.connect('internet', ' ', ' ', function(err) {
        if (err) throw err;
        gprs.getIP(function(err, ip) {
          if (err) throw err;
          console.log('IP:' + ip);
          mqtt.on('connected', function() {
          print("connect!!!");
          clearInterval(reboot_i);
          mqtt.subscribe("door");
          mqtt.publish("IP", ip);
          setTimeout(function() {
          print("mqtt connect");
          sms_init();
          }, 5000);
          });
          // mqtt.on('publish',mqttMessage);
            mqtt.on('publish', function (pub) {
             console.log("topic: "+pub.topic);
             console.log("message: "+pub.message);
            });
            mqtt.on('disconnected', function() {
             console.log("MQTT disconnected... reconnecting.");
             setTimeout(function() {
             print("mqtt reconnect");
             mqtt.connect();
             }, 3000);
            });
             if(ip>0){
               setTimeout(function() {
               print("mqtt connect");
               mqtt.connect();
               }, 4000);
             }
          });
        });
      });
    }
    function Start_modem(){
     Serial2.println("AT+CFUN=1,1");
     Serial2.println("AT+CLIP=1");
     var connection = setInterval(function(){ Serial2.println("AT+COPS?");},2000);
     Serial2.on('data', function (data) {
        print(data);
        if(data.indexOf("+COPS: 0,0,")>-1){
           clearInterval(connection);
           print("modem start");
           Serial2.println("AT+CSQ");
           Serial2.println("AT+CBC");
           Start_MQTT();
         }
         if(data.indexOf("+CSQ: ")>-1){
           var d = data.substr(data.indexOf("+")+1,40);
           var GSM_signal = d.substring(d.indexOf(" ")+1,d.indexOf(","));
           print("GSM_signal : "+ GSM_signal);
         }
      });
    }
    function sms_init(){
    ATSMS = require("ATSMS");
    sms = new ATSMS(Serial2);
    sms.init(function(err) {
           if (err) throw err;
           console.log("Initialised!");
             sms.list("ALL", function(err,list) {
              if (err) throw err;
              if (list.length)
              console.log(list);
              else
              console.log("No Messages");
            });
              sms.on('message', function(msg) {
              console.log("Got message #",msg);
              sms.get(msg, function(err, msg) {
             // if (err) throw err;
              print("Read message", msg);
              var txt = msg.text.toLowerCase();
              print("txt : "+txt);
              if (txt==="on") print("LED1.set()");
              if (txt==="off") print("LED1.reset()");
              // delete all messages to stop us overflowing
              sms.delete("ALL");
              });
              });
             sms_send_data('System reboot and start!');
           });
    }
    function onInit() {
    Start_modem();
    }
    

    And take off that scary things

    ____                 _
    |   __|___ ___ ___ _ _|_|___ ___
    |   __|_ -| . |  _| | | |   | . |
    |_____|___|  _|_| |___|_|_|_|___|
              |_| 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
    E (182428) uart: uart_read_bytes(857): uart driver error
    E (183528) uart: uart_read_bytes(857): uart driver error
    E (184428) uart: uart_read_bytes(857): uart driver error
    E (185428) uart: uart_read_bytes(857): uart driver error
    E (186328) uart: uart_read_bytes(857): uart driver error
    E (187328) uart: uart_read_bytes(857): uart driver error
    E (188228) uart: uart_read_bytes(857): uart driver error
    E (189228) uart: uart_read_bytes(857): uart driver error
    E (190128) uart: uart_read_bytes(857): uart driver error
    E (191028) uart: uart_read_bytes(857): uart driver error
    E (191928) uart: uart_read_bytes(857): uart driver error
    E (192928) uart: uart_read_bytes(857): uart driver error
    E (193828) uart: uart_read_bytes(857): uart driver error
    E (194728) uart: uart_read_bytes(857): uart driver error
    E (195629) uart: uart_read_bytes(857): uart driver error
    E (196629) uart: uart_read_bytes(857): uart driver error
    E (197629) uart: uart_read_bytes(857): uart driver error
    E (198629) uart: uart_read_bytes(857): uart driver error
    E (199529) uart: uart_read_bytes(857): uart driver error
    E (200529) uart: uart_read_bytes(857): uart driver error
    E (200729) uart: uart_read_bytes(857): uart driver error
    E (201729) uart: uart_read_bytes(857): uart driver error
    E (202629) uart: uart_read_bytes(857): uart driver error
    E (203529) uart: uart_read_bytes(857): uart driver error
    E (204429) uart: uart_read_bytes(857): uart driver error
    E (205429) uart: uart_read_bytes(857): uart driver error
    E (206329) uart: uart_read_bytes(857): uart driver error
    E (207329) uart: uart_read_bytes(857): uart driver error
    E (208229) uart: uart_read_bytes(857): uart driver error
    E (209129) uart: uart_read_bytes(857): uart driver error
    E (210129) uart: uart_read_bytes(857): uart driver error
    E (211029) uart: uart_read_bytes(857): uart driver error
    E (212029) uart: uart_read_bytes(857): uart driver error
    E (212929) uart: uart_read_bytes(857): uart driver error
    E (213929) uart: uart_read_bytes(857): uart driver error
    E (214829) uart: uart_read_bytes(857): uart driver error
    E (215829) uart: uart_read_bytes(857): uart driver error
    E (216729) uart: uart_read_bytes(857): uart driver error
    E (217729) uart: uart_read_bytes(857): uart driver error
    E (218629) uart: uart_read_bytes(857): uart driver error
    E (219529) uart: uart_read_bytes(857): uart driver error
    Guru Meditation Error of type LoadProhibited occurred on core  0. Exception was unhandled.
    Register dump:
    PC      : 0x40087593  PS      : 0x00060033  A0      : 0x8008622e  A1      : 0x3ffb0540
    A2      : 0x0000001d  A3      : 0x00060023  A4      : 0x800859fc  A5      : 0x3ffdf080
    A6      : 0x00000003  A7      : 0x00060a23  A8      : 0x00000002  A9      : 0x3ffb2980
    A10     : 0x3ffb0b0c  A11     : 0x00000001  A12     : 0x00000001  A13     : 0x00000001
    A14     : 0x3ffb2980  A15     : 0x3ffdf664  SAR     : 0x00000018  EXCCAUSE: 0x0000001c
    EXCVADDR: 0x0000002d  LBEG    : 0x4000c349  LEND    : 0x4000c36b  LCOUNT  : 0xffffffff
    Backtrace: 0x40087593:0x3ffb0540 0x4008622b:0x3ffb0560 0x400850b1:0x3ffb0580 0x40087355:0x3ffb05a0 0x401248eb:0x3ffb05c0 0x40081715:0x3ffb0600
    ================= CORE DUMP START =================
    9BsAAAkAAAB0AQAA
    rFD9P/BO/T+gUP0/
    8E79P0BQ/T+8AQAA+Cf7P/gn+z+sUP0/8Cf7PxQA­AAD0QCqhIKfLQqxQ/T8AAAAA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A7xEIgEDp+j+85fo/AAAAAATm­+j8AAAAAAQAAAAAAAAAQUgiA
    IOn6P9wA8D8BAAAAgCn7P2A7/j8MC/s/AgAAAAAA­AAClpaWlpaWlpQAAAAAAAAAA
    AAAAANUWCEBgO/4/AGoIQAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAgOn6PwAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAKDp+j8AAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAB6DgiAEDz+Pwwn+z+c+/o/
    AAAAAAAAAACs6fo/AAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA­AAAAAAAAAAAAAAAAAAAAAAAA
    AAAAAAAAAAAAAAAA
    ================= CORE DUMP END =================
    E (47003) esp_core_dump: Skipped 1 tasks with bad TCB!
    E (47047) esp_core_dump: Crashed task has been skipped!
    Rebooting...
    ets Jun  8 2016 00:22:57
    rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0x00
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_d­rv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:2
    load:0x3fff0008,len:8
    load:0x3fff0010,len:1932
    ho 0 tail 12 room 4
    load:0x40078000,len:10012
    load:0x40080000,len:252
    entry 0x40080034
    Loading 24142 bytes from flash...
    Running onInit()...
    >—½µ;
    Uncaught SyntaxError: Got -= expected EOF
     at line 1 col 1
    -=default false;
    OK
    OK
    =undefined
    >save()
    =undefined
    Erasing Flash..................
    Writing..............................
    Compressed 80000 bytes to 27869
    Checking...
    Done!
    Running onInit()...
    ATE0
    

    What does it all mean?

  • Maybe you need to do your Serial2.setup() inside the onInit() function?

    The reset() function seems to not fully initialize the ESP32. But if you use ESP32.reboot() it seems to be very clean, just like a hardware poweron.

    If I do just
    reset(true);
    Serial3.setup(115200);
    save();
    ESP32.reboot();
    THEN try to use Serial3, it isn't really setup. But if I do:

    reset(true);
    function onInit() {Serial3.setup(115200);}
    save();
    ESP32.reboot();

    Then I can use Serial3, as in Serial3.write('foo!\r\n');

    BUT
    reset(); or reset(true); end up with those same
    E (13760) uart: uart_read_bytes(906): uart driver error
    messages in all cases. reset() on ESP32 isn't reliable, it seems.
    ESP32.reboot(); is reliable.

    SO:
    #1) Put your Serial2.setup() inside onInit()
    #2) Avoid reset() on ESP32 unless you want to do reset(true) to clear out the saved program.

    -Dave

  • Ok the root of the problem with the

    E (203529) uart: uart_read_bytes(857): uart driver error
    

    messages is in targets/esp32/jshardwareUart.c line 38 or so in function UartReset()
    if(serial2_initialized) uart_driver_delete(uart_Serial2);
    if(serial3_initialized) uart_driver_delete(uart_Serial3);
    These should set the corresponding flag serialX_initialized to false but they don't.
    if(serial2_initialized) {uart_driver_delete(uart_Serial2);serial­2_initialized=false;}
    if(serial3_initialized) {uart_driver_delete(uart_Serial3);serial­3_initialized=false;}

    Then reset(); ought to work fine without causing the spewing...

  • After you enable ESP32 connect via WIFI, reset() works without error. If you want to work via serial, you need to first make a hard reset and then connect through port, then there are no errors. Fun feature, we spent 2 days :)

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

Error while loading code ESP32

Posted by Avatar for Alexander @Alexander

Actions