1SANE and OpenBSD
2----------------
3
4Building:
5---------
6Don't forget to use GNU make (gmake). E.g. "MAKE=gmake ./configure".
7SANE should compile and install out-of-the-box.
8
9If some libraries and headers (like libjpeg) are installed in /usr/local/, adding
10"-I/usr/local/include/ -L/usr/local/lib/" to the CPPFLAGS environment variable
11before running configure may be necessary to get them detected.
12
13Since release 3.9, SANE is available from OpenBSD ports.
14
15SCSI-scanners:
16--------------
17SANE only supports the generic /dev/uk? devices. /dev/ss? won't work. If your
18scanner is detected by the ss driver, disable the driver with the "config"
19utility or compile a new kernel without ss. Set a link /dev/scanner to
20/dev/uk0 (or whatever you use) and/or edit your backend's config file
21appropriately. Don't forget to set up permissions to the device file correctly
22for access by a non-root user (read/write).
23
24USB-scanners:
25-------------
26USB-Scanners are supported in principle since OpenBSD 2.9. The USB scanner
27driver "uscanner" and access over libusb is supported.
28
29To get your scanner detected by the uscanner driver, it may be necessary to
30add its vendor and device ids to the kernel and recompile
31(sys/devs/usb/uscanner.c). With OpenBSD 3.0 there is also a bug concerning
32uscanner that prevents accessing the /dev/uscanner devices.  Get a newer
33kernel in this case. If your MAKEDEV won't make /dev/uscanner0 do it manually:
34"mknod /dev/uscanner0 c 77 0" for the first scanner. Edit your backend's
35configuration file appropriately.
36
37If you want to use libusb, your scanner should *not* be claimed by the
38uscanner driver. Also make sure that the ugen driver is NOT compiled with
39DIAGNOSTIC. If it is, you will get errors like "ugenioctl: USB_SET_TIMEOUT,
40no pipe". Make sure, that /dev/ugen* and /dev/usb* devices are available. Use
41/dev/MAKEDEV to create them, if necessary.
42
43For some backends you must use libusb. The uscanner driver won't work because
44automatic detection, control messages, or interrupt endpoints are needed.
45
46When using libusb, you need read/write permissions to ugen(4) (/dev/ugen*.*) and
47the usb(4) controller (/dev/usb*) your scanner is connected to.  Consider adding
48a group usb and setting the device permissions using the hotplugd(8) attach
49and detach scripts.  See tools/openbsd for an example.
50
51Parport-scanners:
52-----------------
53I don't have any information about these. Please contact me or the SANE mailing
54list if you succeeded in using one of these.
55
562005-12-23 Henning Meier-Geinitz <henning@meier-geinitz.de>
57