[sane-devel] support for Canon MG8150

2011-06-15 Thread Gernot Hassenpflug
On Wed, Jun 15, 2011 at 5:43 AM, Louis Lagendijk
louis at lagendijk.xs4all.nl wrote:
 On Sat, 2011-06-11 at 12:10 +0200, Louis Lagendijk wrote:

 If uou have git commit access you could do that I guess. It is probably
 better if the current maintainer of the backend (Nicolas, Gernot?) does
 that, the changes do not affect any other devices, so I can not see a
 reason not commit.

 Hello Gernot,
 could you please commit this change to git?
 If you don't have the time, I can have a look at it, but I am currently
 pretty much loaded with other obligations, so I will not be able to get
 to this until at earliest this weekend and probably not even then...
 Thanks Louis


Hello,
I am not a maintainer for SANE. Also, I am not sure what code you are
using here. I have some code I have developed which I need to submit
eventually. If you send me your modification maybe I can do something
with it.
Best regards,
Gernot



[sane-devel] support for Canon MG8150

2011-06-14 Thread Louis Lagendijk
On Sat, 2011-06-11 at 12:10 +0200, Louis Lagendijk wrote:

 If uou have git commit access you could do that I guess. It is probably
 better if the current maintainer of the backend (Nicolas, Gernot?) does
 that, the changes do not affect any other devices, so I can not see a
 reason not commit. 
 
Hello Gernot,
could you please commit this change to git?
If you don't have the time, I can have a look at it, but I am currently
pretty much loaded with other obligations, so I will not be able to get
to this until at earliest this weekend and probably not even then...
Thanks Louis





[sane-devel] support for Canon MG8150

2011-06-11 Thread Wandrille Roncé
Le vendredi 10 juin 2011 05:40:47, vous avez ?crit :
 On Fri, Jun 10, 2011 at 12:38 PM, Wandrille Ronc? vanvan at vanvan.cc wrote:
  Le vendredi 10 juin 2011 05:11:27, vous avez ?crit :
  On Fri, Jun 10, 2011 at 12:08 PM, Wandrille Ronc? w at ndrille.fr wrote:
   Le vendredi 10 juin 2011 04:17:54, vous avez ?crit :
   On Fri, Jun 10, 2011 at 10:50 AM, VanVan vanvan at vanvan.cc wrote:
  Okay, so I compiled another time with ./configure -- enable-debug, and
  look at the pixma_mp150.c file, but there is no debug mode to activate
  inside.
 
 No, not compiling. Just running.
 
 We were talking about scanimage. And I told you to look at the man
 page for sane-pixma and then set the debug env vars.
 
 Regards,
 Gernot

Thanks.

It worked via ethernet for my desktop computer.

[sanei_debug] Setting debug level of pixma to 3.
[pixma] pixma is compiled without pthread support.
[pixma] pixma version 0.16.2
[pixma] sanei_bjnp_find_devices:
[pixma] eth0 is IPv4 capable, sending broadcast..
[pixma] eth0 is IPv4 capable, sending broadcast..
[pixma] eth0 is IPv4 capable, sending broadcast..
[pixma] eth0 is IPv4 capable, sending broadcast..
[pixma] eth0 is IPv4 capable, sending broadcast..
[pixma] Found scanner at ip address: 192.168.1.10
[pixma] Scanner identity string = MFG:Canon;CMD:MultiPass 2.1,IVEC;MDL:MG8100 
series;CLS:IMAGE;DES:Canon MG8100 series;SOJ:BJNP2,BJNPe;
[pixma] Scanner model = Canon MG8100 series
[pixma] Found scanner at ip address: 192.168.1.10
[pixma] Scanner at bjnp://17CDEF00.local:8612 detected, but it was added 
before, good!
[pixma] Found scanner at ip address: 192.168.1.10
[pixma] Scanner at bjnp://17CDEF00.local:8612 detected, but it was added 
before, good!
[pixma] pixma_collect_devices() found Canon PIXMA MG8100 at 
bjnp://17CDEF00.local:8612
[pixma] pixma_find_scanners() found 1 devices
device `v4l:/dev/video0' is a Noname Camera virtual device
device `pixma:MG8100_17CDEF00' is a CANON Canon PIXMA MG8100 multi-
function peripheral


But not on my laptop


[pixma] pixma is compiled with pthread support.
[pixma] pixma version 0.16.2
[pixma] sanei_bjnp_find_devices:
[pixma] wlan0 is IPv4 capable, sending broadcast..
[pixma] wlan0 is IPv4 capable, sending broadcast..
[pixma] wlan0 is IPv4 capable, sending broadcast..
[pixma] wlan0 is IPv4 capable, sending broadcast..
[pixma] wlan0 is IPv4 capable, sending broadcast..
[pixma] Found scanner at ip address: 192.168.1.10
[pixma] Scanner identity string = MFG:Canon;CMD:MultiPass 2.1,IVEC;MDL:MG8100 
series;CLS:IMAGE;DES:Canon MG8100 series;SOJ:BJNP2,BJNPe;
[pixma] Scanner model = Canon MG8100 series
[pixma] Found scanner at ip address: 192.168.1.10
[pixma] Scanner at bjnp://17CDEF00.local:8612 detected, but it was added 
before, good!
[pixma] Found scanner at ip address: 192.168.1.10
[pixma] Scanner at bjnp://17CDEF00.local:8612 detected, but it was added 
before, good!
[pixma] Found scanner at ip address: 192.168.1.10
[pixma] Scanner at bjnp://17CDEF00.local:8612 detected, but it was added 
before, good!
[pixma] pixma_find_scanners() found 0 devices
scanimage: no SANE devices found



This is strange, it is the same linux distribution, with the same sane-
backends compile.
It found the device, but seems to not add it. Have you an idee ?


If it work on my desktop computer, I can assume that this is not a problem 
from the source code.
I can scan real image, all worked from the desktop computer.
So can I add the source code to the git repository to give to all the people a 
compatible driver for the MG8150 and some other ? Do I need some extra 
permissions or can I directly do that ?

Thanks,
W.R




[sane-devel] support for Canon MG8150

2011-06-11 Thread Louis Lagendijk
On Fri, 2011-06-10 at 23:19 +0200, Wandrille Ronc? wrote:

 
 But not on my laptop
 
 
 [pixma] pixma is compiled with pthread support.
 [pixma] pixma version 0.16.2
 [pixma] sanei_bjnp_find_devices:
 [pixma] wlan0 is IPv4 capable, sending broadcast..
 [pixma] wlan0 is IPv4 capable, sending broadcast..
 [pixma] wlan0 is IPv4 capable, sending broadcast..
 [pixma] wlan0 is IPv4 capable, sending broadcast..
 [pixma] wlan0 is IPv4 capable, sending broadcast..
 [pixma] Found scanner at ip address: 192.168.1.10
 [pixma] Scanner identity string = MFG:Canon;CMD:MultiPass 2.1,IVEC;MDL:MG8100 
 series;CLS:IMAGE;DES:Canon MG8100 series;SOJ:BJNP2,BJNPe;
 [pixma] Scanner model = Canon MG8100 series
 [pixma] Found scanner at ip address: 192.168.1.10
 [pixma] Scanner at bjnp://17CDEF00.local:8612 detected, but it was added 
 before, good!
 [pixma] Found scanner at ip address: 192.168.1.10
 [pixma] Scanner at bjnp://17CDEF00.local:8612 detected, but it was added 
 before, good!
 [pixma] Found scanner at ip address: 192.168.1.10
 [pixma] Scanner at bjnp://17CDEF00.local:8612 detected, but it was added 
 before, good!
 [pixma] pixma_find_scanners() found 0 devices
 scanimage: no SANE devices found
 
 
 
 This is strange, it is the same linux distribution, with the same sane-
 backends compile.
 It found the device, but seems to not add it. Have you an idee ?
 
What this implies  is that the network code can find the scanner, but
the actual backend does not recognize it. Are you sure that the same
backend is installed? It looks as if you compiled your own version on
the desktop, but not on the laptop?

 
 If it work on my desktop computer, I can assume that this is not a problem 
 from the source code.
 I can scan real image, all worked from the desktop computer.
 So can I add the source code to the git repository to give to all the people 
 a 
 compatible driver for the MG8150 and some other ? Do I need some extra 
 permissions or can I directly do that ?
 
If uou have git commit access you could do that I guess. It is probably
better if the current maintainer of the backend (Nicolas, Gernot?) does
that, the changes do not affect any other devices, so I can not see a
reason not commit. 

BR, Louis






[sane-devel] support for Canon MG8150

2011-06-10 Thread Gernot Hassenpflug
On Fri, Jun 10, 2011 at 12:08 PM, Wandrille Ronc? w at ndrille.fr wrote:
 Le vendredi 10 juin 2011 04:17:54, vous avez ?crit :
 On Fri, Jun 10, 2011 at 10:50 AM, VanVan vanvan at vanvan.cc wrote:
 Hello,

 I am afraid I cannot tell who you are speaking to, or what message you
 are relating to. Can you please clarify?

 Thanks for the quick response.

 It was a reply to
 
 On Tue, Nov 2, 2010 at 5:29 AM, Louis Lagendijk
 louis at lagendijk.xs4all.nl wrote:
 ?On Sun, 2010-10-31 at 19:51 +0100,
 
 I had try again with git last version.
 I just compile a sane-backends ( git clone git://anonscm.debian.org/sane/sane-
 backends.git) and modify the file pixma_mp150.c to add support for the Canon
 MG8150 printer.

OK, thanks, I got it now.

 By adding this :
  You can try adding the definitions near the end of pixma_mp150.c where
  similar definitions exist, like this:
/../
  #define MG8100_PID 0x174b

 sane-find-scanner found the scanner on USB mode
 found USB scanner (vendor=0x04a9 [Canon], product=0x174b [MG8100 series]) at
 libusb:002:004

 But after:

 Scanimage (from /usr/local/bin) has no verbose mode, with -v or no, I just has
 the msg scanimage: no SANE devices found

 Have you and id?e ?

Sorry about the -v. You should set the debug variables and try again
(see my last message).

Regards,
Gernot



[sane-devel] support for Canon MG8150

2011-06-10 Thread Gernot Hassenpflug
On Fri, Jun 10, 2011 at 12:38 PM, Wandrille Ronc? vanvan at vanvan.cc wrote:
 Le vendredi 10 juin 2011 05:11:27, vous avez ?crit :
 On Fri, Jun 10, 2011 at 12:08 PM, Wandrille Ronc? w at ndrille.fr wrote:
  Le vendredi 10 juin 2011 04:17:54, vous avez ?crit :
  On Fri, Jun 10, 2011 at 10:50 AM, VanVan vanvan at vanvan.cc wrote:

 Okay, so I compiled another time with ./configure -- enable-debug, and look at
 the pixma_mp150.c file, but there is no debug mode to activate inside.

No, not compiling. Just running.

We were talking about scanimage. And I told you to look at the man
page for sane-pixma and then set the debug env vars.

Regards,
Gernot



[sane-devel] support for Canon MG8150

2010-11-02 Thread Gernot Hassenpflug
On Tue, Nov 2, 2010 at 5:29 AM, Louis Lagendijk
louis at lagendijk.xs4all.nl wrote:
 On Sun, 2010-10-31 at 19:51 +0100,
  You can try adding the definitions near the end of pixma_mp150.c where
  similar definitions exist, like this:
 
  ? /* Latest devices (2010) Generation 4 CIS/CCD */
  ? DEVICE (Canon PIXMA MP280, ?MP280, ?MP280_PID, ?1200, 638, 877,
  PIXMA_CAP_CIS),
  ? DEVICE (Canon PIXMA MG5100, MG5100, MG5100_PID, 1200, 638, 877,
  PIXMA_CAP_CIS),
  ? DEVICE (Canon PIXMA MG6100, MG6100, MG6100_PID, 2400, 638, 877,
  PIXMA_CAP_CIS),
  ? DEVICE (Canon PIXMA MG6200, MG6200, MG6200_PID, 2400, 638, 877,
  PIXMA_CAP_CIS),
  ? DEVICE (Canon PIXMA MG8100, MG8100, MG8100_PID, 4800, 638, 877,
  PIXMA_CAP_CCD | PIXMA_CAP_TPU),
 
  and the USB ids near the start of the file under the existing ones,
  like this:
 
  #define MP280_PID 0x1746
  #define MG5100_PID 0x1748
  #define MG5200_PID 0x1749
  #define MG6100_PID 0x174a
  #define MG8100_PID 0x174b
 

 Please check the USB-ids, if it is incorrect network scanning will work
 (as long as the device id is unique) as the network code gets the
 device-id from the definition in mp150.c where it does the lookup by the
 name of the device read over the ethernet connection. For USB it works
 the other way roundSO if the the id is incorrect network scanning
 will work, while usb scanning fails

 best regards, Louis (author of the BJNP stuff)

Hi, yes, please confirm the USBid, I took the above ones from the
Japanese MG8100 series driver, but do not have the device myself.
Best regards,
Gernot Hassenpflug



[sane-devel] support for Canon MG8150

2010-11-01 Thread Gernot Hassenpflug
On Mon, Nov 1, 2010 at 2:19 AM,
ralph.gauges at bioquant.uni-heidelberg.de wrote:
 Hi,

 I recently bought a new multifunction device from Canon (MG8150) and as
 usually there are no linux drivers for the device from the manufacturer.

 So the question now is, how could I be of help to eventually get this device
 running under linux.
 I have never written any device drivers, but I know C/C++ and I am fairly
 familiar with linux, so if you tell me what I can do to help, I will try.

Hi,

At the moment there is no specific support for the new devices, so you
are most welcome to help. As there already exists code that might be
able to support these devices without any (or not much) development
please try the following, using the CVS sane-backends code.

You can try adding the definitions near the end of pixma_mp150.c where
similar definitions exist, like this:

  /* Latest devices (2010) Generation 4 CIS/CCD */
  DEVICE (Canon PIXMA MP280,  MP280,  MP280_PID,  1200, 638, 877,
PIXMA_CAP_CIS),
  DEVICE (Canon PIXMA MG5100, MG5100, MG5100_PID, 1200, 638, 877,
PIXMA_CAP_CIS),
  DEVICE (Canon PIXMA MG6100, MG6100, MG6100_PID, 2400, 638, 877,
PIXMA_CAP_CIS),
  DEVICE (Canon PIXMA MG6200, MG6200, MG6200_PID, 2400, 638, 877,
PIXMA_CAP_CIS),
  DEVICE (Canon PIXMA MG8100, MG8100, MG8100_PID, 4800, 638, 877,
PIXMA_CAP_CCD | PIXMA_CAP_TPU),

and the USB ids near the start of the file under the existing ones, like this:

#define MP280_PID 0x1746
#define MG5100_PID 0x1748
#define MG5200_PID 0x1749
#define MG6100_PID 0x174a
#define MG8100_PID 0x174b

Compile and then see if the device can work at all. Note the MG
devices are sold under different names in different parts of the
world, so the last 2 digits above are simply 00 to denote the family.

(other new device USB ids given here for reference)
Regards,
Gernot
-- 
ISP Asahi-Net: http://asahi-net.jp/en/
No.1 in Japan by customer satisfaction
(Nikkei News, 7 July 2010)



[sane-devel] support for Canon MG8150

2010-11-01 Thread Gernot Hassenpflug
On Mon, Nov 1, 2010 at 4:41 AM,
ralph.gauges at bioquant.uni-heidelberg.de wrote:
 I tried to use the device over ethernet and this seems to work better:

 Quoting Gernot Hassenpflug aikishugyo at gmail.com:

 On Mon, Nov 1, 2010 at 2:19 AM,
 ralph.gauges at bioquant.uni-heidelberg.de wrote:

 Now I fixed the ids again and the device is recognized as an MG8100 device
 over USB as well, but I still get the I/O error.

 So right now, scanning over ethernet works, but over USB it doesn't work
 yet.
 Since the driver seems to be able to talk to the device, this is likely
 something small.

 What can I do to track down the USB problem and what tests can I run to make
 sure the device works as expected? Is there a standard set of tests to run?

Hi,

Great to hear that the device works at least over ethernet. I am
afraid I do not know (yet) how to solve USB issues, perhaps you can
activate the sane USB debug environment variables (see the various
sane-* man pages, apropos should show you them) and send the output
of that when you try sane as root (maybe better than sudo for this
test).

Regards,
Gernot
-- 
ISP Asahi-Net: http://asahi-net.jp/en/
No.1 in Japan by customer satisfaction
(Nikkei News, 7 July 2010)



[sane-devel] support for Canon MG8150

2010-11-01 Thread Gernot Hassenpflug
On Mon, Nov 1, 2010 at 7:40 PM, Ralph Gauges
ralph.gauges at bioquant.uni-heidelberg.de wrote:
 Hi Gernot,

 I did what you suggested and I do have a log file with debug output which is
 rather long.
 Should I really send this to the list? And if yes, should I add the log file
 as an attachment or should I include the log output in the mail itself?

Hi,

Please send it to me, I'll take a look. For completely, please let me
know also the specs of your OS distribution.

 I also noticed that the scanner is accesses as long as the usblp and the
 usb_storage kernel modules are loaded.
 As soon as I remove either one, scanimage -T gets a timeout when accessing
 the device. I don't know if that is significant.

I think for modern distributions no-one should need to touch any
kernel modules. USB devices should simply work. But some USB-related
packages must be installed---these should be dependencies of
sane-backends for your distro anyway though.

Regards,
Gernot



[sane-devel] support for Canon MG8150

2010-11-01 Thread Louis Lagendijk
On Sun, 2010-10-31 at 20:41 +0100,
ralph.gauges at bioquant.uni-heidelberg.de wrote:
 I tried to use the device over ethernet and this seems to work better:
 
 
Then you probably have a mistake in the usb-id. The bjnp code looks up
the device name and fetches the USB-id from the name. As long as the id
is unique the backend will work correctly as the usb-id is faked anyhow.
What does lsusb return? Use the id returned there the set the deviceid


best regards, Louis (author of the bjnp code)





[sane-devel] support for Canon MG8150

2010-11-01 Thread Louis Lagendijk
On Sun, 2010-10-31 at 19:51 +0100, 
  You can try adding the definitions near the end of pixma_mp150.c where
  similar definitions exist, like this:
 
/* Latest devices (2010) Generation 4 CIS/CCD */
DEVICE (Canon PIXMA MP280,  MP280,  MP280_PID,  1200, 638, 877,
  PIXMA_CAP_CIS),
DEVICE (Canon PIXMA MG5100, MG5100, MG5100_PID, 1200, 638, 877,
  PIXMA_CAP_CIS),
DEVICE (Canon PIXMA MG6100, MG6100, MG6100_PID, 2400, 638, 877,
  PIXMA_CAP_CIS),
DEVICE (Canon PIXMA MG6200, MG6200, MG6200_PID, 2400, 638, 877,
  PIXMA_CAP_CIS),
DEVICE (Canon PIXMA MG8100, MG8100, MG8100_PID, 4800, 638, 877,
  PIXMA_CAP_CCD | PIXMA_CAP_TPU),
 
  and the USB ids near the start of the file under the existing ones,   
  like this:
 
  #define MP280_PID 0x1746
  #define MG5100_PID 0x1748
  #define MG5200_PID 0x1749
  #define MG6100_PID 0x174a
  #define MG8100_PID 0x174b
 
 
 I already treid something along those lines by copying the line for  
 the MP990 instead of the MG6200. Since I didn't know where to find the  
 id, I just copied the one from the 990. So since this is the USB id, I  
 will connect the device via USB and try what you suggested.

Please check the USB-ids, if it is incorrect network scanning will work
(as long as the device id is unique) as the network code gets the
device-id from the definition in mp150.c where it does the lookup by the
name of the device read over the ethernet connection. For USB it works
the other way roundSO if the the id is incorrect network scanning
will work, while usb scanning fails

best regards, Louis (author of the BJNP stuff)





[sane-devel] support for Canon MG8150

2010-10-31 Thread ralph.gau...@bioquant.uni-heidelberg.de
Hi,

I recently bought a new multifunction device from Canon (MG8150) and  
as usually there are no linux drivers for the device from the  
manufacturer.

So the question now is, how could I be of help to eventually get this  
device running under linux.
I have never written any device drivers, but I know C/C++ and I am  
fairly familiar with linux, so if you tell me what I can do to help, I  
will try.

Thank you very much

Ralph



[sane-devel] support for Canon MG8150

2010-10-31 Thread ralph.gau...@bioquant.uni-heidelberg.de
Quoting Gernot Hassenpflug aikishugyo at gmail.com:

 On Mon, Nov 1, 2010 at 2:19 AM,
 ralph.gauges at bioquant.uni-heidelberg.de wrote:
 Hi,

 I recently bought a new multifunction device from Canon (MG8150) and as
 usually there are no linux drivers for the device from the manufacturer.

 So the question now is, how could I be of help to eventually get this device
 running under linux.
 I have never written any device drivers, but I know C/C++ and I am fairly
 familiar with linux, so if you tell me what I can do to help, I will try.

 Hi,

 At the moment there is no specific support for the new devices, so you
 are most welcome to help. As there already exists code that might be
 able to support these devices without any (or not much) development
 please try the following, using the CVS sane-backends code.

 You can try adding the definitions near the end of pixma_mp150.c where
 similar definitions exist, like this:

   /* Latest devices (2010) Generation 4 CIS/CCD */
   DEVICE (Canon PIXMA MP280,  MP280,  MP280_PID,  1200, 638, 877,
 PIXMA_CAP_CIS),
   DEVICE (Canon PIXMA MG5100, MG5100, MG5100_PID, 1200, 638, 877,
 PIXMA_CAP_CIS),
   DEVICE (Canon PIXMA MG6100, MG6100, MG6100_PID, 2400, 638, 877,
 PIXMA_CAP_CIS),
   DEVICE (Canon PIXMA MG6200, MG6200, MG6200_PID, 2400, 638, 877,
 PIXMA_CAP_CIS),
   DEVICE (Canon PIXMA MG8100, MG8100, MG8100_PID, 4800, 638, 877,
 PIXMA_CAP_CCD | PIXMA_CAP_TPU),

 and the USB ids near the start of the file under the existing ones,   
 like this:

 #define MP280_PID 0x1746
 #define MG5100_PID 0x1748
 #define MG5200_PID 0x1749
 #define MG6100_PID 0x174a
 #define MG8100_PID 0x174b

 Compile and then see if the device can work at all. Note the MG
 devices are sold under different names in different parts of the
 world, so the last 2 digits above are simply 00 to denote the family.


I have added those lines and connected the device via USB. This is what I got:

gauges at delilah:~/workspace/sane_devel/backends.git$ sane-find-scanner

   # sane-find-scanner will now attempt to detect your scanner. If the
   # result is different from what you expected, first make sure your
   # scanner is powered up and properly connected to your computer.

   # No SCSI scanners found. If you expected something different, make  
sure that
   # you have loaded a kernel SCSI driver for your SCSI adapter.

found USB scanner (vendor=0x04a9, product=0x174b) at libusb:002:006
   # Your USB scanner was (probably) detected. It may or may not be  
supported by
   # SANE. Try scanimage -L and read the backend's manpage.

   # Not checking for parallel port scanners.

   # Most Scanners connected to the parallel port or other proprietary ports
   # can't be detected by this program.

   # You may want to run this program as root to find all devices. Once you
   # found the scanner devices, be sure to adjust access permissions as
   # necessary.
gauges at delilah:~/workspace/sane_devel/backends.git$ scanimage -L
device `pixma:04A9174B' is a CANON Canon PIXMA MX870 multi-function peripheral
gauges at delilah:~/workspace/sane_devel/backends.git$ scanimage -T
scanimage: open of device pixma:04A9174B failed: Access to resource  
has been denied
gauges at delilah:~/workspace/sane_devel/backends.git$ sudo scanimage -T
sudo: scanimage: command not found
gauges at delilah:~/workspace/sane_devel/backends.git$ sudo  
/usr/local/apps/sane-git/bin/scanimage -T
scanimage: scanning image of size 638x877 pixels at 24 bits/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: reading one scanline, 1914 bytes...  FAIL Error: Error  
during device I/O



What can I do to find out what is causing the error?
What would be the next steps?


Thanks

Ralph


 (other new device USB ids given here for reference)
 Regards,
 Gernot
 --
 ISP Asahi-Net: http://asahi-net.jp/en/
 No.1 in Japan by customer satisfaction
 (Nikkei News, 7 July 2010)






[sane-devel] support for Canon MG8150

2010-10-31 Thread ralph.gau...@bioquant.uni-heidelberg.de
Quoting Gernot Hassenpflug aikishugyo at gmail.com:

 On Mon, Nov 1, 2010 at 2:19 AM,
 ralph.gauges at bioquant.uni-heidelberg.de wrote:
 Hi,

 I recently bought a new multifunction device from Canon (MG8150) and as
 usually there are no linux drivers for the device from the manufacturer.

 So the question now is, how could I be of help to eventually get this device
 running under linux.
 I have never written any device drivers, but I know C/C++ and I am fairly
 familiar with linux, so if you tell me what I can do to help, I will try.

 Hi,

 At the moment there is no specific support for the new devices, so you
 are most welcome to help. As there already exists code that might be
 able to support these devices without any (or not much) development
 please try the following, using the CVS sane-backends code.


I was hoping as much. As far as I know, the MG8150 is replacing the  
MP990 which I think is supported.
So would it make sense to check if the code for the 990 works for the 8150?

 You can try adding the definitions near the end of pixma_mp150.c where
 similar definitions exist, like this:

   /* Latest devices (2010) Generation 4 CIS/CCD */
   DEVICE (Canon PIXMA MP280,  MP280,  MP280_PID,  1200, 638, 877,
 PIXMA_CAP_CIS),
   DEVICE (Canon PIXMA MG5100, MG5100, MG5100_PID, 1200, 638, 877,
 PIXMA_CAP_CIS),
   DEVICE (Canon PIXMA MG6100, MG6100, MG6100_PID, 2400, 638, 877,
 PIXMA_CAP_CIS),
   DEVICE (Canon PIXMA MG6200, MG6200, MG6200_PID, 2400, 638, 877,
 PIXMA_CAP_CIS),
   DEVICE (Canon PIXMA MG8100, MG8100, MG8100_PID, 4800, 638, 877,
 PIXMA_CAP_CCD | PIXMA_CAP_TPU),

 and the USB ids near the start of the file under the existing ones,   
 like this:

 #define MP280_PID 0x1746
 #define MG5100_PID 0x1748
 #define MG5200_PID 0x1749
 #define MG6100_PID 0x174a
 #define MG8100_PID 0x174b


I already treid something along those lines by copying the line for  
the MP990 instead of the MG6200. Since I didn't know where to find the  
id, I just copied the one from the 990. So since this is the USB id, I  
will connect the device via USB and try what you suggested.

Currently I am using the device via ethernet. Do I still need the USB  
id or should any USB id work? Would it be better to try USB first?


 Compile and then see if the device can work at all. Note the MG
 devices are sold under different names in different parts of the
 world, so the last 2 digits above are simply 00 to denote the family.


OK. I will try? What is easier to test (or makes more sense) USB or  
ethernet support?

Thanks

Ralph

 (other new device USB ids given here for reference)
 Regards,
 Gernot
 --
 ISP Asahi-Net: http://asahi-net.jp/en/
 No.1 in Japan by customer satisfaction
 (Nikkei News, 7 July 2010)






[sane-devel] support for Canon MG8150

2010-10-31 Thread ralph.gau...@bioquant.uni-heidelberg.de
I tried to use the device over ethernet and this seems to work better:





Quoting Gernot Hassenpflug aikishugyo at gmail.com:

 On Mon, Nov 1, 2010 at 2:19 AM,
 ralph.gauges at bioquant.uni-heidelberg.de wrote:
 Hi,

 I recently bought a new multifunction device from Canon (MG8150) and as
 usually there are no linux drivers for the device from the manufacturer.

 So the question now is, how could I be of help  
 tgauges at delilah:~/workspace/sane_devel/backends.git$ scanimage -L
device `pixma:MG8100_00C8E622' is a CANON Canon MG8100 series  
multi-function peripheral
gauges at delilah:~/workspace/sane_devel/backends.git$ scanimage -T
scanimage: scanning image of size 638x877 pixels at 24 bits/pixel
scanimage: acquiring RGB frame, 8 bits/sample
scanimage: reading one scanline, 1914 bytes...  PASS
scanimage: reading one byte...  PASS
scanimage: stepped read, 2 bytes... PASS
scanimage: stepped read, 4 bytes... PASS
scanimage: stepped read, 8 bytes... PASS
scanimage: stepped read, 16 bytes...PASS
scanimage: stepped read, 32 bytes...PASS
scanimage: stepped read, 64 bytes...PASS
scanimage: stepped read, 128 bytes...   PASS
scanimage: stepped read, 256 bytes...   PASS
scanimage: stepped read, 512 bytes...   PASS
scanimage: stepped read, 1024 bytes...  PASS
scanimage: stepped read, 2048 bytes...  PASS
scanimage: stepped read, 2047 bytes...  PASS
scanimage: stepped read, 1023 bytes...  PASS
scanimage: stepped read, 511 bytes...   PASS
scanimage: stepped read, 255 bytes...   PASS
scanimage: stepped read, 127 bytes...   PASS
scanimage: stepped read, 63 bytes...PASS
scanimage: stepped read, 31 bytes...PASS
scanimage: stepped read, 15 bytes...PASS
scanimage: stepped read, 7 bytes... PASS
scanimage: stepped read, 3 bytes... PASS
o eventually get this device


I also scanned a real image and that also worked. I haven't tried to  
change any settings yet.

So after adding the lines you suggested, scanning over ethernet seems  
to work while scanning via USB does not work yet.
Somehow when using the USB connection, the device is recognized as an  
MX870 while over ethernet it is correctly recognized as an MG8100  
device.

Ah, I have made a small mistake, I changed the wrong ID, maybe it is  
to late already.
Now I fixed the ids again and the device is recognized as an MG8100  
device over USB as well, but I still get the I/O error.

So right now, scanning over ethernet works, but over USB it doesn't work yet.
Since the driver seems to be able to talk to the device, this is  
likely something small.

What can I do to track down the USB problem and what tests can I run  
to make sure the device works as expected? Is there a standard set of  
tests to run?

Thanks

Ralph






 running under linux.
 I have never written any device drivers, but I know C/C++ and I am fairly
 familiar with linux, so if you tell me what I can do to help, I will try.

 Hi,

 At the moment there is no specific support for the new devices, so you
 are most welcome to help. As there already exists code that might be
 able to support these devices without any (or not much) development
 please try the following, using the CVS sane-backends code.

 You can try adding the definitions near the end of pixma_mp150.c where
 similar definitions exist, like this:

   /* Latest devices (2010) Generation 4 CIS/CCD */
   DEVICE (Canon PIXMA MP280,  MP280,  MP280_PID,  1200, 638, 877,
 PIXMA_CAP_CIS),
   DEVICE (Canon PIXMA MG5100, MG5100, MG5100_PID, 1200, 638, 877,
 PIXMA_CAP_CIS),
   DEVICE (Canon PIXMA MG6100, MG6100, MG6100_PID, 2400, 638, 877,
 PIXMA_CAP_CIS),
   DEVICE (Canon PIXMA MG6200, MG6200, MG6200_PID, 2400, 638, 877,
 PIXMA_CAP_CIS),
   DEVICE (Canon PIXMA MG8100, MG8100, MG8100_PID, 4800, 638, 877,
 PIXMA_CAP_CCD | PIXMA_CAP_TPU),

 and the USB ids near the start of the file under the existing ones,   
 like this:

 #define MP280_PID 0x1746
 #define MG5100_PID 0x1748
 #define MG5200_PID 0x1749
 #define MG6100_PID 0x174a
 #define MG8100_PID 0x174b

 Compile and then see if the device can work at all. Note the MG
 devices are sold under different names in different parts of the
 world, so the last 2 digits above are simply 00 to denote the family.

 (other new device USB ids given here for reference)
 Regards,
 Gernot
 --
 ISP Asahi-Net: http://asahi-net.jp/en/
 No.1 in Japan by customer satisfaction
 (Nikkei News, 7 July 2010)