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

smoothie-discuss
gplus
(David Roncal) #1

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,

(Arthur Wolf) #2

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

(Triffid Hunter) #3

@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.

(David Roncal) #4

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

(Arthur Wolf) #5

Then I have no idea

(David Roncal) #6

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

(Wolfmanjm) #7

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