Current Lua downloadable firmware will be posted here

User avatar
By jorisjh
#61133 After flashing with these settings:

first an erase_flash then,
esptool.py --port /dev/cu.SLAB_USBtoUART w
rite_flash -fm dio -fs 32m -ff 40m 0x0 /esp/nodemcu-dev-7-modules-2017-01-12-16-18-04-integer.bin

I get this in ESPlorer:

PORT OPEN 115200

Communication with MCU..Got answer! Communication with MCU established.
AutoDetect firmware...

Can't autodetect firmware, because proper answer not received (may be unknown firmware).
Please, reset module or continue.
lnn��� bp�lrlrlp�n� � l b n�|�l�|�� b��nn�l��l`�nn l`nr���n r��`p�n� r����� b n�|�� �b��nn� l`�nnl�l`nr���n bl``�n ��b�nl� ��nn� �lp�n� r����� l�b n�| b��nn�l� l`�nn l`nr���n ��lr��n ��l����n��r��n|� l lll`��r�l�l��

NodeMCU 1.5.4.1 build unspecified powered by Lua 5.1.4 on SDK 1.5.4.1(39cb9a32)
lua: cannot open init.lua

Reasons the build is unspecified is because I did the Docker build myself with defaults. It seems to work fine except for the ESPlorer attempting to autodetect the firmware and failing to do so. Is ESPlorer autodetect broken?
User avatar
By marcelstoer
#61154
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 ;)
User avatar
By jorisjh
#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.
User avatar
By marcelstoer
#61169
jorisjh wrote:since nodemcu documentation is seriously lacking


Not to divert the discussion from the real issue but as https://nodemcu.readthedocs.io/ is primarily my brainchild (not all the content, though) I take offense at that. However, much more than that I'd be interested in finding out what you're missing?

jorisjh wrote:Perhaps I should raise an issue with ESPlorer.


It'd certainly be worth a try but seeing unresolved issues pile up over there I wouldn't have much hope getting it resolved any time soon.