These are chat archives for esp8266/Arduino

1st
Jul 2015
Michael Miller
@Makuna
Jul 01 2015 01:17
Adafruit mentioned the project and specifically "borrowed" my NeoPixelBus library (with changes of course). At least they mention in their library code where they got it.
Holger Lembke
@holgerlembke
Jul 01 2015 10:15
just to share embarrassing facts: esp8266 turns into a heating element when Vcc is connected to 5 V. The transformation is final.
tzapu
@tzapu
Jul 01 2015 11:16
hi guys, i seem to be having quite a lot of problems with nodemcu v1.0 (esp12e) on the latest staging release
but i ve seen igrr mention that s what he uses and works fine
are there some extra steps or something to make it work ok? it doesn t auto reset/enter programming mode/enter serial monitor mode
my nodemcu 0.9 boards were fine
everything worked perfectly...
Ivan Grokhotkov
@igrr
Jul 01 2015 11:23
i'm mostly using 0.9 here. 1.0 doesn't enter programming mode as well for me.
automatically, that is
tzapu
@tzapu
Jul 01 2015 11:23
aha, well, glad it s not just me then
doesn t seem to exit programming as well either
Ivan Grokhotkov
@igrr
Jul 01 2015 11:24
i used it in manual mode when i was working on the bootloader. the fact that it didn't auto reset was very handy...
but i haven't looked into that issue
perhaps they use different circuit for reset and mode selection?
tzapu
@tzapu
Jul 01 2015 11:24
well, makes more sense to get this one in a permanent location then and keep playing with 0.9 until this one s more stable as well
well, fi they do, they did not update this: https://github.com/nodemcu/nodemcu-devkit
manual mode seems ok though
Ivan Grokhotkov
@igrr
Jul 01 2015 11:26
k
:)
tzapu
@tzapu
Jul 01 2015 11:26
ah
Ivan Grokhotkov
@igrr
Jul 01 2015 11:27
circuit looks pretty much the same
perhaps there is some difference in behaviour of CP2102 vs CH340
tzapu
@tzapu
Jul 01 2015 11:28
possibly
looks like they needed to fix an upload bug on their flasher tool as well
nodemcu/nodemcu-flasher@3e25f54
Michael Miller
@Makuna
Jul 01 2015 13:43
Strange, it was working well with mine about a month ago before I fried mine. What has changed?
Since then I have been just using an USBBasp directly to a 12e and cycle the power when I program (haven't tried any of the OTA yet)
Me No Dev
@me-no-dev
Jul 01 2015 14:12
OTA is good :)
pushing straight from the IDE
need serial for first load though
tzapu
@tzapu
Jul 01 2015 14:39
so looking forward to OTA
will Serial still work somehow for OTA uploads? i assume not..
for OTA debug i mean
Me No Dev
@me-no-dev
Jul 01 2015 14:50
looking into it
i know it's easy if I edin the Arduino IDE code
but we are trying not to modify that as much as we can
tzapu
@tzapu
Jul 01 2015 15:02
maybe some replacement SerialOverTCP lib
Me No Dev
@me-no-dev
Jul 01 2015 15:03
on the ESP side is easy
already have such example
tzapu
@tzapu
Jul 01 2015 15:08
all way above my head... good luck :D
chad cormier roussel
@chadouming
Jul 01 2015 15:37
@holgerlembke noticed the same behaviour when i give my esp 30V because i turned the wrong knob on my power source
Holger Lembke
@holgerlembke
Jul 01 2015 17:17
@chadouming so embarrassing, isn't it? I shorted unregulated Vcc with 3.3 while checking for spikes.... took it as a sign to end the day.
chad cormier roussel
@chadouming
Jul 01 2015 18:26
it's getting really hot
chad cormier roussel
@chadouming
Jul 01 2015 20:49
@me-no-dev i'm trying your OTA update but I get bugged by the board password.
am I retard ? xD
Me No Dev
@me-no-dev
Jul 01 2015 21:03
no you are not
just enetor nothing
chad cormier roussel
@chadouming
Jul 01 2015 21:04
doesnt work
Me No Dev
@me-no-dev
Jul 01 2015 21:04
what are you ttrying to do?
chad cormier roussel
@chadouming
Jul 01 2015 21:04
also tried, ota OTA arduino "" 12345 1234
Me No Dev
@me-no-dev
Jul 01 2015 21:05
no no, i mean are you openong a console
or updatiung?
when is it asking for password?
it asked me only on monitor open
chad cormier roussel
@chadouming
Jul 01 2015 21:05
asked for both
Me No Dev
@me-no-dev
Jul 01 2015 21:06
pull what I just pushed and rebuild
using the IDE right?
#include <ESP8266WiFi.h>
#include <ESP8266mDNS.h>
#include <WiFiUDP.h>

const char* host = "esp8266-ota";
const char* ssid = "**********";
const char* password = "*********";
const uint16_t ota_port = 8266;

WiFiServer TelnetServer(ota_port);
WiFiClient Telnet;
WiFiUDP OTA;

void checkTelnet() {
  if (TelnetServer.hasClient()){
    if (!Telnet || !Telnet.connected()){
      if(Telnet) Telnet.stop();
      Telnet = TelnetServer.available();
    } else {
      WiFiClient toKill = TelnetServer.available();
      toKill.stop();
    }
  }
  if (Telnet && Telnet.connected() && Telnet.available()){
    while(Telnet.available())
      Serial.write(Telnet.read());
  }
  if(Serial.available()){
    size_t len = Serial.available();
    uint8_t * sbuf = (uint8_t *)malloc(len);
    Serial.readBytes(sbuf, len);
    if (Telnet && Telnet.connected()){
      Telnet.write((uint8_t *)sbuf, len);
      yield();
    }
    free(sbuf);
  }
}

void checkOTA(){
  if (OTA.parsePacket()) {
    IPAddress remote = OTA.remoteIP();
    int cmd  = OTA.parseInt();
    int port = OTA.parseInt();
    int size   = OTA.parseInt();

    WiFiClient::stopAll();
    WiFiUDP::stopAll();
    //os_printf("Update: cmd:%d, port:%d, len:%d\n", cmd, port, size);
    WiFiClient client;
    if (client.connect(remote, port)) {
      ESP.updateSketch(client, size, false);
    }
    ESP.restart();
  }
}

void setup() {
  Serial.begin(115200);
  Serial.println();
  //Serial.setDebugOutput(true);
  Serial.println("boot");
  WiFi.mode(WIFI_AP);
  WiFi.begin(ssid, password);
  if(WiFi.waitForConnectResult() == WL_CONNECTED){
    MDNS.begin(host);
    MDNS.addService("arduino", "tcp", ota_port);
    OTA.begin(ota_port);
    TelnetServer.begin();
    TelnetServer.setNoDelay(true);
    Serial.println("ready");
  }
}

void loop() {
  checkOTA();
  checkTelnet();
  delay(1);
}
chad cormier roussel
@chadouming
Jul 01 2015 21:07
i'll try that
also : <WiFiUDP.h> -> <WiFiUdp.h>
Me No Dev
@me-no-dev
Jul 01 2015 21:08
sure thing
with my latest changes no need to change upload mode whan switching from serial to network
it knows what to do
telnet for monitor runs on the advertised by mdns port and TCP
chad cormier roussel
@chadouming
Jul 01 2015 21:23
won't be long, i've had a few merging problem
chad cormier roussel
@chadouming
Jul 01 2015 22:00
[chadouming@lanboy ~]$ telnet 192.168.1.203 8266
Trying 192.168.1.203...
Connected to 192.168.1.203.
Escape character is '^]'.
Connection closed by foreign host.
i was able to connect to the monitor by wifi tho
also, i run into : http://pastebin.com/syLEdvhq when trying to update
Me No Dev
@me-no-dev
Jul 01 2015 22:09
interesting
if you are using my latest thing and build the ide there should not be any SSH mentioned
you go by socket and other things
seems like you are on stock IDE
chad cormier roussel
@chadouming
Jul 01 2015 22:10
building my ide, but merged your change
Me No Dev
@me-no-dev
Jul 01 2015 22:10
you are missing something
did you restart the IDE?
kinda had to, i rebuild the whole thing
Me No Dev
@me-no-dev
Jul 01 2015 22:13
yeah it's all there
what you advertise on?
Screen Shot 2015-07-02 at 1.15.03.png
chad cormier roussel
@chadouming
Jul 01 2015 22:21
Workspace 1_002.png
Me No Dev
@me-no-dev
Jul 01 2015 22:23
MDNS.addService("arduino", "tcp", ota_port);
ota_port must not be 22 or 80
chad cormier roussel
@chadouming
Jul 01 2015 22:23
8266
using your example you gave me earlier
Me No Dev
@me-no-dev
Jul 01 2015 22:24
ha
can you select the OTA uploader and see what will happen?
chad cormier roussel
@chadouming
Jul 01 2015 22:24
already using it
tried with serial
asked me for board password but still failed
Me No Dev
@me-no-dev
Jul 01 2015 22:25
interesting why that happens
Screen Shot 2015-07-02 at 1.25.52.png
no hickups no nothing on my side
same source
chad cormier roussel
@chadouming
Jul 01 2015 22:27
it complains about a npe in network monitor, i'll check the code later, maybe i have a merge error