Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB support #186

Open
rajndrasharma opened this issue Jul 29, 2022 · 9 comments
Open

USB support #186

rajndrasharma opened this issue Jul 29, 2022 · 9 comments
Labels
bug Something isn't working

Comments

@rajndrasharma
Copy link

Can anyone please suggest how to print on thermal printer with usb?

@arielbvargas
Copy link

Unfortunately, I wasn´t able to make a thermal print with USB on Windows. Network printing works great. If anyone can share working code, I will appreciate it. Thanks.

@lukevp
Copy link
Owner

lukevp commented Jul 29, 2022

Hi @rajndrasharma @arielbvargas , did you follow the directions in the Readme to install the drivers? USB printing works fine on windows, Mac, and Linux, but the way it works is through virtual serial port emulation. It doesn’t work with native USB devices. Let me know what printer model you have and what virtual port you’ve tried!

@lukevp lukevp added invalid This doesn't seem right question Further information is requested labels Jul 29, 2022
@rajndrasharma
Copy link
Author

It is rugtek and tvs rp 3200 series printers. I am not able to add virtual com ports. I will try once again.

@hackdan
Copy link

hackdan commented Jul 29, 2022

Anyway, the TM EPSON on TM Virtual Port always keep emulating as the printer was connected even if the cable is disconnected

@lukevp
Copy link
Owner

lukevp commented Aug 3, 2022

You should be able to use the status features to determine if the printer is actually connected and online, independent on if the COM port is connectable @hackdan .

@hackdan
Copy link

hackdan commented Aug 4, 2022

@lukevp, I used a test console project with EPSON TM20-II. I disconnected it after a first print but status continues as connected. Is normal ?

@lukevp lukevp added bug Something isn't working and removed invalid This doesn't seem right question Further information is requested labels Dec 24, 2022
@lukevp
Copy link
Owner

lukevp commented Dec 24, 2022

I changed this to bug status, we need to research if the disconnected state can be detected and reflected using the virtual port. Most likely if you disconnect the printer you would have to just have a timeout on the write or something to that effect. Even if you use automatic status, that is depending on the printer communicating its status. The latest version of the lib has a status poller, you could try that and see if you can detect when the printer is offline.

@DRaichle
Copy link

DRaichle commented Apr 26, 2023

I have the same problem with an Epson TM-T20-III and I just debugged it a little bit. If the printer is disconnected/switched off the member "DsrHolding" of the serial port changes from true to false. After connecting/switching on it changes to true again.
Additionally there is a PinChanged-event in the SerialPort with an event-arg of enum-type "SerialPinChange" that contains a value named "DsrChanged". => This might be used for setting the connected-status and to invoke the connected-event.

The meaing of DSR according to wikipedia is: Data Set Ready which means that the DCE (in this case the printer) is ready to receive and send data.

Edit:
It's necessary to mention that the DsrHolding-value also gets false if the cover is open or if paper is out. => it seems to signal more a kind of "online" status.

@DRaichle
Copy link

I have just seen that it is possible to define in the Epson Virtual Port Assignment Tool how the signal lines (DSR, CTS, RI, DCD) shall be used. Standard setting is: DSR and CTS are set if printer is online - one alternative setting is to set a line if "Printer Power is ON"

Gary-gr9 added a commit to Gary-gr9/ESC-POS-.NET that referenced this issue Jul 6, 2023
…linux as well) with complete printer status report back.

No driver install or Virtual Serial Port needed.
Choose printer from list of usb devices and send data straight to the printer like Serial or Network printer.
Possible fix for Isuues : lukevp#186 lukevp#220 lukevp#223
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants