SimulPiscator / AirSane

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

Bounjour advertisement #19

Closed markosjal closed 5 years ago

markosjal commented 5 years ago

In the Bonjour advertisement I see some things although not necessary can contribute to a "prettier" interface . One of thise things the txt "representation" field, which both OSX and Mopria will use. At least one version of mopria I tested did have a problem with a "." after hostname.local. As I reported it maybe it got fixed. I know it would be complicated to accommodate thousands if different scanner models icons, but consistent with another suggestion I made here about the ability to customize ScannerSettings xml, one may need the ability to override (with custom) or even deactivate the Bonjour advertisement. Maybe some do not want automatic discovery of scanners, to help keep unauthorized users from using them.

SimulPiscator commented 5 years ago

ScannerCapabilities.xml is generated according to a scanner's capabilities, which are relatively complex. I don't see a way how to make it customizable without employing an advanced template mechanism, which is way outside the scope of AirSane.

I'll think about some mechanism how to specify custom scanner icons, though.

You can deactivate the mDNS advertisement by setting --mdns-announce=false when running airsaned.

markosjal commented 5 years ago

My suggestion on making it customizable with an example.

ScannerSettings Is xml that might offer resolutions like `

75 75 300 300 600 600 ` Now in the case where smeone did not want to allow scanning at 75 DPI , they could go and GET the default ScannerCapabilities fle and edit it for that particular scanner (this may require they manually copiy all ScanneCapabilities file if more than one scanner. ` 300 300 600 600 ` It is not rocket science to customize this and obviously in the case of the test backend , even necessary.. One could even use this method for instance to force platen over sheetfeed scanner if a sheetfeeder is malfunctioning. There is clearly something in the test backend too that makes OSX Mojave unhappy and this would be a way to diagnose problems like this as well. Using the default file as a default and a base for a customized file seems logical but giving the ability to override it whether for diagnostic or customization purposes should not be that difficult. Of course I do not write this kind of code. All of this kind of work I have done has been in PHP and I know that in PHP it would be relativly siple for me to override that with a static file. It is actually easier to customize the XML than to build this package, test and get it working. When a user has a problem, like I ran into with test backend having an opton for a work-around is critical. I have invested a lot of time in getting this installed , finding out why it did not run on ubuntu 16.04 , installing Mint 19.1 , testing it on Mint 19.1 , only to find out the xml generated tor the text backend causes osx Mojave to not work with the scanner. You could so easily write an option to overrride a file with an option in startup script and an equivalent to if (file_exists(/path/to/file)) , probably in less time that it took to answer and continue this thread and it would enhance the debugging capabilitis , and ditto for the Bonjour advertisement.