• Hi Gordon,
    thank you for your reply. There is no serial connection possible anymore (Over Serial2 --> Serial2.setup(9600, { rx: A3, tx : A2 });). Any AT+* command could not be sent to the board since there seem to be no connection.
    I did not try to reflash the ESP8266 onboard module.(Is there a manual for that?)
    Is there any documentation of how to connect the flow control to the external WiFi module?

    The full code is as follows:

      Serial1.setup(115200, { rx: B7, tx : B6 });
      var esp8266 = require('ESP8266WiFi');
      
      console.log("Connecting to ESP8266");
      
      var wifi = esp8266.connect(Serial1, function() {
      console.log("Connecting to WiFi");
        wifi.reset(() => {
         /*Does not close all sockets, I assume --> CIPServer creation fails after some restarts of the Espruino*/
          console.log('Reset WiFi');
          console.log('Creating access point');
          wifi.createAP('BLA', '12345678', 1, 0, (err) => {
            if (err) {
              console.log('An error occured:');
              console.log(err);
              return;
            }
            
            console.log('Access Point created');
            
            require('http').createServer((req, res) => {
              req.on('end', function() {
                console.log('request stream end (http.incomingMessage stream)');
              });
              
              res.on('end', function() {
                console.log('response finish (http.serverResponse)');
              });
              
              req.on('close', function() {
                console.log('request close (http.incomingMessage)');
              });
    
              res.on('close', function() {
                console.log('response close (http.ServerResponse)');
              });
              
              console.log('Request Headers:');
              console.log(req.headers);
              console.log('Request Method:');
              console.log(req.method);
              
              var a = url.parse(req.url, true);
              res.writeHead(200, {'Content-Type': 'text/plain'});
              res.end(JSON.stringify(a));
            }).listen(80);
            
            console.log('Http server created');
          });
        });
      });
    
About

Avatar for llakie @llakie started