Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple scanners of the same device type get mixed up #426

Closed
Asgatoril opened this issue Aug 8, 2024 · 3 comments
Closed

Multiple scanners of the same device type get mixed up #426

Asgatoril opened this issue Aug 8, 2024 · 3 comments
Labels

Comments

@Asgatoril
Copy link

Asgatoril commented Aug 8, 2024

Describe the bug
When using multiple scanners of the same model, they are shown in NAPS2 as "Devicename" , "Devicename #2", "Devicename #3" etc.., and can be given custom names and profiles in NAPS2.

If multiple scanners get disconnected and reconnected, e.g. because the devices go in standby, names shift, so that e.g. what was before "Devicename #2" ist now "Devicename #3" and vice versa. This causes the scanner profiles to use the wrong scanner.

To Reproduce
Steps to reproduce the behavior:
We used multiple Canon DR-C230, so I will use that devicename for this example.
1: Attach 2 or more scanners of the same type to the same computer running naps2 and write down in which order you connected them to the computer
2: Create a profile for each scanner. Call the first one "Scanner1" and the second one "Scanner2"
3: Attach the device "Canon DR-C230" to the profile "Scanner1" and the device "Canon DR-C230 #2" to the profile "Scanner2"
4: Scan something with the Profile "Scanner1". It should scan on the scanner that was connected first.
5: Turn off both scanners and turn them back on in the opposite order, they were connected before
6: Scan something with the Profile "Scanner1" again. It will now scan on the other scanner.

Expected behavior
The scanners, selected in the profiles, should stay the same, no matter the order in which they are connected

Screenshots
NAPS2

Desktop (please complete the following information):

  • OS: Windows Server 2019 Standard
  • Version 7.4.3.0

Additional context
The scanners also appear in the device manager with the same name, but each one gets its own registry entry with a different ContainerID (e.g. under: HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Enum\USB\VID_1083&PID_1670\2&e8605e81&0&1). I added a registry key "FriendlyName" for both devices and hoped that this would also help NAPS2 to differentiate between them, but this sadly didn't work. The name in the device manager changes, but the name in NAPS2 stays the same.

@cyanfish
Copy link
Owner

cyanfish commented Aug 9, 2024

This has to do with how scanners identify themselves to NAPS2, it can't be fixed within NAPS2 itself. You can try switching between WIA and TWAIN drivers to see if it makes a difference.

If you like you can also leave the device blank when creating a profile and it will prompt each time for which device to use.

@Asgatoril
Copy link
Author

Ah, ok. Thank you for that information.

Is there anything uniquely identifying, like a serial number, that could be used to e.g. cache the last few connected devices or does WIA only expose the device name?

@cyanfish
Copy link
Owner

WIA uses a device ID instead of the name, but clearly based on your experience this ID isn't getting consistently mapped to the same device.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants