Skip to content

Information in response to 0xA1A1 command #38

@mounaiban

Description

@mounaiban

I believe that we are closing in on the exact use of the 0xA1A1 command (dubbed CAPT_IDENT) but your help is needed to solve this mystery completely. 🕵️

If anyone has a CAPT printer and a few minutes to an hour to spare, maybe post your printer's 0xA1A1 response, along with the printer model name (and add-ons where applicable)?

I am especially looking for 0xA1A1 responses from CAPT printers with A3-size printing, colour printing, optional trays, network cards and also printers made 2003 and earlier.

Getting the 0xA1A1 response

The 0xA1A1 response may be obtained from several sources:

  • CUPS logs, if you are using captdriver (even if unsuccessfully):
    • Ensure that CUPS debug logging was turned on with cupsctl --debug-logging before the last print job. Debug logging may be switched off by running cupsctl --no-debug-logging. If you get a connection reset by peer error, try running the command again.
    • After attempting to print, successful or not, run grep -i -n6 "A1 A1" /var/log/cups/error_log to show only lines near the A1 A1 responses.
    • Try zcat /var/log/cups/error_log.2.gz | grep -i -n6 "A1 A1" - on older logs (error_log.2.gz and older) that have been automatically compressed.
  • Wireshark logs. If you haven't tried the CAPT dissector, maybe give it a go?
  • Your own program, e.g. use libusb to do a single bulk transfer of {0xA1, 0xA1, 0x04, 0x00} to the printer, read the printer and printf() the response and so on...

Thanks in advance for your help!

Details

This command appears to return some kind of autoconfiguration constant to set up printers without description files. @agalakhov has suggested in the SPECS file that it contains info about "printer capabilities". This information would have been useful to network printing managers, like Canon's NetSpot.

I think this string remains the same per model, but I am speculating that it may change if optional hardware is installed or removed. This may be a viable method of generating PPD files.

Response Format as Currently Known

The table below shows what I think the response contains. With your help, we can verify this information and find out the missing bits.

All 16-bit values are shown in big endian.

Scroll right on the table for more printers when viewing on a narrower or smaller screen.

Offset Variable LBP1120 LBP2900 LBP3000 LBP3010 LBP52001 LBP6000 LBP6020 LBP7010C LBP7200
0, 1 Opcode 41377 (0xA1A1) 41377 (0xA1A1) 41377 (0xA1A1) 41377 (0xA1A1) 41377 (0xA1A1) 41377 (0xA1A1) 41377 (0xA1A1) 41377 (0xA1A1) 41377 (0xA1A1)
2, 3 Reply Size 20 (0x0014) 56 (0x0038) 56 (0x0038) 64 (0x0040) 20 (0x0014) 64 (0x0040) 64 (0x0040) 64 (0x0040) 64 (0x0040)
4, 5 CAPT Version ID A(?) 768 (0x0300) 2816 (0x0B00) 2816 (0x0B00) 2816 (0x0B00) 768 (0x0300) 2816 (0x0B00) 2816 (0x0B00) 2816 (0x0B00) 2816 (0x0B00)
6, 7 Product ID(?) 221 (0x00DD) 10801 (0x2A31) 10800 (0x2A30) 2490 (0x09BA) 845 (0x034D) 2492 (0x09BC) 2493 (0x09BD) 3890 (0x0F32) 3530 (0x0DCA)
8, 9 Firmware Version(?) 1 (0x0001) 257 (0x0101) 2 (0x0002) 1 (0x0001) 1 (0x0001) 1 (0x0001) 257 (0x0101) 769 (0x0301) 257 (0x0101)
10, 11 Buffer Size 32767 (0x7FFF) 65520 (0xFFF0) 65520 (0xFFF0) 65520 (0xFFF0) 65520 (0xFFF0) 65520 (0xFFF0) 65520 (0xFFF0) 65520 (0xFFF0) 65520 (0xFFF0)
12, 13 Buffers2 16 (0x0010) 64 (0x0040) 64 (0x0040) 64 (0x0040) 256 (0x0100) 64 (0x0040) 256 (0x0100) 512 (0x0200) 512 (0x0200)
14, 15 Unknown B 0 (0x0000) 4 (0x0004) 4 (0x0004) 4 (0x0004) 144 (0x0090) 4 (0x0004) 4 (0x0004) 132 (0x0084) 422 (0x01A6)
16, 17 Unknown C 65535 (0xFFFF) 65 (0x0041) 64 (0x0040) 82 (0x0052) 59 (0x003B) 92 (0x005C) 103 (0x0067) 94 (0x005E) 83 (0x0053)
18, 19 Unknown D 1 (0x0001) 1 (0x0001) 1 (0x0001) 769 (0x0301) 1 (0x0001) 769 (0x0301) 769 (0x0301) 769 (0x0301) 62209 (0xF301)
20, 21 Max. Speed (pages/hour) -- 720 (0x02D0) 840 (0x0348) 840 (0x0348) -- 1080 (0x0438) 1080 (0x0438) 960 (0x03C0) 1200 (0x04B0)
22, 23 Unknown E -- 0 (0x0000) 0 (0x0000) 0 (0x0000) -- 0 (0x0000) 0 (0x0000) 0 (0x0000) 600 (0x0258)
24, 25 MP Tray Max. Width (x0.1 mm) -- 2159 (0x086F) 2159 (0x086F) 2159 (0x086F) -- 2159 (0x086F) 2159 (0x086F) 2159 (0x086F) 2159 (0x086F)
26, 27 Duplex Max. Width (x0.1 mm)3 -- 0 (0x0000) 0 (0x0000) 0 (0x0000) -- 0 (0x0000) 0 (0x0000) 0 (0x0000) 2159 (0x086F)
28, 29 MP Tray Max. Length (x0.1 mm) -- 3556 (0x0DE4) 3556 (0x0DE4) 3556 (0x0DE4) -- 3556 (0x0DE4) 3556 (0x0DE4) 3556 (0x0DE4) 3556 (0x0DE4)
30, 31 Unknown F -- 0 (0x0000) 0 (0x0000) 0 (0x0000) -- 0 (0x0000) 0 (0x0000) 0 (0x0000) 0 (0x0000)
32, 33 Duplex Max. Length (x0.1 mm) -- 0 (0x0000) 0 (0x0000) 0 (0x0000) -- 0 (0x0000) 0 (0x0000) 0 (0x0000) 3556 (0x0DE4)
34, 35 Unknown G -- 0 (0x0000) 0 (0x0000) 0 (0x0000) -- 0 (0x0000) 0 (0x0000) 0 (0x0000) 0 (0x0000)
36, 37 MPT Min. Width (x0.1 mm) -- 762 (0x02FA) 762 (0x02FA) 762 (0x02FA) -- 762 (0x02FA) 762 (0x02FA) 762 (0x02FA) 762 (0x02FA)
38, 39 Duplex Min. Width (x0.1 mm) -- 0 (0x0000) 0 (0x0000) 0 (0x0000) -- 0 (0x0000) 0 (0x0000) 0 (0x0000) 1820 (0x071C)
40, 41 MPT Min. Length (x0.1mm) -- 1270 (0x04F6) 1270 (0x04F6) 1270 (0x04F6) -- 1880 (0x0758) 1880 (0x0758) 1270 (0x04F6) 1270 (0x04F6)
42, 43 Duplex Min. Length (x0.1mm) -- 0 (0x0000) 0 (0x0000) 0 (0x0000) -- 0 (0x0000) 0 (0x0000) 0 (0x0000) 2570 (0x0A0A)
44 Top Non-printable Margin Thickness (x0.1mm) -- 40 (0x28) 40 (0x28) 50 (0x32) -- 50 (0x32) 50 (0x32) 50 (0x32) 50 (0x32)
45 Bottom Non-printable Margin Thickness (x0.1mm) -- 60 (0x3C) 60 (0x3C) 50 (0x32) -- 50 (0x32) 50 (0x32) 50 (0x32) 50 (0x32)
46 Left Non-printable Margin Thickness (x0.1mm) -- 50 (0x32) 50 (0x32) 50 (0x32) -- 50 (0x32) 50 (0x32) 50 (0x32) 50 (0x32)
47 Right Non-Printable Margin Thickness (x0.1mm) -- 50 (0x32) 50 (0x32) 50 (0x32) -- 50 (0x32) 50 (0x32) 50 (0x32) 50 (0x32)
48, 49 Horizontal Resolution (dpi) -- 600 (0x0258) 600 (0x0258) 600 (0x0258) -- 600 (0x0258) 600 (0x0258) 600 (0x0258) 600 (0x0258)
50, 51 Vertical Resolution (dpi)4 -- 600 (0x0258) 600 (0x0258) 600 (0x0258) -- 600 (0x0258) 600 (0x0258) 600 (0x0258) 600 (0x0258)
52 CAPT Protocol Version ID B -- 21 (0x15) 21 (0x15) 30 (0x1E) -- 30 (0x1E) 31 (0x1F) 30 (0x1E) 30 (0x1E)
53, 54 Print Engine Prototype(?)5 -- 515 (0x0203) 515 (0x0203) 1027 (0x0403) -- 1027 (0x0403) 1028 (0x0404) 1032 (0x0408) 1285 (0x0505)
55 Unknown I -- 2 (0x02) 0 (0x00) 0 (0x00) -- 0 (0x00) 0 (0x00) 0 (0x00) 0 (0x00)
56, 57 Unknown J -- -- -- 4182 (0x1056) -- 4096 (0x1000) 5120 (0x1400) 4221 (0x107D) 61440 (0xF000)
58, 59 Unknown K -- -- -- 0 (0x0000) -- 0 (0x0000) 2 (0x0002) 0 (0x0000) 0 (0x0000)
60, 61 Max Color Speed(?) (pages/hour)6 -- -- -- 0 (0x0000) -- 0 (0x0000) 0 (0x0000) 240 (0x00F0) 1200 (0x04B0)
62, 63 Unknown M -- -- -- 0 (0x0000) -- 0 (0x0000) 0 (0x0000) 0 (0x0000) 600 (0x0258)

Sources:
LBP2900: Issue #7 comment
LBP6000: mounaiban#11
LBP6020: mounaiban#22

Footnotes

  1. LBP5200 without optional tray and without network card

  2. The Canon LBP 1120 has 512KB of RAM and 32767B x 16 == 524272B which rounds up to 512KiB 🤓
    However, doing the same math the other devices results in a memory size twice as large as specified. LBP3000 is claimed to have 2MB, but 65,520B x 64 == 4,193,280B which rounds up to 4MiB. LBP7200 is claimed to have 16MB; 65,520B x 512 == 33,546,240B which rounds up to 32MiB.

  3. According to section F-21 of the LBP7200C User's Guide, only a select number of paper sizes are supported by the duplexer for auto 2-sided printing: B5 (182x257mm), Executive, A4, Letter, Foolscap, Legal (215.9x355.6mm). The largest of the select sizes was Legal, and the smallest was B5.

  4. X/Y resolution may be swapped, but it doesn't matter for now because X and Y-resolution is the same for all known devices

  5. My wild guess: print engine family? Models of the same family are documented by the same service manual. Examples: LBP2900 & 3000, LBP 3100 & 6000...

  6. Some devices have a (much) slower full-colour printing speed: e.g. LBP5200 uses a carousel to swap between four cartridges to dispense toner onto a transfer belt, making the imaging phase a four-pass process. This trades size and complexity for printing speed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions