[sane-devel] sanei_usb.c
Hi All, I'm working on adding support for USB scanners for Sane on OS/2. OS/2 doesn't have libusb, but has a library usbcalls that provides similar functionality, albeit most of the calls use different syntax. I have sane-find-scanner working now for most scanners, and have started work on remaining functions in sanei_usb.c One query I have though is about devname I see in sanei_usb.h that the libusb format for this is libusb:busno:devno Is this defined for all devices or just ones that sanei_usb_init thinks are scanners? I assume that the format of devname really isn't important - so long as it's useful to the usb method being used (ie kernel, libusb or usbcalls for OS/2) in determining which usb device is being attached to? In which case, I could use usbcalls:deviceno or even just deviceno? usbcalls doesn't just bus/deviceno - it just has a device number for each device attached. Thanks for listening - I hope to have some patches (and probably some more questions!!) soonish :) Cheers, Paul.
[sane-devel] sanei_usb.c
Hi Gerald, On 28/6/2005, "Gerald Murray" wrote: >Quoting Paul Smedley : >> One query I have though is about devname >>=20 >> I see in sanei_usb.h that the libusb format for this is libusb:busno:devno >>=20 >> Is this defined for all devices or just ones that sanei_usb_init thinks=20 >> are scanners? > >It is defined for each usb device. Having this naming scheme allows the=20 >OS to use the same functionality that applies to filenames for usb devices. >So the permissions on that filename can be used to indicate the permissions >for its associated usb device.=20 Well permissions are pretty much non-existent on os/2... >> I assume that the format of devname really isn't important - so long as=20 >> it's useful to the usb method being used (ie kernel, libusb or usbcalls=20 >> for OS/2) in determining which usb device is being attached to? >>=20 >> In which case, I could use usbcalls:deviceno or even just deviceno? > >For portability, it would be best to use just one system for all usb devices >within that operating system. This is a problem for the OS you are using.. I don't see why it's a problem? usbcalls uses a device number for each usb device that's attached to the system. Using the format above, I could have for eg. usbcalls:0 - ie my USB Floppy usbcalls:1 - ie my USB Printer usbcalls:2 - ie my USB Scanner When usbcalls:2 is passed to sanei_usb_open, I know to open device number 2 via usbcalls? Or am I missing something? Cheers, Paul.
[sane-devel] sanei_usb.c
Hi Gerhard, Gerhard Jaeger wrote: > just for curiosity - I remember Franz Bakans' efforts to make SANE work > on OS/2 - are you working on a similar project or is it the same one? Same project. Franz only has a scsi scanner so hasn't bothered trying to make usb work on os/2. I have a usb scanner, which is supported through Tame (http://www.os2world.com/goran/tame.htm) which includes a special build of sane that works with usb on os/2 with the epson & snapscan backends, however the person working on that seems to have vanished, so I'm trying to bring things up to date. Cheers, Paul.
[sane-devel] sanei_usb.c
Hi All, On 3/7/2005, "Henning Meier-Geinitz" wrote: >Hi, > >On Tue, Jun 28, 2005 at 10:24:36PM +0930, Paul Smedley wrote: >> OS/2 doesn't have libusb, but has a library usbcalls that provides >> similar functionality, albeit most of the calls use different syntax. >> >> I have sane-find-scanner working now for most scanners, and have started >> work on remaining functions in sanei_usb.c As an update. Last night I did my first scan with scanimage and a modified sanei_usb.c Originally I was working with sane-backends-1.0.15 so I'm now bringing my stuff up to scratch with the latest code in CVS. I need some help with configure - I'm not familiar with the syntax.. What I need is to check for the presence of usbcalls.h - and if present, add HAVE_USBCALLS to config.h & add -lusbcalls to LIBS & BACKENDLIBS Other changes only involve changes to sanei_usb.c and sane-find-scanner.c sane-find-scanner still isn't perfect so I'll probably not update that for 1.0.16 but hopefully I'll have a good patch for sanei_usb.c tonight. Is there a standard format/options for diffs & sane? Cheers, Paul.
[sane-devel] Problem with plustek & SANE_FIX on OS/2
Hi All, I have most USB scanners working on OS/2 now Only reported problems I have are with Avision (lack implemented IRQ transfers for os/2 in sanei_usb) & plustek (hangs during scanning). I've had reports of success with epson, snapscan, umax, umax1220u & gt68xx backends. Anyway, reviewing the logs I've been sent, I see one oddity - but I don't understand why it's an issue on plustek and no any other scanners: In the logs I see things like: scanimage: rounded value of br-x from 126 to -6554 Thing is - this problem doesn't seem to have occured on any other scanners... Anyone have any ideas on likely causes? Cheers, Paul.
[sane-devel] patch for OS/2 USB Support in sanei_usb.c
I know this may be too late for 1.0.16 - but thought I'd submit it anyway. This patch adds usb functionality on OS/2 using the usbcalls interface from http://projects.netlabs.org/?category_id=13 I still need to patch configure.in to detect usbcalls.h and add a #define and link against usbcalls.. This shouldn't break anything on other platforms This isn't perfect yet, but works on quite a few usb scanners - see http://smedley.info/sane.html for details. Cheers, Paul. -- next part -- --- sanei_usb-cvs.c Sat Apr 16 06:18:24 2005 +++ sanei_usb.c Mon Jul 18 20:03:58 2005 @@ -1,5 +1,5 @@ /* sane - Scanner Access Now Easy. - Copyright (C) 2003 Rene Rebe (sanei_read_int) + Copyright (C) 2003 Rene Rebe (sanei_read_int,sanei_set_timeout) Copyright (C) 2001 - 2003 Henning Meier-Geinitz Copyright (C) 2001 Frank Zago (sanei_usb_control_msg) This file is part of the SANE package. @@ -62,6 +62,30 @@ #include #endif /* HAVE_LIBUSB */ +#ifdef HAVE_USBCALLS +#include +#include +#include +#define MAX_RW 64000 +static int usbcalls_timeout = 30 * 1000; /* 30 seconds */ +USBHANDLE dh; +HEV UsbIrqStartHev; + +static +struct usb_descriptor_header *GetNextDescriptor( struct usb_descriptor_header *currHead, UCHAR *lastBytePtr) +{ + UCHAR*currBytePtr, *nextBytePtr; + + if (!currHead->bLength) + return (NULL); + currBytePtr=(UCHAR *)currHead; + nextBytePtr=currBytePtr+currHead->bLength; + if (nextBytePtr>=lastBytePtr) + return (NULL); + return ((struct usb_descriptor_header*)nextBytePtr); +} +#endif /* HAVE_USBCALLS */ + #define BACKEND_NAME sanei_usb #include "../include/sane/sane.h" #include "../include/sane/sanei_debug.h" @@ -72,7 +96,9 @@ { sanei_usb_method_scanner_driver = 0, /* kernel scanner driver (Linux, BSD) */ - sanei_usb_method_libusb + sanei_usb_method_libusb, + + sanei_usb_method_usbcalls } sanei_usb_access_method_type; @@ -138,6 +164,9 @@ void *data; } cmsg; +#elif defined(__BEOS__) +#include +#include #endif /* __linux__ */ static SANE_Bool inited = SANE_FALSE; @@ -202,7 +231,20 @@ DBG (3, "sanei_usb_get_vendor_product: ioctl (product) " "of device %d failed: %s\n", fd, strerror (errno)); } -#endif /* defined (__linux__) */ +#elif defined(__BEOS__) + { +uint16 vendor, product; +if (ioctl (fd, B_SCANNER_IOCTL_VENDOR, &vendor) != B_OK) + DBG (3, "kernel_get_vendor_product: ioctl (vendor) " + "of device %d failed: %s\n", fd, strerror (errno)); +if (ioctl (fd, B_SCANNER_IOCTL_PRODUCT, &product) != B_OK) + DBG (3, "sanei_usb_get_vendor_product: ioctl (product) " + "of device %d failed: %s\n", fd, strerror (errno)); +/* copy from 16 to 32 bit value */ +*vendorID = vendor; +*productID = product; + } +#endif /* defined (__linux__), defined(__BEOS__) */ /* put more os-dependant stuff ... */ } @@ -216,6 +258,8 @@ "/dev/usb/", "scanner", #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined (__OpenBSD__) "/dev/", "uscanner", +#elif defined(__BEOS__) +"/dev/scanner/usb/", "", #endif 0, 0 }; @@ -272,6 +316,10 @@ while ((dir_entry = readdir (dir)) != 0) { + /* skip standard dir entries */ + if (strcmp (dir_entry->d_name, ".") == 0 || strcmp (dir_entry->d_name, "..") == 0) + continue; + if (strncmp (base_name, dir_entry->d_name, strlen (base_name)) == 0) { if (strlen (dir_name) + strlen (dir_entry->d_name) + 1 > @@ -414,6 +462,81 @@ } } #endif /* HAVE_LIBUSB */ +#ifdef HAVE_USBCALLS + /* Check for devices using OS/2 USBCALLS Interface */ + + CHAR ucData[2048]; + struct usb_device_descriptor *pDevDesc; + struct usb_config_descriptor *pCfgDesc; + struct usb_interface_descriptor *intf; + struct usb_endpoint_descriptor *ep; + struct usb_descriptor_header*pDescHead; + + APIRET rc; + ULONG ulNumDev, ulDev, ulBufLen; + + ulBufLen = sizeof(ucData); + memset(&ucData,0,sizeof(ucData)); + rc = UsbQueryNumberDevices( &ulNumDev); + + if(rc==0 && ulNumDev) + { + for (ulDev=1; ulDev<=ulNumDev; ulDev++) + { + rc = UsbQueryDeviceReport( ulDev, + &ulBufLen, + ucData); + + pDevDesc = (struct usb_device_descriptor*)ucData; + pCfgDesc = (struct usb_config_descriptor*) (ucData+sizeof(struct usb_device_descriptor)); + int interface=0; + SANE_Bool found; + if (!pCfgDesc->bConfigurationValue) + { + DBG (1, "sanei_usb_init: device 0x%04x/0x%04x is not configured\n", + pDevDesc->idVendor, pDevDesc->idProduct); + continue; + } + if (pDevDesc->idVendor == 0 || pDevDesc->idProduct == 0) + { + DBG (5, "sanei_usb_init: dev
[sane-devel] patch for OS/2 USB Support in sanei_usb.c
Hi! Henning Meier-Geinitz wrote: > Hi, > > On Mon, Jul 18, 2005 at 08:50:16PM +0930, Paul Smedley wrote: >> I know this may be too late for 1.0.16 - but thought I'd submit it anyway. > > Thanks. I'll commit your code after the release. I hope the next release won't > take as long as this one. > > By the way, I get "Reversed (or previously applied) patch detected! > Assume -R? [n]" when trying to aply the patch. It looks like your diff > isn't done against current CVS. Yes I'd made a copy of sanei_usb.c from cvs a week or so ago - before the beos/zeta patches :( Updated patch, along with patch for configure.in attached: Cheers, Paul. -- next part -- --- sanei_usb-cvs.c Tue Jul 19 18:26:28 2005 +++ sanei_usb.c Mon Jul 18 20:03:58 2005 @@ -62,6 +62,30 @@ #include #endif /* HAVE_LIBUSB */ +#ifdef HAVE_USBCALLS +#include +#include +#include +#define MAX_RW 64000 +static int usbcalls_timeout = 30 * 1000; /* 30 seconds */ +USBHANDLE dh; +HEV UsbIrqStartHev; + +static +struct usb_descriptor_header *GetNextDescriptor( struct usb_descriptor_header *currHead, UCHAR *lastBytePtr) +{ + UCHAR*currBytePtr, *nextBytePtr; + + if (!currHead->bLength) + return (NULL); + currBytePtr=(UCHAR *)currHead; + nextBytePtr=currBytePtr+currHead->bLength; + if (nextBytePtr>=lastBytePtr) + return (NULL); + return ((struct usb_descriptor_header*)nextBytePtr); +} +#endif /* HAVE_USBCALLS */ + #define BACKEND_NAME sanei_usb #include "../include/sane/sane.h" #include "../include/sane/sanei_debug.h" @@ -72,7 +96,9 @@ { sanei_usb_method_scanner_driver = 0, /* kernel scanner driver (Linux, BSD) */ - sanei_usb_method_libusb + sanei_usb_method_libusb, + + sanei_usb_method_usbcalls } sanei_usb_access_method_type; @@ -436,6 +462,81 @@ } } #endif /* HAVE_LIBUSB */ +#ifdef HAVE_USBCALLS + /* Check for devices using OS/2 USBCALLS Interface */ + + CHAR ucData[2048]; + struct usb_device_descriptor *pDevDesc; + struct usb_config_descriptor *pCfgDesc; + struct usb_interface_descriptor *intf; + struct usb_endpoint_descriptor *ep; + struct usb_descriptor_header*pDescHead; + + APIRET rc; + ULONG ulNumDev, ulDev, ulBufLen; + + ulBufLen = sizeof(ucData); + memset(&ucData,0,sizeof(ucData)); + rc = UsbQueryNumberDevices( &ulNumDev); + + if(rc==0 && ulNumDev) + { + for (ulDev=1; ulDev<=ulNumDev; ulDev++) + { + rc = UsbQueryDeviceReport( ulDev, + &ulBufLen, + ucData); + + pDevDesc = (struct usb_device_descriptor*)ucData; + pCfgDesc = (struct usb_config_descriptor*) (ucData+sizeof(struct usb_device_descriptor)); + int interface=0; + SANE_Bool found; + if (!pCfgDesc->bConfigurationValue) + { + DBG (1, "sanei_usb_init: device 0x%04x/0x%04x is not configured\n", + pDevDesc->idVendor, pDevDesc->idProduct); + continue; + } + if (pDevDesc->idVendor == 0 || pDevDesc->idProduct == 0) + { + DBG (5, "sanei_usb_init: device 0x%04x/0x%04x looks like a root hub\n", + pDevDesc->idVendor, pDevDesc->idProduct); + continue; + } + found = SANE_FALSE; + + if (pDevDesc->bDeviceClass = USB_CLASS_VENDOR_SPEC) + { + found = SANE_TRUE; + } + + if (!found) + { + DBG (5, "sanei_usb_init: device 0x%04x/0x%04x: no suitable interfaces\n", + pDevDesc->idVendor, pDevDesc->idProduct); + continue; + } + + snprintf (devname, sizeof (devname), "usbcalls:%d", + ulDev); + devices[dn].devname = strdup (devname); + devices[dn].fd = ulDev; /* store usbcalls device number */ + devices[dn].vendor = pDevDesc->idVendor; + devices[dn].product = pDevDesc->idProduct; + devices[dn].method = sanei_usb_method_usbcalls; + devices[dn].open = SANE_FALSE; + devices[dn].interface_nr = interface; + DBG (4, "sanei_usb_init: found usbcalls device (0x%04x/0x%04x) as device number %s\n", + pDevDesc->idVendor, pDevDesc->idProduct,devices[dn].devname); + dn++; + if (dn >= MAX_DEVICES) + return; + + } + } + +#endif /* HAVE_USBCALLS */ + DBG (5, "sanei_usb_init: found %d devices\n", dn); } @@ -508,13 +609,22 @@ return SANE_STATUS_UNSUPPORTED; #endif /* HAVE_LIBUSB */ } + else if (devices[dn].method == sanei_usb_method_usbcalls) + { +#ifdef HAVE_USBCALLS + vendorID = devices[dn].ven
[sane-devel] Hangs after scan completes with Plustek backend on OS/2
Hi All, Wondering if anyone has any ideas on what could be causing hangs after a scan completes with Plustek-backend USB scanners on OS/2. This is the only backend experiencing this kind of hangs. A sample log is at http://smedley.info/plustekdebug.zip (460k compressed). I see it locally with a Canon LiDE20, and also have reports of hangs with Epson Perfection 1250/1260 - the difference being that with the Canon I always get the hang, the Epson's seem to only hang randomly... Only clue to a potential problem I can see is that a bunch of .raw files get left behind in the same directory as scanimage is run from. Cheers, Paul.
[sane-devel] ENABLE_LOCKING
Hi all, On OS/2 - enable_locking gets enabled by configure, however as far as I can tell, this is only used in sanei_access.c, and then, only by the plustek backend - and the code doesn't work on OS/2. I know that I can run configure with a switch to disable locking, but can configure be changed such that ENABLE_LOCKING is not set on os/2.. I could also workaround this by patching sanei_access.c with something like: #ifdef HAVE_OS2_H # undef ENABLE_LOCKING #endif /* HAVE_OS2_H */ Any thoughts on how to accomplish with configure? Cheers, Paul.
[sane-devel] Hangs after scan completes with Plustek backend on OS/2
Hi Gerhard Gerhard Jaeger wrote: > On Sunday 24 July 2005 13:19, Paul Smedley wrote: >> Hi All, >> Wondering if anyone has any ideas on what could be causing hangs after a >> scan completes with Plustek-backend USB scanners on OS/2. >> >> This is the only backend experiencing this kind of hangs. > > :(( Yeah I agree :) >> A sample log is at http://smedley.info/plustekdebug.zip (460k compressed). > > Nothing special to see in there. Only interesting thing is 2 failed calls to usbbulkread... >> I see it locally with a Canon LiDE20, and also have reports of hangs >> with Epson Perfection 1250/1260 - the difference being that with the >> Canon I always get the hang, the Epson's seem to only hang randomly... Another data point - a Canon LiDE30 seems to work perfectly... and I was wrong with the Epsons - the 1250's work perfectly - the 1260's hang randomly... >> Only clue to a potential problem I can see is that a bunch of .raw files >> get left behind in the same directory as scanimage is run from. > > The .raw files will be created when SANE_DEBUG_PLUSTEK is set to values >= 25. > So you might want to set SANE_DEBUG_PLUSTEK=19 for further tests. Ahh OK - as I say - it was just a thought :P > There might be problems with the threading code? Perhaps - I just wonder why it's only an issue on Plustek scanners - and even then only some... There's a decent list of tested scanners from a variety of backends at http://smedley.info/sane.html and no reports of the issue on other backends :( Time to crank up the debugger and see if anything shows. Cheers, Paul.
[sane-devel] Hangs after scan completes with Plustek backend on OS/2
Hi All, Gerhard Jaeger wrote: > Hi Paul, > > On Sunday 24 July 2005 13:19, Paul Smedley wrote: >> Hi All, >> Wondering if anyone has any ideas on what could be causing hangs after a >> scan completes with Plustek-backend USB scanners on OS/2. >> >> This is the only backend experiencing this kind of hangs. > > :(( > >> A sample log is at http://smedley.info/plustekdebug.zip (460k compressed). > > Nothing special to see in there. > >> I see it locally with a Canon LiDE20, and also have reports of hangs >> with Epson Perfection 1250/1260 - the difference being that with the >> Canon I always get the hang, the Epson's seem to only hang randomly... > > There might be problems with the threading code? Correct. Updated pthreads lib for OS/2 seems to have solved the hangs. Thanks for the tip! Cheers, Paul.
[sane-devel] Epson Perfection 2400 Problems
Hi All, Wondering if anyone can suggestion possible reasons for an Epson Perfection 2400 not working on OS/2. Code is built from latest CVS, and many other scanners that use the Snapscan backend are reported to work. Epson Perfection 2400 seems to have problems uploading the firmware - the log ends with: [snapscan] usb_request_sense: usb command error: Error during device I/O [snapscan] usb_request_sense: usb command error: Error during device I/O [snapscan] sane_snapscan_open: download_firmware command failed: Error during device I/O scanimage: open of device snapscan:usbcalls:1 failed: Error during device I/O Full log is at http://smedley.info/epson2400debugoutput.zip Any ideas appreciated. Cheers, Paul.
[sane-devel] Epson Perfection 2480 Problems
My bad - I meant Epson Perfection 2480 Karl Heinz Kremer wrote: > The Perfection 2400 is supported by the EPSON backend and not the > SNAPSCAN backend. You are using the wrong configuration. > > On Aug 6, 2005, at 4:48 AM, Paul Smedley wrote: > >> Hi All, >> Wondering if anyone can suggestion possible reasons for an Epson >> Perfection 2400 not working on OS/2. >> >> Code is built from latest CVS, and many other scanners that use the >> Snapscan backend are reported to work. >> >> Epson Perfection 2400 seems to have problems uploading the firmware - >> the log ends with: >> [snapscan] usb_request_sense: usb command error: Error during device I/O >> [snapscan] usb_request_sense: usb command error: Error during device I/O >> [snapscan] sane_snapscan_open: download_firmware command failed: Error >> during device I/O >> scanimage: open of device snapscan:usbcalls:1 failed: Error during >> device I/O >> >> Full log is at http://smedley.info/epson2400debugoutput.zip >> >> Any ideas appreciated. >> >> Cheers, >> >> Paul. >> >> --sane-devel mailing list: sane-devel@lists.alioth.debian.org >> http://lists.alioth.debian.org/mailman/listinfo/sane-devel >> Unsubscribe: Send mail with subject "unsubscribe your_password" >> to sane-devel-requ...@lists.alioth.debian.org >> >
[sane-devel] patch for OS/2 USB Support in sanei_usb.c
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: <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
[sane-devel] ENABLE_LOCKING
Hi Gerhard Gerhard Jaeger wrote: > On Monday 25 July 2005 02:49, Paul Smedley wrote: >> Hi all, >> >> On OS/2 - enable_locking gets enabled by configure, however as far as I >> can tell, this is only used in sanei_access.c, and then, only by the >> plustek backend - and the code doesn't work on OS/2. >> >> I know that I can run configure with a switch to disable locking, but can >> configure be changed such that ENABLE_LOCKING is not set on os/2.. > Try the patch below... For what it's worth - I just tried this and it works perfectly - is it possible to get the patch checked in? Cheers, Paul.
[sane-devel] Anon cvs problems
HI All, Anyone else seeing this error when trying to update cvs via anonymous login? cvs -z3 -d:pserver:anonym...@cvs.alioth.debian.org:/cvsroot/sane co sane-backends cvs [checkout aborted]: unrecognized auth response from cvs.alioth.debian.org: cvs: WARNING: Read-only repository access mode selected via `cvs -R'. Cheers, Paul.
[sane-devel] Plustek hangs on OS/2 - part II
Hi All, Wonder if anyone has any ideas on the semi-random LiDE20 hangs on OS/2. Most of the time - if I run scanimage -L it hangs scanimage.exe. When it runs - I get a single beep out of the PC speaker, and looking at the logs, scanimage has gone through all the backend exit routines. Usually, unplugging the scanner will clear the scanimage -L hang. A sample log of this condition is at http://smedley.info/lide20debugoutput-L-hang.txt Sometimes, scanimage -L will still give the beep, but not hang - sample log at http://smedley.info/lide20debugoutput-L-beep-nohang.txt Finally, even rarer, sometimes scanimage -L doesn't beep at all, nor does it hang - a log of this condition is at http://smedley.info/lide20debugoutput-scan-good.txt Anyone have any clues at all? Cheers, Paul.
[sane-devel] Plustek hangs on OS/2 - part II
Oh & I forgot to mention - in the logs that 'beep' there's a return code (32772) from usbbulkread that says 'less data than requested returned'. In this case, 1 byte was requested and 0 returned. log excerpt below shows what the backend does when this occurs. [sanei_usb] sanei_usb_read_bulk: rc = 32772 [plustek] UIO error [plustek] Calibration file-name set to: [plustek] >E:\tcpipapp\home/.sane/Canon-N670U_N676U_LiDE20.cal< In the log without beeps - the rc=32772 doesn't occur, and there are an extra few usbbulkread/write's before the calibration file is set... Hope this helps it make more sense :) Paul Smedley wrote: > Hi All, > Wonder if anyone has any ideas on the semi-random LiDE20 hangs on OS/2. > > Most of the time - if I run scanimage -L it hangs scanimage.exe. When > it runs - I get a single beep out of the PC speaker, and looking at the > logs, scanimage has gone through all the backend exit routines. Usually, > unplugging the scanner will clear the scanimage -L hang. > > A sample log of this condition is at > http://smedley.info/lide20debugoutput-L-hang.txt > > Sometimes, scanimage -L will still give the beep, but not hang - sample > log at http://smedley.info/lide20debugoutput-L-beep-nohang.txt > > Finally, even rarer, sometimes scanimage -L doesn't beep at all, nor > does it hang - a log of this condition is at > http://smedley.info/lide20debugoutput-scan-good.txt > > Anyone have any clues at all? > > Cheers, > > Paul. >
[sane-devel] Re: Plustek hangs on OS/2 - part II
Hi Gerhard! Gerhard Jaeger wrote: > the problem seems to be the UIO Error, which also sometimes exist > on Linux, but in the end has no effect on the functionality. > I did quite a lot of tests these days on the LiDE20 (because of > some calibration issues), but had no problems so far. > > What does the beep mean? On Linux scanimage -L neither beeps, nor > it hangs. I have no idea what the beep means.. I was hoping something in the plustek backend issued a beep and you'd know what it means :P > On Tuesday 09 August 2005 10:06, Paul Smedley wrote: >> Wonder if anyone has any ideas on the semi-random LiDE20 hangs on OS/2. >> >> Most of the time - if I run scanimage -L it hangs scanimage.exe. When >> it runs - I get a single beep out of the PC speaker, and looking at the >> logs, scanimage has gone through all the backend exit routines. >> Usually, unplugging the scanner will clear the scanimage -L hang. >> >> A sample log of this condition is at >> http://smedley.info/lide20debugoutput-L-hang.txt >> >> Sometimes, scanimage -L will still give the beep, but not hang - sample >> log at http://smedley.info/lide20debugoutput-L-beep-nohang.txt >> >> Finally, even rarer, sometimes scanimage -L doesn't beep at all, nor >> does it hang - a log of this condition is at >> http://smedley.info/lide20debugoutput-scan-good.txt > > Hmmm, could not access this file! I've attached the 3xlogs zipped as it's only 20k >> Anyone have any clues at all? > > No, not really, I'll do some tests with the threading enabled... Hmmm maybe I should disable threading and see if it helps Cheers, Paul. -- next part -- A non-text attachment was scrubbed... Name: lide20logs.zip Type: application/octet-stream Size: 22708 bytes Desc: not available Url : http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20050811/3f9a1084/lide20logs-0001.obj From mar...@mkcollins.org Thu Aug 11 07:06:44 2005 From: mar...@mkcollins.org (Martin Collins) Date: Sat Aug 13 00:18:08 2005 Subject: [sane-devel] sane freezes In-Reply-To: <200508091958.38375...@candlsh.freeserve.co.uk> References: <200508091958.38375...@candlsh.freeserve.co.uk> Message-ID: <20050811080644.56680bd3.mar...@mkcollins.org> On Tue, 9 Aug 2005 19:58:38 + Candlish wrote: > Sirs, > > With a Trust SCSI 19200 scanner and dmx3191d scsi card working on > Debian 2.6.8-11-amd64-k8 kernel; my scanner works for 18 seconds > and then freezes. ... > Will dmx3191d work with my new kernel module or should I buy another > card? If so can anyone suggest a suitable model scsi card. Try some debugging before you spend any money. Set SANE_DEBUG_SANEI_SCSI=255 before scanning and see what the terminal output says. Martin
[sane-devel] Plustek hangs on OS/2 - part II
Hi Gerhard, Gerhard Jaeger wrote: > Hi Paul, > > On Tuesday 09 August 2005 12:27, Paul Smedley wrote: >> Oh & I forgot to mention - in the logs that 'beep' there's a return code >> (32772) from usbbulkread that says 'less data than requested returned'. >> In this case, 1 byte was requested and 0 returned. log excerpt >> below shows what the backend does when this occurs. >> >> [sanei_usb] sanei_usb_read_bulk: rc = 32772 >> [plustek] UIO error >> [plustek] Calibration file-name set to: >> [plustek] >E:\tcpipapp\home/.sane/Canon-N670U_N676U_LiDE20.cal< >> > [SNIPSNAP] > > I also got this UIO error sometimes here on my linuxboxes, but they don't > seem to disturb. Well in the meantime, I tried to figure out, when this > UIO error occurs. In the end it only occurs during power-up of the scanner, > directly after pluging it in. So I did some changes to the setup procedure > and managed to make these UIO errors disappear on my boxes. > > Could you please checkout the latest CVS stuff and test on your OS/2 box? Will do - once anon cvs works again :( Thanks for your efforts!! Cheers, Paul.
[sane-devel] configure.in patch for OS/2
Last patch hopefully to get OS/2 USB support working out of the box... Cheers, Paul. -- next part -- --- configure.inFri Aug 19 20:23:42 2005 +++ configure.in.modFri Aug 19 20:23:08 2005 @@ -135,14 +135,11 @@ ]) AC_CHECK_HEADER(usbcalls.h,[ - AC_CHECK_LIB( - usbcalls, - rsm_open_device,[ AC_DEFINE(HAVE_USBCALLS,1,[define if you have the usbcalls library]) LIBS="$LIBS -lusbcalls" - ] - ) -]) + ],,[ +#include +#include ]) dnl *** From sp...@siriush.com Fri Aug 19 12:55:36 2005 From: sp...@siriush.com (Spiro Angeli) Date: Fri Aug 19 12:55:44 2005 Subject: [sane-devel] amd64 and vewscan Message-ID: <200508191455.36143.sp...@siriush.com> Hi, while waiting for Ariel for the Nikon LS-5000 driver to be developped, I am trying out VewScan, but I am unable to make it run on AMD64 os. Anybody has amd64 and VewScan running? If so, please let me know how to make it work. Thank you, Spiro
[sane-devel] Re: Build system changes -- please test!
Hi All, On Sun, 30 Oct 2005 17:26:46 UTC, "Franz Bakan" wrote: > On Sat, 29 Oct 2005 22:14:32 +0200, Henning Meier-Geinitz wrote: > > >I have just committed some changes regarding the Makefiles to the > >sane-backends CVS. Please test if sane-backends can still be built and > >installed on your system (especially OpenBSD and MacOS X). > > still builds on OS/2 :-) Also confirmed here as still OK on OS/2 :) -- Cheers, Paul.
[sane-devel] Request for logs from linux Epson Perfection 2480/3490 user
Hi All, For whatever reason, uploading of scanner firmware fails on OS/2 for the Epson 2480/3490 scanners. I'm wondering if someone who has one of the above scanners working on *nix could generate a set of debug logs for me - just so I can see if there are any obvious differences on OS/2 compared to *nix. Scanner output with: SANE_DEBUG_SNAPSCAN=255 & SANE_DEBUG_SANEI_USB=255 would be appreciated - can be sent offlist to paul at smedley dot info -- Cheers, Paul.
[sane-devel] Re: Request for logs from linux Epson Perfection 2480/3490 user
Hi Fr?d?ric! On Wed, 8 Feb 2006 11:17:02 UTC, Fr?d?ric POUPON wrote: > Le Mardi 7 F?vrier 2006 07:03, Paul Smedley a ?crit?: > > Hi All, > > > > For whatever reason, uploading of scanner firmware fails on OS/2 for > > the Epson 2480/3490 scanners. > > > > I'm wondering if someone who has one of the above scanners working on > > *nix could generate a set of debug logs for me - just so I can see if > > there are any obvious differences on OS/2 compared to *nix. > > > > Scanner output with: > > SANE_DEBUG_SNAPSCAN=255 > > & > > SANE_DEBUG_SANEI_USB=255 > > > Hi ! > > Got a 3490 fully working on deb sarge, kernel 2.6.8-2-686 on amd64 with sane > backend 1.0.16-cvs (downloaded 2005/12). > > I Can build you logs if you still need them. > > As the logs are heavy (146 MB of logs for a full A4 sheet in 300 dpi), we'll > have to tune before what you precisely need, and go on working via private > mail and ftp transfer. Well a scan of 1cm x 1cm as low res (50 dpi) would be fine. The part I'm interested in is the scanner firmware upload anyway. Sane logs generally compress quite well with zip/tar so size shouldn't be too much of a problem. Thanks in advance! -- Cheers, Paul.
[sane-devel] Re: Problems with Epson 3490 Photo
HI Oliver, On Sun, 5 Mar 2006 10:10:32 UTC, Oliver Schwartz wrote: > Hi, > > > [snapscan] usb_read Only 64 bytes read > > [snapscan] usb_read: reading: 0x06 0x00 0x02 0x02 0x49 0x00 0x00 > > 0x00 0x45 0x50 ... > > [snapscan] Read 64 bytes > > [snapscan] inquiry: snapscan_cmd command failed: Error during > > device I/O [snapscan] sane_snapscan_open: error in inquiry command: > > This seems to be a problem with the inquiry command. I got a similar > message from another user. I have a (yet untested) fix for it which I > can send to you, but it requires recompiling the sane-backend > package. Another workaround is an older firmware file. If you're > interested in testing either fix please contact me. I'm interested in both these fixes as I have OS/2 users that cannot get the 3490 to work paul at smedley dot info Thanks -- Cheers, Paul.
[sane-devel] Problem Scanning with Epson RX520
Hi Guys, I got a report from a user of the OS/2 version of Sane that the Epson RX520 isn't working. Debug log is at http://smedley.ingo/debug.txt Scan ends with: scanimage.exe: sane_start: Operation not supported Only real hints (to me) in the log are: [epson] sane_start() [epson] scanner is already open: fd = 0 [epson] You may have to power off your TPU [epson] Also you may have to restart the Sane frontend. [epson] open_scanner() [epson] scanner is already open: fd = 0 [epson] You may have to power off your TPU [epson] Also you may have to restart the Sane frontend. Any clues on how to get this working? -- Cheers, Paul.
[sane-devel] Re: Problem Scanning with Epson RX520
Hi Olaf, On Mon, 25 Sep 2006 00:28:16 UTC, Olaf Meeuwissen wrote: > "Paul Smedley" writes: > > > Hi Guys, > > > > I got a report from a user of the OS/2 version of Sane that the Epson > > RX520 isn't working. Debug log is at http://smedley.ingo/debug.txt > > FWIW, the epson backend doesn't claim it's supported in any way. The > epkowa backend does. Yep - epkowa backend did it for the user > # Is that URL valid? Looks like my DNS server doesn't know about > # smedley.ingo ... Slip of the fingers - should have been http://smedley.info/debug.txt -- Cheers, Paul.