Scanner - Failed to open a connection to the device (-21345) - Solved
A new Xerox 6515, out of the box, I encountered the error "Failed to open a connection to the device (-21345)" when scanning.
I have a MBP, OS X 10.15.7 (Catalina), wired to the multifunction printer.
After a lot of try, included the installation of the last OS X driver directly from XeroX (which desactivate the scanner !), I've finally tried :
On the printer, desactivate IPv6, then reboot it : the scanner works fine after that.
May be this helps.
MacBook Pro 13″, macOS 10.13