dynarithmic / twain_library

Dynarithmic TWAIN Library, Version 5.x
Apache License 2.0
60 stars 25 forks source link

Samsung WIA-SAMSUNG-SM-G900V Twain Driver Issues #8

Open dynarithmic opened 4 years ago

dynarithmic commented 4 years ago

I have discovered that there are issues with the SAMSUNG Galaxy G5 Twain Driver.

The driver has at least two noticeable bugs that I have verified using DTWAIN.

Issue 1: When closing the TWAIN user interface for the Galaxy S5 by selecting "Cancel", the TWAIN driver does not send a MSG_CLOSEDSREQ to the application, as per the Twain Specification (currently version 2.4). This causes DTWAIN to hang, waiting for the request to be sent (but is not sent). This return must be sent by the driver to initiate proper shutdown of the device's user interface.

Issue 2: The second issue is related to Issue 1 above, and that is when "Cancel" is selected from the user interface, the driver must send back one of three return values, either TWRC_SUCCESS or TWRC_FAILURE, or TWRC_CHECKSTATUS. This again, is according to the TWAIN specification. Instead, the driver sends back a TWRC_CANCEL, which is incorrect and goes against the specification as far as I am interpreting things.

As a comparison, I used the HP CLJM277 scanner driver, and it properly shuts down the user interface, informing the application (that would be DTWAIN) of the request.

I am working on a few workarounds for the Samsung issue -- this is not a DTWAIN issue, but an issue with the compliance of the Samsung phone TWAIN driver.

For those using the Twacker program from the Twain Working Group, and discovers that the Samsung driver "works", note that the Twacker program is shutting down the entire Twain Data Source Manager each time a scan is occurring, thus effectively resetting the broken Twain session created by the Samsung driver. This is totally unacceptable for DTWAIN, since it should never be necessary to shut down the entire TWAIN ecosystem and restart it again.

dynarithmic commented 4 years ago

DTWAIN version 5.1.0.6 has been released to address the issue of the Samsung driver.

dynarithmic commented 4 years ago

I will keep this issue opened, even though DTWAIN has a workaround. This is for any other programmer's having an issue with this driver.