On 03/03/2015 03:49 PM, Troels Thomsen wrote: > Hi Martin, > > Good work Martin! > Any missing commands would be a smoking gun imho. > > Rolf, are you following this thread ? > > /Troels > > > > 2015-02-24 23:09 GMT+01:00 Martin <martin...@intergga.ch > <mailto:martin...@intergga.ch>>: > > Troels > > I don't have access to another computer. But I have installed OpenSUSE > 13.2 > and the result is the same as on 13.1. > I did not (yet) test with short delays between the commands, but I > compared > the communication of the Canon software scangear on Windows with the one > of > SANE: > > At start ScanGear sends the following (linebreaks added by me): > <?xml version="1.0" encoding="utf-8" ?> > <cmd xmlns:ivec="http://www.canon.com/ns/cmd/2008/07/common/" > xmlns:vcn="http://www.canon.com/ns/cmd/2008/07/canon/"> >  <ivec:contents><ivec:operation>VendorCmd</ivec:operation> >   <ivec:param_set servicetype="scan"> >    <ivec:jobID> </ivec:jobID> >    <vcn:ijoperation>ModeShift</vcn:ijoperation> >    <vcn:ijmode>1</vcn:ijmode> >   </ivec:param_set> >  </ivec:contents> > </cmd> > > response: > <?xml version="1.0" encoding="utf-8" ?> > <cmd xmlns:ivec="http://www.canon.com/ns/cmd/2008/07/common/" > xmlns:vcn="http://www.canon.com/ns/cmd/2008/07/canon/"> >  <ivec:contents> >   <ivec:operation>VendorCmdResponse</ivec:operation> >   <ivec:param_set servicetype="scan"> >    <ivec:response>OK</ivec:response> >    <ivec:response_detail/> >    <vcn:ijoperation>ModeShiftResponse</vcn:ijoperation> >    <vcn:ijresponse>OK</vcn:ijresponse> >    <vcn:ijresponse_detail/> >   </ivec:param_set> >  </ivec:contents> > </cmd> > > ScanGear starts a scan with the following command sequece: > <?xml version="1.0" encoding="utf-8" ?> > <cmd xmlns:ivec="http://www.canon.com/ns/cmd/2008/07/common/"> >  <ivec:contents> >   <ivec:operation>StartJob</ivec:operation> >   <ivec:param_set servicetype="scan"> >    <ivec:jobID>00000001</ivec:jobID> >    <ivec:bidi>1</ivec:bidi> >   </ivec:param_set> >  </ivec:contents> > </cmd> > > response: > <?xml version="1.0" encoding="utf-8" ?> > <cmd xmlns:ivec="http://www.canon.com/ns/cmd/2008/07/common/"> >  <ivec:contents> >   <ivec:operation>StartJobResponse</ivec:operation> >   <ivec:param_set servicetype="scan"> >    <ivec:response>OK</ivec:response> >    <ivec:response_detail/> >    <ivec:jobID>00000001</ivec:jobID> >   </ivec:param_set> >  </ivec:contents> > </cmd> > > command: > <?xml version="1.0" encoding="utf-8" ?> > <cmd xmlns:ivec="http://www.canon.com/ns/cmd/2008/07/common/" > xmlns:vcn="http://www.canon.com/ns/cmd/2008/07/canon/"> >  <ivec:contents> >   <ivec:operation>VendorCmd</ivec:operation> >   <ivec:param_set servicetype="scan"> >   <ivec:jobID>00000001</ivec:jobID> >   <vcn:ijoperation>ModeShift</vcn:ijoperation> >   <vcn:ijmode>1</vcn:ijmode> >   </ivec:param_set> >  </ivec:contents> > </cmd> > > response: some data > > command: > <?xml version="1.0" encoding="utf-8" ?> > <cmd xmlns:ivec="http://www.canon.com/ns/cmd/2008/07/common/"> >  <ivec:contents> >   <ivec:operation>EndJob</ivec:operation> >   <ivec:param_set servicetype="scan"> >    <ivec:jobID>00000001</ivec:jobID> >   </ivec:param_set> >  </ivec:contents> > </cmd> > > response: > <?xml version="1.0" encoding="utf-8" ?> > <cmd xmlns:ivec="http://www.canon.com/ns/cmd/2008/07/common/"> >  <ivec:contents> >   <ivec:operation>EndJobResponse</ivec:operation> >   <ivec:param_set servicetype="scan"> >    <ivec:response>OK</ivec:response> >    <ivec:response_detail/> >    <ivec:jobID>00000001</ivec:jobID> >   </ivec:param_set> >  </ivec:contents> > </cmd> > > SANE does not send the VendorCmd. Do you think incorporating the missing > command sequence could solve the issue? I do not want to damage my MG7550 > with > wrong commands, that's why I am reluctant to experiment with code-changes. > > Many thanks for your help > Martin > > Am Sonntag, 11. Januar 2015, 14.52:06 schrieb Troels Thomsen: > > Martin, > > ad 1) > > I'm sorry I have no understanding of the protocol what so ever, and have > > spent max ½ hour in the code, to see what the patches I was sent, did. > > ad 2) > > I agree , this IS strange ... > > ad 3) > > I agree , this IS strange ... > > ad 4) > > Frankly, you have so many strange phenomenons going on, so ... you could > > try.... > > (not that this a satisfactory solution at all...) > > > > At this point, I think I would try to test it on another computer, to > see > > if all these really strange phenomenons (e.g. 'enabling Ethernet on the > > device, makes usb scanning work' ) somehow is related to hardware or the > > Linux installation. Just to make sure.... > > > > Sorry, its not much help. > > > > /Troels > > > > 2015-01-07 23:26 GMT+01:00 Martin <martin...@intergga.ch > <mailto:martin...@intergga.ch>>: > > > Troels > > > > > > I agree with you, we have to be careful on the test methodology. > > > My knowledge in c is limited since I wrote my last c-program about 20 > > > years > > > ago. But I could try. > > > But before trying to modify the source code I have some questions: > > > > > > 1) Did you analyze the USB-calls of the Canon-software on windows and > > > compare > > > them to the SANE-sequence? What is the meaning of the first sequece > 55 53 > > > 42 > > > 43 F0 36 04 0B...? > > > > > > 2) What is the difference between scanimage and xsane? Is it only the > > > timing? > > > > > > 3) What is the difference between xsane and the gimp plugin? Is it > only > > > the > > > timing? Why does the gimp plugin only work after xsane? > > > > > > 4) Would it be worth while to make a few tests with the printer mode, > i.e. > > > to > > > try to start xsane after printing? > > > > > > Martin > > > > > > > > If the scanner does not work on a USB port it is quite unlikely to > > > > > work > > > > > over the network: the bjnp network code just carries the USB > exchange > > > > > over IP. > > > > > > > > I mostly agree, though Rolf asks specifically for the USB trace, > because > > > > (as I understood) it differs slightly from the IP traces I had > already > > > > submitted. > > > > (fix usb first , then patch it for IP, if need be) > > > > > > > > One advice: > > > > Be very paranoid on your test methodology. I looked stupid a couple > of > > > > times (sorry Rolf!), because I was fooled by the USB interface > and/or > > > > the > > > > Canon firmware. > > > > When testing a new patch, I tried some settings in random (DPI , > > > > colour/black-n-white etc) and reported the success/failures. > > > > BUT the thing is, that the Canon MF8230 firmware can go into > bad-mode, > > > > > > when > > > > > > > it has received some strange commands, and the following scans might > > > > work > > > > slightly strange for that reason. I was even fooled by the > phenomenon, > > > > > > that > > > > > > > scanning a 1 by 1 cm square works, but scanning the whole A4 didn't. > > > > > > (Well > > > > > > > ... there WERE some differences between what worked through USB and > IP > > > > at > > > > this point in time. I'm guessing it was something timing-critical, > but I > > > > never dissected that last patch from Rolf which fixed it) > > > > > > > > So I started rebooting the scanner whenever I was in doubt. > > > > (disconnect/connect the USB interface plus move Cannon unit from to > > > > "printer mode" and back to "scanner mode" was normally enough) > > > > > > > > > > > > So what do we do? / What is status? > > > > > > > > Since scanning CAN work , one could argue the back-end DOES send > all the > > > > necessary+correct commands to the printer. > > > > If timing is the critical parameter (backed by the fact that > something > > > > as > > > > stupid as enabling IP on the printer-side, suddenly makes it work > now > > > > and > > > > then), maybe we should try to insert an ugly time-delay before > every USB > > > > write? If that changes anything to the better, we can start to hunt > down > > > > where it is really necessary, and hopefully find a nicer approach > > > > afterwards? > > > > > > > > Martin, are you comfortable with pulling the code out of the GIT > > > > repository, compile , install and experiment with inserting delays? > > > > I think there is something called "SANE interface USB" > sanei_usb.c/h. > > > > > > That > > > > > > > was maybe a place to start. > > > > > > > > Louis, what is the odds of success for this approach? > > > > > > > > :-) > > > > > > > > /Troels > > > > > > > > 2015-01-03 20:43 GMT+01:00 Martin <martin...@intergga.ch > <mailto:martin...@intergga.ch>>: > > > > > Am Samstag, 3. Januar 2015, 11.16:10 schrieb Louis Lagendijk: > > > > > > On Fri, 2015-01-02 <tel:2015-01-02> at 22:59 +0100, Martin > wrote: > > > > > > > Hi Troels > > > > > > > > > > > > > > > *Is it USB3 (on the computer)? > > > > > > > > > > > > > > no, it is USB2 > > > > > > > > > > > > > > > *Do you have access to another computer, where you can try > it - > > > > > > Does > > > > > > > > it > > > > > > > > > > > > > work excactly the same strange way ... ? > > > > > > > > > > > > > > No,I don't have access to another computer. But I have also > > > > > > Windows 7 > > > > > > > > > > installed. With Windows 7 and the Canon-software it works OK. > > > > > > > > > > > > > > > *Does unit have ethernet connection / can you try that way? > > > > > > > > > > > > > > Yes. With the ethernet connection the printer works. Thus the > > > > > > > > > > IP-address > > > > > > > > > > > > below is correct. > > > > > > > But I cannot access the scanner. > > > > > > > > > > > > > >   xsane pixma:MG7500_192.168.0.3 > > > > > > > > > > > > > > results in the error message "illegal argument". Same thing > with > > > > > > > > > > > > > >   scanimage --help -d bnjp://192.168.0.3:8612 > <http://192.168.0.3:8612> > > > > > > > > > > > > Hi Martin > > > > > > If the scanner does not work on a USB port it is quite unlikely > to > > > > > > work > > > > > > > > > over the network: the bjnp network code just carries the USB > > > > > > exchange > > > > > > over IP. > > > > > > Anyhow, you can find the name with scanimage -L (but make sure > that > > > > > > port > > > > > > > > > 8612 is not blocked by a firewall (see the man-page for > sane-pixma > > > > > > in > > > > > > the latest sources from GIT. you need to enable port 8612 for > both > > > > > > incoming and outgoing traffic. > > > > > > > > > > > > Louis > > > > > > > > > > Hi Louis > > > > > > > > > > The necessary ports on the firewall are open, yet scanimage -L > does > > > > > not > > > > > find > > > > > the scanner. > > > > > > > > > > But this lead to another discovery: > > > > > I enabled LAN on the MG7550. And although the unit is connected > via > > > > > > USB 2 > > > > > > > > xsane sometimes works?! But with LAN disabled xsane never works > > > > > without > > > > > prior > > > > > scanimage -T. And once xsane or scanimage -T failed all succeeding > > > > > > calls > > > > > > > > fail > > > > > until the scanner is switched off and on again. > > > > > > > > > > Log of xsane working: > > > > > [sanei_debug] Setting debug level of pixma to 21. > > > > > [pixma] pixma is compiled with pthread support. > > > > > [pixma] pixma version 0.17.13 > > > > > [pixma] pixma_collect_devices() found Canon PIXMA MG7500 Series at > > > > > libusb:001:007 > > > > > [pixma] pixma_find_scanners() found 1 devices > > > > > [pixma] pixma_collect_devices() found Canon PIXMA MG7500 Series at > > > > > libusb:001:007 > > > > > [pixma] pixma_open(): Canon PIXMA MG7500 Series > > > > > [pixma] *mp150_open***** This is a generation 4 scanner. ***** > > > > > [pixma] [pixma] Reader task id=139772037314304 (threaded) > > > > > Reader task started > > > > > [pixma] > > > > > [pixma] pixma_scan(): start > > > > > [pixma]  line_size=4605 image_size=4895115 channels=3 depth=8 > > > > > [pixma]  dpi=300x300 offset=(0,0) dimension=1535x1063 > > > > > [pixma]  gamma_table=0x1f201e0 source=0 > > > > > [pixma]  threshold=127 threshold_curve=0 > > > > > [pixma]  ADF page count: 0 > > > > > [pixma] OUT T=58.770 len=288 > > > > > [pixma] 00000000:3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 > 31 > > > > > [pixma] 00000010:2e 30 22 20 65 6e 63 6f 64 69 6e 67 3d 22 75 > 74 > > > > > ... > > > > > Log of xsane not working: > > > > > pixma] pixma_collect_devices() found Canon PIXMA MG7500 Series at > > > > > libusb:001:008 > > > > > [pixma] pixma_find_scanners() found 1 devices > > > > > [pixma] pixma_collect_devices() found Canon PIXMA MG7500 Series at > > > > > libusb:001:008 > > > > > [pixma] pixma_open(): Canon PIXMA MG7500 Series > > > > > [pixma] *mp150_open***** This is a generation 4 scanner. ***** > > > > > [pixma] INTR T=1.249 len=32 > > > > > [pixma] 00000000:00 00 00 01 00 00 00 00 00 00 00 00 00 00 00 > 00 > > > > > [pixma] 00000010:00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 > 00 > > > > > [pixma] > > > > > [pixma] Sending time: '15/01/03 15:32' > > > > > [pixma] OUT T=1.250 len=36 > > > > > [pixma] 00000000:eb 80 00 00 00 00 00 00 00 00 00 00 00 00 00 > 14 > > > > > [pixma] 00000010:31 35 2f 30 31 2f 30 33 20 31 35 3a 33 32 00 > 00 > > > > > [pixma] 00000020:00 00 00 53 > > > > > [pixma] > > > > > [pixma] IN  T=21.251 len=-9 > > > > > [pixma]  ERROR: ETIMEDOUT > > > > > [pixma] > > > > > ... > > > > > > > > > > Martin > > > > > > > > > > > > > > > -- > > > > > sane-devel mailing list: sane-devel@lists.alioth.debian.org > <mailto:sane-devel@lists.alioth.debian.org> > > > > > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel > > > > > Unsubscribe: Send mail with subject "unsubscribe your_password" > > > > > > > > > >       to sane-devel-requ...@lists.alioth.debian.org > <mailto:sane-devel-requ...@lists.alioth.debian.org> > > > > > > -- > > > sane-devel mailing list: sane-devel@lists.alioth.debian.org > <mailto:sane-devel@lists.alioth.debian.org> > > > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel > > > Unsubscribe: Send mail with subject "unsubscribe your_password" > > > > > >       to sane-devel-requ...@lists.alioth.debian.org > <mailto:sane-devel-requ...@lists.alioth.debian.org> > > > >
I have this same problem with a Pixma MX712 where it seems to "hang" until a hard restart (pulling the plug) *but, the funny thing is that Windows Scan on Windows 8 will work even when the Canon software and scanimage, xsane, and simple-scan won't! My Canon is *only connected via lan so I'll see about capturing what Windows Scan is sending to the scanner against what the Canon software is so it can be compared. Kevin -- sane-devel mailing list: sane-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel Unsubscribe: Send mail with subject "unsubscribe your_password" to sane-devel-requ...@lists.alioth.debian.org