<div dir="ltr"><div><div><div><div><div><div><br></div>Martin, <br></div>ad 1)<br>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.<br></div>ad 2)<br></div></div>I agree , this IS strange ... <br>ad 3)<br></div>I agree , this IS strange ...<br><div><div><div><div><div>ad 4)<br></div><div>Frankly, you have so many strange phenomenons going on, so ... you could try.... <br></div><div>(not that this a satisfactory solution at all...)<br><br></div><div>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....<br></div><br></div><div>Sorry, its not much help.</div><br><div>/Troels<br></div><div><div><br></div><div><br></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-01-07 23:26 GMT+01:00 Martin <span dir="ltr"><<a href="mailto:martin.gu@intergga.ch" target="_blank">martin.gu@intergga.ch</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Troels<br>
<br>
I agree with you, we have to be careful on the test methodology.<br>
My knowledge in c is limited since I wrote my last c-program about 20 years<br>
ago. But I could try.<br>
But before trying to modify the source code I have some questions:<br>
<br>
1) Did you analyze the USB-calls of the Canon-software on windows and compare<br>
them to the SANE-sequence? What is the meaning of the first sequece 55 53 42<br>
43 F0 36 04 0B...?<br>
<br>
2) What is the difference between scanimage and xsane? Is it only the timing?<br>
<br>
3) What is the difference between xsane and the gimp plugin? Is it only the<br>
timing? Why does the gimp plugin only work after xsane?<br>
<br>
4) Would it be worth while to make a few tests with the printer mode, i.e. to<br>
try to start xsane after printing?<br>
<div class="HOEnZb"><div class="h5"><br>
Martin<br>
<br>
> > If the scanner does not work on a USB port it is quite unlikely to work<br>
> > over the network: the bjnp network code just carries the USB exchange<br>
> > over IP.<br>
><br>
> I mostly agree, though Rolf asks specifically for the USB trace, because<br>
> (as I understood) it differs slightly from the IP traces I had already<br>
> submitted.<br>
> (fix usb first , then patch it for IP, if need be)<br>
><br>
> One advice:<br>
> Be very paranoid on your test methodology. I looked stupid a couple of<br>
> times (sorry Rolf!), because I was fooled by the USB interface and/or the<br>
> Canon firmware.<br>
> When testing a new patch, I tried some settings in random (DPI ,<br>
> colour/black-n-white etc) and reported the success/failures.<br>
> BUT the thing is, that the Canon MF8230 firmware can go into bad-mode, when<br>
> it has received some strange commands, and the following scans might work<br>
> slightly strange for that reason. I was even fooled by the phenomenon, that<br>
> scanning a 1 by 1 cm square works, but scanning the whole A4 didn't. (Well<br>
> ... there WERE some differences between what worked through USB and IP at<br>
> this point in time. I'm guessing it was something timing-critical, but I<br>
> never dissected that last patch from Rolf which fixed it)<br>
><br>
> So I started rebooting the scanner whenever I was in doubt.<br>
> (disconnect/connect the USB interface plus move Cannon unit from to<br>
> "printer mode" and back to "scanner mode" was normally enough)<br>
><br>
><br>
> So what do we do? / What is status?<br>
><br>
> Since scanning CAN work , one could argue the back-end DOES send all the<br>
> necessary+correct commands to the printer.<br>
> If timing is the critical parameter (backed by the fact that something as<br>
> stupid as enabling IP on the printer-side, suddenly makes it work now and<br>
> then), maybe we should try to insert an ugly time-delay before every USB<br>
> write? If that changes anything to the better, we can start to hunt down<br>
> where it is really necessary, and hopefully find a nicer approach<br>
> afterwards?<br>
><br>
> Martin, are you comfortable with pulling the code out of the GIT<br>
> repository, compile , install and experiment with inserting delays?<br>
> I think there is something called "SANE interface USB" sanei_usb.c/h. That<br>
> was maybe a place to start.<br>
><br>
> Louis, what is the odds of success for this approach?<br>
><br>
> :-)<br>
><br>
> /Troels<br>
><br>
> 2015-01-03 20:43 GMT+01:00 Martin <<a href="mailto:martin.gu@intergga.ch">martin.gu@intergga.ch</a>>:<br>
> > Am Samstag, 3. Januar 2015, 11.16:10 schrieb Louis Lagendijk:<br>
> > > On Fri, <a href="tel:2015-01-02" value="+4520150102">2015-01-02</a> at 22:59 +0100, Martin wrote:<br>
> > > > Hi Troels<br>
> > > ><br>
> > > > > *Is it USB3 (on the computer)?<br>
> > > ><br>
> > > > no, it is USB2<br>
> > > ><br>
> > > > > *Do you have access to another computer, where you can try it - Does<br>
> ><br>
> > it<br>
> ><br>
> > > > > work excactly the same strange way ... ?<br>
> > > ><br>
> > > > No,I don't have access to another computer. But I have also Windows 7<br>
> > > > installed. With Windows 7 and the Canon-software it works OK.<br>
> > > ><br>
> > > > > *Does unit have ethernet connection / can you try that way?<br>
> > > ><br>
> > > > Yes. With the ethernet connection the printer works. Thus the<br>
> ><br>
> > IP-address<br>
> ><br>
> > > > below is correct.<br>
> > > > But I cannot access the scanner.<br>
> > > ><br>
> > > >     xsane pixma:MG7500_192.168.0.3<br>
> > > ><br>
> > > > results in the error message "illegal argument". Same thing with<br>
> > > ><br>
> > > >     scanimage --help -d bnjp://<a href="http://192.168.0.3:8612" target="_blank">192.168.0.3:8612</a><br>
> > ><br>
> > > Hi Martin<br>
> > > If the scanner does not work on a USB port it is quite unlikely to work<br>
> > > over the network: the bjnp network code just carries the USB exchange<br>
> > > over IP.<br>
> > > Anyhow, you can find the name with scanimage -L (but make sure that port<br>
> > > 8612 is not blocked by a firewall (see the man-page for sane-pixma in<br>
> > > the latest sources from GIT. you need to enable port 8612 for both<br>
> > > incoming and outgoing traffic.<br>
> > ><br>
> > > Louis<br>
> ><br>
> > Hi Louis<br>
> ><br>
> > The necessary ports on the firewall are open, yet scanimage -L does not<br>
> > find<br>
> > the scanner.<br>
> ><br>
> > But this lead to another discovery:<br>
> > I enabled LAN on the MG7550. And although the unit is connected via USB 2<br>
> > xsane sometimes works?! But with LAN disabled xsane never works without<br>
> > prior<br>
> > scanimage -T. And once xsane or scanimage -T failed all succeeding calls<br>
> > fail<br>
> > until the scanner is switched off and on again.<br>
> ><br>
> > Log of xsane working:<br>
> > [sanei_debug] Setting debug level of pixma to 21.<br>
> > [pixma] pixma is compiled with pthread support.<br>
> > [pixma] pixma version 0.17.13<br>
> > [pixma] pixma_collect_devices() found Canon PIXMA MG7500 Series at<br>
> > libusb:001:007<br>
> > [pixma] pixma_find_scanners() found 1 devices<br>
> > [pixma] pixma_collect_devices() found Canon PIXMA MG7500 Series at<br>
> > libusb:001:007<br>
> > [pixma] pixma_open(): Canon PIXMA MG7500 Series<br>
> > [pixma] *mp150_open***** This is a generation 4 scanner.  *****<br>
> > [pixma] [pixma] Reader task id=139772037314304 (threaded)<br>
> > Reader task started<br>
> > [pixma]<br>
> > [pixma] pixma_scan(): start<br>
> > [pixma]   line_size=4605 image_size=4895115 channels=3 depth=8<br>
> > [pixma]   dpi=300x300 offset=(0,0) dimension=1535x1063<br>
> > [pixma]   gamma_table=0x1f201e0 source=0<br>
> > [pixma]   threshold=127 threshold_curve=0<br>
> > [pixma]   ADF page count: 0<br>
> > [pixma] OUT  T=58.770 len=288<br>
> > [pixma]  00000000:3c 3f 78 6d 6c 20 76 65  72 73 69 6f 6e 3d 22 31<br>
> > [pixma]  00000010:2e 30 22 20 65 6e 63 6f  64 69 6e 67 3d 22 75 74<br>
> > ...<br>
> > Log of xsane not working:<br>
> > pixma] pixma_collect_devices() found Canon PIXMA MG7500 Series at<br>
> > libusb:001:008<br>
> > [pixma] pixma_find_scanners() found 1 devices<br>
> > [pixma] pixma_collect_devices() found Canon PIXMA MG7500 Series at<br>
> > libusb:001:008<br>
> > [pixma] pixma_open(): Canon PIXMA MG7500 Series<br>
> > [pixma] *mp150_open***** This is a generation 4 scanner.  *****<br>
> > [pixma] INTR T=1.249 len=32<br>
> > [pixma]  00000000:00 00 00 01 00 00 00 00  00 00 00 00 00 00 00 00<br>
> > [pixma]  00000010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00<br>
> > [pixma]<br>
> > [pixma] Sending time: '15/01/03 15:32'<br>
> > [pixma] OUT  T=1.250 len=36<br>
> > [pixma]  00000000:eb 80 00 00 00 00 00 00  00 00 00 00 00 00 00 14<br>
> > [pixma]  00000010:31 35 2f 30 31 2f 30 33  20 31 35 3a 33 32 00 00<br>
> > [pixma]  00000020:00 00 00 53<br>
> > [pixma]<br>
> > [pixma] IN   T=21.251 len=-9<br>
> > [pixma]   ERROR: ETIMEDOUT<br>
> > [pixma]<br>
> > ...<br>
> ><br>
> > Martin<br>
> ><br>
> ><br>
> > --<br>
> > sane-devel mailing list: <a href="mailto:sane-devel@lists.alioth.debian.org">sane-devel@lists.alioth.debian.org</a><br>
> > <a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel</a><br>
> > Unsubscribe: Send mail with subject "unsubscribe your_password"<br>
> ><br>
> >              to <a href="mailto:sane-devel-request@lists.alioth.debian.org">sane-devel-request@lists.alioth.debian.org</a><br>
<br>
--<br>
sane-devel mailing list: <a href="mailto:sane-devel@lists.alioth.debian.org">sane-devel@lists.alioth.debian.org</a><br>
<a href="http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel" target="_blank">http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel</a><br>
Unsubscribe: Send mail with subject "unsubscribe your_password"<br>
             to <a href="mailto:sane-devel-request@lists.alioth.debian.org">sane-devel-request@lists.alioth.debian.org</a><br>
</div></div></blockquote></div><br></div>