serial communication

Good morning
Some time ago I wrote a desktop application in vb.net that reads a Target3001 file and sends g commands directly to the V1 firmware to drill the PCBs I designed, replacing the extrusion with an electric spindle.
I have now switched to dev2 firmware and my application is not communicating. I noticed that when Repetier-Host connects via serial, it immediately sends 100 bytes with value 0x00 and 1 byte with value 0x0A, at this point the firmware responds with "wait". I have modified my application to transmit the same data, but I am not getting any response.
The comm port is set:
BaubRate 115200
DataBits 8
DiscardNull False
DtrEnable False
Handshape None
Parity None
ReadBufferSize 4096
ReadTimeout -1
ReceivedBytesThreshold 1
RtsEnable False
StopBits 1
WriteBufferSize 2048
WriteTimeout -1

is it possible to know how Repetier-Host starts serial communication with dev2 firmware?

Thank you

Comments

  • The extra bytes at start are just for a clean start in case printer does not reset on connect. These values get ignored and 0x0a is newline for all only using ascii communication. V2 communicates just the same. Just make sure to not send binary commands (bit 8 on first byte set) as that requires deeper knowledge on how we compress gcode to binary.

    Does V2 work with host? I ask because not all boards are already converted to V2 so might also be an other problem. Also check if you get some serious error messages in log.
  • Good morning
    V2 runs on RUMBA32 and communicates perfectly with Repetier-host. The printer works very well. My application communicates with V1, but fails with V2. I sniffed the data traffic on the com port with "Serial Port Monitor" and it is clear that Repetier-host sends 100 bytes with the value 0x00 and immediately after 1 byte with the value 0x0a, at this point V2 immediately replies with data.
    I reproduced exactly the same data transmission with my application, but once I send 0x0a I get no response from V2.
    is it a matter of timing between the 100 byte block and 0x0a?
    Is it possible that the serial port must be opened with specific settings?
    With "Serial Port Monitor" I see the data traffic but not the serial settings.

    Thank you
  • I solved my problem.
    I set DtrEnable = True and RtsEnable = True of the serial port and the communication works perfectly!
    Greetings
Sign In or Register to comment.