HP 820Cse SCP protocol

Following is the probable specification for the SCP protocol on 820 printers. There seem to be minor differences with the 820Cxi printer, and the protocol header is changed for 720 series printers.

2Command specifier
2Command reference number
2Length of data
nData, including parameters to this command

Several of the commands are described below:

CS=35, CR=1 (INIT_COM ?)

This is some sort of initialization command. It probably initializes the communications channel, since it is always the first packet sent by the windows driver. It's data consists of 8 bytes that I have only seen as:

  00 00 01 F4 01 00 00 00

CS=101, CR=2 (INIT_DATA ?)

This is another initialization command. It is sent once at the beginning of each file printed, after the INIT_COM packet. It is preceded by a 4-byte VLink packet sent to channel 0. This suggests that it somehow initializes the data channel of the printer (thus our temporary name). This packet typically contains the values: DE AD BE EF. The data portion of this command usually contains the following 8 bytes:

  DE AD BE EF 02 00 00 00

CS=21, CR=1 (INIT_PAGE ?)

This command is sent each time before a page is loaded. It appears to set some parameters for the page, possibly the minimum and maximum horizontal positions for each of the four pens (?). The only data I have seen it contain is the following:

  28 2D 00 41 29 2E 00 42  29 2E 00 42 29 2E 00 42


This is the command that handles loading and ejecting of pages.

11=load, 2=eject
1?? usually 0x01
2usually 0x0960 (2400 decimal), perhaps the horizontal position to place the print-head while loading/ejecting the page. 2400 corresponds to 4" from the left, which is about the center of the page for 8.5" pages.


This is the print sweep command. It causes the print head to print a sweep of data (which has previously been sent over channel 0).

The PRINT_SWEEP command controls the print head while printing data on a page. It can take on two forms, one when printing with the black nozzles, and one when printing with the color nozzles. The black form is described in the most detail here, since it is what I have devoted the most attention to.

Following is the format of the first 48 bytes of data for this command:

1always 0x00
11 = compressed, 0 = not compressed
12 = left-to-right, 1 = right-to-left
11 = black, 0xE = CMY colors
4Compressed size of data
8Typically 0

4Signed number representing vertical position
2Usually 0x4650 (18000 decimal)
2Horizontal position for left margin in dots
2Horizontal position for right margin in dots
20x1C20 (7200) for black data or 0x2EE0 (12000) for color data
2Usually 0x0960 (2400)
2Usually 0x0100 - has something to do with horizontal placement

1If 0, this is the last sweep on the page; the next 12 bytes are ignored. Otherwise, this field predicts the print head direction for the next PRINT_SWEEP command
1Prediction of number of colors in next PRINT_SWEEP (0x01 or 0x0E)
4Vertical position of next sweep
2Horizontal position for left margin in next sweep
2Horizontal position for right margin in next sweep
2Predicts the third-to-last word (2-byte value) of the next sweep packet - 0x1C20 for black, 0x2EE0 for color
2Usually 0x0960 - predicts the second-to-last word of the next sweep packet
1Number of 16-byte rows to follow this header. This is 2 for black and 6 for CMY.

Following this header are sets of 16-byte rows to describe how to handle the nozzles. The odd nozzles are described by the first row, and the even nozzles are described by the second row.

2DPI (dots per inch) - 300 or 600
2Half of the total number of pins used
2Number of unused pins + 1
2First pin to start printing with, typically 1
2Half of the total number of pins used
2Left margin in dots. For black printing, this is always 0x62 greater for the odd pins (first set) than the even pins
2Right margin in dots.
1Some sort of delay before this set of nozzles starts firing. See code for more details.