Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Kyocera Bad line from "snmp" #3413

Closed
Closed

Description

@michaelrsweet

Version: 1.4.1
CUPS.org User: HWJarausch

Using any Kyocera (4 models here at least) via IPP doesn't work.
Trying to add a new printer gives

E [09/Nov/2009:10:38:11 +0100] [cups-deviced] Bad line from "nxsmb": Warning: Not using nxredir library. The DEVICE_URI is not in the right format.
E [09/Nov/2009:10:38:11 +0100] [cups-deviced] PID 31540 (nxsmb) stopped with status 126!
E [09/Nov/2009:10:38:13 +0100] [cups-deviced] Bad line from "snmp": network "Kyocera FS-4000DN" "FS-4000DN" "ID:FS-4000DN;MFG:Kyocera;CMD:PCLXL,PostScript Emulation,PCL5E,PJL;MDL:FS-4000DN;CLS:PRINTER;DES:Kyocera FS-4000DN;" ""

in /var/log/cups/error_log

The relevant part of snmp.log is

DEBUG: 0.002 Received data from 134.130.161.225...
DEBUG: community="public"
DEBUG: request-id=1
DEBUG: error-status=0
DEBUG: add_cache(addr=0x7fff3fcd7de8, addrname="134.130.161.225", uri="(null)", id="(null)", make_and_model="(null)")
DEBUG: OUT Hex Dump (43 bytes):
DEBUG: OUT 0000: 30 29 02 01 00 04 06 70 75 62 6c 69 63 a0 1c 02 0).....public...
DEBUG: OUT 0010: 01 02 02 01 00 02 01 00 30 11 30 0f 06 0b 2b 06 ........0.0...+.
DEBUG: OUT 0020: 01 02 01 19 03 02 01 03 01 05 00 ...........
DEBUG: OUT Message:
DEBUG: OUT SEQUENCE 41 bytes
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT OCTET STRING 6 bytes "public"
DEBUG: OUT Get-Request-PDU 28 bytes
DEBUG: OUT INTEGER 1 bytes 2
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT SEQUENCE 17 bytes
DEBUG: OUT SEQUENCE 15 bytes
DEBUG: OUT OID 11 bytes .1.3.6.1.2.1.25.3.2.1.3.1
DEBUG: OUT NULL VALUE 0 bytes
DEBUG: OUT Hex Dump (47 bytes):
DEBUG: OUT 0000: 30 2d 02 01 00 04 06 70 75 62 6c 69 63 a0 20 02 0-.....public. .
DEBUG: OUT 0010: 01 04 02 01 00 02 01 00 30 15 30 13 06 0f 2b 06 ........0.0...+.
DEBUG: OUT 0020: 01 04 01 95 0b 01 02 01 02 01 01 03 01 05 00 ...............
DEBUG: OUT Message:
DEBUG: OUT SEQUENCE 45 bytes
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT OCTET STRING 6 bytes "public"
DEBUG: OUT Get-Request-PDU 32 bytes
DEBUG: OUT INTEGER 1 bytes 4
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT SEQUENCE 21 bytes
DEBUG: OUT SEQUENCE 19 bytes
DEBUG: OUT OID 15 bytes .1.3.6.1.4.1.2699.1.2.1.2.1.1.3.1
DEBUG: OUT NULL VALUE 0 bytes
DEBUG: OUT Hex Dump (48 bytes):
DEBUG: OUT 0000: 30 2e 02 01 00 04 06 70 75 62 6c 69 63 a0 21 02 0......public.!.
DEBUG: OUT 0010: 01 05 02 01 00 02 01 00 30 16 30 14 06 10 2b 06 ........0.0...+.
DEBUG: OUT 0020: 01 04 01 95 0b 01 02 01 03 01 01 04 01 01 05 00 ................
DEBUG: OUT Message:
DEBUG: OUT SEQUENCE 46 bytes
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT OCTET STRING 6 bytes "public"
DEBUG: OUT Get-Request-PDU 33 bytes
DEBUG: OUT INTEGER 1 bytes 5
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT SEQUENCE 22 bytes
DEBUG: OUT SEQUENCE 20 bytes
DEBUG: OUT OID 16 bytes .1.3.6.1.4.1.2699.1.2.1.3.1.1.4.1.1
DEBUG: OUT NULL VALUE 0 bytes
DEBUG: OUT Hex Dump (40 bytes):
DEBUG: OUT 0000: 30 26 02 01 00 04 06 70 75 62 6c 69 63 a0 19 02 0&.....public...
DEBUG: OUT 0010: 01 03 02 01 00 02 01 00 30 0e 30 0c 06 08 2b 06 ........0.0...+.
DEBUG: OUT 0020: 01 02 01 01 06 00 05 00 ........
DEBUG: OUT Message:
DEBUG: OUT SEQUENCE 38 bytes
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT OCTET STRING 6 bytes "public"
DEBUG: OUT Get-Request-PDU 25 bytes
DEBUG: OUT INTEGER 1 bytes 3
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT SEQUENCE 14 bytes
DEBUG: OUT SEQUENCE 12 bytes
DEBUG: OUT OID 8 bytes .1.3.6.1.2.1.1.6.0
DEBUG: OUT NULL VALUE 0 bytes
DEBUG: OUT Hex Dump (45 bytes):
DEBUG: OUT 0000: 30 2b 02 01 00 04 06 70 75 62 6c 69 63 a0 1e 02 0+.....public...
DEBUG: OUT 0010: 01 06 02 01 00 02 01 00 30 13 30 11 06 0d 2b 06 ........0.0...+.
DEBUG: OUT 0020: 01 04 01 85 01 02 01 02 01 02 01 05 00 .............
DEBUG: OUT Message:
DEBUG: OUT SEQUENCE 43 bytes
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT OCTET STRING 6 bytes "public"
DEBUG: OUT Get-Request-PDU 30 bytes
DEBUG: OUT INTEGER 1 bytes 6
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT SEQUENCE 19 bytes
DEBUG: OUT SEQUENCE 17 bytes
DEBUG: OUT OID 13 bytes .1.3.6.1.4.1.641.2.1.2.1.2.1
DEBUG: OUT NULL VALUE 0 bytes
DEBUG: OUT Hex Dump (48 bytes):
DEBUG: OUT 0000: 30 2e 02 01 00 04 06 70 75 62 6c 69 63 a0 21 02 0......public.!.
DEBUG: OUT 0010: 01 06 02 01 00 02 01 00 30 16 30 14 06 10 2b 06 ........0.0...+.
DEBUG: OUT 0020: 01 04 01 85 22 d5 12 64 02 01 02 01 02 01 05 00 ...."..d........
DEBUG: OUT Message:
DEBUG: OUT SEQUENCE 46 bytes
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT OCTET STRING 6 bytes "public"
DEBUG: OUT Get-Request-PDU 33 bytes
DEBUG: OUT INTEGER 1 bytes 6
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT SEQUENCE 22 bytes
DEBUG: OUT SEQUENCE 20 bytes
DEBUG: OUT OID 16 bytes .1.3.6.1.4.1.674.10898.100.2.1.2.1.2.1
DEBUG: OUT NULL VALUE 0 bytes
DEBUG: OUT Hex Dump (45 bytes):
DEBUG: OUT 0000: 30 2b 02 01 00 04 06 70 75 62 6c 69 63 a0 1e 02 0+.....public...
DEBUG: OUT 0010: 01 05 02 01 00 02 01 00 30 13 30 11 06 0d 2b 06 ........0.0...+.
DEBUG: OUT 0020: 01 04 01 85 01 02 01 02 01 03 01 05 00 .............
DEBUG: OUT Message:
DEBUG: OUT SEQUENCE 43 bytes
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT OCTET STRING 6 bytes "public"
DEBUG: OUT Get-Request-PDU 30 bytes
DEBUG: OUT INTEGER 1 bytes 5
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT SEQUENCE 19 bytes
DEBUG: OUT SEQUENCE 17 bytes
DEBUG: OUT OID 13 bytes .1.3.6.1.4.1.641.2.1.2.1.3.1
DEBUG: OUT NULL VALUE 0 bytes
DEBUG: OUT Hex Dump (45 bytes):
DEBUG: OUT 0000: 30 2b 02 01 00 04 06 70 75 62 6c 69 63 a0 1e 02 0+.....public...
DEBUG: OUT 0010: 01 06 02 01 00 02 01 00 30 13 30 11 06 0d 2b 06 ........0.0...+.
DEBUG: OUT 0020: 01 04 01 81 00 02 01 03 01 02 00 05 00 .............
DEBUG: OUT Message:
DEBUG: OUT SEQUENCE 43 bytes
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT OCTET STRING 6 bytes "public"
DEBUG: OUT Get-Request-PDU 30 bytes
DEBUG: OUT INTEGER 1 bytes 6
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT INTEGER 1 bytes 0
DEBUG: OUT SEQUENCE 19 bytes
DEBUG: OUT SEQUENCE 17 bytes
DEBUG: OUT OID 13 bytes .1.3.6.1.4.1.128.2.1.3.1.2.0
DEBUG: OUT NULL VALUE 0 bytes
DEBUG: IN Hex Dump (43 bytes):
DEBUG: IN 0000: 30 29 02 01 00 04 06 70 75 62 6c 69 63 a2 1c 02 0).....public...
DEBUG: IN 0010: 01 01 02 01 02 02 01 01 30 11 30 0f 06 0b 2b 06 ........0.0...+.
DEBUG: IN 0020: 01 02 01 19 03 02 01 02 01 05 00 ...........
DEBUG: IN Message:
DEBUG: IN SEQUENCE 41 bytes
DEBUG: IN INTEGER 1 bytes 0
DEBUG: IN OCTET STRING 6 bytes "public"
DEBUG: IN Get-Response-PDU 28 bytes
DEBUG: IN INTEGER 1 bytes 1
DEBUG: IN INTEGER 1 bytes 2
DEBUG: IN INTEGER 1 bytes 1
DEBUG: IN SEQUENCE 17 bytes
DEBUG: IN SEQUENCE 15 bytes
DEBUG: IN OID 11 bytes .1.3.6.1.2.1.25.3.2.1.2.1
DEBUG: IN NULL VALUE 0 bytes

The very same printer cooperates with cups-1.3.11 just fine.

Activity

  1. michaelrsweet commented on Nov 9, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    P2 - not release critical.

    If you can, please provide the snmp output from a 1.3.11 system so we can compare, thanks!

  2. michaelrsweet commented on Nov 10, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: HWJarausch

    Here the output of the SNMP log unter CUPS-1.3.11 (only parts concerning the IP 134.130.161.225)

    DEBUG: 0.001 Received 55 bytes from 134.130.161.225...
    DEBUG: community="public"
    DEBUG: request-id=1257855984
    DEBUG: error-status=0
    DEBUG: SEQUENCE 53 bytes
    DEBUG: INTEGER 1 bytes 0
    DEBUG: OCTET STRING 6 bytes "public"
    DEBUG: Get-Response-PDU 40 bytes
    DEBUG: INTEGER 4 bytes 1257855984
    DEBUG: INTEGER 1 bytes 0
    DEBUG: INTEGER 1 bytes 0
    DEBUG: SEQUENCE 26 bytes
    DEBUG: SEQUENCE 24 bytes
    DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.2.1
    DEBUG: OID 9 bytes .1.3.6.1.2.1.25.3.1.5
    DEBUG: add_cache(addr=0x7fff5283a120, addrname="134.130.161.225", uri="(null)", id="(null)", make_and_model="(null)")
    DEBUG: 0.001 Sending 46 bytes to 134.130.161.225...
    DEBUG: SEQUENCE 44 bytes
    DEBUG: INTEGER 1 bytes 0
    DEBUG: OCTET STRING 6 bytes "public"
    DEBUG: Get-Request-PDU 31 bytes
    DEBUG: INTEGER 4 bytes 1257855985
    DEBUG: INTEGER 1 bytes 0
    DEBUG: INTEGER 1 bytes 0
    DEBUG: SEQUENCE 17 bytes
    DEBUG: SEQUENCE 15 bytes
    DEBUG: OID 11 bytes .1.3.6.1.2.1.25.3.2.1.3.1
    DEBUG: NULL VALUE 0 bytes

  3. michaelrsweet commented on Nov 16, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: HWJarausch

    The same with CUPS-1.4.2 (unfortunately).

  4. michaelrsweet commented on Dec 3, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: twaugh.redhat

    Please see https://bugzilla.redhat.com/show_bug.cgi?id=542857#c13 for a more complete debug log.

    I think there are two problems:

    1. Some Lexmark printers seem to return a value of "" for the URI OID
    2. snmp.c uses the wrong request ID for the Lexmark-specific Device ID reuqest, so that even if we got a correct device URI it would get over-written with a Device ID.
  5. michaelrsweet commented on Dec 3, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: twaugh.redhat

    I've attached the patch I'm going to try out.

  6. michaelrsweet commented on Dec 4, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: HWJarausch

    This fixes only part of the problem.
    My Kyocera printer is now detected but on via
    socket:// and not via IPP:// (as was the case with cups-1.3)
    Furthermore I cannot print a testpage of a ascii text on it.
    (On a local HP printer everything works just fine with this CUPS-1.4.2)
    The error message
    Unsupported format 'application/vnd.cups-command'!
    can hardly be true.

    My error log contains (lots of)
    E [04/Dec/2009:10:19:03 +0100] [cups-deviced] Bad line from "nxsmb": Warning: Not using nxredir library. The DEVICE_URI is not in the right format.
    E [04/Dec/2009:10:19:03 +0100] [cups-deviced] PID 4718 (nxsmb) stopped with status 126!

    Furthermore I cannot set options like duplex printing anymore.

    So it still looks completely broken!
    What a pity!

  7. michaelrsweet commented on Dec 8, 2009

    @michaelrsweet
    ContributorAuthor

    CUPS.org User: mike

    Fixed in Subversion repository.

    Tim - I updated your patch...

    Helmut - we stopped auto-detecting IPP printers because it caused some printers (including several Kyocera models) to lock up. Socket printing should work provided you have a valid driver.

  8. michaelrsweet commented on Dec 8, 2009

    @michaelrsweet
    ContributorAuthor

    "0001-Fixes-for-SNMP-scanning-with-Lexmark-printers.patch":

    From 9088cde207a49f2d32090e40b86c37dde47be674 Mon Sep 17 00:00:00 2001
    From: Tim Waugh twaugh@redhat.com
    Date: Thu, 3 Dec 2009 09:58:54 +0000
    Subject: [PATCH] Fixes for SNMP scanning with Lexmark printers.

    • backend/snmp.c (read_snmp_response): Set the correct response ID in
      the LexmarkDeviceIdOID request. Use the most complete Device ID
      response. Don't use the empty string as a URI.

      backend/snmp.c | 17 +++++++++++++++--
      1 files changed, 15 insertions(+), 2 deletions(-)

    diff --git a/backend/snmp.c b/backend/snmp.c
    index d3a6a93..b9aedeb 100644
    --- a/backend/snmp.c
    +++ b/backend/snmp.c
    @@ -999,7 +999,7 @@ read_snmp_response(int fd) /* I - SNMP socket file descriptor */
    DEVICE_PRODUCT, LexmarkProductOID2);
    _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
    packet.community, CUPS_ASN1_GET_REQUEST,

    •          DEVICE_URI, LexmarkDeviceIdOID);
      
    •          DEVICE_ID, LexmarkDeviceIdOID);
      

      _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
      packet.community, CUPS_ASN1_GET_REQUEST,
      DEVICE_PRODUCT, XeroxProductOID);
      @@ -1064,7 +1064,19 @@ read_snmp_response(int fd) /* I - SNMP socket file descriptor */

      if (device->id)

    • {
      
    •   if (strlen (device->id) >
      
    •   strlen ((char *)packet.object_value.string.bytes))
      
    •   {
      
    •    /*
      
    •     \* The Device ID we already saw was more complete.
      
    •     */
      
    •     break;
      
    •   }
      
      • free(device->id);
    • }
      

      device->id = strdup((char *)packet.object_value.string.bytes);

    @@ -1107,7 +1119,8 @@ read_snmp_response(int fd) /* I - SNMP socket file descriptor */

     case DEVICE_URI :
    if (device && packet.object_type == CUPS_ASN1_OCTET_STRING &&
    
    •   !device->uri)
      
    •   !device->uri &&
      
    •   (char _)packet.object_value.string.bytes[0] != '\0')
      

      {
      /_

      * Update an existing cache entry...

      1.6.5.2

  9. michaelrsweet commented on Dec 8, 2009

    @michaelrsweet
    ContributorAuthor

    "str3413.patch":

    Index: backend/snmp.c

    --- backend/snmp.c (revision 8900)
    +++ backend/snmp.c (working copy)
    @@ -999,7 +999,7 @@
    DEVICE_PRODUCT, LexmarkProductOID2);
    _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
    packet.community, CUPS_ASN1_GET_REQUEST,

    •          DEVICE_URI, LexmarkDeviceIdOID);
      
    •          DEVICE_ID, LexmarkDeviceIdOID);
      

      _cupsSNMPWrite(fd, &(packet.address), CUPS_SNMP_VERSION_1,
      packet.community, CUPS_ASN1_GET_REQUEST,
      DEVICE_PRODUCT, XeroxProductOID);
      @@ -1054,7 +1054,9 @@
      break;

      case DEVICE_ID :

    • if (device && packet.object_type == CUPS_ASN1_OCTET_STRING)

    • if (device && packet.object_type == CUPS_ASN1_OCTET_STRING &&

    •   (!device->id ||
      
    •    strlen(device->id) < packet.object_value.string.num_bytes))
      

      {
      /*

      • Update an existing cache entry...
        @@ -1107,7 +1109,7 @@

        case DEVICE_URI :
        if (device && packet.object_type == CUPS_ASN1_OCTET_STRING &&

    •   !device->uri)
      
    •   !device->uri && packet.object_value.string.num_bytes > 0)
      

      {
      /*

      • Update an existing cache entry...
  10. added this to the Stable milestone on Mar 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions