-
Notifications
You must be signed in to change notification settings - Fork 46
Description
Hi,
thanks for the driver.
I have just received a new M110S printer and, first of all, I have to specify that I needed to modify the driver to make it recognize my printer. After that, I noticed a weird offset in the printed labels, and it was caused by the hardcoded 1mm left margin in the printer definition.
Both the bluetooth name-matching logic and the usb vid:pid did not match my printer.
I don't know if somehow I got a fake clone, but it looks legit to me, and the android app had no issue recognizing the printer and printing perfectly centered labels.
The vid:pid pair of my device is 0483:5740 and the bluetooth name, which is also displayed on the printer screen, is Q199E5797220037.
This is the device details when connected via USB:
❯ lsusb -v -d 0483:5740
Bus 003 Device 004: ID 0483:5740 STMicroelectronics Virtual COM Port
Negotiated speed: Full Speed (12Mbps)
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 [unknown]
bDeviceSubClass 0 [unknown]
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x0483 STMicroelectronics
idProduct 0x5740 Virtual COM Port
bcdDevice 1.00
iManufacturer 1 Jieli Technology
iProduct 2 USB Composite Device
iSerial 3 1234567890ABCDEF
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 0x0020
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 7 Printer
bInterfaceSubClass 1 Printer
bInterfaceProtocol 2 Bidirectional
iInterface 4 (error)
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x02 EP 2 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 1
Device Status: 0x0000
(Bus Powered)
The serial in particular is very weird.
To make it work I changed the driver and added a new matching logic for bluetooth using this regex ^(Mr\.in(.*)|Q[0-9]{3}[A-Z][0-9]{10}|T02)$ and an extra check on properties.get('Icon', None) != 'printer', and looked for usb I just looked for the new vid:pid.
I then created a new drv and called it M110S without the 1mm margin and everything works fine.
I can create an MR with all the fixes, but I am not really sure about discriminating the driver by calling it M110S, and I don't really know how else to call it.