[cups] Help wanted printing to a SCSI printer via an Adaptec SCSI Card 2910

Gernot Hassenpflug aikishugyo at gmail.com
Mon Apr 18 22:13:32 PDT 2016


On Tue, Apr 19, 2016 at 7:35 AM, Gernot Hassenpflug <aikishugyo at gmail.com>
wrote:

> On Tue, Apr 19, 2016 at 1:54 AM, Helge Blischke <helgeblischke at web.de>
> wrote:
>
>>
>> > Am 18.04.2016 um 17:16 schrieb Gernot Hassenpflug <aikishugyo at gmail.com
>> >:
>> >
>> > On Tue, Apr 19, 2016 at 12:12 AM, Till Kamppeter <
>> till.kamppeter at gmail.com>
>> > wrote:
>> >
>> >> On 04/18/2016 12:10 PM, Michael Sweet wrote:
>> >>
>> >>> I believe the SCSI backend was picked up by the cups-filters project.
>> >>> But I don't recall whether it worked with those printers or not... :/
>> >>>
>> >>
>> >> The scsi backend did not get into cups-filters, only the parallel and
>> >> serial backends made it to there.
>> >
>> >
>> > Thank you both of you for the replies. I see, if it was really only this
>> > one file I will see if I can compile it myself as a custom backend for
>> > experimental use.
>> > The goal is to enable people with these printers to migrate from their
>> > older Macs to different OSes.
>> >
>> > Any other hints or things to keep in mind, please feel free to add, I'll
>> > post my results also.
>>
>> Hello Helge,
>
>
>> Instead of compiling the scsi.c cups backend (and  the scsi-linux.c if
>> needed), perhaps you
>> consider looking for USB to SCSI adapters for the respective hardware and
>> OS.
>> This because most of the deviations from the "standard USB protocol“ can
>> be handled
>> by the usb quirks approach provided by cups, but – from my (though a
>> couple of years old) experience
>> with SCSI – cards there are lots of vendor specific peculiarities with
>> SCSI controllers which sometimes
>> may be hard to represent by software.
>
>
> Thank you for the input, that would be a good consideration also, for a
> slightly different experiment (there are several variations I am
> considering).
> I am not sure it will fit with the current experiment: the driver in the
> old MacOS7 (guest system under Baslisk II) is a SCSI driver for the
> printer, so thought it will be simplest to have the device as a SCSI in the
> host linux system.
> Regards,
> Gernot Hassenpflug
>

Hello all,
Posting work so far.
First of all, happily so far, I compiled scsi.c (which includes
scsi-linux.c) out of tree in my local /home/<user>/src, after ascertaining
that various CUPS development packages were installed and that /usr/include
had all the necessary headers referenced in the source files.

Changes made to scsi.c:
1. cups/string.h appears to be private (Gmane archives), so changed to
string.h for out of tree compilation. Not sure if this is still the
recommended way to deal with this.
2. httpSeparate deprecated, so replaced with httpSeparateURI, with
requisite definitions for the differing parameters (most of which will not
be used it seems).
Reference: http://www.cups.org/documentation.php/doc-1.2/api-httpipp.html
 a. Added definition: http_uri_coding_t decoding
 b. Commented out: char method[255]
 c. Added: char scheme[8]
 d. Added: int schemelen,usernamelen,hostlen,resourcelen
 e. Call written as:
httpSeparateURI(decoding, argv[0], scheme, schemelen, username,
usernamelen, hostname, hostlen, &port, resource, resourcelen);

Thereafter, compilation at least worked, again according to the
instructions in the API reference:
gcc -o scsi scsi.c -lcups

Maybe if there is a use for the SCSI backend it could be included in the
cups-filters package, after further updating and standardization with the
latest backend style.

Related: I have SCSI host adapter in my PC (SCSI ID 7), but need to check
again (has been a year since I first hooked this up to test, and got
side-tracked) that the sg3 kernel driver correctly sees an ALPS MD-2000
(SCSI ID 6) attached to it, and that the parameters for the host adapter
are correct (16-bit or 32-bit operation, CRC32 on/off, BIOS settings for
interrupts, etc.).

Regards,
Gernot Hassenpflug



More information about the cups mailing list