computerlyrik / dymoprint

Linux Software to print with LabelManager PnP from Dymo
Apache License 2.0
150 stars 51 forks source link

USB time out on Ubuntu 22.04.3 LTS #99

Closed pietwauters closed 6 months ago

pietwauters commented 6 months ago

Hi, I installed everything without problem, and set the permissions as suggested. When running a simple test, I get the following error:

dymoprint "test"
Found one Dymo device: <DEVICE ID 0922:1002 on Bus 001 Address 010>
  manufacturer: Dymo
  product: DYMO LabelManager PnP
  serial: 07264931032016
  configurations:
  - <CONFIGURATION 1: 500 mA>
    interfaces:
    - <INTERFACE 0: Printer>
    - <INTERFACE 1: Mass Storage>
    - <INTERFACE 2: Human Interface Device>

Recognized device as LabelManager PnP (mode switch)
Active device configuration already found.
Opened printer interface: <INTERFACE 0: Printer>
Printing label..
Sending chunk of 573 bytes
Sending chunk of 322 bytes
Traceback (most recent call last):
  File "/home/piet/.local/bin/dymoprint", line 8, in <module>
    sys.exit(main())
  File "/home/piet/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/command_line.py", line 265, in main
    print_label(label_bitmap, margin_px=args.m, tape_size_mm=args.t)
  File "/home/piet/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/dymo_print_engines.py", line 357, in print_label
    lm.printLabel(label_matrix, margin_px=margin_px)
  File "/home/piet/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/labeler.py", line 210, in printLabel
    self.rawPrintLabel(lines, margin_px=margin_px)
  File "/home/piet/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/labeler.py", line 222, in rawPrintLabel
    response = self.sendCommand()
  File "/home/piet/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/dymoprint/labeler.py", line 74, in sendCommand
    rspBin = self.devin.read(8)
  File "/home/piet/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/core.py", line 423, in read
    return self.device.read(self, size_or_buffer, timeout)
  File "/home/piet/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/core.py", line 1029, in read
    ret = fn(
  File "/home/piet/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/backend/libusb1.py", line 846, in bulk_read
    return self.__read(self.lib.libusb_bulk_transfer,
  File "/home/piet/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/backend/libusb1.py", line 954, in __read
    _check(retval)
  File "/home/piet/.local/pipx/venvs/dymoprint/lib/python3.10/site-packages/usb/backend/libusb1.py", line 602, in _check
    raise USBTimeoutError(_strerror(ret), ret, _libusb_errno[ret])
usb.core.USBTimeoutError: [Errno 110] Operation timed out

Any idea what could be the problem?

tomek-szczesny commented 6 months ago

USB communication times out after the print is initialized. Does it do any printing at all? This is something we've seen before when PnP's battery is dead. Have you used it recently?

pietwauters commented 6 months ago

Hi, nothing is printed. The battery is charged for a couple of days now, so I don't think that is the problem. I must admit that I haven't used it recently, but I'll give it try tomorrow on a Windows machine.

Op do 28 dec 2023 om 21:46 schreef Tomek Szczęsny @.***

:

USB communication times out after the print is initialized. Does it do any printing at all? This is something we've seen before when PnP's battery is dead. Have you used it recently?

— Reply to this email directly, view it on GitHub https://github.com/computerlyrik/dymoprint/issues/99#issuecomment-1871479086, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQABLCI6QYXBXLPLVJ46C5LYLXLB5AVCNFSM6AAAAABBFZH6LCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRGQ3TSMBYGY . You are receiving this because you authored the thread.Message ID: @.***>

tomek-szczesny commented 6 months ago

If you haven't used it for a long time and the battery was still in it, I suspect it's dead. These printers have a known flaw of discharging their battery below damage threshold when in storage. Hundreds of people are pissed off about it in Dymo site comments section.

Your attempt with Windows machine should give a definitive answer.

pietwauters commented 6 months ago

Thank you for the quick reply. It was indeed the battery. Somehow the Dymo refused to charge the battery when plugged into my computer, so I plugged it directly into a high rated USB charger, and that did the trick. Great tool you are maintaining! Now I can finally use my Dymo on my Linux systems. Thank you