stapelberg / airscan

Go package to scan paper documents 📄 from a scanner 🖨️ via the network 🕸️ using the Apple AirScan (eSCL) protocol.
Apache License 2.0
158 stars 18 forks source link

dug with compatible checking ? #8

Closed gedw99 closed 3 years ago

gedw99 commented 3 years ago

Wonder how we determine if a printer is / is not compatible ? Some white list ?

So it say its not compatible :

airscan1 
2021/10/29 17:12:50 finding device for 5s (use -timeout=0 for unlimited)
2021/10/29 17:12:50 device "Brother MFC-L2710DW series" discovered (use -host="BRW90324B93B317")
2021/10/29 17:12:55 no compatible scanner found

Yet it works !


airscan1 -host BRW90324B93B317
2021/10/29 17:13:25 finding device for 5s (use -timeout=0 for unlimited)
2021/10/29 17:13:26 device "Brother MFC-L2710DW series" found in 301.239815ms
2021/10/29 17:13:32 wrote /tmp/page1.jpg (136163 bytes)
2021/10/29 17:13:33 scan done in 6.889450047s
stapelberg commented 3 years ago

Now fixed with https://github.com/stapelberg/airscan/commit/d5c5aa4ba0f225db27c8df4d442c72bc515b05cd. The messages should now be clearer.

gedw99 commented 3 years ago

thanks

I just started to build a GUI for it using gio. https://gioui.org/ https://github.com/gioui/gio-example

Have a look and let me know if you like the idea.

stapelberg commented 3 years ago

I don’t mind a GUI for it, but it should go into a separate repository. I want to keep this package light and small, precisely so that other programs (e.g. your GUI) can be built without pulling in any unnecessary dependencies :)

gedw99 commented 3 years ago

@stapelberg

yep thats what i thought :)

the gui will also work on the RASP PI as a native app.

I might have to change the airscan code layout to that the CLI and GUI use the same code paths. will see.

I will let you know the repo i do it in.

stapelberg commented 3 years ago

I might have to change the airscan code layout to that the CLI and GUI use the same code paths. will see.

All the functionality that you need to implement AirScan is already exported by this package.

The CLI is merely a demo application, and there’s no need to re-use any of its code. Just copy the DNSSD discovery as a starting point, and most likely you’ll need to significantly re-wire that anyway for a GUI program :)

gedw99 commented 3 years ago

Ok cool