Giter Site home page Giter Site logo

Comments (6)

moof-moof avatar moof-moof commented on August 18, 2024 2

Hey-hey-hey! @jgphilpott
"S-U-C-C-E-S-S" -- That is how we spell success!
Thank you for your help.

from polyslice.

moof-moof avatar moof-moof commented on August 18, 2024 1

@jgphilpott
Okay, today I had the opportunity to spend some time fiddling with the different connection settings combinations, as you suggested.

I should perhaps mention that my 2D CNC machine is my own design, and that it is controled with a version of the GRBL firmware which is "officially" expected to use a serial speed of 9600. I have previously tested 115200 bauds from the command line, and even though it does seem to work well enough then, I suspect it isn't always as stable at that communication speed. The microcontroler is an Arduino Uno. Not that it should influence the performance of a web app, but my OS is Linux Ubuntu 20.04 with the Mate WM. Browser is Chrome version 124.0.6367.60 (64 bit).

Anyway, during the latest testing using two different Arduinos boards I firstly noticed that when setting very low baud rates, like 4800 and 2400, the output lines got even shorter than previously. On average about two characters as compared to four before.

On the other hand, going to the other "extreme" (baud rates of 115200) did lead to increased line lengths, with 230400 bauds perhaps being marginally better. However the output result was still far from the actual lengths, which contains up to 36 characters per line in my test example text. Increasing the baudrate even more had no additional (discernible) positive effect on the output, while evidently making the controler unresponsive to serial input instead.

I also varied the Data and Stop bit values (7-2 instead of 8-1), and even the flow control and parity settings. Surprisingly to me, this did not seem to influence the overall output for better or worse.

Concerning buffer size, I could not find anything correlated to hat variable either, I'm afraid.

I attach some more screenshots:
1) 115200baud 256buff
2) 115200baud 1024buff
3) 230400baud 1024buff
4) 230400baud 8192buff
5) Chrome console (230400baud 1024buff)

and more examples of expected output:
6) Arduino monitor baud range 4800--230400
7) VS Code tested baud range 9600--230400
1) 115200baud 256buff
2) 115200baud 1024buff
3) 230400baud 1024buff
4) 230400baud 8192buff
5) Chrome console 230400baud 1024buff
6) Arduino monitor baud range 4800--230400
7) VS Code tested baud range 9600--230400

from polyslice.

jgphilpott avatar jgphilpott commented on August 18, 2024 1

Hey @moof-moof I believe I have a solution that should work regardless of the connection settings. If you could checkout the bug/1/response-data-comes-in-small-chunks-making-it-hard-to-read branch and let me know if it is working for you that would be awesome! The branch also contains a few other small changes I made so if you want to see the fix for just this issue take a look at this commit. Once you can confirm it's working (or not) I will merge the changes into the main branch.

from polyslice.

jgphilpott avatar jgphilpott commented on August 18, 2024 1

@moof-moof that's fantastic, I have just merged the branch now, the changes should be live within a few minutes! I'm also working on the upload feature you requested and should have it done shortly.

from polyslice.

jgphilpott avatar jgphilpott commented on August 18, 2024

@moof-moof my best guess is that it has something to do with the connection settings, most likely the buffer size. The docs I linked to should provide more detail on each of the settings. You should be able to edit each of the settings using the inputs at the top of the page (see screenshot 1). Modifying any of the settings will automatically disconnect you from the machine so be sure to reconnect afterwards.

Perhaps try Googling the recommended connection settings for your machine? I've noticed that I occasionally get broken response data from my printer but not all the time and the messages are always longer than 4 characters (see screenshot 2). Without having access to your device it's a little hard to debug, how about you try fiddling with your connection settings and if it's still not working I will take a closer look over the weekend when I have more time.

If you want to see the raw response data in the console try adding console.log(decoder.decode(value)) to line 147 of serial/browser/sender.js.

Screenshot 1

Screenshot 2024-04-24 at 3 08 07 PM

Screenshot 2

Screenshot 2024-04-24 at 3 16 31 PM

from polyslice.

jgphilpott avatar jgphilpott commented on August 18, 2024

FYI @moof-moof I think I've got a solution for this, I'm working on it and will update you shortly.

from polyslice.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.