5

I have a Brother DCP-7065DN multi-function device. This device includes a flatbed scanner.

Here is what scanimage -L reports for this scanner.

device `brother4:net1;dev1' is a Brother Scanner DCP-7065DN
device `brother4:net1;dev0' is a Brother DCP-7065DN DCP-7065DN
device `brother4:bus13;dev1' is a Brother DCP-7065DN USB scanner

I'm unclear on the difference between the brother4:net1;dev1 and brother4:net1;dev0. The third one is clearly the USB interface (which I don't normally use). I usually use the first one. This is a minor but irritating issue, so I'd appreciate clarifications or suggestions where to look.

This scanner has been reliable, but I tried using it just now, and SANE cannot open brother4:net1;dev1. This is likely because I recently switched from a DSL internet service to a cable internet service. When doing this, I had to add a router in front of the cable modem, since the cable modem only had one Ethernet slot. Since the cable modem has address 192.168.1.1 by default, I had to change the router to 192.168.0.1 so as to not conflict with it. The printer uses a static address. It used to be 192.168.1.20, but I changed it to 192.168.0.20. This change may be causing the problem - I had to change it in CUPS before the printer would work.

But I'm unable to discover where SANE stores IP addresses of devices. And furthermore, I don't know where it is getting the list of devices that scanimage -L is listing. I suspect this issue is easily resolved by someone who has a better understanding of how SANE works.

Faheem Mitha
  • 35,108
  • 1
    ArchWiki gives a good summary, but it doesn't seem to tell the whole story, some proprietary drivers also have net configurations in /etc/sane.d/<device>.conf. Perhaps grep for 192\.168\. in /etc/sane.d and /etc/sane.d/dll.d? – Satō Katsura Sep 02 '17 at 14:41

1 Answers1

5

So, a little more searching, and it appears that the Brother network devices listed in the scanimage -L output shown in my question (the first two lines), are listed in (wait for it):

/opt/brother/scanner/brscan4/brsanenetdevice4.cfg

This has a symbolic link in /etc linking to this file:

root@orwell:/etc# ls -lah opt/brother/scanner/brscan4/brsanenetdevice4.cfg 
lrwxrwxrwx 1 root root 49 Sep 25  2013 opt/brother/scanner/brscan4/brsanenetdevice4.cfg /opt/brother/scanner/brscan4/brsanenetdevice4.cfg

Needless to say, I found this by doing a grep. For some reason, Brother wants you to modify this file using the utility brconfig4, which is kinda bananas. I.e. the syntax to add a device is:

brsaneconfig4 -a name=Scanner model=DCP-7065DN ip=192.168.0.20

It seems that the devices brother4:net1;dev1 and brother4:net1;dev0 listed above really are redundant, because this is the contents of /opt/brother/scanner/brscan4/brsanenetdevice4.cfg with both those devices:

DEVICE=DCP-7065DN , "DCP-7065DN" , 0x4f9:0x24a , IP-ADDRESS=192.168.0.20

DEVICE=Scanner , "DCP-7065DN" , 0x4f9:0x24a , IP-ADDRESS=192.168.0.20

So I deleted the first line, corresponding to the device DCP-7065DN, using (to humor Brother)

brsaneconfig4 -r DCP-7065DN
Faheem Mitha
  • 35,108