Closed tuxcnc closed 2 years ago
cat test.nc >/dev/rfcomm0
violates the Grbl flow control protocol. You cannot send an arbitrary amount of data at full speed without waiting for "ok" acknowledgments.
Do not ask why $H in the program, because it can be useful and can work.
The fact that it "can work" in some situations does not necessarily mean that it works in all situations, nor does it mean that it is supported.
cat test.nc >/dev/rfcomm0
violates the Grbl flow control protocol. You cannot send an arbitrary amount of data at full speed without waiting for "ok" acknowledgments.
The program has 28 bytes length, and the size of the buffer is not a problem. The problem is how to finish some codes. On a machine without defined home switches, the program displays:
$H [MSG:ERR: No homing cycles defined] ok
And goes on. It only hangs on M30 and Sender is waiting forever at the end of the program, although the program is over ... Here you have the whole :
ok G90 [MSG:ERR: No homing cycles defined] ok $H [MSG:INFO: FluidNC v3.4.7] [MSG:INFO: Compiled with ESP32 SDK:v4.4.1-1-gb8050b365e] [MSG:INFO: Local filesystem type is SPIFFS] [MSG:INFO: Configuration file:config.yaml] [MSG:INFO: Machine CNC1310] [MSG:INFO: Board MKS-DLC32] [MSG:INFO: I2SO BCK:gpio.16 WS:gpio.17 DATA:gpio.21] [MSG:INFO: SPI SCK:gpio.14 MOSI:gpio.13 MISO:gpio.12] [MSG:INFO: SD Card cs_pin:gpio.15 detect:NO_PIN] [MSG:INFO: Stepping:I2S_static Pulse:4us Dsbl Delay:0us Dir Delay:1us Idle Delay:2ms] [MSG:INFO: Axis count 3] [MSG:INFO: Shared stepper disable I2SO.0] [MSG:INFO: Axis X (-1000.000,0.000)] [MSG:INFO: Motor0] [MSG:INFO: stepstick Step:I2SO.1 Dir:I2SO.2:low Disable:NO_PIN] [MSG:INFO: All Limit gpio.36:low] [MSG:INFO: Axis Y (-1000.000,0.000)] [MSG:INFO: Motor0] [MSG:INFO: stepstick Step:I2SO.5 Dir:I2SO.6 Disable:NO_PIN] [MSG:INFO: All Limit gpio.35:low] [MSG:INFO: Axis Z (-1000.000,0.000)] [MSG:INFO: Motor0] [MSG:INFO: stepstick Step:I2SO.3 Dir:I2SO.4:low Disable:NO_PIN] [MSG:INFO: All Limit gpio.34:low] [MSG:INFO: Kinematic system: Cartesian] [MSG:INFO: PWM Spindle Ena:gpio.27 Out:gpio.32 Dir:NO_PIN Freq:5000Hz Res:13bits] [MSG:INFO: Using spindle PWM] [MSG:INFO: Flood coolant gpio.5] [MSG:INFO: Mist coolant I2SO.7] [MSG:INFO: Probe Pin: gpio.22:low] [MSG:INFO: BT Started with FluidNC] ok $SS ok M3 ok G0X10 ok <Run|MPos:-9.998,0.000,0.000|FS:1320,0> <Run|MPos:-9.995,0.000,0.000|FS:1320,0> <Run|MPos:-9.993,0.000,0.000|FS:1320,0|WCO:-10.000,0.000,0.000> <Run|MPos:-9.988,0.000,0.000|FS:1320,0> <Run|MPos:-9.980,0.000,0.000|FS:1320,0> <Run|MPos:-9.975,0.000,0.000|FS:1320,0> <Run|MPos:-9.967,0.000,0.000|FS:1320,0> <Run|MPos:-9.945,0.000,0.000|FS:1320,0> <Run|MPos:-9.932,0.000,0.000|FS:1320,0|Ov:100,100,100|A:SM> <Run|MPos:-9.917,0.000,0.000|FS:1320,0> <Run|MPos:-9.910,0.000,0.000|FS:1320,0> <Run|MPos:-9.900,0.000,0.000|FS:1320,0|WCO:-10.000,0.000,0.000> <Run|MPos:-9.882,0.000,0.000|FS:1320,0> <Run|MPos:-9.608,0.000,0.000|FS:1500,0> G0X0 ok
Again : USB - works Bluetooth - not works
The uncontrolled streaming of data violates the protocol. Bluetooth and USB are different with regards to the hardware and software buffers.
We have higher priorities to work on than this unsupported issue. If you can find a case of a compliant sender having trouble we will give it a higher priority.
We addressed your other issue quite quickly.
The uncontrolled streaming of data violates the protocol.
What did you hitch on to this test from the Linux console? It was just a test to rule out the problem in Sender. I use bCNC and it's the same. In FluidNC in the Bluetooth protocol there is a bug. Again: The program works from the SD card. The program works via USB. The program does not work through Bluetooth, because in Bluetooth something is bad. Supported or unsupported - what does it matter? There is a Bluetooth error and should be fixed.
Is M0 code suported ?
Well, the program is :
M0 G0X10 G0X0 M2 M30
WORKS via USB NOT WORKS via Bluetooth. Via bluetooth it hangs after M0. (I used bCNC)
Now it is a problem and worth to fix it?
OK
Similar problem, in Fluidterm by Bluetooth I can't send file to SD card :
--- Fluidterm on /dev/rfcomm0 115200,8,N,1 --- --- Quit: Ctrl+] or Ctrl+Q | Upload: Ctrl+U | Reset: Ctrl+R --- ok path /opt/fluidnc-v3.4.7-posix/test.nc --- Sending file /opt/fluidnc-v3.4.7-posix/test.nc as /SD/test.nc --- [MSG:INFO: Reception failed or was canceled] error:160 send error: expected NAK, CRC, EOT or CAN; got b'o' send error: expected NAK, CRC, EOT or CAN; got b'k' send error: expected NAK, CRC, EOT or CAN; got b'\r' send error: expected NAK, CRC, EOT or CAN; got b'\n' send error: expected NAK, CRC, EOT or CAN; got b'o' send error: expected NAK, CRC, EOT or CAN; got b'k' XModem reception cancelled
Grbl 3.4 [FluidNC v3.4.7 (bt) '$' for help]
Grbl 3.4 [FluidNC v3.4.7 (bt) '$' for help] ok ok
Via USB no problem :
--- Fluidterm on /dev/ttyUSB0 115200,8,N,1 --- --- Quit: Ctrl+] or Ctrl+Q | Upload: Ctrl+U | Reset: Ctrl+R ---
ok path /opt/fluidnc-v3.4.7-posix/test.nc --- Sending file /opt/fluidnc-v3.4.7-posix/test.nc as /SD/test.nc --- $Xmodem/Receive=/SD/test.nc [MSG:INFO: Received 28 bytes to file /sd/test.nc] ok
Believe me, there is some bad code in Bluetooth...
Closing, user blocked.
Controller Board
MKS DLC32
Help From Board Vendor
Machine Description
XYZ
Configuration file
Startup Messages
User Interface Software
Does not matter
What happened?
Refers to execute g-code program, not using terminal. Here you are test.nc program :
$H $SS M3 G0X10 G0X0 M5 M30
It runs well from SD card. It runs well by USB connection. It hangs after $H by Bluetooth connection. To exclude the sender problem, I used Linux terminal only :
cat test.nc > /dev/ttyUSB0 cat test.nc > /dev/rfcomm0
By USB program is sent and works well, by Bluetooth program is sent, but does only homing, then stops and does nothing else. Do not ask why $H in the program, because it can be useful and can work. BTW. There is the same problem after M30 (Sender is waiting for program end to eternity).
Other Information
No response