-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev Branch Telnet, FTP Server Compatibility #3118
Comments
Sorry, I've just deleted my previous reply, as I misread the issue and responded incorrectly. My bad, I will look into this. But I am getting a bit tired from all of the hours that I am putting in at the mo. Maybe it's time to take a few days break and read a book or two. |
I have just built and downloaded an image including _init, ftp and telnet and after reflashing:
And the telnet session (note that the FTP server diagnostics are coming out on the stdout telnet session):
and lastly the FTP session:
I am not saying that your issue isn't valid, BTW, but just that I can't immediately reproduce it on my current woking dev version, so doing a quick fix isn't practical as I am in the middle of a work package and don't want to change out environments. |
It is my understanding that the team is attempting to PR the dev to master soon. As such, I would think that the team would want end users to be testing dev. Am I mistaken? If something is found, do you want end users to hold them and not share? Is opening an issue the right way to share? |
No, just explaining that I am human and make mistakes, but try to apologise when I do. There isn't some company funding a large dev team here; just one guy putting the hours in unpaid. |
@TerryE, I have continued from the work you did above. Much appreciated. I will post my follow on work next, but the problem must be intermittent based on unknown factors (e.g. firmware, LFS, Win7, putty, filezilla, command order). These are some of the hardest problems to isolate. Summary
Is taking a break the most helpful thing?
Honestly, how can I help you? Creating more tension is not going to move us forward faster. Can you think of one task that is on your plate, that you would like not to have to do that you can pass on (that will not make more work for you down the road)? Pass it along. I believe I can appreciate where you are at. At one point in my career, I inherited a pile of code written by a bunch of engineers (yea I was and am one of those too). Fortunately I had a boss who gave me the space to halt development for 3 months in order to rebuild the foundation. I would suspect you do not have that luxury, and that has to be super frustrating. For me, I am caught between a rock and a hard place. Not because of you, but just because things happen. I have been making various choices to push away or climb over those obstacles, one by one. As such our paths have crossed. I have not taken the time to set up my own local development environment so that I can both create firmware and LFS images all by myself. As such, I am dependent on 2 volunteers running those services. More on this at the end. 3 weeks ago I was in the middle of a big upgrade and the LFS firmware webservice no longer produced working images for Master. I assumed the webservice was not working for dev either, so I attempted to contribute by opening issues on odd stuff I had seen. That caused some tension. I recently found out through pure luck that, the LFS webservice did work for dev branch (but still not master). I am becoming more fearful that LFS webservice for master branch will never be fixed. This means that I need to port my existing applications over to the dev branch. This is the first ticket focused on that. Please continue to know that these are not complaints, just statements of what is. Time for my own development environment?As a result of the above beliefs, my interest in deploying the entire develpment environment is growing, not becasue I think it is best for the team, but because that appears the only way for me to move forward. I believe Nodemcu benefits by having a bridge from simple interactive Lua (think welcome.lua and blink_a_pin.lua) to the bigger useful apps. In my opinion, that bridge is those 2 webservices. So the question before me now is what development environment will it be: RPi or Windows 7 or Windows 10 and there seems no obvious choice to me. Win 7 is still my platform of choice. RPi would be pi zero w since I have 2 in stock that are not deployed. I have not stumbled into development environment documentation that was designed for dummies, so the helpfulness of the documentation may dictate my choice. As always, I will attempt to document the steps I take, both for my reproduceablity, but possibly for others. If you have a suggestion, throw it my way. Too Many Words
Not a quote from this thread, but when if it appears that another person in the discussion does not appear to understand what I am saying or I am puzzled by the reply, then the only way I know how to overcome that is to listen more deeply and, as needed, try again (or walk away). Hope this helps. |
@marcelstoer What method was used to elevate this to a bug? E.g. were the symptoms confirmed independently or did it just looked like it should be elevated. |
Steps Taken Based on work/testing by @TerryE above,
Wemos Iteration Summary
Command Syntaxnode.flashindex'_init'() Using
Zip Contains3 files |
@TerryE, your attempts to duplicate the panic are most appreciated even though you were unable to duplicate the issue. You then did additional testing and everything looked okay. Thank you for doing this. Next StepsShould I try a third device type (I have at least 3 different models reserved for development: 2x nodemcu v0.9, 4x wemos D1 mini, 4x bare esp-12F). I have posted all the nodemcu stuff **for perhaps others to review ** With help, I could possibly collect some debug info like you shared above if that would help. The problem is unlikely to go away by itself. OR just let this go for now? |
If you want to do your own builds rather than rely on cloudbuilder -- and this also means that you can luac.cross locally as well then you really need some form of Linux (compatible) environment. I did validate the luac.cross make for Cygwin and MinGW, but I am not sure if anyone has the main make working on these. With Windows 7, the easiest way is to use VirtualBox IMO, and there are a number of pre-built Ubuntu server images available such as Ubuntu18.04-3 from here. You may need to use a few apt installs, but you can then PuTTy onto the VM from the PC. You would also need to add Guest additions to the OS (see the instruction on the VBox site) so that you can connect to the ESP through a host USB. Allocating 1Gb RAM is easily enough for a server VM. Splitting the issues down is really useful. For example is telnet robust on its own? Ditto FTP, or is the combination needed? If you have specific documentation recommendation, then raise your proposal in general terms just to make sure that we generally agree, then draft specific rewording. If you doing this sort of contribution, I am happy to do some 1-1 chitchat. You will find my email addr in the commit logs; drop me an email. Also be aware from the initial work on the FTP server is that it is very much a subset implemention and it is sensitive to which FTP client you are using -- for example some open two FTP sessions. PS: I also have D1 minis as my target workhorse. I am fairly confident that this class of error is module variant independent so I would just stick with these. |
You could also use Marcel's Docker image. to create firmware images and LFS. If you only need luac.cross to build LFS images you can build a native windows version with VisualStudio. Just used it last week and it works. |
The issue for any Windows developer is the any of these paths is foreign and involves be learning curve. IMO VBox + prebuilt Ubuntu image is just as easy as docker, but each to his own. Ditto Cygwin and MinGW are far smaller installs than VS, but I haven't logged onto Windows in anger in over a decade - and this is from a guy who has been to MS @ Redmond three times because of all the MS dev work my teams used to do. 🤣 |
Before LFS, it was @marcelstoer 's awesome ESP8266 Cloud Builder Service all the way for me (a typical NodeMCU end-user). Without the Cloud Builder Service, I would found myself developing on the Arduino long ago. I migrated to the Win7/10-Docker-LFS-esptool-ESPlorer development path since the day LFS went live (thanks @TerryE - we are not worthy - lol). IMO, this is the path of least resistance for developers such as me that live mostly in the Windows universe. I find it only takes me about 2 minutes and 2 or 3 cmd lines each time I have a new I do have a workflow process cheat sheet of sorts in txt format I'd be willing to share if anyone is interested. I know this is not the proper forum for such things so PM me if interested. |
OT-on
Care to share it through a wiki page at https://github.com/nodemcu/nodemcu-firmware/wiki? I think any GH user can create new pages. OT-off |
@marcelstoer -- Windows Docker LFS esptool ESPlorer Workflow Cheat Sheet [edit:] Content reformat by TE, Page rename by MS |
Back to the original issue I can report that I also observed this issue.
NodeMCU 3.0.0.0 |
@HHHartmann Gregor, can you just confirm that you are using |
I am using The restart does not occur before PR #3075. |
@TerryE Just prepared an LFS with only telnet_pipe and ftpserver to outrule any interference from my usual startup script. node.flashindex('telnet_pipe')():open("wifi","xxxxx",23)
node.flashindex('ftpserver')().createServer("test","12345",true) Same results |
@TerryE just for your Information, you don't need telnet to reproduce. |
Yup, thanks. Input lines are expected to be CR terminated, so |
The fix to the telnet issue was a one liner in @marcelstoer, please note. Thanks |
Btw, I just noticed the file links in |
I can't remember what happened here and why
|
👍 SGTM, thanks Terry! |
@marcelstoer. let me do this, but I've got some other stuff to do this weekend so this might take a few days. Sorry. |
Unless you'd like to add changes to |
@marcelstoer, I suggested that we move |
That and the necessary renamings are done.
Bummer, will fix it right away.
Ok, I missed that. You can either add that fix to the branch I prepared or merge that one and commit it separately. |
Expected behavior
Dev branch to support Telnet, FTP and Web server enabled at the same time. Master branch does.
Actual behavior
Dev branch panics when FTP filelist requested while Telnet module is "open"
ftpserver.lua
obtained from herehttps://github.com/nodemcu/nodemcu-firmware/blob/dev/lua_modules/ftp/ftpserver.lua
telnet_pipe.lua
obtained from herehttps://github.com/nodemcu/nodemcu-firmware/tree/dev/lua_examples/telnet
Test code
web ide fails with lines referencing socket also (not included here)
Telnet can be run as local Lua code with the same effect
FTP is too big to run from local Lua code.
NodeMCU startup banner
Dev branch LFS from cross compiler web service
Hardware
Wemos D1 Mini (esp8266-12F)
Software (examples/modules)
Will not be line for line matches with dev branch sources, but are the same code
telnet_pipe.lua
ftpserver.lua
200519a.zip
The text was updated successfully, but these errors were encountered: