Skip to content
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

'Transfer aborted' message when trying to upload macro files to SD #433

Closed
axg20202 opened this issue Jan 7, 2025 · 18 comments
Closed

'Transfer aborted' message when trying to upload macro files to SD #433

axg20202 opened this issue Jan 7, 2025 · 18 comments

Comments

@axg20202
Copy link

axg20202 commented Jan 7, 2025

I'm running the latest build of grblhal (7 Jan), and current Iosender release. I can't seem to upload files to SD. Existing files are listed. 'Uploading' message is displayed for a few seconds, then 'Transfer aborted'. I have uploaded files to SD before, so not sure what the issue is here. Any ideas?

@terjeio
Copy link
Owner

terjeio commented Jan 7, 2025

Works for me: iMXRT1062 driver - both via YModem and FTP (FTP is used when enabled and connection is up).
Which driver/board?

@axg20202
Copy link
Author

axg20202 commented Jan 7, 2025

iMXRT1062 Teensy breakout board. I wonder if wiping the SD might help. FAT32 yes?

@terjeio
Copy link
Owner

terjeio commented Jan 7, 2025

Odd that it worked before - is the board networked and FTP enabled or are you uploading over USB?
My card is a cheap 2GB HC 10 marked of some asian brand - 888 or ggg?. FAT32 formatted.

@axg20202
Copy link
Author

axg20202 commented Jan 7, 2025

Just using usb. i can remove the sd and copy files to it. they show up in iosender. Its just transfers from the PC that no longer work.

@terjeio
Copy link
Owner

terjeio commented Jan 7, 2025

Anything changed in the setup? Different USB cable?
If you upload a larger file does it fail immediately or does the status line show any bytes beeing transferred before it fails?

image

@axg20202
Copy link
Author

axg20202 commented Jan 7, 2025

i just tried to upload a gcode file, same error. usb cable is the same.

@axg20202
Copy link
Author

axg20202 commented Jan 9, 2025

Any other ideas on this? Logan suggested there could be an SD setting relating to FTP vs USB uploading, but I can't locate such a setting.

@terjeio
Copy link
Owner

terjeio commented Jan 9, 2025

It is either CRC transmit errors or file create/write errors. The controller only NAKs on failure so impossible for the sender to know the reason. If the Transferred X of Y bytes... status message does appear, even briefly, the file was created successfully...
If you are compiling yourself adding a few debug messages could reveal what the issue is. If I direct you are you able to do that?

@terjeio
Copy link
Owner

terjeio commented Jan 9, 2025

could be an SD setting relating to FTP vs USB

Oops, this could be a clue. If you are running an older version of the controller firmware it may incorrectly report FTP as started even when not. The sender selects the protocol based on "FTP" beeing present in the NEWOPT line in the $I report or not:

image

@axg20202
Copy link
Author

axg20202 commented Jan 9, 2025

OK, thanks. I don't think that's the issue then.
[NEWOPT:ENUMS,RT+,HOME,ES,REBOOT,EXPR,ATC,SED,SD,YM]

I would certainly be willing to compile myself if that could help. Very much appreciate your help.

@phil-barrett
Copy link
Collaborator

phil-barrett commented Jan 9, 2025

In the builder, you need to add networking to get FTP. Does that mean that you can't use (er, upload to) SD without networking? I assume there is no FTP via USB path...

[EDIT] Strike that. Upload with YModem work fine via USB.

@terjeio
Copy link
Owner

terjeio commented Jan 9, 2025

Try this version, replaces ymodem.c in the sdcard folder.
I had to copy messages to a buffer and write that out on transfer ending since the comms channel is claimed by the ymoden protocol during transfer.

ymodem.zip

@axg20202
Copy link
Author

axg20202 commented Jan 9, 2025

Thanks. Before I try this, I made a few discoveries trying lots of different Web builder settings. The issue is with the current web builder. If I select any additional plugins (odomoter, lightburn etc) alone or in combination, SD card file transfer over USB fails. Works fine if none are selected. I usually select lightburn ppi, clusters, and odometer. The problem is there is still another issue with the current web builder that prevents proper rapidchange atc macro functions (I get a tool out of range error when trying to load a tool) so for now I'm stuck with a build from December that works apart from SD transfers.

@axg20202
Copy link
Author

axg20202 commented Jan 9, 2025

I think I will try a new manual compile and see if that resolves my issues. I've generally had good luck with the Web builder but have been having a few issues with it since the last few updates.

@terjeio
Copy link
Owner

terjeio commented Jan 9, 2025

The culprit is the Lightburn clusters plugin, it buffers input and modifies it before returning it for processing. The YModem plugin wants the raw input for itself so the Lightburn plugin cannot be in the loop messing with the data.
The solution to this is to let the YModem plugin take over the input stream at the raw interrupt level. I have it running now, and I guess I'll commit the change tomorrow. I'll leave the Web Builder issues till tomorrow as well.

@axg20202
Copy link
Author

axg20202 commented Jan 9, 2025

Thanks for working out the issue. However, I've discovered that the tool out of range error with the latest build still occurs after a manual compile. Must be unrelated to webbuilder. Would you prefer I open a new issue thread?

image

@terjeio
Copy link
Owner

terjeio commented Jan 10, 2025

Fix committed for grblHAL YModem issue.

Would you prefer I open a new issue thread?

Yes, since this is also a grblHAL issue.

@axg20202
Copy link
Author

Thanks for your help. I've posted the issue in the grblhal git.

@terjeio terjeio closed this as completed Jan 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants