I use an Epson TM-U675 multifunctional POS printer both at work and at home (I got myself one because I liked it so much!), and I run Windows 10 in both locations. My current workflow for interacting with it involves the use of a python module I've written to turn a marked up text file into a raw binary file that I then can either spool to the printer by telling it to print RAW or can write to a COM emulation port provided by the Epson TM Virtual Port Driver. This works remarkably well and gives me very granular control over my printer thanks to the ESC/POS instruction set, and has been a remarkably fun project -- I wholeheartedly recommend it to anyone who's particularly bored.
I also use Nano as my primary text editor for developing code, and have had poor experience with builds of the editor for Windows lacking awareness of the console window being resized, and so typically enable WSL on my systems so that I always have my editor within reach.
Recently, I also got myself an Epson DM-D110 vacuum-fluorescent customer display, which I can communicate with using the physical COM1 port on my desktop and also supports the ESC/POS instruction set. And, as a bonus, since I use WSL1, I can run my code from my WSL environment and write data to the display by writing it to /dev/ttyS1 -- All works as intended! And again on my laptop, when using a USB serial cable, I can write from there.
The issue comes in when I want to use my TM-U675 from WSL. I have it configured to use COM2 with the Epson TM Virtual Port Driver Port Assignment Tool, I am able to write to COM2 under Windows, and I can even connect to COM2 via putty, send 50 or so bytes (to fill up the printer's receive buffer so that it gets flushed to the page), and verify that the data is actually being sent properly to the printer. However, in WSL1 attempts to write to /dev/ttyS2 fail, with the very unhelpful message "Input/Output error."
What follows is an example of the output I am receiving. All of these commands are at the Windows command prompt.
Test command: type testfile.bin > COM2
Expected output: [the printer prints testfile.bin]
Actual output: [the printer prints testfile.bin]
Test command: bash -c "cat testfile.bin > /dev/ttyS2"
Expected output: [the printer prints testfile.bin]
Actual output: /bin/bash: /dev/ttyS2: Input/output error
I currently only have a USB interface module card (UB-U03II, upgrading to a UB-U01III when I get paid though!) for my TM-U675, so connecting via USB serial cable to my laptop or COM port on my desktop isn't currently an option. Are there known issues with compatibility between WSL1 and the Epson TM Virtual Port Driver? Has anyone else had any success with virtual COM ports and WSL1?