Am Donnerstag, 2. April 2020 17:30:28 UTC+2 schrieb Gerhard Reithofer:
> Hi *,
> I used a label printer for years on Linux.
> It becomes registered in Linux as character device like
> crw-rw---- 1 root lp 180, 1 Apr 2 16:34 /dev/usb/lp1
>
> Syslog:
> usb 1-1.2: new full-speed USB device number 24 using ehci-pci
> usb 1-1.2: New USB device found, idVendor=04f9, idProduct=2044, bcdDevice= 1.00
> usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
> usb 1-1.2: Product: QL-720NW
> usb 1-1.2: Manufacturer: Brother
> usb 1-1.2: SerialNumber: 000J6Z876646
> usblp 1-1.2:1.0: usblp1: USB Bidirectional printer dev 24 if 0 alt 0 proto 2 vid 0x04F9 pid 0x2044
>
> I can comunicate with it via [file open $dev {RDWR}] and anything works
> perfect.
> But now my customer must change to Windows and he wants to use it the
> same way.
>
> I think that it is some sort of USB serial but really dont know.
> Using the enum_usb script from the TCL wiki it is found as:
> USB Printing Support
> usbprint
> USB Printing Support
> BrotherQL-720NW
>
> What I do not know is the possibilty to access the device via file IO or
> any other way. The bidirect mode is necessary because the printer has a
> very powerful interface and it provides information about loaded label
> format, the device capabilities like label sizes, error handling, etc.
>
> I know some usb-serial adapters which can be used via COM:devices but
> in this case I do not even know which device (COM1:, LPT3:, ...) I
> could try.
>
> Any hints where I could further dig in to talk to my printer?
>
> TIA,
> Gerhard
#example with twapi and SDK
#Brother b-PAC3 SDK installiert, 32 bit
#
#BrssCom.Document
#Open
#settext 0
#settext 1
#settext usw.
#doPrint
#close
#
# template created with P-Touch Editor
# brotherql62x25.lbx
# 1 line and 1 arbitrary character as a wildcard
# in directory C:/etiketten
package require twapi
set etikettlbx "brotherql62x25.lbx"
set etikettdir "C:/etiketten"
set etikettfile [file join $etikettdir $etikettlbx ]
proc bqldrucken_p {kvar etikettfile {anzahl 1} } {
set brother [::twapi::comobj BrssCom.Document]
set etikett [string map {"/" "\\" } $etikettfile ]
$brother -call Open [subst {$etikett}]
$brother -call settext 0 "$kvar"
$brother -call doPrint 0 1,$anzahl
$brother -call close
}
bqldrucken_p "123456789" $etikettfile
best regards
Greor