[cups.general] How to send jobs to a SCSI printer with cups?

Mike Fedyk mfedyk at matchmail.com
Fri Sep 10 16:13:02 PDT 2004


Mike Fedyk wrote:

> Mike Fedyk wrote:
>
>> Michael Sweet wrote:
>>
>>> Mike Fedyk wrote:
>>>
>>>> What can I do to find what commands are having trouble with the 
>>>> scsi printer?
>>>
>>>
>>>
>>>
>>> There is only one command we issue, the group 0 print command,
>>> along with the total number of bytes in the current buffer (8k in
>>> the current implementation).
>>
>>
>>
>> Is that a 6 byte or 10 byte command?
>>
>> Trying to find more info about the device with sg3-utils, it looks 
>> like it doesn't like 6 byte scsi commands.
>
Is this right?

In scsi-linux.c at line 185:

      scsi_cmd[0] = 0x0a;       /* Group 0 print command */
      scsi_cmd[1] = 0x00;
      scsi_cmd[2] = bytes / 65536;
      scsi_cmd[3] = bytes / 256;
      scsi_cmd[4] = bytes;
      scsi_cmd[5] = 0x00;

According to [1], the format should be

Operation code (0Ah)
LUN
MSB
Transfer Length
LSB
Control

I don't know if the linux scsi stack changes the orders of the fields 
though...

[1]
http://www.danbbs.dk/~dino/SCSI/SCSI2-11.html





More information about the cups mailing list