You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • And these two as well, also blaming faulty supermini boards which I was using:

    Just tried a board @MaBe supplied with no USB on it, and it works great. You just need to stop the Ap first with stopAP:

    var wifi = require("Wifi");
    wifi.stopAP()
    
    WIFI_NAME="xx";
    WIFI_OPTIONS={password:"xxx"};
    
    function get(url) {
      var http = require("http");
      http.get(url, function(res) {
        res.on('data', function(data) {
          console.log(data);
        });
      });
    }
    
    wifi.connect(WIFI_NAME, WIFI_OPTIONS, function(err) {
      if (err) {
        console.log("Connection error: "+err);
        return;
      }
      console.log("Connected!");
      get("http://www.pur3.co.uk/hello.txt");
    });
    

    Or once you've done wifi.save() to save the wifi state, the automatic AP won't start.

    ... but I've now pushed a change which automatically stops the AP if connect is called (on C3) and vice versa, so normal code should work on the C3 now.

    assuming you don't have a broken ESP32C3 supermini board

About

Avatar for Gordon @Gordon started