Send codes via USB to printer

H

Harry Simpson

Right now I'm sending config code to a Zebra QL220+ printer via serial port
successfully.

I now want to use the USB connection to send the same config codes. I'm
using the Serial class to send the serial. How can I send text or codes to
the printer via USB??

TIA

HArry Simpson
 
G

Guest

I now want to use the USB connection to send the same config codes.
I'm using the Serial class to send the serial. How can I send text or
codes to the printer via USB??

Does your printer support USB? I see that your printer you mentioned is
Serial?
 
H

Harry Simpson

Yes it's got a serial connector and a USB connector and another app actually
uses both to communicate with it.
 
D

Dick Grier

Harry,

If you want to send raw data, take a look at:

http://www.codeproject.com/KB/vb/Print_Raw_Data.aspx
and
http://support.microsoft.com/kb/322090/en-us

For most things, you'd just use the Printer support, but if you want to
duplicate the functions of your serial interface, look at these references.

Dick

--
Richard Grier, MVP
Hard & Software
Author of Visual Basic Programmer's Guide to Serial Communications, Fourth
Edition,
ISBN 1-890422-28-2 (391 pages, includes CD-ROM). July 2004, Revised March
2006.
See www.hardandsoftware.net for details and contact information.
 
H

Harry Simpson

I'm just sending text and it's not the sending part so much is how do I tell
my application to send via USB.
Right now I'm using Serial class in .NET 2 and I can send text all day long
to the printer via COM1. I just need to send the same text via USB but
don't know how to code it and can't find anything that really relates. It
must be really simple and I'm trying to make it harder than it is.....

Thanks
Harry
 
H

Harry Simpson

If I try to use the Serial class passing in mySerialPort.PortName as "USB"
instead of "COM1" it errors out with
"The given port does not start with COM/com or does not resolve to a valid
serial port. Parameter name: portName"
messagebox

When I connect the usb using another app. (not mine) it shows the Port as
"USB" and also identifies the connected USB Device as QL 220+ which is the
model printer I've connected. So there must be a way to deal with USB
connected devices in .NET......

Harry
 
H

Harry Simpson

It says nothing on how to select a USB port to send data through. It's all
serial ports. Do I immulate a serial port and how do I do that in code?
Does anyone ever use USB ports in their apps? I can't find anything
relevant.

TIA
Harry
 
H

Harry Simpson

So it cannot be done - is that the concensus?

Harry Simpson said:
It says nothing on how to select a USB port to send data through. It's
all serial ports. Do I immulate a serial port and how do I do that in
code?
Does anyone ever use USB ports in their apps? I can't find anything
relevant.

TIA
Harry
 
O

Olexandr Kravets

Harry,
Did you find any examples?
I just need to make similar functionality and don't know how to start ...
Any help will be helpful.

Thanks, Olexandr !
 
J

JDS

Harry,
Did you find any examples?
I just need to make similar functionality and  don't know how to start ....
Any help will be helpful.

Thanks, Olexandr !






- Show quoted text -

Does the USB device install as a com port? If so, you can write to it
as if it were a standard serial port. I have seen this before on some
USB devices and used them that way. Apologies if this is not the case
here but worth having a look at as it would provide a simple solution.
 
H

Harry Simpson

No help - it obviously can't be done.

Olexandr Kravets said:
Harry,
Did you find any examples?
I just need to make similar functionality and don't know how to start ...
Any help will be helpful.

Thanks, Olexandr !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top