This commit adds some debug verbosity to the last committed sanei_usb.c patch
id 5b69fa8c6d
for fixing the choice of usb endpoints, in the sanei_usb_open() seek for endpoints loop.
Updated following files for Pixma MP730 support:
- backend/pixma_mp730.c:
Add width scan area fitting
Fix end scan sequence protocol
- sanei/sanei_usb.c:
In sanei_usb_open(), changed the "seek for endpoints" loop
so that it first looks for those interfaces (in config 0)
that have been detected as potential scanners in
sanei_usb_init()
patches have been applied yet, but it's a start. The backends
are not installed as shared libs but as add-ons, which are shared libs
but in a specific folder in [/system|~]/config/add-ons/ named SANE/.
The install target has been changed to account for this,
Some files don't exist in BeOS/ZETA (ipc.h, ...).
Bbackend function names get a prefix, I suppose to avoid namespace clashes.
Though we do have a libdl to implement dl_open, the native way is prefered.
Added a --with-docdir= configure arg.
BeOS has a broken get[name|addr]info() from bind. This is fixed in ZETA R1.
libtool needs -no-undefined. Various VPATH fixes.
Check for <be/drivers/USB_scanner.h>, but not used yet.
No S_IFSOCK (sockets are fds to /dev/net/api). Stub pio code, untested.
Patch from Francois Revol <revol@free.fr>.
-Detects endpoints for different configurations, interface and
altsetting numbers > 0
- Routine added for changing configuration, interface or altsetting
number
sanei_usb_set_configuration
sanei_usb_claim_interface
sanei_usb_release_interface
sanei_usb_set_altinterface
* sanei/sanei_usb.c configure.in: use usb_interrupt_read instead of
usb_bulk_read for sanei_usb_read_int. Fixes bug #300878. Added a missing DBG output in sanei_usb_read_int. Check for
usb_interrupt_read to make sure, we have at least version 0.1.8.
/** Initiate a interrupt transfer read.
*
* Read up to size bytes from the interrupt endpoint from the device to
* buffer. After the read, size contains the number of bytes actually read.
*
* @param dn device number
* @param buffer buffer to store read data in
* @param size size of the data
*
* @return
* - SANE_STATUS_GOOD - on succes
* - SANE_STATUS_EOF - if zero bytes have been read
* - SANE_STATUS_IO_ERROR - if an error occured during the read
* - SANE_STATUS_INVAL - on every other error
*
*/
sanei_usb_find_devices is called. Also only devices that really exist are
opened. These changes fixe the slow detection of devices on systems using
devfs or old scanner drivers.
interface number from bInterfaceNumber. Explicitely set the alternative
setting. When closing, call clear_halt, and reset_ep, and release_interface
explicitley. On errors in write/read, call clear_halt.
usb_find_busses only once. Make sure that already opened devices aren't opened
again. Exit libusb scan loop if one device is found. Make error values more
expressive. Check for missing config descriptors before using them to avoid
segfaults.
Henning Meier-Geinitz <henning@meier-geinitz.de>