Network Scanning

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
sveijk
Level 1
Level 1
Posts: 7
Joined: Wed Sep 24, 2008 10:46 am

Network Scanning

Post by sveijk » Wed Sep 24, 2008 11:05 am

At work we have a Canon photocopier, scanner printer connected to the network (model IR 2018)

After jumping through some convoluted hoops i was able to get my hands on a version of the linux printer driver that works (UFR II driver for linux only available on the canon.de website).. so now i'm trying to scan.

Just to pre-emt some posts, this is not connected to a USB port in any way..

Installing the windows app, color network scangear works under wine. Going into the configuration the app can find and talk to the scanner, all good. The app however doesn't allow you to actually scan, of course you have to TWAIN to do that (doh!)

Is there anyway of pointing linux to use the wine twain?? Probably not i'm sure, but it seems such a shame as the software will happily communicate with the scanner.

User avatar
dimesio
Moderator
Moderator
Posts: 12687
Joined: Tue Mar 25, 2008 10:30 pm

Re: Network Scanning

Post by dimesio » Wed Sep 24, 2008 11:55 am

sveijk wrote:
Is there anyway of pointing linux to use the wine twain?? Probably not i'm sure, but it seems such a shame as the software will happily communicate with the scanner.
Your scanner needs to work in Linux first (through SANE).
http://winehq.org/site/docs/wineusr-gui ... ure#AEN443
If you get it working, let us know how. There's a dearth of information on this.

sveijk
Level 1
Level 1
Posts: 7
Joined: Wed Sep 24, 2008 10:46 am

Post by sveijk » Thu Sep 25, 2008 4:28 am

If only it would work with SANE, life would be a lot sweeter..

Know i'm thinking a long way out the box here, but going to fiddle and will report back if I have any progress.

vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin » Thu Sep 25, 2008 9:30 am

sveijk wrote:If only it would work with SANE, life would be a lot sweeter..

Know i'm thinking a long way out the box here, but going to fiddle and will report back if I have any progress.
Wine does not support any hardware drivers. That also includes printer / scanner drivers. There is just no infrastructure in place for them.

sveijk
Level 1
Level 1
Posts: 7
Joined: Wed Sep 24, 2008 10:46 am

Post by sveijk » Thu Sep 25, 2008 10:35 am

vitamin wrote:
sveijk wrote:If only it would work with SANE, life would be a lot sweeter..

Know i'm thinking a long way out the box here, but going to fiddle and will report back if I have any progress.
Wine does not support any hardware drivers. That also includes printer / scanner drivers. There is just no infrastructure in place for them.
Indeed this is true, but it's not really hardware (Eh? I hear you exclaiming) It's actually a network device, and wine stuff will easily talk to a network device. As already stated the control program is quite happily talking to the scanner whilst running under wine.

If this had its own scanning utility using the driver directly, I'd leave it at that, as I would be able to get pics into my machine, but it doesn't.

Looking back at some very very old forums it turns out that people used to use their old scsi and parallel scanners under wine. The problem for me at the moment is if I try to implement a wine TWAIN, it automatically trys to connect me to scanners in SANE.

I cannot work out how to tell it not to, and use the windows twain_32.dll, as it isn't in the listed libraries. Guessing it must work though, as it's exactly what people were doing back in 1999 with older non-USB scanners

ho hum the journey continues....

(mind I never been defeated by a bit of hardware yet!)[/i]

vitamin
Moderator
Moderator
Posts: 6605
Joined: Sat Feb 23, 2008 2:29 pm

Post by vitamin » Thu Sep 25, 2008 1:40 pm

sveijk wrote:
vitamin wrote:
sveijk wrote:If only it would work with SANE, life would be a lot sweeter..

Know i'm thinking a long way out the box here, but going to fiddle and will report back if I have any progress.
Wine does not support any hardware drivers. That also includes printer / scanner drivers. There is just no infrastructure in place for them.
Indeed this is true, but it's not really hardware (Eh? I hear you exclaiming) It's actually a network device, and wine stuff will easily talk to a network device. As already stated the control program is quite happily talking to the scanner whilst running under wine.
Well TWAIN (as well as printer) has it's own interface that is close to gdi. But that's why I said Wine doesn't have that part implemented either.

sveijk
Level 1
Level 1
Posts: 7
Joined: Wed Sep 24, 2008 10:46 am

Post by sveijk » Fri Sep 26, 2008 5:35 am

Well here's an update....

Copied all the required twain dlls, directories etc to my wine folder...

Annoyingly wine of course kept on trying to use its native twain via sane support...

However did some digging and discovered that wine-twain is a package. Forcibly removed the thing (had to use --nodeps), and suddenly the scanning sources became those belonging to windows twain not linux sane.

Scanned, slightly buggy i'll admit, the transfer window crashes and won't close itself, so you have to do it manually. But now any twain compliant windows software running under wine will grab images from the scanner using windows twain and scanner driver yay..

Now to write, or find someone who has written a bit of wrapper software that'll let me use it like a sane devfice, but failing that at least i can now save the images to disk :D

User avatar
dimesio
Moderator
Moderator
Posts: 12687
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio » Fri Sep 26, 2008 10:45 am

sveijk wrote:Well here's an update....

Copied all the required twain dlls, directories etc to my wine folder...

Annoyingly wine of course kept on trying to use its native twain via sane support...
In winecfg, "native" means real Windows dlls, and "builtin" refers to Wine's dlls. And since you just referred to Wine's twain as "native," I have to ask this: are you sure you set the override correctly? It may not have been necessary to "forcibly remove" Wine's twain.
However did some digging and discovered that wine-twain is a package.
Out of curiosity, what distro are you using? On my system (openSUSE) twain_32.dll.so is part of the regular wine package, not a separate one.
Now to write, or find someone who has written a bit of wrapper software that'll let me use it like a sane devfice, but failing that at least i can now save the images to disk
You might want to contact the sane-devel mailing list.

sveijk
Level 1
Level 1
Posts: 7
Joined: Wed Sep 24, 2008 10:46 am

Post by sveijk » Fri Sep 26, 2008 11:51 am

dimesio wrote: In winecfg, "native" means real Windows dlls, and "builtin" refers to Wine's dlls. And since you just referred to Wine's twain as "native," I have to ask this: are you sure you set the override correctly? It may not have been necessary to "forcibly remove" Wine's twain.
Sorry, that was just my mistake inversing the naming convention. In wineconf it does not give me the option of using an overide for twain_32.dll. (or anything twain or twunk for that matter). After removing the package though wine just defaulted to using the windows dll, so problem solved.
Out of curiosity, what distro are you using? On my system (openSUSE) twain_32.dll.so is part of the regular wine package, not a separate one.
I'm using fedora 7 (at least on this pc) and wine-1.0-0.3.rc3.fc7
You might want to contact the sane-devel mailing list.
Had a look at the sane-devel mailing list, there are posts from 1999 onwards talking about using twain via wine as a backend for sane. Then everyone realises what a load of work it will be and gives up. Although maybe the first hurdle has already been crossed, getting anything to twain in wine using a windows driver.

If i can make a psuedo linux version of twain_32.dll, using winelib, and get that to talk to the scanner driver, then I might consider trying to write a sane backend. Or maybe at that point someone at sane would consider writing the backend. It would be a bit of an odd one, as it would be a backend that would rely on wine to run..

But if this all seems too tricky I'm quite happy having to twain from some wine program and saving to disk rather than pulling stuff directly into an app using sane. At least that is working now, so all is good :D

User avatar
dimesio
Moderator
Moderator
Posts: 12687
Joined: Tue Mar 25, 2008 10:30 pm

Post by dimesio » Fri Sep 26, 2008 1:38 pm

sveijk wrote: Sorry, that was just my mistake inversing the naming convention. In wineconf it does not give me the option of using an overide for twain_32.dll. (or anything twain or twunk for that matter).
It's not on the list in the Libraries tab, but you can simply type it in under "New overrides." Winecfg will generate a popup warning that this is not recommended, and ask if you really want to do this, but if you click yes, it will add it to the list of existing overrides. At least, it does in 1.1.5, but I don't think that's something that has changed since 1.0.

sveijk
Level 1
Level 1
Posts: 7
Joined: Wed Sep 24, 2008 10:46 am

Post by sveijk » Fri Sep 26, 2008 5:22 pm

dimesio wrote:
It's not on the list in the Libraries tab, but you can simply type it in under "New overrides." Winecfg will generate a popup warning that this is not recommended, and ask if you really want to do this, but if you click yes, it will add it to the list of existing overrides. At least, it does in 1.1.5, but I don't think that's something that has changed since 1.0.
Thanks for the info. Indeed you are right, just tried it there. For me it is all academic, don't usually use wine, just for this workaround. Will try reinstalling the package though, and see if it still bypasses the wine twain.

Will post a report when I do it..

sveijk
Level 1
Level 1
Posts: 7
Joined: Wed Sep 24, 2008 10:46 am

Post by sveijk » Sat Sep 27, 2008 5:35 am

Update

Tried reinstalling wine-twain package... Then typing in the manual override, all still works so all is good cheers.

:D

Locked