Comments (6)
Hey-hey-hey! @jgphilpott
"S-U-C-C-E-S-S" -- That is how we spell success!
Thank you for your help.
from polyslice.
@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
from polyslice.
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.
@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.
@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](https://private-user-images.githubusercontent.com/4128208/325213266-201e7612-01a8-4afe-a929-c37d688dde9b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTY5MzMzNDksIm5iZiI6MTcxNjkzMzA0OSwicGF0aCI6Ii80MTI4MjA4LzMyNTIxMzI2Ni0yMDFlNzYxMi0wMWE4LTRhZmUtYTkyOS1jMzdkNjg4ZGRlOWIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDUyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA1MjhUMjE1MDQ5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YThjMzYzZGVlOTdkNDU4N2ZhNGNlMjU3ODVkZjY4Mzg5MTliMTVjMzMzZDE3ZWY2MTc3NzRkODYzYTdkMjQyNCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.UjMgGOhmlcYasogMuwVOBNSceefUMlwVMRDnyFXgBOA)
Screenshot 2
![Screenshot 2024-04-24 at 3 16 31 PM](https://private-user-images.githubusercontent.com/4128208/325214934-f036f3ad-2144-417c-b575-4da819c71d3d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTY5MzMzNDksIm5iZiI6MTcxNjkzMzA0OSwicGF0aCI6Ii80MTI4MjA4LzMyNTIxNDkzNC1mMDM2ZjNhZC0yMTQ0LTQxN2MtYjU3NS00ZGE4MTljNzFkM2QucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDUyOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA1MjhUMjE1MDQ5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9YmYxNDY1OTllNmZhODgwMzk3NjFlYjA5YzdlNmY1MzU3NGEwOTU0MGFkNzY5ZTA3MjNlZjM5MzMxMmZlMjhmZCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.fqE8GnONO1NKUTc_o_vvHescaFtCmnVYjXLwnhp1p5A)
from polyslice.
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from polyslice.