NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ulpt0 or uscanner but same device? and using sane-backends (Canon MP150)



On Fri, 18 Apr 2008, Greg Troxel wrote:

>   So I patched sane-backends-1.0.19/sanei/sanei_usb.c so NetBSD will include 
>   usb.h and also scan the usb devices to get the vendor and product info. 
>   That worked to detect it (I don't know why it doesn't use libusb for 
>   that.)
> 
> If you don't get this upstream, please put in pkgsrc.

But I received another email saying that USB scanner worked. I am confused 
about this. Anyways this is what I have

--- sanei/sanei_usb.c.orig      2007-11-16 02:46:32.000000000 -0600
+++ sanei/sanei_usb.c   2008-04-24 20:40:08.000000000 -0500
@@ -87,7 +87,7 @@
 }
 #endif /* HAVE_USBCALLS */
 
-#if defined (__FreeBSD__) 
+#if defined (__FreeBSD__) || defined (__NetBSD__)
 #include <dev/usb/usb.h>
 #endif /* __FreeBSD__ */
 #if defined (__DragonFly__)
@@ -252,7 +252,7 @@
     *vendorID = vendor;
     *productID = product;
   }
-#elif defined (__FreeBSD__) || defined (__DragonFly__)
+#elif defined (__FreeBSD__) || defined (__DragonFly__) || defined (__NetBSD__)
   {
     int controller;
     int ctrl_fd;


Then my scanner was detected.

> Did you try 'scanimage' or 'xscanimage' instead of xsane?  They are
> simpler.

Not yet.

> It may be that uscanner behaves differently from sane-code/libusb/ugen.
> So I'd try to get ugen going.


Any ideas or pointers on how to get ugen0 to be configured? What kernel 
code for that? I read "The ugen driver provides support for all USB 
devices that do not have a special driver." So it seems like I shouldn't 
have to do anything special to have a ugen0 (booting with 4.0 kernel 
instead of my custom built kernel for uscanner supporting the device).


Well I heard from one person that USB scanner worked when they commented 
out the uscanner kernel configuration. Is that applicable even if uscanner 
doesn't know about the hardware? (I should try instead of asking but 
rebooting many times is slow!)

  Jeremy C. Reed


Home | Main Index | Thread Index | Old Index