Menu

#734 commandtodnp cups command filter not available for DNP DS620

None
open
nobody
None
5
2021-08-17
2021-05-19
kk123
No

Hello
I am trying to create a CUPS command file to be printed that will update the marker attributes and printer online/offline status using commands like ReportLevels and ReportStatus. However, I cannot find a "commandtodnp" filter (no mentioned in the ppd or available at /usr/share/lib/cups/filter) , that can interpret the CUPS printer commands.

Is there one available for ubuntu linux 20.04? I am using the CUPS+Gutenprint driver v5.3.3. I have a DNP DS620 printer.

My CUPS command file looks like this:

#CUPS-COMMAND
ReportLevels

Any assistance on this would be very helpful. Thank you.

Regards,
Karthika

Discussion

  • Solomon Peachy

    Solomon Peachy - 2021-05-19

    On Wed, May 19, 2021 at 12:00:20PM -0000, kk123 wrote:

    I am trying to create a CUPS command file to be printed that will
    update the marker attributes and printer online/offline status using
    commands like ReportLevels and ReportStatus. However, I cannot find a
    "commandtodnp" filter (no mentioned in the ppd or available at
    /usr/share/lib/cups/filter) , that can interpret the CUPS printer
    commands.

    If there is no cupsCommands keyword in the PPD, why do you assume this
    functionality exists at all?

    That said, I did partially implement command support, but there wasn't a
    good way to hook that up to gutenprint's PPD generator, and client
    support was abysmal so I pretty much walked away from it.

    But if you manually add this to your PPD, level reporting should work:

    % Level reporting
    cupsCommands: "ReportLevels"
    cupsFilter: "application/vnd.cups-command 100 gutenprint53+usb"
    %

    I haven't implemented ReportStatus, as it doesn't add anything useful
    beyond what's already in ReportLevels.

    Incidently, all of this information is already sent to CUPS before/after
    every print, so there's not really a need to directly issue the
    ReportLevels commands; you can just query the cached marker attributes
    directly via the CUPS API. Here's what my DS80 currently reports:

    Attribute marker-colors #00FFFF#FF00FF#FFFF00
    Attribute marker-levels 50
    Attribute marker-low-levels 10
    Attribute marker-high-levels 100
    Attribute marker-message 56 native prints remaining on 8x12 media
    Attribute marker-names 8x12
    Attribute marker-types ribbonWax
    Attribute marker-change-time 1620578750

     
    • kk123

      kk123 - 2021-05-19

      Hi Solomon

      Thank you for your response.

      If there is no cupsCommands keyword in the PPD, why do you assume this
      functionality exists at all?

      I see a "commandtodnp" filter available on MAC for the DNP DS620 driver, so I was wondering if there was an available filter I needed to be using with gutenprint.

      Incidently, all of this information is already sent to CUPS before/after
      every print, so there's not really a need to directly issue the
      ReportLevels commands;

      The reason I was looking at using cupsCommands to report levels was mainly for the printer online/offline status. We need to know if the printer is actually connected, and the only way (that I could find) to discover this without prints being fired, was using a cupsCommand print job. The same problem exists if the ribbon or media is removed, we don't know that unless a print is actually fired. I was hoping to find that out in advance by using the cups commands.

      But if you manually add this to your PPD, level reporting should work:
      % Level reporting
      cupsCommands: "ReportLevels"
      cupsFilter: "application/vnd.cups-command 100 gutenprint53+usb"
      %

      I tried using the gutenprint53+usb , but it is a backend, rather than a filter, and the job fails since it can't find the filter in /usr/lib/cups/filter. Would copying it in the /usr/lib/cups/filter be a good idea? I am not sure about that, it might affect something else?

      Thank you.

      Regards,
      Karthika

       
      • Solomon Peachy

        Solomon Peachy - 2021-05-20

        On Wed, May 19, 2021 at 11:20:07PM -0000, kk123 wrote:

        I see a "commandtodnp" filter available on MAC for the DNP DS620 driver, so I was wondering if there was an available filter I needed to be using with gutenprint.

        That's supplied by DNP and unfortunately has nothing to do with
        Gutenprint.

        The reason I was looking at using cupsCommands to report levels was
        mainly for the printer online/offline status. We need to know if the
        printer is actually connected, and the only way (that I could find) to
        discover this without prints being fired, was using a cupsCommand
        print job. The same problem exists if the ribbon or media is removed,
        we don't know that unless a print is actually fired. I was hoping to
        find that out in advance by using the cups commands.

        If you're trying to run this on the machine that has the actual printer
        connected, the backend executable has extensive reporting/status
        capabilities.

        $ BACKEND=dnp-ds80 /usr/lib/cups/backend/gutenprint53+usb -sin
        INFO: Printer Status: Idle (0)
        INFO: Prints remaining in job: 0
        INFO: Free Buffers: 2
        INFO: Media Type: 8x12
        INFO: Native Prints Available on New Media: 110
        INFO: Native Prints Remaining on Media: 55
        INFO: Half-Size Prints Remaining on Media: 55
        INFO: Model: DS80
        INFO: Serial Number: DS8Y0B007359
        INFO: Firmware Version: DS80 1.30
        INFO: Media Color Offset: Y 10 M 10 C 10 L 10
        INFO: Media Class: 1
        INFO: Media Lot Code: 37YGP891
        INFO: Media ID: 0
        INFO: Ribbon ID: 0000
        INFO: 300 DPI Color Data (SD): DS80_300_0130.CWD (FC36)
        INFO: 600 DPI Color Data (SD): DS80_600_0130.CWD (8D66)
        INFO: Lifetime Counter: 9005
        INFO: A Counter: 153
        INFO: B Counter: 8992
        INFO: P Counter: 0
        INFO: M Counter: 53
        INFO: Matte Counter: 53

        Alternatively, a more generic subset of the data can be returned via JSON:

        $ BACKEND_STATS_ONLY=2 BACKEND=dnp-ds80 /usr/lib/cups/backend/gutenprint53+usb
        {
        "backend": "DNP DS-series / Citizen C-series",
        "version": "0.113 / 0.137-dnp3",
        "timestamp": "2021-05-19 21:02:54",
        "manufacturer": "Dai Nippon Printing",
        "model": "DS80",
        "serial": "DS8Y0B007359",
        "firmware": "DS80 1.30",
        "decks": {
        "Roll": {
        "status": "Idle",
        "mediatype": "8x12",
        "medialevel": "OK",
        "medialevelnow": 55,
        "medialevelmax": 110,
        "counters": {
        "lifetime": 9005
        }
        }
        }
        }

        (You'll want to add SERIAL=.... if you have more than one printer in the system)

        If the printer is unplugged or off, the command will error out, but
        otherwise the status/state lines will report whatever the printer says
        is going on.

        I tried using the gutenprint53+usb , but it is a backend, rather than a filter, and the job fails since it can't find the filter in /usr/lib/cups/filter. Would copying it in the /usr/lib/cups/filter be a good idea? I am not sure about that, it might affect something else?

        Symlink it over. :)

        • Solomon
         
        • kk123

          kk123 - 2021-05-20

          Hi Solomon

          Thank you for the detailed post, it is extremely helpful to see all these printer details coming directly from the backend.

          I can see the levels instantly using the backend command you shared!!
          I did try using the gutenprint53+usb backend as the filter, but I couldn't see the ReportLevels updated (I'm checking the printer-state-reason and marker levels in the printers.conf after running the cups command job).

          I am trying to find a printer device/model independent way of checking printer on/off status and marker levels, and I thought printing a CUPS command job would facilitate that. I am doing this from an application (java) - that has access to the printer state from CUPS. If you do have thoughts about how I can check the printer status and marker levels independent of the printer model, it would be great to hear them!

          Thank you so much, appreciate your quick response!

          Karthika

           

          Last edit: kk123 2021-05-20
          • Solomon Peachy

            Solomon Peachy - 2021-08-17

            Did you ever try pasting this into your PPD?

            % Level reporting
            cupsCommands: "ReportLevels"
            cupsFilter: "application/vnd.cups-command 100 gutenprint53+usb"
            %

            (and yes, you can just copy or symlink the backend binary over to the filters directory)

             
  • Robert Krawitz

    Robert Krawitz - 2021-05-19

    Ticket moved from /p/gimp-print/bugs/730/

     
  • Robert Krawitz

    Robert Krawitz - 2021-05-19
    • Group: 5.3-fixed -->
     
  • Robert Krawitz

    Robert Krawitz - 2021-05-19

    Recategorizing as feature request.

     

Log in to post a comment.