| |

VerySource

 Forgot password?
 Register
Search
View: 1271|Reply: 7

How to send control commands to the printer through the usb interface?

[Copy link]

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-3-5 08:30:01
| Show all posts |Read mode
I have an EPSON inkjet printer, and I want to set and print it using control commands, but it is a USB interface. Why can I only find the USB disk using functions like SetupDiGetClassDevs, but I can't find the printer? Are functions like SetupDiGetClassDevs Can I only operate things like USB stick, mouse, keyboard, joystick, etc.? Or is it correct for me to send control commands to the printer using functions like SetupDiGetClassDevs? Thank you!
Reply

Use magic Report

0

Threads

10

Posts

9.00

Credits

Newbie

Rank: 1

Credits
9.00

 China

Post time: 2020-5-20 09:30:01
| Show all posts
Its communication protocol may be encrypted, you should not control it.

If you want to control, you use API functions that specifically control the printer.
Reply

Use magic Report

1

Threads

2

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

 Author| Post time: 2020-5-21 12:45:02
| Show all posts
There are manuals for the control commands! Of course, you can also use some Windows API to set and control the printer to print pictures, but I need to control some parameters of the printer myself. I am mainly unfamiliar with how to send control commands through usb. I can't find the printer with usb! Because I am not familiar with how to send control commands to the printer via usb, so I am not sure if I am taking a detour, or am I wrong with the functions such as SetupDiGetClassDevs?
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-26 09:00:01
| Show all posts
I don’t know how to use DeviceIoControl
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-31 18:15:01
| Show all posts
I also have a question about USB communication
Ask the next poster Do you use Windows DDK when writing USB programs with VC?
What header files do I need to add? Why do I get an error when I use functions similar to CreatFile and SetupDiGetClassDevs?
Please advise
Reply

Use magic Report

0

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-8-31 18:30:01
| Show all posts
I have never used it before, but you should first understand the communication protocol.
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-8-31 18:45:01
| Show all posts
To use functions such as SetupDiGetClassDevs, you need to understand the concept of GUID first. Each type of device has its own GUID. If the GUID is set incorrectly, the device will naturally not be found
Second, if there is F/W in terms of hardware control, it is estimated that you can still crack the instructions with software such as Bushand. If it is completely through the ASIC register, there is basically no way
Or there is the last resort, which is to provide WIA driver functions, which can also be achieved by a general framework
Reply

Use magic Report

0

Threads

14

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 United States

Post time: 2020-8-31 19:00:01
| Show all posts
OpenPrinter, WritePrinter, directly write the printer port, as long as you know the language used by the printer.
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list