-
-
Notifications
You must be signed in to change notification settings - Fork 476
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
Corrupted Serial upload to SD card #251
Comments
So it is Upload issue, not really printing issue When you changed to 2.0 did you used 2.0 Web UI or 1.0 ? FYI The comment removing is done by ESP3D to speed up serial transmission which is slow like hell The picture happened on 1.0 or 2.0 ? Which version of Marlin do you use ? What baud rate do you use between ESP3D and printerboard ? Is computer connected to your printer when you upload ? |
Yes, right now it is an uploading issue but the couple times I did get a print to start, it was very erratic and just grinded the filament at max speed until I shut it down. I am almost certain the gcode is good but we can cross that when we get there. I tried 1.0, 2.0, 2.1 and 2.0 with async & async UI without success. I believe the picture was on 1.0 but it's possible I'm wrong. Marlin version is 1.0.0 Baud rate I use is 250000 The only thing plugged into the printer is the SD card. |
For printing ESP3D has nothing to do with printing process - it just launchs SD print command to Marlin - print is 100% handled by Marlin if you says GCODE is correct on SD then it is not ESP3D issue - the Upload can be, but printing no, once print is launched it is out of ESP3D. You can verify that by manually copy GCODE file to SD and print from SD from printer then launch another print from ESP3D to compare. Can you give me the exact version of Marlin you use? I will try to see if there was some change since I tested and try again - Marlin code is always changing and I do not really always follow the changes in real time as I do not used Marlin Also what is the size of the file you upload ? |
This is the output of M115 I reformatted the SD card as FAT instead of FAT32 to see if that makes any difference. I'm currently doing a upload test with Simplify3D to make sure that works as expected. (It's so slowwww) If so, I'll plug in the ESP8266 and try it again. File size is 310KB |
This FW is pretty old I am surprised ESP3D can list files properly - I will do some tests on a system to check |
Yeah, but it is the latest official release. I might try to update this weekend and transfer over settings. I was able to successfully upload a g-code file with Simplify3D to the SD card but one interesting thing I noticed was that I had to manually send M29 to end the save. Otherwise, it started putting the temperature commands in the file. Not sure if ESP3D sends the M29 command to close the file but it was required in my test in Simpify3D. Also, the g-code is confirmed good, I did a dry run after uploading the file with Simplify3D and it was successfully printing. |
Yes ESP3D send M29 to close the upload process |
That bug you linked in the Marlin repo looks very similar to my problem but I am on a much older version and that is a problem with a recent commit. I dug into my Marlin firmware and found the only place that error is called is the get_command function in Marlin_main.cpp if you want to see the code that throws the error. The line that throws that error is |
Yes but at that time I had no info about your FW version. I was guessing with info I had |
Right. Is it possible to put the g-code in the SPIFFS filesystem and just stream the commands to the printer from the ESP8266? It would save a lot of time from not having to put the g-code on the printers SD card. |
Also, the problem picture I linked to in the original post happened again with a fresh install of 2.0. I started ESP3D, made sure the SD was clear, started the upload, it stayed at 100% for about a minute and a half (Way too short for the full upload), and then it started trying to erratically print automatically and the files box was filled with temperature data. What I think could be happening is ESP3D is prematurely ending the save stream but still sending the data, so the printer exits the save state and enters the running state, and it gets fed a bunch of g-code in the middle of the file super fast because the ESP thinks it is still saving to a file, not printing. |
Update: I upgraded to Marlin 1.1.9 and the problem is still there. Uploaded a file, progress bar started at 70%, progressed to 100% in a minute or so before starting printing automatically and erratically so it isn't unique to that firmware version. After stopping the print (Turning off the printer since aborting didn't work) I did M20 and there was still no file on the SD card. This is the new output of M115.
|
The print start automaticaly ? that is weird, it means the commands are not saved to SD but send to printer Can you share the file you said it is only 310KB |
Sure, it's attached. That's why I have the theory that ESP3D thinks it is still uploading but in reality, it has exited save mode for some reason and is in normal mode. |
thank you I have setup a system - just need to flash the Marlin FW on it - so I will have a look today |
Sounds good. I thought the firmware update would fix it but I guess not. (Also, the new auto bed leveling is so awesome, I'm glad I decided to upgrade Marlin. The 1.0.0 bed leveling didn't do much.) |
Can reproduce issue with ESPD2.0 :
so no line was accepted what ever I type I got same message:
need to check how to reset this - a part of restart printer board |
I have added time stamp for purge and sendLine2Serial and testing now - it is as slow as you I think as after 5 min I am still at 10% |
Yeah, 40 minutes later and it still shows uploading. I'll try disabling debug later today. |
So disabling debug seemed to fix the upload time problem and that file uploaded in about 5 minutes, same as you. Also, the diff on the uploaded file and original looked correct, just with all the comments removed so it looks like everything was written properly on first look. Still needed to init the SD card manually though. |
Yes LOG on SPIFFS is ok for small things - and more the log file is growing more the system is slowing down - got 4s per line sent just because of SPIFFS write in 1.82MB file - I think I will add a file spliter in future Happy it works for you |
Also, you might want to have the debug log exclude the wifi password in the initial setup. I edited it out while I was reviewing it but it should probably be done automatically. |
Hmmm no I do not log wifi password - only SSID
but I see in your log :
this is not done by me and I do not understand why you have this |
It was definitely in there. It was only on the first setup though when you set all your settings and pick a wifi network and enter your password. |
you mean doing 1st wizard ? |
Yes |
I see, this is when you update any EEPROM settings the function save data is generic it does not know it what it is |
back to M21 - your printer does have LCD ?
|
No, it doesn't |
Ok so the best is to put |
I have added the M21 in serial upload process - 3e38795 So I guess this issue can be closed now |
I got the same problem when I upgraded to Marlin 1.1.9. There is a bugfix open for this, MarlinFirmware/Marlin#11871. As I understand the issue is the new Marlin no longer taking straight text upload. It needs the line number and the checksum as described in the error in the latest Marlin. If I use Marlin 1.1.8, it works. To create one line "M106" of a gcode file, TEST.G, I will manually type "M28 TEST.G", "N0 M106*36"(not just "M106"), "M29" in ESP3D. It will save the file to the SD card. |
If you check the bugfix comments - I am in it 😉 |
Thank you! I will check out the 2.0. I want to create a button in WebUI to control a relay to turn on/off the printer. I have followed your instructions to setup the development environment, but so far I can't install gulp on my Windows 7 computer. What is the best environment to use? Mac, PC or Linux? |
I do it under windows and linux so I guess just stick to version I give OS is not important |
But why not use Macro feature for your Button ? |
I will love to use Macro, but not sure where to look for instructions. |
I am not good at docs Macro is just a link to a file with GCODE and [ESPXXX} commands |
I think ESP command will work. I will check it out tonight. Thank you for your help. |
I updated to 2.0 with 2.0 UI, but I can't see the Macro panel. How do I turn in on? |
Got it! Thank you! I will try to power on/off this weekend. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I've been trying to upload and print a gcode file in 8.3 format, but every time I upload a file, it never shows up in the files list. If I run a M20 command, sometimes it shows the file on the SD card but I'm unable to run it. If I try to run M23 it returns
Error:Line Number is not Last Line Number+1, Last Line: 0 Resend: 1
Other times I just get
upload failed
. Not sure if it is related but when I select a file to upload, the progress bar immediately skips to 100% and sticks there for a couple minutes while it attempts to upload I believe.I've tried both 2.0 dev and am currently on 1.0 with no success running on Marlin firmware.
Also, this happened one time. https://imgur.com/a/gJLRG7j
EDIT: G-code appeared corrupt because Marlin stripped the comments, changing the size and hash.
The text was updated successfully, but these errors were encountered: