On 05/12/21 14:45, Andrzej Szombierski via sane-devel wrote:
Hello everyone,
I got an old Lexmark X215 scanner/printer combo. The device is a
rebranded Samsung and it didn't take much to convince the xerox_mfp
backend to support it. I've made a preliminary patch (attached). I'm
posting it in case anyone else is interested in getting this ancient
device to work.
In case anyone would think it's a good idea to merge this, below is a
summary of the oddities of this device and my patch.
1. It seems quite confusing to me, but both the printer and the scanner
utilize the same set of BULK usb endpoints, on a Printer class
interface. So they are skipped by sanei_usb. And even if they weren't,
the interface is usually claimed by usblp.
2. To reduce interference with usblp, I've decided to utilize it instead
(or is there a better way?) So I've added a new transport
xerox_mfp-usblp. Instead of using sanei_usb (and libusb underneath),
data is sent directly to the usblp device. On startup, the usual paths
are searched for usblp devices (with vid/pid filtering to filter out
only the Lexmark). The code is unlikely to work under a non-Linux OS
3. The scanner doesn't support CMD_OBJECT_POSITION. The windows driver
doesn't send this command. I've added code to skip this command if the
device model matches "SAMSUNG/ORION" (yes, that's the model name sent by
the firmware).
4. On inquiry, the scanner returns zero values for maximum window height
(both AFP and manual values). I'm using the max_win_len value instead.
Let me know if you have any comments.
aloha Andrzej
now i'm just a kibitzing hack, but you should probably conditionally
bracket #include <unistd.h> with #ifdef HAVE_UNISTD_H.
then tweak configure(am,in) to check for asm/ioctls.h and
then conditionally include it. solaris 10 sparc has no such header,
but there is /usr/include/sys/ioctl.h. don't know what you are
doing with asm/ioctls.h but it is probably doable, possibly with
a lot of additional work, on most *nix like os'es.
maybe you could also include some of your text description of
the Lexmark X215/Samsung/ORION/xerox_mfp solution in a comment block
in xerox_mfp-usblp.c so future readers are aware of your approach.
just my couple of bytes
aloha
ras