Loading
avision: add support for the HP ScanJet Pro 3000 s2
The ScanJet Pro 3000 s2 (03f0:3e05) speaks the Avision protocol, but needs a few departures from what its INQUIRY reports:
- The command channel is the second bulk endpoint pair. sanei_usb keeps the first pair it finds and ignores the rest, which leaves the backend talking to an endpoint the device never answers on, so the addresses are set explicitly after opening (AV_USE_2ND_BULK_EP). Bulk 0x07/0x87 are silent; 0x02/0x82 work.
- It sets the "detect accessories" inquiry bit but answers the corresponding READ with status only and no data, so the existing AV_NO_DETECT_ACCESSORIES is used to skip it.
- It transfers 32 lines per side per stripe while its ASIC id falls in the range avision maps to a 16-line stripe. With the wrong stripe size the duplex deinterlacer splits every physical stripe down the middle and mixes both sides into both output pages (AV_READ_STRIPE_32).
- The ADF returns a horizontally mirrored image without setting the corresponding inquiry bit (AV_ADF_MIRRORS_IMAGE).
- Below its native optical resolution it returns the pixels of each line round-robin from three sensor segments, so reading a line straight through interleaves three parts of the page and shows up as a fine comb through the lettering. The segments are regrouped before the rest of the post-processing (AV_COLUMN_INTERLEAVED_3). The line does not have to divide evenly between the segments: at 300 dpi it is 2548 pixels, which splits 850/849/849. Native-resolution scans are not affected.
The front panel scan and cancel buttons are exposed as sensor options so scanbd can start a scan from the button. Presses are latched, so polling the message option cannot swallow them.
All development was based on data from USB wireshark captures of the WIA driver's communication with the scanner.
Tested on the device: 150, 200, 300 and 600 dpi color, simplex and ADF duplex, and driving a duplex scan from the front panel buttons via scanbd. Both scan and cancel buttons work.
Co-Authored-By: Claude Opus 5 noreply@anthropic.com
Edited by Erik Pitti