Open ligius- opened 6 years ago
Couple of things.
I can confirm point 2.
I decided to wait on handling the chaining communication plugins until I had a case that required it. Furthermore due to the fact that replicators and the like required flashing in order to make an alternative serial input work @unlimitedbacon and I decided to recommend flashing marlin with the required changes.
Thank you for your prompt reply.
It's not a TCP connection but a standard serial one. The ESP8266 is working in serial bridge mode. As a matter of fact, using the exact same pins with a CH430 converter works just fine.
I'm using now esp-link but also tried it with https://github.com/beckdac/**ESP8266-transparent-bridge** and ESP3D, I have the exact same issue. I've used the name "NodeMCU" just as a board reference, not the firmware.
Edit: I'm not excluding an issue with my ESP8266 board, but I've tried the other serial port on the NodeMCU as well.
Edit 2: on the PC side, I've used "HW Virtual Serial Port" and com0com + com2tcp, just to try and exclude software issues.
Ok I am confused now. Are you or are you not using the Networked Printing (TCP) feature in MatterControl?
If you are, then it's not going to work since MatterControl does not currently support Sailfish Communication (S3G) and Networked Printing (TCP) at the same time.
If you are not, then I don't think we can help you. Since it works over a normal USB/Serial connection, it's not a MatterControl problem.
Perhaps I should've been clearer. For this issue I am not using TCP, only 'standard' serial. The other issue opened before this, was related to the fact that switching to TCP and back to serial breaks the printer profile.
It works over normal serial connection, but I think there are some hardcoded timings or some buffering/flow control that is not taken into account. I wish I could help more, but I don't know where to start.
Just to be clear again, this issue relates to MatterControl working over pc -> usb-> serial but not over pc -> virtual serial -> wifi -> serial.
I'm using a NodeMCU (ESP8266, 3.3V) with a level converter to talk directly to a MightyBoard MCU (ATMega1280, 5.5V). The printer uses x3g/binary for serial communication.
If I connect a USB to serial converter directly on the pins it works just fine, I can control the printer via MatterControl and print without errors. If I use a TCP to COM bridge instead (tried various programs and settings) the communication fails after a few commands with "Generic Packet Error, packet discarded".
To reproduce, I go into the control panel for the printer and nudge the X or Y steppers a bit in either direction. Eventually I get the above error in the terminal and communication ceases, the steppers are left powered (un-released).
I have not been able to figure out why, on my oscilloscope all the signals look ok. I'm suspecting it has to do with some latency or buffering, but I see no option to configure that.
Attaching a short snippet of communication that I was able to peek, the communication error starts around the middle part.
Also attaching oscilloscope traces (from another reproduction), the middle part shows communication loss. The blue trace is the TX (from computer), yellow is RX, though not all details can be captured.
MC port error.txt
Here is both a serial dump (hex) and the terminal dump, they should be relatively in sync:
print_log 2.txt
MC port error 2.txt