Hi! Henning Meier-Geinitz wrote: > Hi, > > On Tue, Jul 19, 2005 at 06:51:04PM +0930, Paul Smedley wrote: >> Updated patch, along with patch for configure.in attached: > > Your code is in CVS now.
Thanks - some small changes in attached patch. Cheers, Paul. -------------- next part -------------- --- sanei_usb-cvs.c Mon Aug 8 01:36:04 2005 +++ sanei_usb.c Mon Aug 8 01:51:12 2005 @@ -70,7 +70,7 @@ #define MAX_RW 64000 static int usbcalls_timeout = 30 * 1000; /* 30 seconds */ USBHANDLE dh; -HEV UsbIrqStartHev; +PHEV pUsbIrqStartHev=NULL; static struct usb_descriptor_header *GetNextDescriptor( struct usb_descriptor_header *currHead, UCHAR *lastBytePtr) @@ -1066,11 +1066,11 @@ case USB_DT_INTERFACE: interface = (struct usb_interface_descriptor *) pDescHead; DBG (5, "Found %d endpoints\n",interface->bNumEndpoints); + DBG (5, "bAlternateSetting = %d\n",interface->bAlternateSetting); break; case USB_DT_ENDPOINT: endpoint = (struct usb_endpoint_descriptor*)pDescHead; address = endpoint->bEndpointAddress; - //address = endpoint->bEndpointAddress & USB_ENDPOINT_ADDRESS_MASK; direction = endpoint->bEndpointAddress & USB_ENDPOINT_DIR_MASK; transfer_type = endpoint->bmAttributes & USB_ENDPOINT_TYPE_MASK; /* save the endpoints we need later */ @@ -1208,7 +1208,7 @@ #ifdef HAVE_LIBUSB libusb_timeout = timeout; #else - DBG (1, "sanei_usb_close: libusb support missing\n"); + DBG (1, "sanei_usb_set_timeout: libusb support missing\n"); #endif /* HAVE_LIBUSB */ } @@ -1593,15 +1593,15 @@ #ifdef HAVE_USBCALLS int rc; USHORT usNumBytes=*size; - DBG (5, "Entered usbcalls UsbBulkWrite with dn = %d\n",dn); - DBG (5, "Entered usbcalls UsbBulkWrite with dh = %p\n",dh); - DBG (5, "Entered usbcalls UsbBulkWrite with int_in_ep = 0x%02x\n",devices[dn].int_in_ep); - DBG (5, "Entered usbcalls UsbBulkWrite with interface_nr = %d\n",devices[dn].interface_nr); - DBG (5, "Entered usbcalls UsbBulkWrite with bytes to read = %u\n",usNumBytes); + DBG (5, "Entered usbcalls UsbIrqStart with dn = %d\n",dn); + DBG (5, "Entered usbcalls UsbIrqStart with dh = %p\n",dh); + DBG (5, "Entered usbcalls UsbIrqStart with int_in_ep = 0x%02x\n",devices[dn].int_in_ep); + DBG (5, "Entered usbcalls UsbIrqStart with interface_nr = %d\n",devices[dn].interface_nr); + DBG (5, "Entered usbcalls UsbIrqStart with bytes to read = %u\n",usNumBytes); if (devices[dn].int_in_ep){ rc = UsbIrqStart (dh,devices[dn].int_in_ep,devices[dn].interface_nr, - usNumBytes, (char *) buffer, (HEV *) UsbIrqStartHev); + usNumBytes, (char *) buffer, pUsbIrqStartHev); DBG (5, "rc of UsbIrqStart = %d\n",rc); } else From si...@munton.demon.co.uk Sun Aug 7 22:20:19 2005 From: si...@munton.demon.co.uk (Simon Munton) Date: Sun Aug 7 22:20:30 2005 Subject: [sane-devel] Epson Perfection 2480 Photo: firmware loading In-Reply-To: <87br4aj7fy.fsf...@frigate.technologeek.org> References: <cb6387b505080403391f4ba...@mail.gmail.com> <200508071201.58025.oliver.schwa...@gmx.de> <87br4aj7fy.fsf...@frigate.technologeek.org> Message-ID: <200508072320.19699.si...@munton.demon.co.uk> On Sunday 07 August 2005 12:46 pm, Julien BLACHE wrote: > While speaking of the 2480, I used it with the epkowa backend > (requires evil non-free binary-only libraries), and did not have to > suffer the waiting time after the firmware loading. Would it be > possible to do something similar in the snapscan backend ? > > (something like a SANE daemon to automatically load firmwares into > scanners which need it, triggered by hotplug, would be a really nice > thing to have... shouldn't be too hard to do, but requires a snippet > of code for the firmware loading for each and every scanner...) > Here's something I use for this very purpose (attached): The shell script epson2480 and firmware.usermap go in /etc/hotplug/usb. Compile epson_loader.c with the following command: gcc -o epson_loader epson_loader.c -lusb (needs libusb) and put the executable in /usr/bin (or whereever, adjust path in epson2480 to suit) You may need to change the path to the firmware file in epson_loader.c. The result of this is the firmware is downloaded when the scanner is switched on. There is also epson_buttons.c which will tell you which button has been pressed most recently. Could be worked up to poll the buttons regularly and launch scanimage etc automatically. All of it should probably be made more robust, but it works for me. Simon -------------- next part -------------- A non-text attachment was scrubbed... Name: epson2480 Type: application/x-shellscript Size: 894 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20050807/60f641ff/epson2480-0001.bin -------------- next part -------------- A non-text attachment was scrubbed... Name: epson_buttons.c Type: text/x-csrc Size: 1560 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20050807/60f641ff/epson_buttons-0001.c -------------- next part -------------- A non-text attachment was scrubbed... Name: epson_loader.c Type: text/x-csrc Size: 2354 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20050807/60f641ff/epson_loader-0001.c -------------- next part -------------- # This file is part of sane-backends. # # The entries below are used to detect a USB scanner when it's plugged in # and then run the libusbscanner script to change the ownership and # permissions on the "device node" used by libusb. # # The 0x0003 match flag means the device is matched by its vendor and # product IDs. # # Sample entry (replace 0xVVVV and 0xPPPP with vendor ID and product ID respectively) : # libusbscanner 0x0003 0xVVVV 0xPPPP 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 # # usb module match_flags idVendor idProduct bcdDevice_lo bcdDevice_hi bDeviceClass bDeviceSubClass bDeviceProtocol bInterfaceClass bInterfaceSubClass bInterfaceProtocol driver_info # # # The following list already contains a lot of scanners. If your scanner # isn't mentioned there, add it as explained above and mail the entry to # the sane-devel mailing list. # # Epson Corp.|Perfection 2480 epson2480 0x0003 0x04b8 0x0121 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000 From ramey....@gmail.com Mon Aug 8 05:34:00 2005 From: ramey....@gmail.com (Ken Ramey) Date: Mon Aug 8 05:34:32 2005 Subject: [sane-devel] Epson 2480 Transparency Unit Message-ID: <e3eb2ba9050807223420d00...@mail.gmail.com> In an attempt to solve the problem I reported earlier - getting transparency scans with colored vertical bands - I installed the latest version of sane-backends (1.0.1.16). This seems to have aggravated my problems. The vertical bands are still present and in addition, I am no longer able to get reasonable preview scans. Instead, the preview now has only the first slide slot and a very small portion of the second slot. Any suggestions? Thanks. ken