Hi Dennis, Thanks for the work on the ImageClass backend, I've just browsed the code and it looks close to mp730 one, but I think it's fine to have ImageClass in a separate file, as it concerns a large number devices.
I'll incorporate it in CVS soon, as I have currently under test, several modifications for MP970. Concerning the issues: - Did you try also with Xsane ? I did not notice with Xsane the ADF and ADF duplex issue (only ADF appears if duplex not declared), but I don't use xscanimage. Could you test with Xsane and check if you have still the ADF duplex issue ? - Concerning the free issue, I just compared code with mp150 file, the finish_scan () function does not contain free () statements, they are included in the close () function. Maybe this is why the free () gets executed twice. I would suggest to do as in the mp150 finish scan () function, remove the 2 lines in iclass_finish_scan: free (mf->buf); mf->buf = mf->lbuf = mf->imgbuf = NULL; and let the close () function do the free statement. Could you test this ? -For grayscale at 150 dpi, this is rather weird. Could it be related to the free statements ? Nicolas Le samedi 19 avril 2008 ? 23:28 -0700, Dennis Lou a ?crit : > Attached are diffs and code for the imageClass multi-functions. > As discussed, I created a separate pixma_imageclass.c as it seemed > different enough to warrant that approach. I've run all combinations > of DPI and color along with several sizes and boundaries and everything > seems to be working. > > However, there are a couple issues. First, xscanimage shows options for > both ADF and ADF duplex when I've only specified PIXMA_CAP_ADF in the device > table. > Second, glibc complains of a double free on (pixma_t *) s->subdriver->buf in > iclass_finish_scan() and hangs if I scan grayscale at 150DPI and only with > this > combination. I've traced the code and inserted debug statements and verified > that only 1 call to iclass_finish_scan() is occurring, so I'm pretty sure it > is > not happening in my code. > > Also, I've only an MF4270 so all the other devices listed in the Windows > driver are completely untested. > > -Dennis > > ----- Original Message ---- > From: Nicolas <nicolas.martin at freesurf.fr> > To: Dennis Lou <dlou99 at yahoo.com> > Cc: sane-devel at lists.alioth.debian.org > Sent: Thursday, April 17, 2008 2:31:44 PM > Subject: Re: [sane-devel] Canon imageClass MFP's > > Yep, after having a look at the log file you sent, messages look very > similar to MP730 series ones, so it should be a good start point. > What might be more uncertain is the ADF management, this is a bit weak > in the pixma backend. > Depending on modifications you add, you need to figure out if it could > break code, or you could create, like in mp730_t structure, a > mp->generation variable which can ease to separate differences between > models. > > Nicolas > > > Le jeudi 17 avril 2008 ? 13:58 -0700, Dennis Lou a ?crit : > > I dug around some more and I think I've decoded most of the commands and > > protocols. > > Of the 3 pixma subfamilies, it most closely resembles the mp730.c code. > > Lamp/calibration/busy flags seem to be moved around a little but the > > has-paper > > flag seems the same (on a side note, I have yet to observe a cold lamp on > > this machine) > > and the step1() sequence is slightly different. I think I have enough > > info to start > > writing the backend at this point. > > > > I agree that a seperate pixma_imageclass.c is the easiest (don't have to > > worry about > > breaking existing code) and it'd be easier for end-users to find the right > > driver > > and/or add devices. Besides, if imageclass should be merged to an existing > > file, so > > should mp150/mp730/mp750. However, it might be close enough that all I > > have to do is > > add the USB PID's to mp730.c and change a couple lines here and there. > > > > I will be sending snoop logs in a separate email shortly. > > > > -Dennis > > > > ----- Original Message ---- > > From: Nicolas <nicolas.martin at freesurf.fr> > > To: Dennis Lou <dlou99 at yahoo.com> > > Cc: sane-devel at lists.alioth.debian.org > > Sent: Thursday, April 17, 2008 1:12:09 PM > > Subject: Re: [sane-devel] Canon imageClass MFP's > > > > Hi, > > > > Currently maintaining the pixma backend, I can give you tips and > > knowledge on it if you want to design a backend for those Canon MFPs. > > > > Especially if the protocol used by them is similar to the PIXMA > > protocol, then it can be easy to integrate them either in the pixma > > backend (the easiest, let's say as a separate pixma_ImageClass.c file > > for instance), or in a separate imageclass backend, that would probably > > use most of the pixma code. > > > > To have a first idea of what it looks like, could you send me (at mail > > address) a zipped USB snoop of a typical scan session under Windows > > > > Then, we can discuss on the best solution to implement the backend. > > > > Nicolas > > > > Le mercredi 16 avril 2008 ? 18:04 -0700, Dennis Lou a ?crit : > > > Hi, > > > > > > I recently acquired a Canon imageClass MF4270 and am interested in > > > contributing a sane backend for it. This is my progress so far: > > > > > > +Examined Windows driver package. Found references to: > > > --Canon MF5650 > > > --Canon MF5630 > > > --Canon MF3110 > > > --Canon MF8100 > > > --Canon MF5730 > > > --Canon MF5750 > > > --Canon MF5770 > > > --Canon MF6500 Series > > > --Canon MF3200 Series > > > --Canon MF4100 Series > > > --Canon MF4600 Series > > > --Canon MF4010 Series > > > --Canon MF4200 Series > > > > > > +Ran sane-find-scanner -v -v > > > +Ran cat /proc/bus/usb/devices > > > +Created various logs using USB snooper in Windows > > > +Isolated sections of log pertaining to connect, init, scan and de-init > > > +Generated C code from logs and replayed USB commands in Linux > > > +Reversed engineered some commands and responses > > > +Modified C code to generate PNM/BMP files; performed scans from code > > > > > > > > > > > > Attached are output from sane-find-scanner and /proc/bus/usb/devices > > > > > > Looking at the logs, it seems very similar to the pixma MP series. > > > > > > Is anybody else working on this series? > > > > > > -Dennis > > > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > > Be a better friend, newshound, and > > > know-it-all with Yahoo! Mobile. Try it now. > > > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > > > > > > > > > > > > > > ____________________________________________________________________________________ > > Be a better friend, newshound, and > > know-it-all with Yahoo! Mobile. Try it now. > > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ > > > > ____________________________________________________________________________________ > Be a better friend, newshound, and > know-it-all with Yahoo! Mobile. Try it now. > http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ