Virtual Serial Port Over Wifi

0 views
Skip to first unread message
Message has been deleted

Eduviges Gearlds

unread,
Jul 13, 2024, 12:27:59 PM7/13/24
to contdedertio

A virtual COM port or a virtual serial port is an ideal solution when a legacy software application expects a connection to a serial device port (COM port or COMM port) but cannot connect, due to a physical lack of available serial ports. Instead, we reconfigure the computer to send serial port data over a local area network or the Internet as if over a true serial port. When the legacy application attempts to send data to a serial COM port, it is actually transmitted through the virtual serial port over a TCP/IP connection. Information sent back to the legacy application also travels over the network where it is received by the virtual serial or virtual COM port, and is then finally passed to your legacy application.

Important Note: This tutorial deals exclusively with a virtual COM port implementation that is used with NetBurner devices. If you are looking for a native software solution to create virtual COM ports for use with other systems or hardware, we suggest the Virtual Serial Port over Ethernet Connector or the Virtual Serial Port Driver from our partners at Eltima Software. They are both incredibly stable and versatile utilities that support various Windows versions, up to the latest Windows 10.

Virtual Serial Port Over Wifi


Download https://miimms.com/2yJVpf



Congratulations! You have now set up and tested your virtual COM port. We hope that you can see how this example can be expanded upon to incorporate your own legacy serial comm applications to work with newer computers that either have too few DB9 RS-232-style ports or none at all.

Permission is hereby granted to purchasers of NetBurner System-on-Modules and serial-to-Ethernet modules (NetBurner Devices) to use this program to create a virtual serial communications port on a Windows computer so long as the sole purpose is to connect to the NetBurner Device. No other rights to use this program or its derivatives in part or in whole are granted.

Thank you for bringing this to our attention. It looks like the link for the Virtual COM port software was not pointing to the right file. Please feel free to try the download again and let us know if you run into any additional issues.

Is it possible to set up a solution where, from a single computer, I can access multiple Cisco switch console ports over ethernet (USB console/serial ports with USB-A sockets on the switches) . i.e. some kind of command center with multiple switches defined and the ability to click between them effortlessly and bring up their unique console windows, have multiple sessions open at once etc. I understand I would probably need some kind of ethernet to USB-A serial hardware on each switch.

Hi Tony, thanks for the question! If I understand the setup correctly, it should be possible to have multiple switches talk to a single computer over Ethernet with the use of Serial-to-Ethernet converters. You would need one converter per switch. They would allow you to connect to the console ports with a network connection from any computer on the same network using a SSH or Telnet client.

Hi
Can I send data from one computer to other computer through internet cable which is in a same lan. If so, How to transfer data from one Virtual serial port to other port. Please provide step by step process.
Regards,
Vino

The process described in the article (and the software we provide) is really only applicable for individuals using our serial to Ethernet devices. You can connect two virtual serial ports together as you described across a LAN, but will need more general software to do so. You can find this from Eltima. You will need one virtual serial port to be set up as the server, and the other as the client. The client will then initiate the connection to the server, and at that point, you will be able to start sending data across the virtual serial ports. Good luck!

You can damage your printer by doing any modifications. This is only for educational purposes. Anything you do is your responsibility and I'm not responsible for results of any unsuccessful modifications. You have been warned.

The thing is to have the Octoprint working without a dedicated PC (Raspberry or other) that is connected to your 3D printer just for dealing with Octoprint. For some of us it can be waste of such good piece of hardware. So this can help you or you can treat it as a fun fact.

In this approach we will use serial connection (UART) over the WiFi (the same way applies for the Ethernet). We will use cheap and small ESP8266 board that will be connected directly to our 3D printer. Also, you need some kind of PC that will anyway run the Octoprint on it, but maybe you already have some PC (Raspberry Pi?) working all the time and you want to make use of it. On host side we will run Octoprint in a docker container.

EasyESP firmware is beautiful piece of software that has a serial2net capability which helps us to achieve our goal. It can send the whole UART through the Ethernet (in our case WiFi) and it can be used bi-directionally - sounds great, isn't it? Also, you can always connect to your printer via telnet and you will speak to each other like with normal serial connection! With our approach neither printer nor octoprint will have no idea that the conversation is going through WiFi.

You need to connect your ESP board directly to your 3D printer's motherboard. If you have possibility to connect your printer to the PC it's highly possible that there is some UART-to-USB converter on printer's motherboard. In my case it was CH340G that is widely used in many various devices. Just connect both Rx and Tx, 3V3 and GND to your ESP board and you're ready to go. Take a look at the basic schematic below:

Hi, this is exactly what I was looking for. Unfortunately, I don't have access to the test pins of my mother, but it has a USB (type B) connection. Are there any ways to convert the USB port to the serial server without accessing the "rx" and "tx" pins? I have tried connecting the ESP micro USB with an cable, but it doesn't work.
My printer uses a BTT SKR v1.4.

Hi there!
I'm not sure it is a case for your motherboard. Looking on picture of the motherboard I cannot see any UART RX or TX pins that you could use. You need these pins accessible to use this solution.

Thanks for the answer, but I have also tested those and they don't seem to work. I have also tested the ESP module separately and its connection is good. The only part that doesn't work is the connection between the ESP and printer! I have also tested other RX and TX pins. Could this be a firmware issue?

Not something I have done before with this board, but I it does seem to suggest that the Tx0/Rx0 might be used for a TFT. It's all in the firmware. I am pretty sure if you don't use the existing incoming TX and RX you would have to update the firmware to know you were using that set as the main command pipe.

You might be able to modify the code used in the wifi Module. It communicates over Serial on TX3/RX3. You would have to get an understanding of how that interfaces to the board and firmware. But it might be a solution. It is the only interface I see that would be pure serial into the MCU. For sure not as easy as just wiring things in.

Yes, I think you are right. What about the USB port itself? Can I connect the printer's USB port to ESP's USB port or it's RX TX? I have tried connecting these through a USB to TTL convertor, but the printer's USB port doesn't seem to have power.

Not without some very specific firmware. What you have to realise is that the port on your printer is not really a Serial port it is a USB device interface. It identifies it self to your PC as a serial port and the software drivers on your PC/Pi do all the conversions including registering it as a serial port device. Your PC has a Driver that takes any of the commands that would normally go directly to the hardware device and then sends the proper info over the USB interface protocol and that is converted in your Printers CPU back to a serial port in a similar way. There are device out there that can do this but they expensive. For many the cost would for sure rival the cost of the printer.

I have also seen some work that is done with the Raspberry Pi Pico that looks promising but it is not directed at 3d Printers. It is almost always directed at keyboards or other HMI interfaces. This project by sekigon-gonnoc called Pico-PIO-USB seems to have some promise in that it must be doing some similar conversion as each keyboard segment is added to in the demo. The demo video link in the readme seems to not be working for me but here is a direct link.

If you had the time and chops to workout the firmware, this could be a direction... Maybe. but, it would be a lot less expensive to find a 3d Printer motherboard that has exposed direct access to the back side of a USB to Serial conversion chip(CH340) like the board used in the example at the top of this Thread.

One other option I had thought of is to use a Pi Zero W in place of the ESP32 at the Printer side. It has the USB interface and it would be pretty easy code to receive data in the same way as stated above using an ESP32 and send it to the USB interface connected to your printer. The Pi Zero W can be gotten for less than $40 as a full kit and about half that if you just get the board. Its a bit overkill (maybe not) for the use case but it is inexpensive and does remove a good bit of the interface hurdle. If you keep the OS really light and run everything in memory, it could be really reliable and the SD card might last a very long time.

The thing is to have the Octoprint working without a dedicated PC (Raspberry or other) that is connected to your 3D printer just for dealing with Octoprint. For some of us it can be waste of such good piece of hardware.

While I have reservations about the Pi Zero w option in my previous post, it does address several challenges right out of the box. With proper implementation and simplicity in mind, it could offer a few years of reliable service.

I don't believe that a Raspberry Pi is unreliable or requires significant time and financial investment particularly when considering an RPi Zero 2 W. I do agree that an RPi 4 or RPi 5 is moving into the significant financial investment category.

7fc3f7cf58
Reply all
Reply to author
Forward
0 new messages