Status: Proposed
Context:
The project requires integration with a CZUR scanner for image acquisition as part of Task 5: Implement Specialized Detectors. Subtask 5.1 (Scanner API Research) was initiated to determine the best method for programmatic interaction with CZUR scanners. Initial research indicates that CZUR does not provide an official, publicly documented Software Development Kit (SDK) or a general-purpose API for their scanners. For example, the product page for the CZUR Lens Pro model explicitly states "SDK Development Package: No".
Decision Drivers:
- Reliable Communication: The integration must allow for stable and reliable communication with the scanner.
- Maintainability: The chosen integration method should be as maintainable as possible, preferring standardized approaches over bespoke solutions.
- Development Complexity: The effort required to implement and maintain the integration is a key consideration. Reverse engineering is generally more complex and less stable than using an official SDK or a standard protocol.
- Cross-Platform Needs (if any): The solution should ideally support the target operating system(s) for the project.
Considered Options:
-
Official CZUR SDK/API:
- Description: Utilize a software development kit or API provided directly by CZUR.
- Pros: Typically the most straightforward and supported method.
- Cons: Current research strongly suggests this is not available.
- Investigation: Extensive searches of CZUR's website and general web searches have not yielded an official SDK for general developer use.
-
TWAIN Protocol:
- Description: Use the TWAIN standard, an API and protocol for communication between software and image acquisition devices like scanners.
- Pros: Standardized protocol; many TWAIN libraries exist for various programming languages.
- Cons: Dependent on CZUR providing TWAIN-compliant drivers for the specific scanner model(s) used in the project. Not all features of a scanner might be exposed via TWAIN.
- Investigation: Some third-party software (e.g., Readiris PDF) mentions compatibility with CZUR scanners via TWAIN. This needs to be verified for the specific model(s) chosen for this project.
-
"Mini-SDK" / Reverse Engineering:
- Description: Analyze the scanner's communication by reverse-engineering its Windows DLLs (e.g.,
ETapp.dllmentioned in older community posts) or by sniffing USB communication protocols. - Pros: Might provide access to a wider range of features if successful.
- Cons: Highly complex, error-prone, time-consuming, and likely OS-dependent (DLLs are Windows-specific). Resulting integration may be fragile and break with scanner software/firmware updates.
- Investigation: Older (circa 2016) community posts discuss this possibility, highlighting its difficulty.
- Description: Analyze the scanner's communication by reverse-engineering its Windows DLLs (e.g.,
-
CZUR Cloud API:
- Description: Investigate if CZUR's cloud services (e.g., "CZUR Cloud") offer any developer-accessible API that could be used to interact with connected scanners.
- Pros: Could offer a higher-level interface if available.
- Cons: Availability and capabilities are unknown. May introduce internet dependency.
- Investigation: Initial searches have not revealed a documented cloud API for developers.
Decision:
The primary approach for integrating with the CZUR scanner will be to investigate TWAIN compatibility once the specific target CZUR scanner model(s) for this project are identified.
If TWAIN proves to be a viable option for the selected model(s) (i.e., compliant drivers are available and provide necessary functionality), it will be the preferred integration method due to its standardized nature.
If TWAIN is not viable, the following fallback options will be evaluated in order of preference:
- CZUR Cloud API: Further investigation into undocumented or less obvious cloud interaction methods.
- "Mini-SDK" / Reverse Engineering: This will only be considered as a last resort due to its complexity and potential unreliability.
Consequences:
- Blocking Issue: The research and subsequent development for scanner integration (Subtask 5.1 and dependent subtasks like 5.2 Connection Management, 5.3 Scan Settings) are currently blocked until the specific CZUR scanner model(s) to be used in this project are identified by the development team/project stakeholders.
- Impact on Subsequent Tasks: The chosen integration method will significantly influence the design and implementation of
Codexis.BuildManager.ScannoIntegrationand related modules. - Resource Allocation: If reverse engineering becomes necessary, it will require significantly more specialized skills and time.
- TWAIN Library Selection: If TWAIN is chosen, an appropriate TWAIN library for the project's language/environment will need to be selected and evaluated.
Next Steps:
- Action Item (Project Team): Identify and communicate the specific CZUR scanner model(s) that will be used for this project.
- Subtask 5.1 Continuation: Once the model(s) are known, resume research focusing on:
- Official specifications for the identified model(s) regarding SDK, API, or TWAIN support.
- Availability and quality of TWAIN drivers for these models.
- Targeted community forum searches for experiences integrating with these specific models.
- Update this ADR with the model information and the results of the focused TWAIN investigation.