octo4a icon indicating copy to clipboard operation
octo4a copied to clipboard

Possible solution to some of Octo4a connection issues

Open bazarovdev opened this issue 1 year ago • 1 comments

Problem: printer is seen by Octo4a but you unable to connect (for example from Klipper that uses Octo4a's USB driver)

Analysis: looking on Rx, Tx and Reset signal it was found that during Octo4a session compared to PC the Reset line toggled at the beginning of communication Correct communication from PC: image Unable to connect from Octo4A: image

It was found that "arduino" based printers (GT2560) use DTR line of RS-232 to cause reset: image

and Octo4a toggles this line on baudrate changes VirtualSerialDriver.kt:

...
 val newConnectionRequired = ((isStartPacket || currentBaudrate != baudrate) && selectedDevice != null)
...
if (newConnectionRequired) {
  port?.dtr = true
  port?.rts = true
}

Work-arounds:

  • switch printer to use 115200 baudrate to avoid switching baudrates. or
  • add dummy packet and delay on connection to start communication after 2-nd reset

Possible solution: don't toggle dtr on baudrate changes (?)

bazarovdev avatar Jan 15 '23 16:01 bazarovdev

Thanks for the analysis

alufers avatar Mar 24 '23 23:03 alufers