#### Description
New version does not open serial communication with Grbl, I think it has something in common with last changes in UART communication (without resetting the connection upon opening). When I initialize the connection with (for example) Picocom first then the new version of cncjs works as expected thus it provides me to the thinking of connection reset prior to use it properly.
How can i avoid this?
#### Versions
– CNCjs: 1.10.4
– Node.js: v18.19.0
– NPM: 9.2.0
#### How Do You Install CNCjs?
– [x] NPM
– [ ] Download the CNCjs Desktop Application
#### CNC Controller
– [x] Grbl-Mega
– [ ] Smoothieware
– [ ] TinyG/g2core
#### Hardware
– [x] Raspberry Pi
– [ ] Desktop or Laptop
– [ ] Mobile Device
#### Operating System
– [ ] Not Applicable
– [ ] Windows
– [ ] Mac
– [x] Linux
评论 (8)
#2 – lgojniczek 于 2024-10-28
Hi cheton,
I have tested it on just pure Grbl 1.1h on Arduino Uno and it works like a charm. So this must be something with grbl-Mega. Apparently I have noticed that if I choose Marlin in the Connection widget it’s all good and connection is established.
#3 – cheton 于 2024-10-30
I recalled an edge case, with certain Grbl builds, the Grbl controller will not respond if the sender continuous sends data (e.g., status query ?) before establishing a serial connection. To address this, a new option might be needed to maintain the original behavior by waiting to send status queries until after receiving the Grbl startup string.
#4 – cheton 于 2024-10-31
@lgojniczek Locate the line with queryActvity() in GrblController.js and remove it as shown below:
I tested this change earlier, and it should resolve the issue with grbl-Mega. Once you confirm it works, I will make a new change to address this regression issue.
#5 – cheton 于 2024-10-31
It will be fixed in PR #893. A waiting time of 1 second should be enough for grbl-Mega.
#6 – lgojniczek 于 2024-10-31
Great, thank you.
#7 – cheton 于 2024-10-31
@lgojniczek It’s fixed in CNCjs v1.10.5
#8 – lgojniczek 于 2024-10-31
Many thanks cheton, I really appreciate that.
I confirm it works.
#1 – cheton 于 2024-10-28
Hi @lgojniczek,
Could you try running
./bin/cncjs -vvvto collect the logs? Also, if possible, could you test with another Arduino board, like the Arduino Uno or Arduino Nano with Grbl? I’m curious if this issue is specific to grbl-Mega.