Turns out that this is not a show-stopper issue for me. Paint Shop Pro includes a menu item "End TWAIN Session" that can close the SANEWinDS dialog. So: this is a non-issue. Sorry for the false alarm.
Anyway, I'm seeing this behavior with both the x64 and x86 version of SANEWinDS. It's as though it's waiting for some kind of confirmation from PSP or from the saned server, but never gets it. Here are entries from the saned.log for two successful scans: one from SANEWinDS where the twain window hangs, and one from XSANE that does not hang. I'm not seeing much of any difference between the two.
It's ancient. Paint Shop Pro, version 7.04. 32bit windows app from 2001. Seems to work just fine with the native HP twain scanning driver for my scanner. But there's no network scanning with that, so I'm excited for SANEWinDS. It's communicating over port 6566 to avision:libusb on a Ubuntu box that the scanner is connected to.
Anyway, I'm seeing this behavior with both the x64 and x86 version of SANEWinDS. It's as though it's waiting for some kind of confirmation from PSP or from the saned server, but never gets it. Here are entries from the saned.log for a two successful scans: one from SANEWinDS where the twain window hangs, and one from XSANE that does not hang. I'm not seeing much of any difference between the two.
It's ancient. Paint Shop Pro, version 7.04. 32bit windows app from 2001. Seems to work just fine with the native HP twain scanning driver for my scanner. But there's no network scanning with that, so I'm excited SANEWinDS. It's communicating over port 6566 to avision:libusb on a Ubuntu box that the scanner is connected to.
What's the name of the application?
After a successful network scan, the twain scanning dialog box has grayed-out "Close" and "Scan" buttons. The only way to continue is to kill the host graphics program calling twain via the task manager.
Version 1.6.9221
Improved appearance of main form during startup
TWAIN: Fixed empty progress bar in no-GUI mode
Version 1.6.9220
Fixed failure to send button press action to backend
TWAIN: Check for null SANE option descriptor array before attempting to process options
TWAIN: Removed the word "Error" from a log message that's only a warning
TWAIN: Don't try to get SANE options if no device was located
TWAIN: Fixed missing icon and title on progress form
TWAIN: Fixed failure to interpret TW_BOOL enum values as boolean
Package updates
Prevent applying user settings repeatedly during startup and backend changes
Hide invalid and inactive SANE options like scanimage does
Fixed incorrect display of SANE_UNIT_MICROSECOND
fixed null reference bug in ADF detection
Be more explicit when mixing bitwise and boolean logic
Correction: It's because SANEWinDS displays inactive options while scanimage does not. I can't think of any good reason to display inactive options, so I'll fix that.
It's because of this code in canon_dr.c (https://gitlab.com/sane-project/backends/-/blob/master/backend/canon_dr.c?ref_type=heads): /* "Imprinter" group --------------------------------------------------- */ if(option==OPT_IMPRINT_GROUP){ opt->name = "imprinter-options"; opt->title = SANE_I18N ("Imprinter Options"); opt->desc = SANE_I18N ("Controls for imprinter units"); opt->type = SANE_TYPE_GROUP; opt->constraint_type = SANE_CONSTRAINT_NONE; /*flaming hack to get scanimage to hide group*/ if (...
It works now. Thanks for your support. But one think is diverent with my change to SANE 1.3.1 I get Imprinter Options in SANEWinDS but not with scanimage -A Output format is not set, using pnm as a default. All options specific to device net:192.168.14.207:canon_dr:libusb:001:005: Standard: --source ADF Front|ADF Duplex [ADF Front] Selects the scan source (such as a document-feeder). --mode Lineart|Gray|Color [Gray] Selects the scan mode (e.g., lineart, monochrome, or color). --resolution 100|150|200|240|300|400|600dpi...
Package updates
Image transfer buffer management improvement
Added gt68xx.ini (mustek)
I just checked in a fix for this. Please give it a try and let me know how it goes.
Accept larger chunks during image transfer (SANE 1.3)
With Sane 1.3.1 the scanner starts but I get a blank or black pages. With scanimage over the network it works.
It is also interesting that the imprinter only comes via the network but not locally on the server All options specific to device 'net:192.168.14.207:canon_dr:libusb:001:007': Standard: --source ADF Front|ADF Duplex [ADF Front] Selects the scan source (such as a document-feeder). --mode Lineart|Gray|Color [Gray] Selects the scan mode (e.g., lineart, monochrome, or color). --resolution 100|150|200|240|300|400|600dpi [600] Sets the resolution of the scanned image. Geometry: --page-width 0..215.872mm...
It is also interesting that the imprinter only comes via the network but not locally on the server All options specific to device 'net:192.168.14.207:canon_dr:libusb:001:007': Standard: --source ADF Front|ADF Duplex [ADF Front] Selects the scan source (such as a document-feeder). --mode Lineart|Gray|Color [Gray] Selects the scan mode (e.g., lineart, monochrome, or color). --resolution 100|150|200|240|300|400|600dpi [600] Sets the resolution of the scanned image. Geometry: --page-width 0..215.872mm...
I have downgrade my scansrv. root@sanesrv01:~# apt policy sane-utils sane-utils: Installed: 1.0.31-4.1 Now I can scan. I would like to create a test setup with 1.3.1 there were some fixes. v65 2023-06-06, MAN - fix imprinter support (#672) - update attach_one and other init functions
TWAIN: don't try to set unsettable SANE options
Avoid exception when optionvaluesets collection is null
TWAIN: Fixed failure to set SANE string options
I'm testing with a DR-C225II, which is less well supported than your DR-C125 according to http://www.sane-project.org/sane-mfgs.html#Z-CANON. I found that I couldn't scan at all using sane-backends 1.2.1, I could scan only in color using 1.1.1, and both grey and color worked using 1.0.29.
Thanks for the customization. I have compiled the code. The error message is now gone. Unfortunately, scanning still does not work. I get an IO error from the saned backend. I am now testing the older version of saned.
The breaking change in the canon_dr backend was introduced in 1.2.1, so if you can downgrade to 1.1.1 that should work for you. I fixed the bugs in SANEWinDS that were revealed by the bugs in canon_dr, but I'd like to spend more time testing before releasing a new version. If you can compile from the current source it should work for you now.
Replace IIF() with IF()
Don't crash if the backend sends null values in a constraint list (canon_dr)
I have reproduced this issue and will work on a fix.
Hello, I am using a Canon DR-C125 with sand (1.2.1). When I try to connect to the scanner, I get an error message. Does anyone have an idea what the problem could be? 2025-02-24 11:34:58.8265 DEBUG [SANEWinDS.SANE_API.Net_Control_Option] Option=dropout-front, Action=SANE_ACTION_SET_VALUE 2025-02-24 11:34:58.8265 DEBUG [SANEWinDS.SANE_API.Net_Control_Option] New value(0) = 'None' 2025-02-24 11:34:58.8265 DEBUG [SANEWinDS.FormMain.SetOpt] Value Type = 'System.String', Value = 'None' 2025-02-24 11:34:58.8265...
Updated INI file handling for new TW_BOOL enum.
Solved. It must be installed as Administrator. Run PowerShell as Admin Run this command Start-Process msiexec.exe -ArgumentList '/i', "SANEWinDS_1.5.9111_x64.msi" -Verb RunAs Now, it works
Hello, I'm using Windows 11 and the thin client works like a charm to access a Canon MP540 scanner installed on a Raspberry PI 2b with Wifi. Now, I want to use NAPS2 to access the scanner but I can't find a TWAIN source for this scanner. Is there something to do to be able to use TWAIN sources?
TWAIN: Fixed incorrect TWCC_BADVALUE when type conversion is required on MSG_SET
Updated genesys.ini with values from more recent backend
TWAIN: improved compliance with 2.1 standard
TWAIN: DG_CONTROL/DAT_CAPABILITY/MSG_SET with same container as MSG_GET
Check for null pointer after allocating memory
TWAIN: Integrated ICAP_SUPPORTEDSIZES with other UINT16 TWON_ENUMERATION types for cap GET/SET.
TWAIN: Allow setting ICAP_SUPPORTEDSIZES by TW_ENUMERATION
TWAIN: when app is TWAIN 2.0, return TW_BOOL as enumeration.
TWAIN: added DG_CONTROL/DAT_CAPABILITY/MSG_RESETALL
Separate installers for 32 and 64 bit. Version 1.5.9111.
Simplification of prior commit
Added TWAIN 2.0 DSM_Entry entrypoint logic
Please try 1.4 and let me know if it works for you.
Release 1.4.9107
For 32-bit TWAIN, only load the TWAIN 2.0 DSM if the calling DSM is also 2.0, otherwise load the TWAIN 1.x DSM.
Added 64-bit TWAIN support
VS and package updates
You're correct, only 32-bit TWAIN is currently implemented. I'll work on that.
Hi Alex! It appears to me that SANEWinDS is currently only able to interact with Twain 32bit API, since data sources for modern Twain API are missing (confirmed with 64-bit vs 32-bit example Twain apps). Am I misconfiguring something or is it intended? In IrfanView for instance I have to enable the old 32-bit Twain API.
Please provide a trace log as mentioned above and I'll try to spot the problem. Thanks.
I met the same issue, cry.....
Package updates and housekeeping for version 1.3
TWAIN: Added brightness and contrast settings to auto-created backend INI file
TWAIN: Added ICAP_BRIGHTNESS and ICAP_CONTRAST
TWAIN: don't translate TWAIN bit depths less than 3
TWAIN: Inform applications which ICAP_PIXELTYPEs we support
Housekeeping
TWAIN: Prevent enabling duplex when duplex is not supported
TWAIN: ensure non-zero step size in TW_RANGE_FIX32 structure for resolution caps
TWAIN: Minor improvement to unit conversion logging
TWAIN: enable setting of ICAP_BITORDER since it's mandatory
TWAIN: Improved accuracy of result returned by DG_IMAGE/DAT_IMAGELAYOUT/MSG_SET
TWAIN: Inform apps that we support mm and cm units