SimulPiscator / AirSane

Publish SANE scanners to MacOS, Android, and Windows via Apple AirScan.
GNU General Public License v3.0
251 stars 26 forks source link

Image Capture.app: Failed to open a connection to the device (-21355) #26

Closed trbtm closed 4 years ago

trbtm commented 4 years ago

I am running AirSane on a Raspberry Pi 3B (Raspbian GNU/Linux 10 \n \l (v 10.2)). I am using macOS 10.15.2 as a client.

When trying to use Image Capture I get the following error message:

Screenshot 2020-01-06 at 20 00 18

In System Preferences the Scanner gets configured as:

Screenshot 2020-01-06 at 20 10 35

I runned the server via

sudo -u saned airsaned --debug=true --access-log=-

and when using Image Capture I saw no activity at all:

enumerating local devices...
sane_init(nullptr, nullptr)
sane_get_devices() ...
... sane_get_devices() -> SANE_Status Success
sane_exit()
found: hpaio:/usb/Deskjet_F4500_series?serial=[SOME SERIAL] (Hewlett-Packard Deskjet_F4500_series)
sane_init(nullptr, nullptr)
sane_open(hpaio:/usb/Deskjet_F4500_series?serial=[SOME SERIAL]) -> 0x752362c0
[source] := "Flatbed"
sane_close(0x752362c0)
sane_exit()
uuid: 27b46af4-f1f6-55ca-b60d-dc7814f8d43b
published as 'Hewlett-Packard Deskjet_F4500_series'
listening on 127.0.0.1:8090
listening on 192.168.0.11:8090
listening on ::1:8090
listening on [SOME IPV6 IP]:8090
listening on [SOME IPV6 IP]::8090
listening on [SOME IPV6 IP]::8090

Scanning via "http://local-ip-of-pi:8090" works without any issue and making a test scan results into this:

enumerating local devices...
sane_init(nullptr, nullptr)
sane_get_devices() ...
... sane_get_devices() -> SANE_Status Success
sane_exit()
found: hpaio:/usb/Deskjet_F4500_series?serial=[SOME SERIAL] (Hewlett-Packard Deskjet_F4500_series)
sane_init(nullptr, nullptr)
sane_open(hpaio:/usb/Deskjet_F4500_series?serial=[SOME SERIAL]) -> 0x752362c0
[source] := "Flatbed"
sane_close(0x752362c0)
sane_exit()
uuid: 27b46af4-f1f6-55ca-b60d-dc7814f8d43b
published as 'Hewlett-Packard Deskjet_F4500_series'
listening on 127.0.0.1:8090
listening on 192.168.0.11:8090
listening on ::1:8090
listening on [SOME IPV6 IP]:8090
listening on [SOME IPV6 IP]::8090
listening on [SOME IPV6 IP]::8090
192.168.0.4 - - [06/Jan/2020:18:51:12 +0000] "GET /" 404 0 "" "Mozilla/5.0(Macintosh;IntelMacOSX10_15_2)AppleWebKit/605.1.15(KHTML,likeGecko)Version/13.0.4Safari/605.1.15"
192.168.0.4 - - [06/Jan/2020:18:51:34 +0000] "GET /27b46af4-f1f6-55ca-b60d-dc7814f8d43b" 200 2866 "http://192.168.0.11:8090/" "Mozilla/5.0(Macintosh;IntelMacOSX10_15_2)AppleWebKit/605.1.15(KHTML,likeGecko)Version/13.0.4Safari/605.1.15"
sane_init(nullptr, nullptr)
sane_open(hpaio:/usb/Deskjet_F4500_series?serial=[SOME SERIAL]) -> 0x73019918
[mode] := "Gray"
[source] := "" -> Invalid argument
[resolution] := 600dpi
[tl-x] := 0mm
[tl-y] := 0mm
[br-x] := 148mm
[br-y] := 210mm
sane_start(0x73019918) with options:
[batch-scan] = 0
[br-x] = 148mm
[br-y] = 210mm
[brightness] = 0
[compression] = "JPEG"
[contrast] = 0
[jpeg-quality] = 10
[length-measurement] = "Padded"
[mode] = "Gray"
[resolution] = 600dpi
[source] = "Flatbed"
[tl-x] = 0mm
[tl-y] = 0mm
sane_read(0x73019918): End of file reached
sane_close(0x73019918)
sane_exit()
192.168.0.4 - - [06/Jan/2020:18:57:07 +0000] "POST /27b46af4-f1f6-55ca-b60d-dc7814f8d43b" 200 17375883 "http://192.168.0.11:8090/27b46af4-f1f6-55ca-b60d-dc7814f8d43b" "Mozilla/5.0(Macintosh;IntelMacOSX10_15_2)AppleWebKit/605.1.15(KHTML,likeGecko)Version/13.0.4Safari/605.1.15"

It seems like Image Capture is not even trying to communicate to the server.

trbtm commented 4 years ago

The issue magically resolved overnight. Maybe restarting both, server AND client did the job.