Brother scanners directly working linux

hum... then something is wrong because brscan4 is meant to be detected and installed by the elive-health tool :thinking: , can you show me the info of these two commands in live mode? (which means: no brscan packages installed yet)

lsusb | grep -i brother
hwinfo | grep -i brother

yeah but is not so viable because users normally modify quite the system (which means: adding repositories for example), so some of these packages are not possible to be installed later, or the version can differ, or it can be a bad idea to install them (people can install packages that breaks or overloads their systems, or lots of libs / dependencies), so in short a new install meants to be a clean setup, so is better to just let the user decide (manually) which packages to install and by knowing how he has been installed them, the only thing possible is to generate a list for the user showing him them so he may want to add them on the list

yeah i do that too, like an "overview" of what things I had installed in the last months

Well the device is recognized as a printer not as a scanner so doesn't trigger elive-health.

Maybe it does (sorry ATM I don't have a live-USB iso available) but in general elive-health takes ages to recognize said USB scanner and this printer turns itself off/standby if it isn't used for a while.
Like I said 'printer-driver-brlaser' was already installed (automatically) on my system and opening the document-scanner immediately pops a link to the Brother website when it doesn't find a driver.

I already know not to do that and simply install 'brscan" but this migh be confusing for a first timer. :thinking:

I think that would be more helpful alongside the current pop up in the installer. It would of course be an extensive list including all the pulled in depencies but it might jog someones memory about what's installed and what not.

it doesn't matter, we only need to detect the "machine model" which on that case we know requires X package to feature the scanner

ah right, I think I remember the printer (+scanner) should be turned ON when you boot elive (which triggers elive-health) to make it installed

that's why elive-health meants to feature that: if the device is detected, the required driver is installed (silently) and so the scanner will directly work for everybody (and there's a good amount of them so...)

what could be better is to create a dbus file conf that will trigger when the device is connected it runs elive-health (or equivalent) to install the driver :thinking:

Yes, that would definitely be best. :1st_place_medal:
That way it would be faster than 'simplescan' which points you to the Brother website for drivers only --after clicking 'scan' and it not finding a connecte scanner.

Or more like an udev conf file (i meant), similar to this one: /lib/udev/rules.d/70-printers.rules

I'm not very experienced on udev rules, but since you have this scanner, can you try to a conf .rules file to see if it can trigger (run) a script when the scanner is plugged?

How to start: read the previously said file (there's plenty of other examples on that directory too), it shows how to "monitor" udev activities so run that command see what "answers" when you plug the scannet, it may provide some needed details we need to fetch in order to run the "install-brscanX-if-not-installed-yet" script, then finally try to create a .rules file and see if actually runs a script everytime you plug the scanner/printer (uninstall brscan package first, to make sure is detected). Note that it needs to be pretty generic, like only "brother" keyword matching, since there's many models (elive-health already knows which package to install for which one), but maybe the model number needs to be included as parameter to the script :thi

Some useful links:

Also: include a pastebin (or here) of all the details (like the result of udevadm...) so it can be useful to implemet correctly the feature :slight_smile:

Will do, the moment I have enough time. :+1:
I'm extremely busy ATM but will have more time at the end of next week.

Well 'udevadm' is a real joy when connecting my standalone Canon scanner .... and that 'documentscanner' does see and configure it correctly.
So that wont be the way to go I'm afraid. I cannot check ATM as I don't have access to the Brother scanner now. :slightly_frowning_face:

syslog (kernel) does mention/recognize the scanner:

So this has me wondering if all 2-in-one printer/scanner devices have this issue, or is this Brother specific. :thinking:
It might be the Brother dcp1510 and Bullseye specific in the sense that Buster installed


Where now only 'printer-driver-brlaser' is installed and doesn't bring in 'brscan4' as it only takes care of the cups drivers.
Where the trick will be in knowing which brscan version (0-4) to use, where I do know that the 1510 and 1512 require brscan4.

Messing around, reading up and thinking ..... we need 'udev' to recognize the scanner device, then look if the required driver is installed. If not, get and install the package and load the driver.

In the case of my dcp1510 that would be: PRODUCT=4f9/2d0/100 in the output of: 'udevadm monitor --kernel --property --subsystem-match=usb'. The 4f9 would be sufficient to recognize the Brother product and the scanner lines in 'elive-health' could be used/called.

Minor issue in the 'elive-health' code is that it still points to Buster a few times... that needs repair. :thinking:

This is the offending line (359) there:

  # scanners support {{{
    if ((is_buster)) ; then
        if lsusb | grep -qs "Brother Industries" || grep -qs "Brother Industries" /tmp/.hwinfo.txt 2>/dev/null ; then
            if dpkg -l | grep -qsE "^ii\s+" && ! dpkg -l | grep -qsE "^ii\s+brscan" ; then
                # get models
                brother_scanner="$( cat /tmp/.hwinfo 2>/dev/null | grep "Brother Industries" ; lsusb | grep "Brother Industries" )"

I don't think that running 'elive-health' on every 'udev' event is a good idea, so maybe create this part using udev rules, maybe in '/etc/udev/rules.d/' ? :thinking:

its not so bad idea, it will trigger only when that (defined) USB is plugged, udev is optimized for that, the tool should be optimized too (move out of elive-health probably), the problem is that if we don't do it on udev, we are limited to have this feature work only when the computer boots while the printer is turned on, not optimal and user will not know how to make it working when dealing in a real life situation

But actually only required (once) if the user wants to access the scanner for the first time. With the right 'brscan*' package installed it wont be needed anymore.
Hence my thought of connecting it to the 'document scanner' (or 'sane') and not the printer.

i dont know how the document scanner / sane would detect if there's that (uninstalled) scanner and to install the package

that's why a simple trigger from, for example udev (which i think is meant to be used for that) should run that tool

another option is to run that tool each time udev detects a USB plugged (similar to the first idea, but the difference is that in the first idea the tool will only be run if matches specific criteria, like model numbers, a "brother" name on it, etc...)

that's why i said we should check other udev rules examples, we may find options that we can use for being more specific on the match

1 Like

I can't find it in the sourcecode either but it has to be there as the 'error' widget even points to the brother website for drivers.
If you click on "install driver software" it points to there.

this is already a good feature for any of the cases :slight_smile:

but elive wants to be better: to have them directly working (which is already implemented, but we want a better implementation now)

Just thinking of having that widget replaced with the Elive "woohoo" one and clicking OK to install. :thinking:
Meaning we'd have our "own" fork of 'document-scanner', i.e 'elive-scanner'. :madness:

In my job I'm working with a lot of SOHO scanner. HP, Epson, Brother, Cannon ... Everything.
One issue is the ever changing download pages. When I write a how-to and link to the DL page of the driver, in the best case the driver goes to another place, found by search the driver model. In worst case the whole setup package is rebuild (smart unify installer, that will download during installation [insert puking smiley here]).
Even download the driver and provide it at my own company storage sucks, because of the plenty issues. Use the latest driver is a 50:50:50 chance it goes better, stays the same bad or getting worse.

I just want to warn, that link to the drivers page needs more updates than anyone sane (related to the brain, not to the scanner driver) can imagine.
Apart from that I'd like the idea.

PS: My workplace is Windows only, so no Linux tests possible.

why to have a widget, why to click or accept, if we can simply have it working by default magically? :slight_smile: that's the elive way lol

you can solve this with a wallpaper :slight_smile: lol

1 Like

you're right .... absolutely. :madness:

But thinking about it:

  1. the installation routine will (in most cases) require root so will ask for password. On top it requires an internet connection,
  2. the 'brscan' packages are in the 'non-free' repository, so a question on whether the user is OK with this is appropriate.
  3. An issue Elive has is, that it does a lot of stuff under the hood that no-one notices, thus calling it Debian with Enlightenment slapped on.
    Showing it off is actually good pr.

So my advice would be to show a pop-up on what is happening and ask permission.