Discussion:
Possible to rename network scanner?
(too old to reply)
d***@aequodata.com
2017-05-18 23:46:17 UTC
Permalink
Raw Message
I have a clinic where there are about seven scanners networked with
sane.d and xinetd. Right now when users open SimpleScan 
and look at the list of available network scanners, they see all seven
named 'fujitsu-fl7160' in the list and have to memorize which order
their scanner is in the list.

Is there a method to assign a descriptive name to each scanner like
'lab department 1' ?

Clients are using Ubuntu/SimpleScan.

Thanks.
m. allan noah
2017-05-19 12:20:34 UTC
Permalink
Raw Message
The fujitsu backend includes the serial number of the scanner in the
device name. The users would have to memorize that number. Anything
more would be a code change. The best place to make such a change
would probably be in saned itself, so that all backends could benefit.
Unfortunately, many backends use a dynamically generated device name,
so saned might see different device names after the host reboots. So,
the easiest place to solve this would likely be in the fujitsu backend
itself. We could potentially replace the serial number with a
user-specified device name. This requires more thought.

allan
I have a clinic where there are about seven scanners networked with sane.d
and xinetd. Right now when users open SimpleScan
and look at the list of available network scanners, they see all seven named
'fujitsu-fl7160' in the list and have to memorize which order
their scanner is in the list.
Is there a method to assign a descriptive name to each scanner like 'lab
department 1' ?
Clients are using Ubuntu/SimpleScan.
Thanks.
--
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
--
"well, I stand up next to a mountain- and I chop it down with the edge
of my hand"
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Olaf Meeuwissen
2017-05-19 12:39:14 UTC
Permalink
Raw Message
Hi All(an),
Post by m. allan noah
The fujitsu backend includes the serial number of the scanner in the
device name. The users would have to memorize that number. Anything
more would be a code change. The best place to make such a change
would probably be in saned itself, so that all backends could benefit.
Unfortunately, many backends use a dynamically generated device name,
so saned might see different device names after the host reboots. So,
the easiest place to solve this would likely be in the fujitsu backend
itself. We could potentially replace the serial number with a
user-specified device name. This requires more thought.
I don't think this is something that should be addressed by a SANE
backend. It should also not be addressed by a SANE frontend. It should
be addressed by SANE, eh, "middleware". Not unlike the sanei_* stuff
but not linked statically into whatever backend happens to use it.

I've been doing Node.js web application/service development at the
office for the last year and in that field they also use the terms
frontend and backend. At the same time, there's middleware all over
the place, to the point where there's middleware for middleware ;-), but
it all just gets sandwiched between the frontend and the backend.

I realize that SANE "middleware" is not something we can deliver now or
anytime soon (seeing that the SANE 2 draft has been stuck so long that I
can't recall the year any more precisely than 200x) but it is something
that we may consider for discussion after 1.0.26 (or 1.0.27 ;-)

# So many ideas, so little time ... but I might just start a SANE-R
# discussion after the release. Solliciting ideas for the meaning of
# the R already!
# Then there's also the issue of Alioth -> GitLab.com that's been near
# the forefront of my mind for a while already and refuses to go away.
# Never even mind Fedora 26 and Debian 9 on the horizon which'll trigger
# a small "tsunami" of compiler warning fixes and autotools updates ...
# but that's all for after our upcoming sane-backends release.

Just my two yen,
--
Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27
GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9
Support Free Software https://my.fsf.org/donate
Join the Free Software Foundation https://my.fsf.org/join
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Olaf Meeuwissen
2017-05-19 13:23:50 UTC
Permalink
Raw Message
Hi Curtis,

# Cc:ing sane-devel again. No need to leave the rest out, is there?
I may be talking out of turn here but from a simple Noob User
perspective. I would like to see these 5 Networked scanners in a GUI
list like Printers in the System Settings.
How nice that would be to pick your scanner and Rename it. Scanner 1,
Scanner 2, Bob's Office ect.
Pick which scanner you are using from a drop down list on the Frontend.
I hear you, even though I am not a GUI guy. Usability is not exactly
one of the SANE standard's strong points after about 20 years of
stagnation. Things have changed (a lot!) and the standard hasn't kept
pace.
Once again from a Noobs perspective. I have no idea how complicated this
would be to create, but I will say that setting up my non supported
wireless printer was 10x easier to setup than my supported wireless
scanner (all-in-one)
What you want is not at all unreasonable but unless someone steps up to
do the Hard Work(tm), it ain't gonna happen.

# Not suggesting that you should be the one to step up.
# Not sure I want to either ... but maybe I should ... then again ...
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Aaron Muir Hamilton
2017-05-21 14:51:05 UTC
Permalink
Raw Message
Some of these misleading indentation errors also look like genuine bugs.
Here's one gem from backends/genesys_gl847.c which turned into a
misleading indent when I ran it through clang-format:

660 while (val8 & REG41_FEBUSY);
661 {
662 usleep (10000);
663 status = sanei_genesys_get_status (dev, &val8);
664 };

Pay close attention to the semicolons.

As an aside, this is probably why the 1TBS is superiour to GNU-style.
Post by Olaf Meeuwissen
Hi All(an),
Post by m. allan noah
The fujitsu backend includes the serial number of the scanner in the
device name. The users would have to memorize that number. Anything
more would be a code change. The best place to make such a change
would probably be in saned itself, so that all backends could benefit.
Unfortunately, many backends use a dynamically generated device name,
so saned might see different device names after the host reboots. So,
the easiest place to solve this would likely be in the fujitsu backend
itself. We could potentially replace the serial number with a
user-specified device name. This requires more thought.
I don't think this is something that should be addressed by a SANE
backend. It should also not be addressed by a SANE frontend. It should
be addressed by SANE, eh, "middleware". Not unlike the sanei_* stuff
but not linked statically into whatever backend happens to use it.
I've been doing Node.js web application/service development at the
office for the last year and in that field they also use the terms
frontend and backend. At the same time, there's middleware all over
the place, to the point where there's middleware for middleware ;-), but
it all just gets sandwiched between the frontend and the backend.
I realize that SANE "middleware" is not something we can deliver now or
anytime soon (seeing that the SANE 2 draft has been stuck so long that I
can't recall the year any more precisely than 200x) but it is something
that we may consider for discussion after 1.0.26 (or 1.0.27 ;-)
# So many ideas, so little time ... but I might just start a SANE-R
# discussion after the release. Solliciting ideas for the meaning of
# the R already!
# Then there's also the issue of Alioth -> GitLab.com that's been near
# the forefront of my mind for a while already and refuses to go away.
# Never even mind Fedora 26 and Debian 9 on the horizon which'll trigger
# a small "tsunami" of compiler warning fixes and autotools updates ...
It's ugly work, but maybe it's time we normalize the formatting in some
of the files (especially ones which are abandoned-ish and don't have
open patches). A lot of the compiler warnings I see (I run Arch Linux,
so I'm on bleeding-edge-ish GCC most of the time) are things like
misleading indentation warnings. We don't need to invest in any
infrastructure for formatting IMHO, we could just do a once-over with
clang-format on some of the files.
Just my $0.024298 CAD
Post by Olaf Meeuwissen
# but that's all for after our upcoming sane-backends release.
Just my two yen,
--
Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27
GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9
Support Free Software https://my.fsf.org/donate
Join the Free Software Foundation https://my.fsf.org/join
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Roger
2017-05-21 18:40:09 UTC
Permalink
Raw Message
Post by Aaron Muir Hamilton
Some of these misleading indentation errors also look like genuine bugs.
Here's one gem from backends/genesys_gl847.c which turned into a
660 while (val8 & REG41_FEBUSY);
661 {
662 usleep (10000);
663 status = sanei_genesys_get_status (dev, &val8);
664 };
Pay close attention to the semicolons.
Wow! Even my cat could have probably have caught this with his extremely short
attention span, unless there's a mouse cursor in there.
Post by Aaron Muir Hamilton
As an aside, this is probably why the 1TBS is superiour to GNU-style.
The only benefit I see for GNU-style is fewer text lines in a file, while significantly degrading
easy readability.

Think the easiest to read (or learn by) is the C Programming BSD/Allman style,
with K&R style closely following.

For kicks, here's my (old) augemented BSD/Allman style incantation:
alias indent="indent -bad -bap -nbbo -bl -bli0 -c33 -cbi4 -cd33 -ncdw -nce -ci4 -cli4 -cp33 -d0 -i4 -ip4 -npcs -npsl -nsc -sob -ts4"
Olaf Meeuwissen
2017-05-22 11:05:28 UTC
Permalink
Raw Message
Hi Aaron, list,
Post by Aaron Muir Hamilton
Some of these misleading indentation errors also look like genuine bugs.
Here's one gem from backends/genesys_gl847.c which turned into a
660 while (val8 & REG41_FEBUSY);
661 {
662 usleep (10000);
663 status = sanei_genesys_get_status (dev, &val8);
664 };
Pay close attention to the semicolons.
Things like this is why I prefer to address the compiler warnings one at
a time and ask for feedback where not sure what to do.
Post by Aaron Muir Hamilton
As an aside, this is probably why the 1TBS is superiour to GNU-style.
Not familiar with 1TBS, so I looked it up[1]

[1] https://en.wikipedia.org/wiki/Indent_style#Variant:_1TBS_.28OTBS.29

OK, got it. Fine with me, though most of my own C/C++ code uses GNU.

We all have our preferences and I am not going to step on people's toes
trying to enforce a "one true style" for all of sane-backends. Backend
maintainers can use whatever works for them in those files that make up
their backends. All I would like to ask is to use whatever they prefer
consistently throughout a file.

If the file includes hints for common editors that's great but that is
typically limited to emacs and vim. Adding an EditorConfig[2] entry
would be better as that ought to work for even more editors and IDEs.

[2] http://editorconfig.org/

What I would like to apply throughout though is

- UTF-8 encoding everywhere
- no trailing whitespace at the end of line
- no trailing empty lines are the end of file
- new line at end of file

That shouldn't be too controversial but I'll stay away from the coding
style (and tab versus spaces) wars ;-)
Post by Aaron Muir Hamilton
Post by Olaf Meeuwissen
# Never even mind Fedora 26 and Debian 9 on the horizon which'll trigger
# a small "tsunami" of compiler warning fixes and autotools updates ...
It's ugly work, but maybe it's time we normalize the formatting in some
of the files (especially ones which are abandoned-ish and don't have
open patches). A lot of the compiler warnings I see (I run Arch Linux,
so I'm on bleeding-edge-ish GCC most of the time) are things like
misleading indentation warnings. We don't need to invest in any
infrastructure for formatting IMHO, we could just do a once-over with
clang-format on some of the files.
As mentioned above, we all have our coding style preferences and some of
the developers may be more outspoken than others. Since I like to keep
as many of them around as possible, I prefer to tread carefully with a
blanket re-indent of (some of the) code files. If the indenting is more
or less (more rather than less) consistent, I don't see any need to redo
the indenting.

We have a number of builds[3] among which Fedora 25 should give results
close-ish to what you see. Checkout out one of the recent logs[4].

[3] https://gitlab.com/sane-project/backends/pipelines
[4] https://gitlab.com/sane-project/backends/builds/16802918

I try to keep the ci-envs[5] up-to-date with *stable* releases, so
Fedora 26 (and Debian 9?) should be just around the corner.

[5] https://gitlab.com/sane-project/ci-envs

Hope this helps,
--
Olaf Meeuwissen, LPIC-2 FSF Associate Member since 2004-01-27
GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13 F43E B8A4 A88A F84A 2DD9
Support Free Software https://my.fsf.org/donate
Join the Free Software Foundation https://my.fsf.org/join
--
sane-devel mailing list: sane-***@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel
Unsubscribe: Send mail with subject "unsubscribe your_password"
to sane-devel-***@lists.alioth.debian.org
Loading...