Hello, I am working with Smoothieware and I am developing a software to upload

Hello,

I am working with Smoothieware and I am developing a software to upload files to it through USB (not using the files explorer). I know I have to use M28 and the name, and finish with M29. When the file is small, it all works right, but if file is longer than 3KB, Smoothie crashes (serial port crashes too and it says on the error: “device reports readiness to read but returned no data”.
Any Idea about what is happening?
Thank you very much,

Are you waiting for smoothie to answer “ok” before sending a new line ?

@Arthur_Wolf
That shouldn’t be necessary, smoothie’s USB stack implements USB flow control, ie smoothie will tell the host to stop sending for a while when the buffer is full, and then tell the host it can send again when the buffer drains a bit.

If it is now necessary to wait for OK over USB, something has been broken since I wrote the USB stack.

@Arthur_Wolf
Yes, I am waiting to receive the ok from Smoothie…

Then I have no idea

Ok I found it. Just I streamed another data and it got confused. Sorry and thank you

@Triffid_Hunter You do however have to consume the returned Oks otherwise it will block.