Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
burkhardOffline
Post subject: brscan2 (Brother) doesn't work with aptosid 2011-03 [solved]  PostPosted: 29.01.2012, 12:40



Joined: 2011-01-15
Posts: 6

Status: Offline
After installing aptosin 2011-03 I noticed that brscan2 did not work with sane, although sane-find-scanner found a valid usb device, scanimage -L claimed not to find the right backend.
The reason was the missing of the /usr/lib64 symlink to /usr/lib.
So brscan2 installation simply creates the /usr/lib64/sane directory where it copies in the brscan libraries.
In this case, sane could not find them because it only searches the backend libs in /usr/lib/sane.

The solution is to create the symlink by the command

ln -s /usr/lib /usr/lib64

*before* installing bscan2.


Best regards

Burkhard
 
 View user's profile Send private message  
Reply with quote Back to top
slamOffline
Post subject: RE: brscan2 (Brother) doesn  PostPosted: 29.01.2012, 14:30
Team Member


Joined: 1970-01-01
Posts: 607
Location: w3
Status: Offline
Those files belong in /usr/lib/sane. The link is not missing, /usr/lib64 is not needed and depreciated. You should file a bug report against brscan2, they need to fix that.
Greetings,
Chris

_________________
an operating system must operate
development is life
my Debian repo
 
 View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number 
Reply with quote Back to top
broweOffline
Post subject: RE: brscan2 (Brother) doesn  PostPosted: 30.01.2012, 13:06



Joined: 2010-09-12
Posts: 155
Location: Canada
Status: Offline
Hi burkhard, maybe you can help me troubleshoot my scanner. I have a Brother MFC-J415W and sane-find-scanner shows this:

found USB scanner (vendor=0x04f9 [Brother], product=0x025c [MFC-J415W]) at libusb:004:006

and I'm using brscan3-0.2.11-4.amd64.deb

lsusb reports:

Bus 004 Device 006: ID 04f9:025c Brother Industries, Ltd

xsane finds no scanner.
 
 View user's profile Send private message  
Reply with quote Back to top
burkhardOffline
Post subject: RE: brscan2 (Brother) doesn  PostPosted: 30.01.2012, 20:03



Joined: 2011-01-15
Posts: 6

Status: Offline
Hi browe!

Try to run scanimage with increased debug level:

SANE_DEBUG_DLL=3 scanimage -L

Then you should see some lines like this:
...
[dll] load: searching backend `brother3' in `/usr/lib/x86_64-linux-gnu/sane:/usr/lib/sane'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-brother3.so.1'
[dll] init: initializing backend `brother2'
...

At least you should see, where scanimage searches the needed libs.

Best regards

Burkhard
 
 View user's profile Send private message  
Reply with quote Back to top
broweOffline
Post subject: RE: brscan2 (Brother) doesn  PostPosted: 01.02.2012, 02:05



Joined: 2010-09-12
Posts: 155
Location: Canada
Status: Offline
I created the following links:

      Code:

ln -s /usr/lib64/sane/libsane-brother3.so.1.0.7 /usr/lib/sane/libsane-brother3.so
ln -s /usr/lib64/sane/libsane-brother3.so.1.0.7 /usr/lib/sane/libsane-brother3.so.1
ln -s /usr/lib64/sane/libsane-brother3.so.1.0.7 /usr/lib/sane/libsane-brother3.so.7


And now I get:

      Code:

SANE_DEBUG_DLL=3 scanimage -L
[sanei_debug] Setting debug level of dll to 3.
[dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.22
[dll] sane_init/read_dlld: using config directory `/etc/sane.d/dll.d'
[dll] add_backend: adding backend `brother3'
[dll] sane_get_devices
[dll] load: searching backend `brother3' in `/usr/lib/x86_64-linux-gnu/sane:/usr/lib/sane'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-brother3.so.1'
[dll] init: initializing backend `brother3'
[dll] sane_get_devices: found 1 devices
device `brother3:bus1;dev1' is a Brother MFC-J415W USB scanner
[dll] sane_exit: exiting
[dll] sane_exit: calling backend `brother3's exit function
[dll] sane_exit: finished

lsusb
Bus 004 Device 002: ID 04f9:025c Brother Industries, Ltd


At least now I get a message from xsane:

      Code:

Failed to open device 'brother3:bus1;dev1'


Also, sane-find-scanner:

      Code:

found USB scanner (vendor=0x04f9 [Brother], product=0x025c [MFC-J415W]) at libusb:004:002


Any more hints would be appreciated.
 
 View user's profile Send private message  
Reply with quote Back to top
burkhardOffline
Post subject: RE: brscan2 (Brother) doesn  PostPosted: 03.02.2012, 22:29



Joined: 2011-01-15
Posts: 6

Status: Offline
In this case, you don't have sufficiant rights for using this device.
You have got 2 solutions:

1. Login as root and use xsane (Ahhhrghhh...) Bad one. Don't do this!!!
2. enter an additional entry in the udev rules:

Open file /lib/udev/rules.d/60-libsane.rules (as root) in your favorite editor

enter the following line at the end of the usb scanners (about line 1178)

ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="025c", ENV{libsane_matched}="yes"

and restart the udev (or reboot)

This time you may use this device as ordinary user

Best regards

Burkhard
 
 View user's profile Send private message  
Reply with quote Back to top
broweOffline
Post subject: RE: brscan2 (Brother) doesn  PostPosted: 11.02.2012, 20:28



Joined: 2010-09-12
Posts: 155
Location: Canada
Status: Offline
Thanks for the help burkhard, I followed your advice but I'm still stuck:

I added the following to /lib/udev/rules.d/60-libsane.rules and restarted udev by command /etc/init.d/udev restart I also tried after a dist-upgrade and reboot.

      Code:

# Brother MFC-J415W manually added
ATTRS{idVendor}=="04f9", ATTRS{idProduct}=="025c", ENV{libsane_matched}="yes"

# The following rule will disable USB autosuspend for the device
ENV{libsane_matched}=="yes", RUN+="/bin/sh -c 'if test -e /sys/$env{DEVPATH}/power/control; then echo on > /sys/$env{DEVPATH}/power/control; elif test -e /sys/$env{DEVPATH}/power/level; then echo on > /sys/$env{DEVPATH}/power/level; fi'"

LABEL="libsane_usb_rules_end"


Here's another snipit of code, all seems to be loading properly, but no luck, xsane and skanlite both give up:

      Code:

SANE_DEBUG_DLL=3 skanlite
[sanei_debug] Setting debug level of dll to 3.
[dll] sane_init: SANE dll backend version 1.0.13 from sane-backends 1.0.22
[dll] sane_init/read_dlld: using config directory `/etc/sane.d/dll.d'
[dll] add_backend: adding backend `brother3'
[dll] sane_get_devices
[dll] load: searching backend `brother3' in `/usr/lib/x86_64-linux-gnu/sane:/usr/lib/sane'
[dll] load: dlopen()ing `/usr/lib/sane/libsane-brother3.so.1'
[dll] init: initializing backend `brother3'
[dll] sane_get_devices: found 1 devices
[dll] sane_open: trying to open `brother3:bus1;dev1'
 
 View user's profile Send private message  
Reply with quote Back to top
burkhardOffline
Post subject: RE: brscan2 (Brother) doesn  PostPosted: 07.02.2013, 20:38



Joined: 2011-01-15
Posts: 6

Status: Offline
Almost a year had to pass until my aptosid installation became a similar state. After a fresh-install of aptosid 2012-1 I installed the brscan2 in the way described above. Unfortunately I ended up with an unusable scanner.

scanimage -L
showed me a correct
device `brother2:bus1;dev3'

But when trying to scan, it complains about "invalid parameters".
Meanwhile the /var/log/messages file got the entry
"... (scanimage) did not claim interface 1 before use"

Nevertheless, I found that the brscan2 package wrote two other libs into the directory
/var/lib64
which hadn't been in the library path. In order to solve this, I added a new file "brscan2.conf" in the ld.conf.d directory, containing the needed path. The easiest way to do this is to enter this command:

echo /usr/lib64 >> /etc/ld.so.conf.d/brscan2.conf

After calling "ldconfig" the scanner worked as expected!

Best regards

Burkhard
 
 View user's profile Send private message  
Reply with quote Back to top
burkhardOffline
Post subject: RE: brscan2 (Brother) doesn  PostPosted: 13.07.2013, 14:30



Joined: 2011-01-15
Posts: 6

Status: Offline
I just noticed that the new update of libsane touches the /etc/sane.d/dll.conf. Therefore the brother2 backend is no longer detected and sane does not find a brother scanner.
As a solution you can simply add the string "brother2" (or brother / brother3 depending on your model) at the end of the file dll.conf.

Best regards

Burkhard
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio