[sane-devel] PF 1800 AFL driver

Marcel Sereboff msereboff at gmail.com
Sun Nov 1 21:58:17 GMT 2026


Hi Ralph,

Thanks for the replies. I had Claude compare the 1800 AFL with the three
backends you mentioned, reading their source and the sane-mustek-sq113
HARDWARE.md.

The protocol write-up you asked for is already public:
https://github.com/Pr0fB0ff/primefilm-1800afl/blob/main/docs/protocol.md

For the 1800 AFL, a new backend is the right eventual home, with the
protocol document and an entry in unsupported.desc as the first step. I
have an entry ready. Shall I open a merge request for it?

mustek_usb2 and sane-mustek-sq113: clearly related at the transport level,
but not the same register file.

The same on both:

Open handshake 64 65 44 45 and close 64 65 16 17, through wValue 0x90.
wValue 0xB0 writes register/value pairs, and 0x07 reads a value back.
wValue 0x02 and 0x03 announce a bulk write and a bulk read, and 0xC0 is
part of clearing the FIFO.
Status is multiplexed behind register 0x8B.
Different on the 1800 AFL:

bRequest is 0x0C for one byte and 0x04 for more, not 0x01, and wLength
varies (no fixed 4 bytes with doubled pairs).
A read is selected with wValue 0xB0, not 0x04.
The bulk byte count goes in wIndex, with no size in registers 0x7C-0x7F.
USB 1.1 rather than USB 2.0.
The registers themselves. Register 0x90 sets the data format here (on the
SQ113 it is lamp PWM), a scan starts with 0xBE rather than 0xF3/0xF4, the
motor is at 0x80-0x89 rather than 0xE0-0xFE, RAM addresses are at 0xB0-0xB5
rather than 0xA0-0xA5, and banks go through 0x83 rather than 0x5F.
The front end looks like a Wolfson WM8196/WM8199 rather than an AD9826.
So I read it as a sibling of the SQ113, probably an older USB 1.1 part,
with a framing layer that could be shared but scan code that could not. The
name of the chip is still unknown. mustek_usb2 reads the string "ESCAN01"
through status selectors 0x19-0x1F, so I tried those on my unit, and it
does not identify itself that way. On this chip the selector goes in
register 0x97, and selectors 0x10-0x1F only mirror 0x00-0x0F, so 0x19-0x1F
return the same sensor and status bytes as 0x09-0x0F, with no string. That
is one more small difference from the SQ113. Selectors 6 and 7 change
between reads, which looks like a running counter.

pieusb: nothing in common beyond the bRequest values. It tunnels SCSI
commands over IEEE-1284-style port writes, and the 1800 AFL has no SCSI
layer. Its 05e3:0145 is, though, the ID the Pacific Image installer lists
for the PF7250U.

Your 1800U and PF3600 Pro: these may be a different family from mine.
Pacific Image's software splits into separate hardware libraries by model.
The one for the PrimeFilm 1800U accepts only 05e3:0120 and talks to it with
Genesys-style requests: bRequest 0x0C/0x04, wValue 0x83 to select a
register, 0x85 to write it, 0x84 to read it, which are the constants in
SANE's genesys/low.h. That comes from reading the software, as I have no
1800U to try it on. If your unit answers those requests, the genesys
backend may be the closer starting point. It would also be a useful test of
why your PF3600 Pro reports the same ID, whether by a wrong firmware load
or by sharing the 1800U's electronics. My 1800 AFL stalls on those same
requests.

Thanks,

Marcel + Clanker

On Sun, Nov 1, 2026 at 12:04 PM Ralph Little <skelband at gmail.com> wrote:

> Hi,
> Further to my previous reply, we also have the mustek-usb2 backend that
> supports SQ113 chips which may be somewhat related.
> Someone recently posted here about another SQ113 based driver which you
> might also check out: https://gitlab.com/jayanderson0/sane-mustek-sq113
>
> Cheers,
> Ralph
>
> On 2026-11-01 11:34, Marcel Sereboff wrote:
> > Hello,
> > a
> > I while ago I bought a Pacific Image PrimeFilm 1800 AFL and got the
> > clanker working on building a driver for it. Things are going well and
> > I have something now that works, and handles greyscale at least as
> > well as what the factory wrote. This is a film scanner and I do not do
> > much color photography. Please let me know if this is useful to you
> > and if I can do more work with this machine to advance your project.
> >
> > From the clanker...
> >
> > Over the past weeks I have reverse engineered its protocol from the
> > vendor's Windows driver DLLs and checked each step on my unit. The
> > result is a working userspace driver in Python (pyusb/libusb). It
> > scans slides and whole film strips, feeding the strip frame by frame,
> > at 1800 dpi in 8 or 16 bits (12 of them significant). I would like to
> > make this useful to other owners and to SANE, and I'd welcome advice
> > on the best way to do that.
> >
> > The device
> >
> > USB 2770:0119, product string "AFL Film Scanner", USB 1.1 full speed,
> > vendor class, bulk IN 0x81, bulk OUT 0x02, interrupt IN 0x83.
> > The vendor's INF for this model (1800aflscan.inf) also lists
> > 2770:011a, 2770:011b, 05da:00cd and 1606:f000, which may be related
> units.
> > It uses the "SQ" ASIC stack from the vendor software (SQ_SCAN.DLL,
> > IO_PORT.DLL, FVC.DLL): a parallel-port-style (SPP/EPP) register
> > interface carried over USB vendor control transfers. It does not speak
> > the Genesys protocol (the register requests stall).
> > What works (checked on the hardware)
> >
> > Open handshake, chip init, lamp, carriage moves, status and film sensors.
> > MCU commands: lens position, firmware version, film feed and eject.
> > 8- and 16-bit scans in colour and in a fast mono mode (one channel,
> > about twice the line rate), plus a 300 dpi preview mode.
> > Flat-field correction, front-end gain picked from open light or from
> > the film, and autofocus.
> > Strip transport: frames are placed closed-loop from the sprocket holes
> > and the gap between frames. I checked this along a whole uncut
> > 36-exposure roll, together with rewind and the end-of-strip detection.
> > Not done: colour negative handling (orange mask, gains), and testing
> > on any unit other than mine. Units seem to differ in feed slack, so
> > the strip feeding has deliberately wide tolerances.
> >
> > What I can offer
> >
> > A protocol write-up, also at the link below: the register map as far
> > as known, the scan setup sequences, the sensor and status bits, the
> > film feed commands, and a list of gotchas (for example, drive register
> > 0xCF must be 0x0C, or every line comes back as one flat signal). The
> > write-up comes from my own notes and live runs. It contains no vendor
> > code.
> > The Python driver, published at the link below (GPL-2.0-or-later).
> > Possibly, later, a SANE backend in C. The strip feeder seems to fit an
> > ADF-style source, one image per frame with scanimage --batch.
> > My questions
> >
> > Would you prefer a new backend, or to start with a link to the
> > protocol notes and the external driver (for example, an entry in the
> > unsupported devices list)?
> > Is there an existing backend for this SQ / Faraday-bridge chip family
> > that I have missed, which this work could extend instead?
> > Is anyone else on the list using a PrimeFilm 1800 AFL or one of the
> > related IDs above? Testing on a second unit would help a lot.
> > Code and notes: https://github.com/Pr0fB0ff/primefilm-1800afl
> >
> > Thanks,
> >
> > Marcel Sereboff + Clanker
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20261101/a8f69f79/attachment.htm>


More information about the sane-devel mailing list