Why does escpos hang when trying to connect to printer?

273 views Asked by At

I have a SureMark 4610 printer that I'm trying to connect to, but for some reason it hangs when I connect. I've installed the necessary drivers for the printer. What could be the problem?

I'm using Windows 10 if that is of any use to you all.

Here's the printer device info

    DEVICE ID 04b3:4535 on Bus 000 Address 019 =================
 bLength                :   0x12 (18 bytes)
 bDescriptorType        :    0x1 Device
 bcdUSB                 :  0x110 USB 1.1
 bDeviceClass           :    0x0 Specified at interface
 bDeviceSubClass        :    0x0
 bDeviceProtocol        :    0x0
 bMaxPacketSize0        :   0x40 (64 bytes)
 idVendor               : 0x04b3
 idProduct              : 0x4535
 bcdDevice              :  0x216 Device 2.16
 iManufacturer          :    0x1 (c) Copyright IBM Corp. 2000
 iProduct               :    0x5 Printer Interface (Usage = 3500h, Usage Page = FF45h)
 iSerialNumber          :    0x3 060725163603C100193
 bNumConfigurations     :    0x1
  CONFIGURATION 1: 0 mA ====================================
   bLength              :    0x9 (9 bytes)
   bDescriptorType      :    0x2 Configuration
   wTotalLength         :   0x22 (34 bytes)
   bNumInterfaces       :    0x1
   bConfigurationValue  :    0x1
   iConfiguration       :    0x0 
   bmAttributes         :   0x40 Self Powered
   bMaxPower            :    0x0 (0 mA)
    INTERFACE 1: Human Interface Device ====================
     bLength            :    0x9 (9 bytes)
     bDescriptorType    :    0x4 Interface
     bInterfaceNumber   :    0x1
     bAlternateSetting  :    0x0
     bNumEndpoints      :    0x1
     bInterfaceClass    :    0x3 Human Interface Device
     bInterfaceSubClass :    0x0
     bInterfaceProtocol :    0x0
     iInterface         :    0x5 Printer Interface (Usage = 3500h, Usage Page = FF45h)
      ENDPOINT 0x82: Interrupt IN ==========================
       bLength          :    0x7 (7 bytes)
       bDescriptorType  :    0x5 Endpoint
       bEndpointAddress :   0x82 IN
       bmAttributes     :    0x3 Interrupt
       wMaxPacketSize   :   0x10 (16 bytes)
       bInterval        :    0x4

Here is the simple code

from escpos import printer
p = printer.Usb(idVendor=0x04B3, idProduct=0x4535, timeout=10, in_ep=0x82)
print(p.idProduct)

I cannot get to the print because it just hangs indefinitely at line 2.

0

There are 0 answers