- Tue Jan 17, 2017 4:58 pm
#61157
marcelstoer wrote:jorisjh wrote:Is ESPlorer autodetect broken?
It just doesn't know about Docker-built NodeMCU I guess. However, it'd be interesting to learn how/why that is different from "other" NodeMCU firmware (e.g. from the cloud builder).
The relevant code is around https://github.com/4refr0nt/ESPlorer/bl ... ava#L12659 (14k LOC spaghetti code monster).
I'm accepting PRs at https://github.com/marcelstoer/docker-nodemcu-build in case you figure it out
Thanks Marcel, I see you made the docker build, great work! I'm not so familiar with Docker, so I just stuck to the defaults, a little bit more experienced with Vagrant. Honestly I noticed the same behaviour with the cloud-builds, the docker build was an experiment to see if that would result in anything different, but no. So that's good news for you. Thanks for the link though, I looked through the java file, this seems to be the responsible function call:
Code: Select allpublic void CheckComm() {
if (!AutodetectFirmware.isSelected()) {
portJustOpen = false;
return;
}
portJustOpen = true;
TerminalAdd("\r\nCommunication with MCU..");
checker = new ActionListener() {
public void actionPerformed(ActionEvent evt) {
if (portJustOpen) {
btnSend(""); // only CR+LF
TerminalAdd(".");
if (Terminal.getCaretOffsetFromLineStart() >= 10) {
TerminalAdd("\r\n");
}
} else {
try {
openTimeout.stop();
} catch (Exception e) {
log(e.toString());
}
}
}
};
openTimeout = new Timer(3000, watchDog);
openTimeout.setRepeats(false);
openTimeout.setInitialDelay(3000);
openTimeout.start();
}
So whenever AutodetectFirmware.isSelected() is true, it sends a CR+LF and expects a whole lot of text Terminal.getCaretOffsetFromLineStart() >= 10
But that's not really the behaviour I'm seeing with a regular serial connection using screen, if you attach a session, it does nothing a CR+LF I think will return the interpreter >. Only on a reset or DTR-toggle will it produce a whole lot of text. Which, in the cloud-build it is way more compared to the docker-build, but that doesn't in this instance explain the behaviour anyway.
NodeMCU custom build by frightanic.com
branch: dev
commit: 46dc9eaeb361c9b329a02a767a72f73f2ff92025
SSL: false
modules: file,gpio,net,node,tmr,uart,wifi
build built on: 2017-01-12 16:16
powered by Lua 5.1.4 on SDK 2.0.0(656edbf)
I'm a bit new to the nodemcu, although I have solid experience dealing with embedded systems. I've seen this issue already in many forms on the forums, sometimes having to do with incorrect flashing (makes sense!) but sometimes not at all. It's a bit different compared to my usual dealings, since nodemcu documentation is seriously lacking, additionally ESPlorer is a tool that's independent, so incompatibilities might not get caught so quickly. Perhaps I should raise an issue with ESPlorer.