Re: [sane-devel] Canon MF237w ADF

2018-03-28 Thread Louis Lagendijk
On Wed, 2018-03-28 at 11:28 +, Алтымышев Атилла wrote:
>  Hello!
> Please, i need help.
> We are using Canon MF237w MFP in our organization. We have installed
> Linux Mint 17.3, when i scan on glass its find. But when im using
> ADF, First page going scan, but the second one is stopping. 
> 
> There is simple-scan debug.
> I think that sane losing connect to the MFP when trying scan second
> page.
> May be i need to configure sane-backends? (pixma.conf)
> 
> Best regards, Atilla Altymyshev.
Looking at the logfile you seem to be connected over IP (Wifi?). Does
the scanning work over USB?

/Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org

Re: [sane-devel] How can I help with Canon Maxify MB2000 series testing?

2018-03-17 Thread Louis Lagendijk
On Sat, 2018-03-17 at 18:51 +, Patrick Roncagliolo wrote:
> Regarding ADF support, I can tell you a difference between two
> situations:
> 
> ADF empty: backend hangs a while, than I can read "scanimage:
> sane_read: Document feeder out of documents"
> ADF with sheets loaded: operation hats instantaneously, and I can
> read "scanimage: sane_read: Operation was cancelled"
> 
> I can send you some files (scanimage logs and wireshark dumps) if you
> want.
Is this over USB as well? If so, it the backend proper. You may want to
talk to Rolf again for that

BR, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org

Re: [sane-devel] How can I help with Canon Maxify MB2000 series testing?

2018-03-17 Thread Louis Lagendijk
On Sat, 2018-03-17 at 18:36 +, Patrick Roncagliolo wrote:
> I have empty iptables. By reading manpages, I found that /etc/sane.d
> was not in the $SANE_CONFIG_DIR.
> I put there "bjnp://192.168.1.5", lanched scanimage -L and it finally
> worked.
> 
> One question/curiosity: scangearmp2 (Canon proprietary scan tool for
> linux) sends a discovery probe on port 8611 instead of 8612, and
> behaves differently from the pixma backend. Is there some reverse-
> engineered documentation about the BJNP messages, types, codes? I
> imagine so, given that pixma-backend exists, but I had no success in
> finding it.
> 
Read the source code... NO there was no documentation whatsoever. I
reverse engineered the protocol from PCAP traces from the Windows
driver. But that is only part of the story: the bjnp protocol just
translates the USB protocol to run over TCP/IP. So the actual
processing is still done by the same backend code as used for USB
scanning. Internally in the bjnp code I map the sanner name to the USB-
id as that is used a lot in the backend...
I reverse engineered the protocol using the MP970 I had at that time,
and it still works for recent scanners that use BJNP, even though I
have seen some variations used by Canon (later Windows drivers for the
scanner use more TCP and less UDP. But that may also have been the case
with the BJNP printing part. And if it works, don't touch it...

BR, Louis-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org

Re: [sane-devel] Looking for help with scanner

2018-03-17 Thread Louis Lagendijk
On Sat, 2018-03-17 at 11:20 -0700, John Oliver wrote:
> On Sat, Mar 17, 2018 at 02:59:09PM +0100, Louis Lagendijk wrote:
> > On Fri, 2018-03-16 at 10:07 -0700, John Oliver wrote:
> > > On Ubuntu 16.04.04, using "Simple Scan" which is, apparently,
> > > SANE.
> > > 
> > > I bought a Canon imageCLASS MF416dw and had to jump through some
> > > hoops
> > > to get it printing.  It's on the network, wired, local
> > > subnet.  I'm
> > > using the PIXMA backend.
> > > 
> > > 
> > > _scanner._tcp.local. [4m15s] PTR Canon MF410
> > > Series._scanner._tcp.local.
> > > ar: Canone585ce.local. (Cache flush) [4m15s] A 192.168.0.20,
> > > Canon
> > > MF410
> > > Series._scanner._tcp.local. (Cache flush) [4m15s] SRV
> > > Canone585ce.local.:8610 0 0, Canon MF410
> > > Series._scanner._tcp.local.
> > > (Cache flush) [4m15s] TXT "txtvers=1" "note="
> > > "adminurl=http://Canone585ce.local/airprint.html; "ty=Canon MF410
> > > Series" "UUID=f48139e585ce" "mfg=Canon" "mdl=MF410 Series"


Sol this is how the device reports itself: Canon MF410 Series
This deviates more from the type number on the label than normal, just
something to take into account when adding the scanner in the code

> > > 
> > Did you try the scanner over USB? If that works we can continue
> > with
> > the network scanning. Network just adds some additional complexity,
> > so
> > lets first ensure that the scanner works over USB.
> > A quick grep on the source code seems to suggest that it is not yet
> > supported.
Well it reports with a different string, so a grep probably would not
have found it anyhow, but it is currently not suported for all I can
see
> > What does lsusb say for the scanner when connected over USB?
> 
> Haven't tried yet, I don't have a USB cable handy...
Please contact the mailing list again and ask Rolf Bensch to have a
look at the scanner: it is currently not supported. I guess that it
should be added in the code. That is normally not that complicated. But
Rolf does normally the management of the code, so he knows what look
for. @Rolf Bensch: can you please have a look? @John, please find a USB
cable as Rolf will want to do initial testing over USB
> 
> > You could also try:
> > export SANE_DEBUG_PIXMA=20
> > export SANE_DEBUG_BJNP=20
> > scanimage -L 2> log
> > and mail me the logfile
> > See espacially the lines starting with 
> > [pixma] Scanner model
> 
> Attached.
> 
And as expected: the scanner is not yet recognized. Lets hope that Rolf
can have a look...
> 
> What does itt ake to get support added?  I'm happy to do some legwork

See above.

BR, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Looking for help with scanner

2018-03-17 Thread Louis Lagendijk
On Fri, 2018-03-16 at 10:07 -0700, John Oliver wrote:
> On Ubuntu 16.04.04, using "Simple Scan" which is, apparently, SANE.
> 
> I bought a Canon imageCLASS MF416dw and had to jump through some
> hoops
> to get it printing.  It's on the network, wired, local subnet.  I'm
> using the PIXMA backend.
> 
> joliver@blinky:~$ sudo nmap -sU -p 8610-8612 192.168.0.20
> 
> Starting Nmap 7.01 ( https://nmap.org ) at 2018-03-16 09:56 PDT
> Nmap scan report for 192.168.0.20
> Host is up (0.038s latency).
> PORT STATE SERVICE
> 8610/udp open|filtered unknown
> 8611/udp closedcanon-bjnp1
> 8612/udp closedcanon-bjnp2
> MAC Address: F4:81:39:E5:85:CE (Canon)
> 
> Nmap done: 1 IP address (1 host up) scanned in 1.74 seconds
> joliver@blinky:~$ sudo nmap -sT -p 8610-8612 192.168.0.20
> 
> Starting Nmap 7.01 ( https://nmap.org ) at 2018-03-16 09:56 PDT
> Nmap scan report for 192.168.0.20
> Host is up (0.0017s latency).
> PORT STATE  SERVICE
> 8610/tcp open   unknown
> 8611/tcp closed unknown
> 8612/tcp closed unknown
> MAC Address: F4:81:39:E5:85:CE (Canon)
> 
> Nmap done: 1 IP address (1 host up) scanned in 0.32 seconds
> 
> 
> So, I tried mfnp://192.168.0.20 but simple-scan quickly bombs out
> with
> "No scanners detected"  So I sniffed traffic while starting sane:
> 
> joliver@blinky:~$ sudo tcpdump -vvv host 192.168.0.20
> tcpdump: listening on wlp2s0, link-type EN10MB (Ethernet), capture
> size
> 262144 bytes
> 10:04:03.030738 IP (tos 0x0, ttl 64, id 41990, offset 0, flags [DF],
> proto UDP (17), length 44)
> 192.168.0.15.44468 > 192.168.0.20.8610: [udp sum ok] UDP, length
> 16
> 10:04:03.032672 IP (tos 0x0, ttl 64, id 6518, offset 0, flags [none],
> proto UDP (17), length 60)
> 192.168.0.20.8610 > 192.168.0.15.44468: [udp sum ok] UDP, length
> 32
> 10:04:03.032757 IP (tos 0x0, ttl 64, id 41991, offset 0, flags [DF],
> proto UDP (17), length 44)
> 192.168.0.15.48892 > 192.168.0.20.8610: [udp sum ok] UDP, length
> 16
> 10:04:03.036182 IP (tos 0x0, ttl 64, id 17032, offset 0, flags
> [none],
> proto UDP (17), length 126)
> 192.168.0.20.8610 > 192.168.0.15.48892: [udp sum ok] UDP, length
> 98
> 10:04:03.040416 IP (tos 0x0, ttl 64, id 23405, offset 0, flags
> [none],
> proto UDP (17), length 60)
> 192.168.0.20.8610 > 192.168.0.15.8612: [udp sum ok] UDP, length
> 32
> 10:04:03.050893 IP (tos 0x0, ttl 64, id 11420, offset 0, flags
> [none],
> proto UDP (17), length 60)
> 192.168.0.20.8610 > 192.168.0.15.8612: [udp sum ok] UDP, length
> 32
> 10:04:03.082441 IP (tos 0x0, ttl 64, id 41994, offset 0, flags [DF],
> proto UDP (17), length 44)
> 192.168.0.15.41346 > 192.168.0.20.8610: [udp sum ok] UDP, length
> 16
> 10:04:03.083924 IP (tos 0x0, ttl 64, id 7595, offset 0, flags [none],
> proto UDP (17), length 60)
> 192.168.0.20.8610 > 192.168.0.15.41346: [udp sum ok] UDP, length
> 32
> 10:04:03.104825 IP (tos 0x0, ttl 64, id 41998, offset 0, flags [DF],
> proto UDP (17), length 44)
> 192.168.0.15.42059 > 192.168.0.20.8610: [udp sum ok] UDP, length
> 16
> 10:04:03.106075 IP (tos 0x0, ttl 64, id 46684, offset 0, flags
> [none],
> proto UDP (17), length 60)
> 192.168.0.20.8610 > 192.168.0.15.42059: [udp sum ok] UDP, length
> 32
> 10:04:05.956867 IP (tos 0x0, ttl 255, id 7957, offset 0, flags
> [none],
> proto UDP (17), length 343)
> 192.168.0.20.mdns > 224.0.0.251.mdns: [udp sum ok] 0- [0q] 1/0/5
> _scanner._tcp.local. [4m15s] PTR Canon MF410
> Series._scanner._tcp.local.
> ar: Canone585ce.local. (Cache flush) [4m15s] A 192.168.0.20, Canon
> MF410
> Series._scanner._tcp.local. (Cache flush) [4m15s] SRV
> Canone585ce.local.:8610 0 0, Canon MF410 Series._scanner._tcp.local.
> (Cache flush) [4m15s] TXT "txtvers=1" "note="
> "adminurl=http://Canone585ce.local/airprint.html; "ty=Canon MF410
> Series" "UUID=f48139e585ce" "mfg=Canon" "mdl=MF410 Series"
> "scannerAvailable=0", Canone585ce.local. (Cache flush) [4m15s] NSEC,
> Canon MF410 Series._scanner._tcp.local. (Cache flush) [4m15s] NSEC
> (315)
> 10:04:07.186519 IP (tos 0x0, ttl 64, id 42873, offset 0, flags [DF],
> proto UDP (17), length 44)
> 192.168.0.15.41949 > 192.168.0.20.8610: [udp sum ok] UDP, length
> 16
> 10:04:07.187775 IP (tos 0x0, ttl 64, id 41168, offset 0, flags
> [none],
> proto UDP (17), length 60)
> 192.168.0.20.8610 > 192.168.0.15.41949: [udp sum ok] UDP, length
> 32
> 10:04:07.187834 IP (tos 0x0, ttl 64, id 42874, offset 0, flags [DF],
> proto UDP (17), length 44)
> 192.168.0.15.49897 > 192.168.0.20.8610: [udp sum ok] UDP, length
> 16
> 10:04:07.192040 IP (tos 0x0, ttl 64, id 8611, offset 0, flags [none],
> proto UDP (17), length 126)
> 192.168.0.20.8610 > 192.168.0.15.49897: [udp sum ok] UDP, length
> 98
> 10:04:07.193488 IP (tos 0x0, ttl 64, id 43608, offset 0, flags
> [none],
> proto UDP (17), length 60)
> 192.168.0.20.8610 > 192.168.0.15.8612: [udp sum ok] UDP, length
> 32
> 10:04:07.203582 IP (tos 0x0, ttl 64, id 58366, offset 0, flags
> [none],
> proto UDP (17), length 

Re: [sane-devel] How can I help with Canon Maxify MB2000 series testing?

2018-03-17 Thread Louis Lagendijk
On Tue, 2018-03-13 at 21:17 +, Patrick Roncagliolo wrote:
> Hi,
> 
> I tested pixma version 0.17.46 thru USB. It works. 
> 
> However, after updating from your PPa, I'm not able to discover my
> printer on the network. pixma.conf seems to be ignored, no matter if
> I set the IP and multiple port combinations (8610, 8611, 8612, but
> whit wireshark I see only requests as broadcast on ports 8610 8612).
> What could have been changed? Any hints about some dumb things that I
> can have forgotten since last configuration?
> 
> Il giorno dom 11 mar 2018 alle ore 12:26 Rolf Bensch  ine.de> ha scritto:
> > Hi Patrick,
> > 
> > 
> > 
> > I just added button support for your scanner.
> > 
> > 
> > 
> > If you're fetching the sources from git you can start testing now.
> > 
> > Otherwise you must wait 'til tomorrow to get the update from my
> > ppa.
> > 
> > 
> > 
> > Button support is basicly implemented in standard frontends. You
> > should
> > 
> > use gscan2pdf to get best results. Or if you're familiar
> > programming
> > 
> > bash scripts, you can use scanbd
> > 
> > (https://sourceforge.net/projects/scanbd/). If you like I can
> > provide my
> > 
> > pixma scripts.
> > 
> > 
> > 
> > Hope this helps.
> > 
> > 
> > 
> > Cheers,
> > 
> > Rolf
> > 
> > 

I have an MB5050  myself and that works pretty well.
Can you please (in a shell) do:

export SANE_DEBUG_BJNP=20
scanimage -L 2>  log

and mail the resulting log file?
Some of the most recent Canon scanners no longer support bjnp, butthe
MB2000 is as far as I know of the same generation as my MB5050, so I
expect bjnp till to be supported.

Please check your firewall settings (see man sane-pixma) to be sure
that traffic does not get blocked. There should be no reason to modify
the pixma.conf file, unless you are on WIFI: ome users report problems
oer WIFI.
See the bjnp-timeout settings in pixma.conf. A single line of 
bjnp-timeout=5000 
at the beginning of that file should in that case do the trick.
I decided against including that by default as it would cause long
delays for user using other backends

BR, Loujis-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org

Re: [sane-devel] Canon MX922 scan error

2018-02-28 Thread Louis Lagendijk
On Sun, 2018-02-25 at 14:45 -0400, J. Paul Bissonnette wrote:
> On Sat, 24 Feb 2018 15:14:22 +0100
> Louis Lagendijk <lo...@fazant.net> wrote:

Can you please do the following (as root):


tcpdump host 
and then in a different window:
scanimage -L


Given the fact that the scanner does not work on USB either, this is
not going to help. @Rolf Bensch: do you have any idea why the MX922
stopped working? 

> I checked the scanner with windows 7, the scanner is functional.
> 
> jpb@maple:~$ sudo tcpdump host 192.168.0.108
> [sudo] password for jpb: 
> tcpdump: verbose output suppressed, use -v or -vv for full protocol
> decode listening on eno1, link-type EN10MB (Ethernet), capture size
> 262144 bytes 08:54:51.457427 IP 192.168.0.108.8612 >
> 192.168.0.5.8612:
> UDP, length 32 08:54:51.457464 IP 192.168.0.108.8612 >
> 192.168.0.5.8612: UDP, length 32 08:54:51.522781 IP 192.168.0.5.58749
> >
> 192.168.0.108.8612: UDP, length 16 08:54:51.524481 IP
> 192.168.0.108.8612 > 192.168.0.5.58749: UDP, length 32
> 08:54:51.524629
> IP 192.168.0.5.58617 > 192.168.0.108.8612: UDP, length 16
> 08:54:51.526334 IP 192.168.0.108.8612 > 192.168.0.5.58617: UDP,
> length
> 117 08:54:51.571296 IP 192.168.0.5.50297 > 192.168.0.108.8612: UDP,
> length 16 08:54:51.573604 IP 192.168.0.108.8612 > 192.168.0.5.50297:
> UDP, length 32 08:54:56.821491 ARP, Request who-has 192.168.0.108
> tell
> 192.168.0.5, length 28 08:54:56.822500 ARP, Reply 192.168.0.108 is-at
> 00:bb:c1:22:e6:97 (oui Unknown), length 46
> 
> jpb@maple:~$  scanimage -L
> device `pixma:MX920_192.168.0.108' is a CANON Canon PIXMA MX920
> Series
> multi-function peripheral
> 
> 
> 1) Connect the scanner using a USB cable. Does it work? No
-> so here is the issue: there is a problem in the backend itself, as
bjnp just changes the interface but the actual scanner handling is
exactly the same as for USB. We need input from Rolf Bensch as he knows
much more about the scanning code then I do

> 
>  xsane -v
> xsane-0.999 (c) 1998-2013 Oliver Rauch
>   E-mail: oliver.ra...@xsane.org
>   package xsane-0.999
>   compiled with GTK-2.24.29
>   with color management function
>   with GIMP support, compiled with GIMP-2.8.16
>   XSane output formats: jpeg, pdf(compr.), png, pnm, ps(compr.),
> tiff,
>  txt jpb@maple:~$ 

Try scanimage before going to xsane. Scanimage is easier to use from
the command line and has some debugging options as well.


> 1st click on scan error
> [bjnp] bjnp_open_tcp: ERROR - Can not connect to scanner: Connection
> refused 2nd click no error
> save number is advanced from 001.jpeg to 002.jpeg
> 1st click on scan error
> [bjnp] bjnp_open_tcp: ERROR - Can not connect to scanner: Connection
> refused 2nd click no error
> the save number is advanced
> 
Please note that you need to power cycle the scanner when you get the
TCP connect error and probably for USB as well.


BR, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MF8360cdn

2018-02-24 Thread Louis Lagendijk
On Sat, 2018-02-24 at 09:42 +0100, Frank Dornheim wrote:
> Hello,
> 
> I'm trying to scan with a Canon MF8360cdn. He is supported in the
> PIXMA manpage.
> I see that it is found, but no scanner is output afterwards.
> 
> $ env SANE_DEBUG_BJNP="5" scanimage  --help
> [sanei_debug] Setting debug level of bjnp to 5.
> [bjnp] sanei_bjnp_find_devices, pixma backend version: 0.17.37
> [bjnp] sanei_bjnp_find_devices: No devices specified in
> configuration file.
> [bjnp] sanei_bjnp_find_devices: Added all configured scanners,
> now
> do auto detection...
> [bjnp] prepare_socket: lo is not a valid IPv4 interface,
> skipping...
> [bjnp] prepare_socket: enp2s0 is IPv4 capable, sending broadcast,
> socket = 36
> [bjnp] prepare_socket: virbr0 is IPv4 capable, sending broadcast,
> socket = 37
> [bjnp] prepare_socket: virbr1 is IPv4 capable, sending broadcast,
> socket = 38
> [bjnp] prepare_socket: lxcbr0 is IPv4 capable, sending broadcast,
> socket = 39
> [bjnp] sanei_bjnp_find_devices: Select returned, time left
> 0.499983
> [bjnp] sanei_find_devices: Discover response:
> [bjnp]  :4d 46 4e 50 82 01 00 00  00 00 00 00 00 00 00 10
> [bjnp]  0010:00 01 80 00 06 04 88 87  17 0d 8a 7a 00 00 00 00
> [bjnp] get_scanner_name: Forward lookup for mf8300c.bodomos.lan
> succeeded, using as hostname
> [bjnp]
> bjnp_allocate_device(mfnp://mf8300c.bodomos.lan:8610/timeout=1000) 0
> [bjnp] get_scanner_name: Forward lookup for mf8300c.bodomos.lan
> succeeded, using as hostname
> [bjnp] setup_udp_socket: Setting up a UDP socket, dest:
> 192.168.178.131  port 8610
> [bjnp] bjnp_get_scanner_mac_address: Discover response:
> [bjnp]  :4d 46 4e 50 82 01 00 00  00 00 00 00 00 00 00 10
> [bjnp]  0010:00 01 80 00 06 04 88 87  17 0d 8a 7a 00 00 00 00
> [bjnp] bjnp_allocate_device: Scanner not yet in our list, added
> it: mf8300c.bodomos.lan:8610
> [bjnp] get_scanner_id: Get scanner identity
> [bjnp]  :4d 46 4e 50 02 30 00 00  00 01 00 00 00 00 00 00
> [bjnp] setup_udp_socket: Setting up a UDP socket, dest:
> 192.168.178.131  port 8610
> [bjnp] get_scanner_id: scanner identity:
> [bjnp]  :4d 46 4e 50 82 30 00 00  00 01 00 00 00 00 00 56
> [bjnp]  0010:4d 46 47 3a 43 41 4e 4f  4e 3b 43 4d 44 3a 4d 46
> [bjnp]  0020:4e 50 31 2c 4d 75 6c 74  69 50 41 53 53 20 32 2e
> [bjnp]  0030:31 3b 4d 44 4c 3a 4d 46  38 33 30 30 43 20 53 65
> [bjnp]  0040:72 69 65 73 3b 43 4c 53  3a 49 4d 47 3b 44 45 53
> [bjnp]  0050:3a 43 61 6e 6f 6e 20 4d  46 38 33 30 30 43 20 53
> [bjnp]  0060:65 72 69 65 73 3b
> [bjnp] get_scanner_id: Scanner identity string =
> MFG:CANON;CMD:MFNP1,MultiPASS 2.1;MDL:MF8300C
> Series;CLS:IMG;DES:Canon
> MF8300C Series; - length = 86
> [bjnp] get_scanner_id: Scanner model = MF8300C Series
> [bjnp] add_scanner: New scanner added:
> mfnp://mf8300c.bodomos.lan:8610/timeout=1000, serial mf8300c, mac
> address: 8887170d8a7a.
> [bjnp] sanei_find_devices: Discover response:
> [bjnp]  :42 4a 4e 50 02 01 00 00  00 00 00 00 00 00 00 00
> [bjnp] sanei_bjnp_find_devices: Select returned, time left
> 0.46
> [bjnp] sanei_find_devices: Discover response:
> [bjnp]  :4d 46 4e 50 82 01 00 00  00 00 00 00 00 00 00 10
> [bjnp]  0010:00 01 80 00 06 04 88 87  17 0d 8a 7a 00 00 00 00
> [bjnp] get_scanner_name: Forward lookup for mf8300c.bodomos.lan
> succeeded, using as hostname
> [bjnp]
> bjnp_allocate_device(mfnp://mf8300c.bodomos.lan:8610/timeout=1000) 1
> [bjnp] get_scanner_name: Forward lookup for mf8300c.bodomos.lan
> succeeded, using as hostname
> [bjnp] setup_udp_socket: Setting up a UDP socket, dest:
> 192.168.178.131  port 8610
> [bjnp] bjnp_get_scanner_mac_address: Discover response:
> [bjnp]  :4d 46 4e 50 82 01 00 00  00 00 00 00 00 00 00 10
> [bjnp]  0010:00 01 80 00 06 04 88 87  17 0d 8a 7a 00 00 00 00
> [bjnp] add_scanner: Scanner at
> mfnp://mf8300c.bodomos.lan:8610/timeout=1000 was added before, good!
> [bjnp] sanei_find_devices: Discover response:
> [bjnp]  :42 4a 4e 50 02 01 00 00  00 00 00 00 00 00 00 00
> [bjnp] sanei_find_devices: scanner discovery finished...
> scanimage: no SANE devices found
> 
> Thanks Con
> 
Scanimage needs to have its output redirected to a file, e.g.:
scanimage > tt 
If you do not do that it should give you something like:
[louis@travel tmp]$ scanimage
scanimage: output is not a file, exiting
[louis@travel tmp]$ 

What does 
scanimage -L return?
kind regards, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MX922 scan error

2018-02-24 Thread Louis Lagendijk
On Fri, 2018-02-23 at 15:20 -0400, J. Paul Bissonnette wrote:
> 
> Sanner is discoverable and on the same net
> 
> I set the Firewall
> BJNP  8612-8612   TCP 8612-8612
> Problem even when firewall is disabled
> 
Ok, when the firewall is off and the problem still occurs, that can't
be the poblem. In any case you will have to allow UDP as well. 
The protocol uses both TCP and UDP.
> Man sane-pixma claims the MX920 series is supported
> output frpm avahi-discover
> jpb@maple:~$ avahi-discover
> Browsing domain 'local' on -1.-1 ...
> 
> '_canon-bjnp1._tcp' in domain 'local' on 2.0 ... Browsing for
> services
Ok, bjnp is supported, good

Can you please do the following (as root):
tcpdump host 

and then in a different window:
scanimage -L

and mail me the output of both commands?

Some things you should try first:
1) Connect the scanner usinga USB cable. Does itwork?

2) Is the scanner connected over WIFI?
If so and you have a recent sane version, you could try to define to
define the scanner using a timeout value (e.g. at the start of the file
specify
bjnp-timeout=5000
See the description in the /etc/sane.d/pixma.conf (or whatever path
your distribution uses). The timeout parameter is supported since sane-
backends 1.0.27.
What OS/distribution are you using?

/Kind regards, Louis



-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MX922 scan error

2018-02-23 Thread Louis Lagendijk
On Fri, 2018-02-23 at 09:38 -0400, J. Paul Bissonnette wrote:
> This error has basically plagued this canon since new
> 
> [bjnp] bjnp_open_tcp: ERROR - Can not connect to scanner: Connection
> refused
> 
> The printer part of this unit works on all computers 
> 
> This is the error from every computer in the house. We are running
> either Xubuntu 16.04LTS or Ubuntu Studio 16.04LTS
> 
> 
> Any suggest
> 
> Paul
> 
> 
A few questions first:

- Is the firewall opened correctly (see man sane-pixma)
- does this scanner even support the bjnp interface? Lately Canon is
excluding  bjnp support from (certain?) new scanners: 
check using avahi-discover and see if it repots something like:

Found service 'Canon MB5000 series-4' of type '_canon-bjnp1._tcp' in
domain 'local' on 2.0. 
or
Browsing for services of type '_canon-bjnp1._tcp' in domain 'local' on
2.1 ...
Browsing for services of type '_canon-bjnp1._tcp' in domain 'local' on
2.0 ...

Do NOT specify the scanner in pixma.conf UNLESS it is in a different 
ipv4 subnet (within one subnet it will auto-discvoer the scanner if it
supports bjnp)

BR, Louis




-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Bug report: man page StandardInput=

2018-02-05 Thread Louis Lagendijk
On Sat, 2018-02-03 at 01:44 -0800, ToddAndMargo wrote:
> Hi All,
> 
> Bug report:
> 
> In the man page, under the section for
>  /usr/lib/systemd/system/saned@.service
> 
> It states:
> 185:   StandardInput=null
> 
> The correct setting is:
> StandardInput=socket
> 
> "Without this the socket is passed in the wrong spot.[1]"
> 
> Please correct this.
> 
> Many thanks,
> -T
> 
> Reference:
> [1] https://bugzilla.redhat.com/show_bug.cgi?id=1091566#c8
> 
> 
I guess you missed the part above that description: it says that this
works for Saned with systemd support compiled in.There is a second
example that shows the .service file for the case where systemd support
is NOT compiled inAnd it looks as if your version does not have
support compiled in. 
Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] How can I help with Canon Maxify MB2000 series testing?

2018-01-30 Thread Louis Lagendijk
On Mon, 2018-01-29 at 20:35 +, Patrick Roncagliolo wrote:
> Yes, --button-controlled=yes has no effect on the scanner: nothing
> happens, scanimage just hangs while the scanner seems to not have
> understood the command, the display do not change page nor shows a
> prompt or some sign that an operation is pending. I do not know if
> this feature should be supported on the MB2350, I never saw such a
> feature even on Windows when configuring/using my scanner. Could you
> tell me where to check if MB2350 supports the button-controlled mode
> or if you know some windows software that can show me how it works so
> that I can understand what should be the expected behaviour on Linux,
> if any?
> 
> Il giorno lun 29 gen 2018 alle ore 20:40 Louis Lagendijk <louis@fazan
> t.net> ha scritto:
> > On Sun, 2018-01-28 at 14:26 +, Patrick Roncagliolo wrote:
> > > Hi Rolf,
> > > 
> > > I tested scanimage with different options today. In particular, I
> > > tested all the combinations of connection/resolution/color
> > > available with flatbed mode:
> > > 
> > >  --Connection: usb/net
> > >  --Resolution: 75/150/300/600/1200
> > >  --Color: color/gray/lineart
> > > 
> > > ...for a total of 30 tests. I can confirm that all the
> > > combinations work, I have a folder with all the scans and a
> > > script, so I can replicate the operation while collecting debug
> > > info by setting SANE_DEBUG_PIXMA if necessary, and share all the
> > > results somewhere (eg. Google Drive). 
> > > 
> > > But ADF _do not_ work for me using scanimage or scanadf. Here's a
> > > sample output (SANE_DEBUG_PIXMA=3 PIXMA_EXPERIMENT=1):
> > 
> > This sounds the same as the status on my MB5050. You may also want
> > to test the button support: that probably does not work either.
> > 
> > BR, Louis

Hi Patrick
Buttons can be used in xsane (button controlled scan option in standard
options), but are more relevant with scanbd (scan button daemon). It
did not work with my MB5050 but I scan so seldom that I never got
around fixing the isues I found when I started adaption of the pixma
backend.

BR, Louis-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org

Re: [sane-devel] How can I help with Canon Maxify MB2000 series testing?

2018-01-29 Thread Louis Lagendijk
On Sun, 2018-01-28 at 14:26 +, Patrick Roncagliolo wrote:
> Hi Rolf,
> 
> I tested scanimage with different options today. In particular, I
> tested all the combinations of connection/resolution/color available
> with flatbed mode:
> 
>  --Connection: usb/net
>  --Resolution: 75/150/300/600/1200
>  --Color: color/gray/lineart
> 
> ...for a total of 30 tests. I can confirm that all the combinations
> work, I have a folder with all the scans and a script, so I can
> replicate the operation while collecting debug info by
> setting SANE_DEBUG_PIXMA if necessary, and share all the results
> somewhere (eg. Google Drive). 
> 
> But ADF _do not_ work for me using scanimage or scanadf. Here's a
> sample output (SANE_DEBUG_PIXMA=3 PIXMA_EXPERIMENT=1):
This sounds the same as the status on my MB5050. You may also want to
test the button support: that probably does not work either.

BR, Louis-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org

Re: [sane-devel] [janitorial] Relocating the SANE Project

2018-01-29 Thread Louis Lagendijk
On Fri, 2018-01-26 at 17:59 +0900, Olaf Meeuwissen wrote:
> Dear all,
> 
> TL;DR :: Let's move to GitLab.com!  Mailing list TBD.
> 
> # Apologies for the belated follow-up.  I planned to wait a week or
> so
> # to let the dust settle before following up but then Real Life got
> in
> # the way :-(
> 
> 
> I made a couple of suggestions and asked for feedback.  Apart from
> one
> off-list request to join the SANE project on GitLab.com, not one of
> the
> SANE developers has chimed in.  I will take that to mean that
> everyone
> will be fine with whatever gets chosen in the end.  Speak up if
> that's
> not the case!
> 
I am fine with whatever is chosen, as long as there is some description
of the expected work-flow, especilly for the handling of pull-requests.

> The non-developers that did follow up mentioned[1] Sourceforge as a
> possibility (and questioned[2] whether that was serious), offered
> help
> with moving the mailing list to Debian infra-structure[1] (thanks,
> btw!) and a preference for GitHub[3][4].
> 
sourceforge is attractive for its mailinglist capability. But as long
as we can find a working solution for that, I am fine. And we need to
move the web pages (especially supported devices) to an easily found
place.


BR, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Epson XP-860 Scan to Computer (PDF) function

2018-01-02 Thread Louis Lagendijk
On Sun, 2017-12-31 at 10:31 -0800, Kip Warner wrote:
> Hey list,
> 
> I have an Epson XP-860 multi-function printer / scanner. I am using
> Ubuntu 17.10 (amd64). The device is connected via USB and wireless.
> 
> The scanner functionalist works fine from within Simple Scan or any
> other scanning application. However, when I select on the device's
> integrated touch screen console "Scan to Computer (PDF)", and then
> select USB connection, it shows the following error message:
> 
> "Communication error. Check if computer is connected."
> 
> I'm assuming that in order to have this work, there needs to be some
> userland configuration on the connected machine. I was expecting that
> when I hit that button, Simple Scan or some other user selectable
> scanning application would open and the scan would begin. 
> 
> Would anyone be able to point me in the right direction?
> 
> Yours truly,
> 
Device initiated scans require a daemon on the computer that knows what
to do when the button on the scanner is pushed. Please have a look
scanbd https://sourceforge.net/projects/scanbd/. Scanbd is designed on
top of sane. The deamon continuously polls the scanner to see if work
needs to be done. It will then use saned to do the actual scanning.
Results will be stored on disk in the resolution you configured in the
scanbd configuration.

Xsane does have a button-controlled scan option that allows it to wait
for a key press as well. But that is used to delay scanning until the
key on the scanner is pressed. 

BR, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Configure the scanner of Canon i-SENSYS MF4380dn via network

2017-12-09 Thread Louis Lagendijk
On Sat, 2017-12-09 at 13:59 +0100, Stefan Greim wrote:
> Hello,
> 
> i switched some weeks ago from Windows to Ubuntu 16.04 LTS and I
> have 
> some trouble using my scanner of Canon i-SENSYS MF4380dn via network.
> I installed the printer driver from this site: 
> https://www.canon-europe.com/support/consumer_products/products/fax__
> multifunctionals/laser/laserbase_mf_series/i-
> sensys_mf4380dn.aspx?type=drivers=EN=LINUX 
> The printer is working as expected.
> After that I added this the Sane Repository as described here: 
> https://launchpad.net/~rolfbensch/+archive/ubuntu/sane-git
> I added to the file /etc/sane.d/pixma.conf: "bjnp://192.168.2.199" 
> (which is the ip of the canon device) and tried to find the scanner
> via 
> "sane-find-scanner" and "scanimage -L", but that did not work.
> 
> The results are:
> ~$ sane-find-scanner
> 
># sane-find-scanner will now attempt to detect your scanner. If
> the
># result is different from what you expected, first make sure your
># scanner is powered up and properly connected to your computer.
> 
># No SCSI scanners found. If you expected something different,
> make 
> sure that
># you have loaded a kernel SCSI driver for your SCSI adapter.
> 
># No USB scanners found. If you expected something different,
> make 
> sure that
># you have loaded a kernel driver for your USB host controller
> and 
> have setup
># the USB system correctly. See man sane-usb for details.
> 
># Not checking for parallel port scanners.
> 
># Most Scanners connected to the parallel port or other
> proprietary ports
># can't be detected by this program.
> 
># You may want to run this program as root to find all devices.
> Once you
># found the scanner devices, be sure to adjust access permissions
> as
># necessary.
> 
> 
> 
> and:
> 
> ~$ sudo scanimage -L
> 
> No scanners were identified. If you were expecting something
> different,
> check that the scanner is plugged in, turned on and detected by the
> sane-find-scanner tool (if appropriate). Please read the
> documentation
> which came with this software (README, FAQ, manpages).

Looking at the code I get the impressio that you scanner is not yet
supported. adding support may be easy (looking at the web I get the
impression that the MF4380 should be similar to the MF4360 that is
supported. But nobody has done the work. 

best regards, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Cannot connect to my Fujitsu ScanSnap S1300i: connect_fd: could not open device: 3

2017-12-06 Thread Louis Lagendijk
On Wed, 2017-12-06 at 12:35 +0100, Max Westen wrote:
> Mea culpa!
> 
> Found the culprit 
> SANE DID work. but I had scanbd installed too, so scanbd had the
> usb connection with sane and kept the device locked.
> I disabled scanbd, as I remembered installing that and that it might
> interfere with SANE... and so it did!
> 
> Sorry for having bothered you and thanks for the help!
> 
> Max
> 
Well, make sure scanbd and the sane backend have their own dll.conf
where scanbd uses the "normal" one (including the backend for your
scanner), and give the normal clients only see the net backend as you
normally would for saned.

Configure scanbd  to use the a separate directory where your copy the
relevant config for your backend and a dll.conf that is configured for
your backend. Remove all backends from the normal dll.conf (normally in
  /etc/saned.d) but the net backend

All frontends will then use net to connect to scanbd/saned that in its
turn connects to the scanner

BR, Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] saned@service environment question

2017-12-06 Thread Louis Lagendijk
On Wed, 2017-12-06 at 20:27 +0900, Olaf Meeuwissen wrote:
> Hi,
> 
> Apologies for the belated reply.
> 
> ToddAndMargo writes:
> 
> > On 11/25/2017 01:09 AM, Olaf Meeuwissen wrote:
> > > Hi ToddAndMargo,
> > > 
> > > ToddAndMargo writes:
> > > 
> > > > Dear list,
> > > > 
> > > > In the man page, the script for saned@.service shows:
> > > 
> > > # OK, you are reading the documentation, just rather selectively
> > > ;-)
> > > 
> > > > Environment=SANE_CONFIG_DIR=/etc/sane.d
> > > > # If you need to debug your configuration uncomment the next
> > > > line and
> > > > # change it as appropriate to set the desired debug options
> > > > # Environment=SANE_DEBUG_DLL=255 SANE_DEBUG_BJNP=5
> > > > 
> > > > https://bugzilla.redhat.com/show_bug.cgi?id=1091566#c8
> > > > also adds:
> > > > 
> > > > #Environment=SANE_DEBUG_DLL=128 SANE_DEBUG_NET=128
> > > > 
> > > > Question:
> > > > Do you un-comment the all, or only uncomment one of them?
> > > 
> > > You add the SANE_DEBUG_* variables for the backends you want to
> > > debug.
> > > In your case, you probably want to look at least at
> > > SANE_DEBUG_DLL and
> > > SANE_DEBUG_NET and the backend that supports your particular
> > > scanner.
> > > 
> > > > Question:
> > > > 
> > > > Should it not be?
> > > > 
> > > > Environment=SANE_CONFIG_DIR=/etc/sane.d SANE_DEBUG_DLL=255
> > > > SANE_DEBUG_BJNP=5 SANE_DEBUG_NET=128
> > > > 
> > > > all run togther with spaces as the demlimier?
> > > 
> > > Please read the systemd documentation.  I vaguely seem to
> > > remember all
> > > the Environment "assignments" are run together by systemd,
> > > though.
> > > 
> > > # Disclaimer: I no longer use systemd.
> > > 
Yes, systemd concatenates multiple Environment statements, se for
example:
https://coreos.com/os/docs/latest/using-environment-variables-in-system
d-units.html
> > > > Questions:
> > > > 
> > > > What is
> > > > SANE_CONFIG_DIR=/etc/sane.d
> > > 
> > > An environment variable that tells the dll (and most other
> > > backends)
> > > where to look for their configuration.  See sane-dll(5).
> > > 
> > > > SANE_DEBUG_DLL=255
> > > > SANE_DEBUG_BJNP=5, and
> > > > SANE_DEBUG_NET=128
> > > 
> > > Environment variables that tell each of the backend how much to
> > > log.
> > > Larger values produce more output.  What and how much exactly
> > > differs
> > > between backends.
And please check man- for the details of a specific backend

BR, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] any rhel rpms for 1.0.27 out there?

2017-11-23 Thread Louis Lagendijk
On Wed, 2017-11-22 at 19:42 -0800, ToddAndMargo wrote:
> Dear List,
> 
> Anyone know of a source of RPMs out there for
> RHEL and Clones (CentOS, etc.)?  RHEL is
> stuck on 1.0.24 and does not include sane-backends-daemon
> 
> 
> Many thanks,
> -T
> 
> 
No, I don;t know of a repo that has it. but you may try to rebuild the
Fedora SRPM... Just fetch the SRPM and do a rpmbuild --rebuild 
most likely does the job. 
BR, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] systemd and saned

2017-11-11 Thread Louis Lagendijk
On Fri, 2017-11-10 at 21:28 -0800, ToddAndMargo wrote:
> Dear Sane List,
> 
> Google is failing me here.
> 
> I need to get saned running as a service under systemd.
> Does anyone have a paper on how to do this?
> 
That may depend on your distribution. The saned man-page gives an
example (it actually gives 2 examples, depending on whether your saned
is compiled with systemd support)

Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Saned Tutorial is not correct -

2017-11-09 Thread Louis Lagendijk
On Thu, 2017-11-09 at 20:53 +0900, Olaf Meeuwissen wrote:
> Hi Alvaro,
> 
> Simon Matter writes:
> (that you wrote)
> > > The mistake is also in the man pages:
> > > 
> > > using Ubuntu 16.04:  man saned
> > > 
> > > excerpt start:
> > > 
> > > SYSTEMD CONFIGURATION
> > >for systemd we need to add 2 configuation files in
> > > /etc/systemd/system.   < This
> > > should
> > > be
> > > /etc/systemd
> > 
> > I'm not sure but at least on RHEL7 /etc/systemd/system seems
> > correct. Can
> > it be that Ubuntu 16.04 uses an older systemd and therefore the
> > manpage
> > should be changed? If yes, then this has to be done in the Ubuntu
> > packages
> > of SANE.
> 
> Please take a look at the Directories section of the systemd manual
> page[1]
> and the systemd.unit manual page[2] for Ubuntu 16.04LTS.
> 
>  [1]: http://manpages.ubuntu.com/manpages/xenial/en/man1/systemd.1.ht
> ml#contenttoc5
>  [2]: http://manpages.ubuntu.com/manpages/xenial/en/man5/systemd.unit
> .5.html
> 
> Based on my understanding of the documentation there, I would say
> that
> Ubuntu's(?) saned manual page[3] (which is not modified from the one
> that the SANE project ships in this respect) refers to the correct
> directory locations.  If that in some way does not work, it's first
> and
> foremost an issue with the Ubuntu tutorial[4] and Ubuntu's systemd
> and/or SANE packages.
> 
>  [3]: http://manpages.ubuntu.com/manpages/xenial/en/man8/saned.8.html
>  [4]: https://help.ubuntu.com/community/SaneDaemonTutorial
> 
> You may also want to take a look of the files provided by Ubuntu's
> sane-utils package[5] and note that these files should be installed
> for
> you by the package, completely obviating the need for you to
> configure
> anything.
> 
>  [5]: https://packages.ubuntu.com/xenial/amd64/sane-utils/filelist

The locations mentioned in the man-page are definitely correct for
Fedora and RHEL,  the only systems using systemd at the time I wrote
the systemd parts of the man-page (in 2013). For these distros they are
still correct.
Now Ubuntu may have changed some of the paths when it introduced
systemd. It may also be the case that Ubuntu does use an old version of
systemd that does not yet support the user specific units (in
/etc/systemd/user). Can somebody please confirm if other Ubuntu
versions (probably later versions) do use /etc/systemd/system?
If I can find some time I may try to clarify the man-page with the
alternate location if we can get more clarity on this.
BR, Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] BJNP protocol

2017-10-13 Thread Louis Lagendijk
On Fri, 2017-10-13 at 18:51 +, Ralph Little wrote:
> Hi,
> Do any of the SANE Pixma devs (I guess primarily Rolf) have any
> documentation of the BJNP protocol so far as scanning is concerned?
> If so, could I get a hold of a copy?
> I guess I could figure it out with a code read but if someone had
> something written down, then that would save me a lot of work.
> 
> Cheers,
> Ralph
> 
Hi Ralph
No there is no documentation.  reverse engineered the protocol based on
the traces of the Ip-packets.
So reading the code (especially pixma_bjnp_private.h) is the way to go.
Most communication happens using UDP, but the transfer of the scanned
data happens over TCP.

Cheers, Louis -- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org

Re: [sane-devel] sane-pixma and Canon MF8380Cdw

2017-10-03 Thread Louis Lagendijk
On Sun, 2017-10-01 at 14:19 +0300, Harri T. wrote:
> Hi,
> 
> I'm trying to connect a Canon MF8380Cdw multifunction device to my
> Linux Stretch laptop. Windows PCs seem to communicate with the ports
> TCP/8610 and UDP/8610 when scanning. I checked that with Wireshark.
> 
> The folloing line is added to /etc/sane.d/pixma.conf:
> 
> mfnp://192.168.0.51:8610
> 
> However, the scanner is not found:
> 
> [0] mypc:~>scanimage --version
> scanimage (sane-backends) 1.0.25; backend version 1.0.25
> 
> [0] mypc:~>scanimage  
> scanimage: no SANE devices found
> 
> [0] mypc:~>strace scanimage:
> ...
> socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP) = 36
> connect(36, {sa_family=AF_INET, sin_port=htons(8610),
> sin_addr=inet_addr("192.168.0.51")}, 16) = 0
> sendto(36, "MFNP\2\1\0\0\0\0\0\0\0\0\0\0", 16, 0, NULL, 0) = 16
> select(37, [36], NULL, NULL, {tv_sec=4, tv_usec=0}) = 1 (in [36],
> left {tv_sec=3, tv_usec=997255})
> recvfrom(36,
> "MFNP\202\1\0\0\0\0\0\0\0\0\0\20\0\1\200\0\6\4t/hO\327b\300\250\2\25"
> , 2048, 0, NULL, NULL) = 32
> close(36)   = 0
> socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP) = 36
> connect(36, {sa_family=AF_INET, sin_port=htons(8610),
> sin_addr=inet_addr("192.168.0.51")}, 16) = 0
> sendto(36, "MFNP\0020\0\0\0\1\0\0\0\0\0\0", 16, 0, NULL, 0) = 16
> select(37, [36], NULL, NULL, {tv_sec=4, tv_usec=0}) = 1 (in [36],
> left {tv_sec=3, tv_usec=982931})
> recvfrom(36, "MFNP\2020\0\0\0\1\0\0\0\0\0VMFG:CANON;CMD:MF"..., 2048,
> 0, NULL, NULL) = 102
> close(36)  
> ...
> 
> Does this mean that SANE connects to the device but the model is not
> supported?
> 
> Best regards,
> 
> Harri
> 
Harri, to see if your device is supported at all, please check first
using a USB connection. The network protocol piggybacks on the USB
backend. so a test of the USB interface should show if the MF8380 is
supported in the Sane version you are using.
I am not sure if this covers your device, but the MF8300 Series has
been added quite some time ago (May 2015?). So your sane version may be
too old. You may need to upgrae to 1.0.27.

You can also try:
SANE_DEBUG_PIXMA=21 scanimage 2> log and forward the log file. 
BR, Louis 



-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon PIXMA TS8050 compatibility - PIXMA TS8000 Series

2017-06-16 Thread Louis Lagendijk
On Thu, 2017-06-15 at 11:28 +0200, Johannes S. wrote:
> Hi there,
> I just got my new TS8050 and tried to configure SANE to scan from the
> TS8050 over the network (the same way worked for my old PIXMA
> MX925).The Scanner is listed as "Testers needed" on the SANE website,
> so here's my experience report:
> 
> The scanner has a static IP set to 192.168.1.3, my sane configuration
> contains the following entry:
> 
> > bjnp://192.168.1.3 
> 
> When I run `scanimage -L` I get the following error message:
> 
> > [bjnp] udp_command: ERROR - no data received (timeout = 1000)
> > [bjnp] bjnp_init_device_structure: Cannot read mac address,
> > skipping this scanner
> > [bjnp] udp_command: ERROR - no data received (timeout = 1000)
> > [bjnp] add_scanner: ERROR - Cannot read scanner make & model:
> > bjnp://192.168.1.3:8612/timeout=1000
> > device `v4l:/dev/video0' is a Noname Integrated Camera virtual
> > device
> 
> When I try and scan the device with nmap I get the following report:
> 
> > ~ sudo nmap -sU 192.168.1.3/32 
> > Starting Nmap 7.50 ( https://nmap.org ) at 2017-06-15 11:25 CEST
> > Nmap scan report for 192.168.1.3
> > Host is up (0.036s latency).
> > Not shown: 993 closed ports
> > PORT     STATE         SERVICE
> > 68/udp   open|filtered dhcpc
> > 161/udp  open          snmp
> > 500/udp  open|filtered isakmp
> > 1900/udp open|filtered upnp
> > 1901/udp open|filtered fjicl-tep-a
> > 5353/udp open          zeroconf
> > 5355/udp open|filtered llmnr
> > MAC Address: 84:BA:3B:83:58:44 (Canon)
> > Nmap done: 1 IP address (1 host up) scanned in 3.48 seconds
> 
> Looks to me like the bjnp protocol is not supported by this model? Is
> there any other test I can run to help?
> 
> Best regards,
> Johannes
Hi Johannes,
First try to scan using a USB connection, does that work? It is
essential that the scanner works over USB.

And second, try WITHOUT mentioning the scanner in pxima.conf:
export set SANE_DEBUG_BJNP=4 
scanimage -L 2>log

and check if you get any response from the scanner in the log file.

And by the way: did you open the firewall (see man sane-pixma)
So far most Canons do support bjnp, but I learned of one type (forgot
which one) that does not support it.
If there is a bjnp response and the device works on USB, we can discuss
how to debug the issue.

best regards, Louis-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org

Re: [sane-devel] Canon Pixma MG3650 not supported

2017-05-16 Thread Louis Lagendijk
On Mon, 2017-05-15 at 19:44 +0200, Jonatan Hatakeyama Zeidler wrote:
> Hi there,
> 
> on your list of supported devices there is the Canon PIXMA MG3600
> Series. Does that mean the Pixma MG3650 should be supported as well?
> Because it is not. The Pixma MG3650 is a 2in1 device (printer and
> scanner).
What is the verson number of Sane that you are using? The MG3600 was
added in October last year, so only a recent version based on a pre-
release will work with your scanner. Maybe Rolf's PPA https://launchpad
.net/~rolfbensch/+archive/ubuntu/sane-git may be of help getting a
recent snapshot. Release of a new sane version is coming by the end of
this month, but it depends on your distro when updated packages will be
available

BR, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] sane-backends release 1.0.26 schedule

2017-05-08 Thread Louis Lagendijk
On Sun, 2017-05-07 at 07:34 +0900, Olaf Meeuwissen wrote:
> Hi all,
> 
> Louis Lagendijk writes:
> 
> > On Sat, 2017-05-06 at 15:55 +0200, Wilhelm wrote:
> > > Am 06.05.2017 um 14:27 schrieb m. allan noah:
> > > > On Sat, May 6, 2017 at 5:52 AM, Louis Lagendijk <louis@fazant.n
> > > > et>
> > > > wrote:
> > > > > 
> > > 
> > > From a scanbd point of view it would be suffcient to have either:
> > > 
> > > 1) an env-var e.g. SANE_CONFIG_FILE which is normally unset and
> > > all
> > > sane-applications use the compile-time setting. scanbd can set
> > > this
> > > to an alternative (e.g. scanbd-dll.conf) file before starting
> > > saned.
> > > 
> > > 2) give saned a -c  option
> > > 
> > > I would prefer 1)
> > 
> > Well 2 is not an option in my opinion as there is no way for saned
> > to
> > pass an argument to the rest of saned. That is why I implemented
> > 1).
> 
> I don't understand why saned would have to pass arguments to the rest
> of
> saned.  Can you explain?

A terribly confusing typo: I meant sane (or libsane that by default
runs dll.c. Libsane does not have the possibility to pass any arguments
to it.  So saned could not pass the argment to libsane (or dll.c for
that matter). Or it would have to use a environment variable anyway.
that is what I tried to convey.


> > The change to an alternative dll.file was driven by the fact that
> > when
> > packaging scanbd you want to minimize the amount of configuration
> > to be
> > done by the user.
> 
That would not solve the dll.d issue though, sigh (see below for more
details).

> There's post-installation scripts that can take care of most of that
> and
> pre-removal scripts can restore things back to how they were.  As far
> as
> I understand, the only thing the user needs to configure are the
> desired
> actions when a button gets pushed.

This would not work for dll.c updates on rpm based systems at least:
new versions of config files will be stored as dll.conf.rpmnew.  So at
least on rpm based systems not touching dll.conf is desirable. A
restore of the dll.conf from a scanbd removal can not restore the
dll.conf to the latest dll.conf. 

Hence my preference to make an dll-override (see below for an
alternative solution) and leave dll.conf alone (and only load the
backends mentioned in that alternative dll.conf file and ignore dll.d
if an override is specified. I am still unhappy about the inconsistent
behaviour in that case though).
I only wish that dll.d was only loaded from a directive in dll.conf. 
Dll.d is a nasty problem. Any better suggestions for that?
> 
>  - in /etc/scanbd/sane.d/
>    - add symlinks to all files (and directories) in /etc/sane.d
>    - replace the /etc/scanbd/sane.d/dll.conf link with a copy
>    - disable the net backend in /etc/scanbd/sane.d/dll.conf
>  - in /etc/sane.d/dll.conf disable all backends
>    You could prefix all lines with '#scanbd ' for example.
>  - in /etc/sane.d/dll.conf enable the net backend
>    I would also add a note that admins should make changes in
>    /etc/scanbd/sane.d/dll.conf instead.
>  - in /etc/sane.d/net.conf make sure localhost is enabled
> 
Copying dll.conf + symlinking the rest should be ok. I am happy with
this part of the solution.

Modifying sane config files I am not sure about. I seem to recall that
modifying other packages config files is not allowed or at least
frowned upon for fedora. So this would still be a manual action for the
user.

Postinstall for scanbd could do the copying/linking as you propose.
This solves the scanbd side of things. The problem is on the sane
(default) side as we have dll.d to deal with.

> After that scanbd can just set SANE_CONFIG_DIR=/etc/scandb/sane.d and
> do
> its thing.
> 
> On the off chance that sane-backends package upgrades add/remove conf
> files, you should probably also add a trigger to update the symlinks.
> 
Again, I need to check the rules. 

> Did I miss something?  If not, why would we need to complicate the
> dll
> backend's configuration file handling if this can be handled fairly
> easily by package post-installation and pre-removal scripts?
> 
> The only "wart" in the above is the pile of symlinks.
> 
I am not too worried about that part.

> But please read on as I am open to modifying the dll backend's
> conffile
> handling.  Just not in the upcoming 1.0.26.  I think it's all too
> last
> minute and could use some more thought and discussion.
> 
I fully agree on not including this now. I started my initial mail
stating that  I realized that I was very late taking this on. I said in
the report on Alioth that it could take a long 

Re: [sane-devel] sane-backends release 1.0.26 schedule

2017-05-06 Thread Louis Lagendijk
On Sat, 2017-05-06 at 15:55 +0200, Wilhelm wrote:
> Am 06.05.2017 um 14:27 schrieb m. allan noah:
> > On Sat, May 6, 2017 at 5:52 AM, Louis Lagendijk <lo...@fazant.net>
> > wrote:
> > > On Fri, 2017-04-28 at 08:04 -0400, m. allan noah wrote:
> > > > Ok folks, it's time to get another sane-backends release out
> > > > the
> > > > door.
> > > > 
> > > > Olaf has done a good job of cleaning up our contributors list
> > > > and
> > > > curating the bug tracker. However, there are a handful of
> > > > patches in
> > > > the bug tracker that could still be applied, once they are
> > > > reviewed.
> > > > Also, quite a number of backends that are now unmaintained. So,
> > > > this
> > > > is a good time to get involved with sane. If you benefit from
> > > > this
> > > > project, and have some programming experience, we could use the
> > > > help.
> > > > 
> > > > Schedule:
> > > > 
> > > > May 7: Feature freeze (only fix bugs and update docs after this
> > > > date)
> > > > May 14: Code freeze (only update docs after this date)
> > > > May 21: Release
> > > > 
> > > 
> > > Hi,
> > > Yesterday when I had a look at our bug tracker for any issues in
> > > my
> > > code I found https://alioth.debian.org/tracker/?func=detail
> > > _id=30
> > > 186=315004=410366
> > > This is an issue for scanbd integration that requires more
> > > flexibility
> > > for configuration of dll-loading: when scanbd is used users need
> > > to use
> > >  the net backend only, but scanbd/saned need to be fed with the
> > > "normal" list of backends.
> > > I made a patch to dll.c where
> > > - It used the dll.conf with the name pointed out by env. var
> > > SANE_CONFIG_FILE if defined, if not
> > > - it tries to load a dll2.conf if it exists. This is meant to be
> > > a file
> > > dropped in thre sane config dir by scanbd. If that does not exist
> > > - it follows the existing code path.
> > > 
> > > I added a #include statement in the config file so dll2.conf can
> > > include dll.conf if so required.
> > > 
> > > I am in the process of testing and cleaningup. but my question
> > > is:
> > > should I commit this change so close to the freeze date?
> > > Documentation
> > > is still to be done, but I would still have 2 weeks for that.
> > > Alan, what do you think?
> > > 
> > 
> > I don't now recall the entire discussion around the guts of
> > scanbd's
> > implementation, but you description sounds a little odd to me.
> > 
> > 1. If dll2.conf is created by scanbd, and scanbd is not running,
> > and
> > the user uses scanimage or another frontend, he will unknowingly
> > load
> > dll2.conf first. Even if dll2.conf #includes dll.conf, it is still
> > a
> > behavior change.
> > 2. Do you not also need changes to saned to make this work? That
> > seemed to be the case in the earlier discussion.
> > 3. I think I would prefer a more clear name than dll2.conf, but I
> > cannot think of one :)
> 
> From a scanbd point of view it would be suffcient to have either:
> 
> 1) an env-var e.g. SANE_CONFIG_FILE which is normally unset and all
> sane-applications use the compile-time setting. scanbd can set this
> to
> an alternative (e.g. scanbd-dll.conf) file before starting saned.
> 
> 2) give saned a -c  option
> 
> I would prefer 1)
> 
Well 2 is not an option in my opinion as there is no way for saned to
pass an argument to the rest of saned. That is why I implemented 1).

The change to an alternative dll.file was driven by the fact that when
packaging scanbd you want to minimize the amount of configuration to be
done by the user. If the scanbd package drops a dll2.conf file in
SANE_CONFIG_DIR there is no need for manual configuration.

I am now implenmenting a #pidfile directive for in dll2.conf that will
check for the pidfile and fail processing of dll2.conf and fallback to
dll.conf. 

The way I envisage this working is:
The package drops a dll2.conf file containing:

#pidfile=/var/run/scanbd.pid
net

so sane users see only the net backend if scanbd is active.

The default dll.conf remains unchanged, but net should be commented out

Scanbd uses dll.conf (sets SCAN_CONFIG_FILE=dll.conf)


The only configuration required from the user is:
- comment net from dll.conf if not already done
- populate net.conf with localhost

I changed the name of the alternative config file to dll-override.conf
(but remain open for better alternatives).

I hope that these changes (dll-override.conf as name + check for
pidfile) address concerns people may have so I can commit the changes
today and be in time for 1.0.26.

Comments anybody?

BR, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] scanbd integration (was Re: sane-backends release 1.0.26 schedule)

2017-05-06 Thread Louis Lagendijk
On Sat, 2017-05-06 at 21:20 +0900, Olaf Meeuwissen wrote:
> Hi Louis,
> 
> Louis Lagendijk writes:
> 
> > On Fri, 2017-04-28 at 08:04 -0400, m. allan noah wrote:
> > > Ok folks, it's time to get another sane-backends release out the
> > > door.
> > 
> > [snip]
> > 
> > Hi,
> > Yesterday when I had a look at our bug tracker for any issues in my
> > code I found https://alioth.debian.org/tracker/?func=detail_i
> > d=30186=315004=410366
> > This is an issue for scanbd integration that requires more
> > flexibility
> > for configuration of dll-loading: when scanbd is used users need to
> > use
> > the net backend only, but scanbd/saned need to be fed with the
> > "normal" list of backends.
> 
> Thanks for trying to improve scanbd integration.
> 
> > I made a patch to dll.c where
> > - It used the dll.conf with the name pointed out by env. var
> > SANE_CONFIG_FILE if defined, if not
> > - it tries to load a dll2.conf if it exists. This is meant to be a
> > file
> > dropped in thre sane config dir by scanbd. If that does not exist
> > - it follows the existing code path.
> 
> So, if I understand correctly, your patched dll backend tries
> 
>   $SANE_CONFIG_FILE (if defined)
>   $SANE_CONFIG_DIR/dll2.conf (if SANE_CONFIG_DIR is defined)
>   $sysconfdir/dll2.conf
>   $SANE_CONFIG_DIR/dll.conf (if SANE_CONFIG_DIR is defined)
>   $sysconfdir/dll.conf
> 
> where $sysconfdir is set at ./configure time.  Is that right?
> 
Yes, I am indeed using the $sysconfdir (or SANE_CONFIG_DIR) as search
path for all config files. 

I am using the sanei functions for loading the config, so the logic is
the same as for loading other config files.


> If so, I guess that could be okay but I don't like the dll2.conf name
> very much.  It seems to imply there's a dll2 backend.  There isn't
> one,
> not now at least.
Neither do I. I am still looking for something better, right now I am
trying to get a working solution. How about dll-override.conf?

> > I added a #include statement in the config file so dll2.conf can
> > include dll.conf if so required.
> 
> How does that work when SANE_CONFIG_DIR is defined?

I need to check this, but I am using sanei_config so it SHOULD (famous
last words) work. do it would follow the normal search path
(SANE_CONFIG_DIR if set, otherwise $sysconfdir). I actually implemented
this by a call to read_conf with the new name from within read_config.
This would allow even allow an include from an include.

I however just realized that if a user gets the override dll.conf,
scanbd could use dll.conf explicitely. This removes the need for the
#include, so i will remove it.

alan mailed me about one issue: if there is a dll2.conf but scanbd is
not started, sane would not find any scanners. I don't know what to do
about that case. Well start scanbd init scripts or the systemd units
could place/remove the dll2.conf, but that is to much of an hack. Maybe
 add a pidfile parameter on the first line in dll2.conf that if not
present makes sane fallback to dll.conf?

Thanks for the feedback
Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] sane-backends release 1.0.26 schedule

2017-05-06 Thread Louis Lagendijk
On Fri, 2017-04-28 at 08:04 -0400, m. allan noah wrote:
> Ok folks, it's time to get another sane-backends release out the
> door.
> 
> Olaf has done a good job of cleaning up our contributors list and
> curating the bug tracker. However, there are a handful of patches in
> the bug tracker that could still be applied, once they are reviewed.
> Also, quite a number of backends that are now unmaintained. So, this
> is a good time to get involved with sane. If you benefit from this
> project, and have some programming experience, we could use the help.
> 
> Schedule:
> 
> May 7: Feature freeze (only fix bugs and update docs after this date)
> May 14: Code freeze (only update docs after this date)
> May 21: Release
> 

Hi,
Yesterday when I had a look at our bug tracker for any issues in my
code I found https://alioth.debian.org/tracker/?func=detail_id=30
186=315004=410366
This is an issue for scanbd integration that requires more flexibility
for configuration of dll-loading: when scanbd is used users need to use
 the net backend only, but scanbd/saned need to be fed with the
"normal" list of backends.
I made a patch to dll.c where
- It used the dll.conf with the name pointed out by env. var
SANE_CONFIG_FILE if defined, if not
- it tries to load a dll2.conf if it exists. This is meant to be a file
dropped in thre sane config dir by scanbd. If that does not exist
- it follows the existing code path.

I added a #include statement in the config file so dll2.conf can
include dll.conf if so required.

I am in the process of testing and cleaningup. but my question is:
should I commit this change so close to the freeze date? Documentation
is still to be done, but I would still have 2 weeks for that.
Alan, what do you think?

cheers, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] [sane-commit] [sane-backends] 02/02: fix 1200 dpi scanning for MB5000 series

2017-05-05 Thread Louis Lagendijk
On Fri, 2017-05-05 at 10:56 +0200, Rolf Bensch wrote:
> Hello Louis,
> 
> Please don't forget to increment the pixma backend version in pixma.h
> (PIXMA_VERSION_BUILD) and in pixma.desc (version) after patching the
> code.
> 
> Many thanks.
> 
> Cheers,
> Rolf
Hi Rolf
Sigh, I had been considering that I had to bump the backend version and
still forgot to do it. Is done now. thanks for the reminder!

Cheers, Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Newbie

2017-02-06 Thread Louis Lagendijk
On Tue, 2017-01-31 at 00:36 +0100, Horst Kern wrote:
> Hello there,
> 
> please do not be too unkind with me, if I ask a dumb question.
> 
> My new Canon Pixma Scanner 5751 does not work with the scanner
> programs 
> like simple-scan on my Ubuntu Linux.
> 
> I turned on debugging and found many lines like this:
> 
> [sanei_debug] Setting debug level of pixma to 21.
> [pixma] pixma is compiled with pthread support.
> [pixma] pixma version 0.17.18
> [pixma] Scanner model MP150(Canon PIXMA MP150) not found, giving up! 
> MG5700 series
> [pixma] Scanner model MP170(Canon PIXMA MP170) not found, giving up! 
> MG5700 series
> 
> I downloaded the latest sane backend: sane-backends-e3ed043
> 
> In the code I found, that MG5700 is listed.
> 
> Is there any way to install the update, or do I need to compile from 
> source? (Did not do that for a long time!)
> 
> Best Regards,
> Horst.
> 
Hi Horst
You need an updated package, so recompiling may be the way to go. If
you are on Ubuntu, Rof Bensch's PPA (see https://launchpad.net/~rolfben
sch/+archive/ubuntu/sane-git) may help you. Otherwise check the
INSTALL.LINUX.

BR, louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


[sane-devel] Help, I pushed mucb more to got then I wanted

2017-01-06 Thread Louis Lagendijk
guys,
My sincere apologies: I messed up my last push to git. I did not notice
that I had already commited other changes to my local copy that should
not go into master. how can I best revert the changes to pixma_mp150.c?

/Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Allow users to specify the timeout of network operations (PIXMA)

2017-01-06 Thread Louis Lagendijk
On Wed, 2016-12-28 at 08:15 +1100, Frederick Zhang wrote:
> Hi SANE developers,
> 
> I'm using SANE to drive my Canon MG5765 and it is great except the 
> "select timed out" issue occurs quite often. My router is fairly 
> outdated and actually the machine itself lags a lot when scanning
> with 
> high DPI. I've created a simple patch (and tested) to allow
> specifying 
> the timeout limit in configuration file, not sure whether it would
> help 
> or not :)
> 
I just pushed an extended version of this patch into git. Frederick was
so kind to test my updated version before I pushed it

/Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] (no subject)

2016-12-15 Thread Louis Lagendijk
On Mon, 2016-12-12 at 20:42 -0500, junt...@gmail.com wrote:
> Hi it's me again.  Don't know if you gave up on me but I am trying
> again from the beginning.  I have scanned via USB and now am
> attempting to get it working over my wifi.

What kind of scanner? How do you want to run over wifi? Sane directly
over wifi to the scanner or using saned to the machine that has the
usb-connection to the scanner?
> 
> On step two it says:
which instructions? 

> Step 2: Tell SANE to run as a server (saned)
> systemd only
> Execute at a terminal:
> sudo nano /etc/systemd/system/saned.socket
> and input exactly:
> # Defaults for the saned initscript, from sane-utils
> 
> # To enable under systemd please read README.Debian
> # Set to yes to start saned under SysV
> RUN=no

this looks suspicious. Should this not be a file in /etc/default? I am
not a Debian user (is this Debian?) Check the README.Debian as
instructed. This does not look like a normal systemd socket file...

You are probably mixing systemd and non-systemd instructions

/Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] [Janitorial] Zero(!) compiler warnings

2016-09-21 Thread Louis Lagendijk
On Wed, 2016-09-21 at 22:12 +0900, Olaf Meeuwissen wrote:
> Hi devs,
> 
> About a year ago, I set out trying to get rid of *all* compiler
> warnings
> on a "well-defined" build platform.  I'm happy to report that we've
> made
> it!  With the commit of ee550e5d[1], the debian-8-full build[2], is
> free
> of compiler warnings!
> 
>  [1] https://gitlab.com/sane-project/backends/commit/ee550e5de8e63664
> 2b9895d54f6740aa38ee6ff8
>  [2] https://gitlab.com/sane-project/backends/builds/4218963
> 
well done, it is good to see things cleaned up. I am afraid that the
"we" above is not correct. It  was your workThanks a lot.

> 
> The fedora-24-clang build[7]?  Let's leave that for another
> time.  Much
> of what you see there will pop up with gcc-6.x as well (which will be
> in
> Debian 9, rumoured to release sometime early next year, IIRC).
> 
Fedora 24 already has a GCC 6.1. I did a quick compile and saw 
some 20 odd warnings: some unused defines, some warnings like: 

magicolor.c: In function 'mc_scan_finish':
magicolor.c:1291:2: warning: this 'if' clause does not guard... [-
Wmisleading-indentation]
  if (status != SANE_STATUS_GOOD)
  ^~
magicolor.c:1293:3: note: ...this statement, but the latter is
misleadingly indented as if it is guarded by the 'if'
   return status;
   ^~

I have not looked at these in more detail (I wish I had more time)

Let me know if you want a log of the full compilation.
best regards, Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] [janitorial] musl builder, PDF SANE Standard, __sane_unused__

2016-07-19 Thread Louis Lagendijk

> > 
> > At openSUSE we use libusb-1 since openSUSE 12.2
> > (i.e. we use libusb-1 since about April 2012)
> > via "configure --enable-libusb_1_0".
> > I am not aware of issues because of this.
> > 
> 
> Thanks!
Fedora is using libusb-1 as well. according to 
https://lists.fedoraproject.org/pipermail/package-announce/2013-Septemb
er/116459.html
this has been the case since at least 1.0.23/ Fedora 18 i 2013
Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] pixma 5300 series not working because of sanei_bjnp_open return status

2016-06-18 Thread Louis Lagendijk
On Sat, 2016-06-18 at 10:14 +0200, Martin wrote:
> Hi,
> 
> I am looking for someone to merge the proposed change to upstream in
> https://alioth.debian.org/tracker/index.php?func=detail=315219
> oup_id=30186=410366
> 
> So we can get a new package/release and make the 5300's scanner to
> work 
> again !
> 
> It doesn't work in ubuntu since a long time now : 
> https://bugs.launchpad.net/ubuntu/+source/simple-scan/+bug/1526198
> 
> Thanks
> 
this bug has been fixed in git for almost a year and was included in
the 1.0.25 release of sane. Are you using 1.0.25 or a git checkout? If
so, this issue cannot be the reason for the fault you are seeing.
BR, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] sane-devel Digest, Vol 131, Issue 16

2016-05-14 Thread Louis Lagendijk
On Sat, 2016-05-14 at 15:09 +, Cian Walsh wrote:
> Hi Louis,
> 
> I've run sane-find-scanner as root and it does find a scanner at the
> USB port, and also accesses it it as a normal user. However,
> scanimage -L doesn't find the scanner on either on root.
> 
> Regards,
> Cian
What is the product reported by sane-find-scanner? I am afraid that the
MX282 is not yet supported..
regards, louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] PIXMA Backend Detection Issue

2016-05-14 Thread Louis Lagendijk
On Thu, 2016-05-12 at 14:04 +, Cian Walsh wrote:
> Hey all,
> 
> Apologies if the format of this email is incorrect, this is my first
> mailing list email.
> 
> Anyway, does anyone know who I'd get in contact with regarding an
> issue with the PIXMA backend driver? According to them man docs, USB
> printers should be autodetected, but mine doesn't appear to be.
> Trying to run SANE from a Raspberry Pi running Debian, and connecting
> to a  Canon PIXMA MP282.
> 
Did you try as a normal user or as root?

As root try:
sane-find-scanner

to see if your scanner is vsible on the USB bus at all
When it is (still as root):

scanimage -L

and see if the scanner is accessable as root.

Best regards, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Question/Bug for button Scan Pixma

2016-04-25 Thread Louis Lagendijk
On Sat, 2016-04-23 at 20:27 +0200, Helmut Schiefer wrote:
> Hello,
> 
> Now I was able to test and unfortunately it doesn't work. For sure
> the  
> upnp time out problem is gone, but the button mode doesn't work.
> 
> Situation so far:
> Command I use:  scanimage --button-controlled=yes -b > /tmp/blub
> 
> Output with debug option:  there is a poll like that.
> [bjnp] bjnp_set_timeout to 1000
> [bjnp] bjnp_read_int(0, bufferptr, 0x40 = 64):
> [bjnp] bjnp_poll_scanner: Poll details (type 2)
> [bjnp]  :42 4a 4e 50 02 32 00 00  00 30 00 00 00 00 00 74
> [bjnp]  0010:00 02 00 00 00 00 00 0d  00 72 00 6f 00 6f 00 74
> [bjnp] ..
> [bjnp] setup_udp_socket: Setting up a UDP socket, dest:
> 192.168.100.41  
>   port 8612
> [bjnp] bjnp_poll_scanner: Poll details response:
> [bjnp]  :42 4a 4e 50 82 32 00 00  00 30 00 00 00 00 00 34
> [bjnp]  0010:00 00 00 00 00 00 00 0d  00 00 00 24 00 00 00 00
> [bjnp] ..
> [bjnp] bjnp_set_timeout to 1000
> [bjnp] bjnp_read_int(0, bufferptr, 0x40 = 64):
> [bjnp] bjnp_poll_scanner: Poll details (type 2)
> [bjnp]  :42 4a 4e 50 02 32 00 00  00 31 00 00 00 00 00 74
> [bjnp]  0010:00 02 00 00 00 00 00 0d  00 72 00 6f 00 6f 00 74
> [bjnp] ..
> [bjnp] setup_udp_socket: Setting up a UDP socket, dest:
> 192.168.100.41  
>   port 8612
> [bjnp] bjnp_poll_scanner: Poll details response:
> [bjnp]  :42 4a 4e 50 82 32 00 00  00 31 00 00 00 00 00 34
> [bjnp]  0010:00 00 00 00 00 00 00 0d  00 00 00 24 00 00 00 00
> [bjnp] ..
> 
> In case I hit the color button, the short display at the scanner  
> shows: “Verarbeitung läuft” (Work in progress), but nothing happened.
> 
> The scanner is a pixma mg4250.
> 
> Scanning without the button-controlled mode works well.
> 
> Best Regards
> Helmut
> 
Can you please try the atached, updated version of the pixma_mp150.c
(to be placed in the backend directory)? I guess that this will solve
this.

Thanks
Louis/* SANE - Scanner Access Now Easy.

   Copyright (C) 2011-2016 Rolf Bensch 
   Copyright (C) 2007-2009 Nicolas Martin, 
   Copyright (C) 2006-2007 Wittawat Yamwong 

   This file is part of the SANE package.

   This program is free software; you can redistribute it and/or
   modify it under the terms of the GNU General Public License as
   published by the Free Software Foundation; either version 2 of the
   License, or (at your option) any later version.

   This program is distributed in the hope that it will be useful, but
   WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   Foundation, Inc., 59 Temple Place - Suite 330, Boston,
   MA 02111-1307, USA.

   As a special exception, the authors of SANE give permission for
   additional uses of the libraries contained in this release of SANE.

   The exception is that, if you link a SANE library with other files
   to produce an executable, this does not by itself cause the
   resulting executable to be covered by the GNU General Public
   License.  Your use of that executable is in no way restricted on
   account of linking the SANE library code into it.

   This exception does not, however, invalidate any other reasons why
   the executable file might be covered by the GNU General Public
   License.

   If you submit changes to SANE to the maintainers to be included in
   a subsequent release, you agree by submitting the changes that
   those changes may be distributed with this exception intact.

   If you write modifications of your own for SANE, it is your choice
   whether to permit this exception to apply to your modifications.
   If you do not wish that, delete this exception notice.
 */
/* test cases
   1. short USB packet (must be no -ETIMEDOUT)
   2. cancel using button on the printer (look for abort command)
   3. start scan while busy (status 0x1414)
   4. cancel using ctrl-c (must send abort command)
 */

#define TPU_48 /* uncomment to activate TPU scan at 48 bits */
/*#define DEBUG_TPU_48*/   /* uncomment to debug 48 bits TPU on a non TPU device */
/*#define DEBUG_TPU_24*/   /* uncomment to debug 24 bits TPU on a non TPU device */

#include "../include/sane/config.h"

#include 
#include 
#include 
#include 		/* localtime(C90) */

#include "pixma_rename.h"
#include "pixma_common.h"
#include "pixma_io.h"

/* Some macro code to enhance readability */
#define RET_IF_ERR(x) do {	\
if ((error = (x)) < 0)	\
  return error;		\
  } while(0)
  
#define WAIT_INTERRUPT(x) do {			\
error = handle_interrupt (s, x);		\
if (s->cancel)\
  return PIXMA_ECANCELED;			\
if (error != PIXMA_ECANCELED && error < 0)	\
  return error;\
  } while(0)

#ifdef __GNUC__
# define UNUSED(v) (void) v
#else
# define UNUSED(v)
#endif

/* Size 

Re: [sane-devel] Question/Bug for button Scan Pixma

2016-04-22 Thread Louis Lagendijk
On Fri, 2016-04-22 at 20:48 +0200, Louis Lagendijk wrote:
> On Fri, 2016-04-22 at 10:20 +0200, Helmut Schiefer wrote:
> > 
> This may be related to the timing changes I made to the pixma network
> code earlier this week. I works ok on my MB5050 but may be the casue
> of
> your problems:
> please try to change the mimimum timing in 
> backende/pixma_bjnp_private.h on line 83:
> 
> #define BJNP_BC_RESPONSE_TIMEOUT 500
>  
> (500 msec) to a larger value, for example
> #define BJNP_BC_RESPONSE_TIMEOUT 1000
> 
> to make the timeout 1000 msec = 1 second
> This may solve your issue.
>  
> You did not tell us what scanner model you are using, so there may be
> some other issues lurking in the backend proper (I had to fix the
> button detection for my MB5050 to make the backend recognize the
> buttons on that scanner).
> Please note that to fully automate button controlled scanning you
> will
> need scanbd as well. Scanbd is a nice tool that continuously monitors
> the buttons and starts a script to process and forward the scan
> result
> as required.
> 
> Kind regards, Louis
> 
Funny, I now managed to reproduce the problem with scanimage accessing
the pixma backend directly. It worked before using scanbd.
Increasing the minimum timeout to 1 sec indeed seems to fix it. I
committed the change into git

BR, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Question/Bug for button Scan Pixma

2016-04-22 Thread Louis Lagendijk
On Fri, 2016-04-22 at 10:20 +0200, Helmut Schiefer wrote:
> Dear List,
> 
> I install the sane solution on my Ubuntu 12.04. I want to set up a  
> easy way to scan documents and sent by mail to my inbox. First of
> all  
> I had to setup saned and scanimage with the button control mode.  
> Unfortunately, the button mode doesn't work in my environment and I  
> have no glue, what can solve the problem.
> 
> What I did so far:
> Scanner is found over the network and simple scan with scanimage is  
> possible and worked well. In case I do a scanimage -A I got some
> error  
> messages:
> 
>    Buttons:
>  --button-update
>  Update button state
> [bjnp] bjnp_set_timeout to 300, but using minimum value 500
> [bjnp] bjnp_read_int(0, bufferptr, 0x40 = 64):
> [bjnp] bjnp_poll_scanner: Poll details (type 0)
> [bjnp]  :42 4a 4e 50 02 32 00 00  00 02 00 00 00 00 00 50
> [bjnp]  0010:00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00
> [bjnp] ..
> [bjnp] setup_udp_socket: Setting up a UDP socket, dest:
> 192.168.100.41  
>   port 8612
> [bjnp] udp_command: ERROR - select failed: timed out
> [bjnp] udp_command: ERROR - select failed: timed out
> [bjnp] udp_command: ERROR - select failed: timed out
> [bjnp] udp_command: ERROR - no data received (timeout = 500)
> [bjnp] bjnp_poll_scanner: Poll details (type 1)
> [bjnp]  :42 4a 4e 50 02 32 00 00  00 03 00 00 00 00 00 50
> [bjnp]  0010:00 01 00 00 00 00 00 00  00 72 00 6f 00 6f 00 74
> [bjnp] ..
> [bjnp] setup_udp_socket: Setting up a UDP socket, dest:
> 192.168.100.41  
>   port 8612
> [bjnp] udp_command: ERROR - select failed: timed out
> [bjnp] udp_command: ERROR - select failed: timed out
> [bjnp] udp_command: ERROR - select failed: timed out
> [bjnp] udp_command: ERROR - no data received (timeout = 500)
> [bjnp] bjnp_poll_scanner: Poll details (type 2)
> [bjnp]  :42 4a 4e 50 02 32 00 00  00 04 00 00 00 00 00 74
> [bjnp]  0010:00 02 00 00 00 00 00 00  00 72 00 6f 00 6f 00 74
> [bjnp] ..
> [bjnp] setup_udp_socket: Setting up a UDP socket, dest:
> 192.168.100.41  
>   port 8612
> [bjnp] udp_command: ERROR - select failed: timed out
> [bjnp] udp_command: ERROR - select failed: timed out
> [bjnp] udp_command: ERROR - select failed: timed out
> [bjnp] udp_command: ERROR - no data received (timeout = 500)
>  --button-1  [0] [read-only]
> 
> In general, port 8612 is open and scanner communication works with
> 8612.
> 
> Any ideas?

This may be related to the timing changes I made to the pixma network
code earlier this week. I works ok on my MB5050 but may be the casue of
your problems:
please try to change the mimimum timing in 
backende/pixma_bjnp_private.h on line 83:

#define BJNP_BC_RESPONSE_TIMEOUT 500
 
(500 msec) to a larger value, for example
#define BJNP_BC_RESPONSE_TIMEOUT 1000

to make the timeout 1000 msec = 1 second
This may solve your issue.
 
You did not tell us what scanner model you are using, so there may be
some other issues lurking in the backend proper (I had to fix the
button detection for my MB5050 to make the backend recognize the
buttons on that scanner).
Please note that to fully automate button controlled scanning you will
need scanbd as well. Scanbd is a nice tool that continuously monitors
the buttons and starts a script to process and forward the scan result
as required.

Kind regards, Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MP495 wireless issue

2016-02-27 Thread Louis Lagendijk

On 2016-02-27 12:52, Malcolm Taylor wrote:

Hi,
I can get scanning by usb but not wireless. I added the printer IP
address in the pixma.conf file bjnp://192.168.1.43. On wireleess
connection Xsane connects to the printer but immediately fails with
error "Error during read: Error during device I/O. From internet posts
could be a bug in the sane-pixma driver.
Ubuntu 15.04, Canon MP495 libsane 1.0.24 sane utils 1.0.24.
Any suggestions appreciated.

Regards,

Malcolm Taylor

Hi Malcolm
This is a known issue on 1.0.24 compiled with a newer GCC. Please 
upgrade to 1.0.25 that has this issue fixed


Kind regards, Louis

--
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] PIXMA: New Protocol Timeouts

2016-02-27 Thread Louis Lagendijk

On 2016-02-18 10:35, Rolf Bensch wrote:

Hello Louis,

However, some Pixma scanners usually timeout the 1st USB command. I
already fixed this in pixma_imageclass.c by simply resending the 1st
command (query_status()).

To reduce the timeout loop from 8 sec to 1 sec for this 1st particular
command, I'd like to load tmo in pixma_cmd_transaction() (->
pixma_common.c) from a parameter.

I see 2 options:
(1) a new parameter in the function call of pixma_cmd_transaction()
(2) a new parameter with the default setting for 8 sec, e.g. in s->io

Which one is smarter?

Many thanks for your idea in advance.

Cheers,
Rolf

Am 18.02.2016 um 08:54 schrieb Rolf Bensch:

Hello List,

My recent commits to Sane's git repository contain some fixes which
affect USB and BJNP protocol timeouts.

This affects *ALL* Canon PIXMA, imageCLASS, i-SENSYS and *SOME* 
CanoScan

scanning devices (please search your scanner here:
http://sanexe-project.org/lists/sane-backends-cvs.html#S-PIXMA).

Background:

Many users have reported and my experience was the same while 
debugging
a new scanner, that the 8 sec receive timeout needed approx. 160 sec 
to

lapse. This blocked the interface and was very annoying.

I found out that the protocol timeouts were set to eternal 20 sec. So 
I

reduced the timeouts down to 1 sec (human immediately), for both
PIXMA_BULKIN_TIMEOUT and PIXMA_BULKOUT_TIMEOUT. Now the 8 sec receive
timeout loop is working again, also with available 
sanei_usb_set_timeout().


Please report any problems caused by this fixes.

Cheers,
Rolf


Hi Rolf
Myapologies for not responding sooner, but I am on a businesstrip untill 
end of coming week. I hope to be able to get back to you when I get home

Br, Louis

--
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon Pixma MG5700 series

2015-12-05 Thread Louis Lagendijk
On Mon, 2015-11-30 at 22:50 -0700, Andrew Reginato wrote:
> 
> 
> No scanners were identified. If you were expecting something
> different,
> check that the scanner is plugged in, turned on and detected by the
> sane-find-scanner tool (if appropriate). Please read the
> documentation
> which came with this software (README, FAQ, manpages).
> 
> 
> Okay, so it sort of was what I was expecting (as in I wasn't
> expecting it to work), yet it also wasn't what I was expecting (that
> the pixma driver actually did pick up on the scanner and recognized
> it).  I'm not a programmer, but is there anything I can help with or
> contribute?
The result above is expected: the bjnp part of the backend can talk to
the scanner but the backend proper does not know the Canon MG5700
series scanner yet in your sane-version. The latest released version of
sane (1.025) should support it

Kind regards, Louis
> 

> -- 
> sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org
-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org

Re: [sane-devel] issues with sane-pixma and Canon MX7600

2015-10-30 Thread Louis Lagendijk
On Thu, 2015-10-29 at 10:26 -0700, James Ring wrote:
> One more thing,
> 
> On Thu, Oct 29, 2015 at 10:13 AM, James Ring  wrote:
> > Hi all,
> > 
> > Up until recently, I've been able to scan fine with my Canon Pixma
> > MX7600. Then I upgraded to Ubuntu Wily and I've started getting:
> > 
> > $ scanimage
> > scanimage: open of device pixma:MX7600_192.168.2.107 failed:
> > Invalid argument
> > 
> > The device pings and I can get to its HTTP port. Everything appears
> > OK.
> > 
> > If I run
> > 
> > strace -f -s 256 -o /tmp/trace.txt scanimage
> > 
> > the relevant output appears to be:
> > 
> > socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP) = 204
> > connect(204, {sa_family=AF_INET, sin_port=htons(8612),
> > sin_addr=inet_addr("192.168.2.107")}, 16) = 0
> > sendto(204, "BJNP\2\1\0\0\0\0\0\0\0\0\0\0", 16, 0, NULL, 0) = 16
> > select(205, [204], NULL, NULL, {4, 0}) = 1 (in [204], left {3,
> > 998257})
> > recvfrom(204,
> > "BJNP\202\1\0\0\0\0\0\0\0\0\0\20\0\1\10\0\6\4\0\0\205\316\356\343\3
> > 00\250\2k",
> > 2048, 0, NULL, N
> > ULL) = 32
> > close(204)
> > write(2, "scanimage: open of device pixma:MX7600_192.168.2.107
> > failed:
> > Invalid argument\n", 78) = 78
> > 
> > It appears to me that the scanner is responding but the driver
> > doesn't
> > like the response. I'm running sane 1.0.14-11 and sane-utils
> > 1.0.25+git201505.
> 
> I just verified that downgrading to libsane 1.0.24-4ubuntu1 from
> 1.0.25+git201505 allows me to scan again, so I definitely there's
> some
> sort of sane-pixma regression in there.
this looks similar to an issue that I fixed some time ago. Please see
if you can find a package of the released 1.0.25. that should fix your
issue

Louis

-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] PIXMA MG7150 test

2015-09-22 Thread Louis Lagendijk
On Mon, 2015-09-21 at 21:37 +0200, Kiligolo wrote:
> Hello,
> 
> I have a Canon PIXMA MG7150. It has an usb port but it's connected to my 
> computer via wifi.
> 
> The scanner is detected automatically and i can use scanimage -d pixma --
> format=tiff > image.tiff.
> However I usually scan with the scanner buttons and the tactile screen (I'm 
> not going to do 9000 two-way trips to scan a file) but the --button-
> controlled option doesn't work (the scanner detects my computer but doesn't 
> start the scan) so I can't send the output directly to my computer.
> 
> The default resolution (75dpi) is too low for me to read the tiff image, so I 
> tested the other ones listed on the scanner screen (600, 300 and 150)  with 
> the --resolution option :
>  - 150dpi doesn't work. The output file is corrupteed. scanimage output :
> [bjnp] bjnp_recv_data: could not read response payload (select timed out): 
> Success!
> [bjnp] bjnp_recv_data: could not read response payload (select timed out): 
> Success!
> [bjnp] bjnp_write: ERROR: scanner data left = 0xee4 = 3812
> [bjnp] bjnp_recv_header:ERROR, Received response has cmd code 235, 
> expected 33
> [bjnp] Could not read response to command!
> [bjnp] bjnp_write: ERROR: scanner data left = 0xee4 = 3812
> [bjnp] bjnp_recv_header:ERROR, Received response has cmd code 241, 
> expected 33
> [bjnp] Could not read response to command!
> scanimage: sane_read: Error during device I/O
> 
>  - 300dpi works but it takes 5 minutes instead of 10 seconds
>  - 600dpi doesn't work. The output file is cut (the lower part of the sheet 
> is 
> missing). scanimage ouptut :
> [bjnp] bjnp_recv_data: could not read response payload (select timed out): 
> Success!
> scanimage: sane_read: Error during device I/O
>  
> 
First a few questions:
- What is the version of sane-backends that you are using?
- Did you try button controlled scanning over USB? The bjnp code
replaces the USB interface when the network scanning is used, but as it
is more complex and less tested than the standard USB code, we like you
to test with USB first, so we know where to look for the issues: in the
pixma backend or in the network code.

I don't recall ever testing button controlled scanning with scanimage,
so I don't know how that works. I doubt if the resolution received from
the scanner is used by scanimage. @Rolf, can you please comment?

Button controlled scanning is not used very often, so even if the 
scanner is supported by the backend, the parsing of the buttons may
still be incorrect. 
@Rolf Bensch, can you please comment, you know the backend much better
than I do, I only wrote the BJNP network code.

For button controlled scanning I would anyhow recommend setting up
scanbd as that will allow setting the scanner up to continuously poll
the scanner and initiate a scan with the parameters entered on the
scanner and store the result on the computer as often as you press one
of the scan buttons. That will save you many trips from the computer to
the scanner, as you can scan whenever you press a button and the
computer is on

Best regards, Louis



-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Xsane (canon MG6450)

2015-09-22 Thread Louis Lagendijk
On Fri, 2015-09-18 at 22:55 +0200, lovrolu wrote:
> Since quite some time has passed and it looks like OP either gave up or
> had some difficulties, I thought I would chime in and help out since I
> just got mine today.
> 
> http://www.sane-project.org/sane-backends.html#S-PIXMA lists PIXMA
> MG6450's status as "untested". I would like to resolve this. Could
> someone point me in the right direction? What am I to do as a tester?
> 
> Lovro
> 

hi Lovro
I guess that Rolf Bensch, the main maintainer of the pixma backend is
away. A few quick hints:
- use the latest GIT-branch of Sane or find a recent Sane package for
your distribution (if you need a package for Ubuntu, check Rolf's PPA: 
https://launchpad.net/~rolfbensch/+archive/ubuntu/sane-git
- connect the scanner using a USB cable
- test the scanner in all resolutions 
- Test color and B
- for a bonus: connect the scanner over the network and repeat the test
scans above

Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] MX895 auf Ubuntu 'Precise'

2015-07-01 Thread Louis Lagendijk
hi Balthasar,
On Wed, 2015-07-01 at 20:09 +, Balthasar Nebel wrote:
 Hi Louis,
 
 
 I tried nslookup, but the name is not known in the network. I even
 added this name in /etc/hosts but with same result. I noticed that
 D8:BE:01 are the last 3 bytes of the MAC Address of the printer
 (88:87:17:D8:BE:01), not sure if this is relevant.
 The firewall is not up so neither the TCP nor the UDP port gets
 blocked.
 I made a trace with SANE_DEBUG_BJNP=5 and you find the result below.
 
 
 Regards,
 Balthasar
 
 
 PS: I missed notification for this list, so it took a long time until
 I recognized your last response. Sorry for that.
 
Please try the latest git version: this looks like a bug I fixed last
week.
kind regards, Louis




-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Problem with pixma mx535 network scanner

2015-06-27 Thread Louis Lagendijk
On Sat, 2015-06-27 at 12:31 +0100, Graham Perry wrote:
 It had been working fine on a previous development build, but after
 the latest pull from git it now returns:
 
 
  scanimage: open of device pixma:MX530_192.168.1.66 failed: Invalid
 argument
 
 
 Full debug output is as follows: http://pastebin.com/KPm5eZqn
 
 
 Any help greatly appreciated.
 -- 
 sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org

I did a quick check on my own fedora 21 with my MB5050 and ran into the
same problem. It turned out to be caused by some confusion caused by the
old distribution's version of sane. Please check your sane backends
directory (/usr/lib(64)/sane) for any sane_pixma.so.0.1.24 leftovers,
including the sane_pixma.so and sane_pixma_so.1 links. Remove these and
re-install the backend from the source tree and you should be ok.
Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon laser multi-functional support: MFNP protocol

2015-06-27 Thread Louis Lagendijk
On Mon, 2015-06-22 at 14:58 +0300, Michael Shigorin wrote:
 On Wed, Apr 01, 2015 at 06:19:05PM +0200, Louis Lagendijk wrote:
  Before anything: if scanning over USB  does not work, trying to
  scan over the network is bound to fail.
 
 Got that; both devices and a winxp vm are handy today (will be
 there next week hopefully too), here's a 15 Mb usbsnoop log:
 http://fly.osdn.org.ua/~mike/tmp/sane-pixma/Canon-iR1133-scan-300dpi.usblog.xz
 
  for the MF8540 first a question: what did you use to initiate the scan?
 
 xsane and scanimage
 
 MF8540Cdn and MF6140dn are available for testing/dumping right now,
 trying against today's git...
 
  It looks as if a scan was not attempted. Please try (over USB):
  scanimage  filename
  and see what happens.

Can you please try the fixes I submitted to GIT today to see if they fix
the network issue with the MF devices?

 Proper sounds but almost completely white image:
 http://fly.osdn.org.ua/~mike/tmp/sane-pixma/Canon-MF8540Cdn-scanimage.ppm.xz

how did you scan? Please try 
scanimage  test.ppm
to avoid problems due to settings from xsane etc. 

 
  As you saw it is not clear whether the device is supported with
  the current pixma backend. Maybe somebody on the list that
  knows the backend better than I do can help you with that (the
  MF8500 series is listed in pixma_imageclass.c, so it is
  probably possible to get it working, I only wrote the
  networking code).
 
 Thank you :-)

 
  the ImageRunner 1133 is listed too in the same file, so getting
  it to work is probably possible too
 
 It _does_ work for me as of RELEASE_1_0_24-292-g8c51579:
 http://fly.osdn.org.ua/~mike/tmp/sane-pixma/Canon-iR1133iF-scanimage.ppm.xz
 (the same vendor provided test print)
 
  The MF6100 series is not listed, but it again might be quite
  possible to get it to work.
 
 The same almost white image as with 8540:
 http://fly.osdn.org.ua/~mike/tmp/sane-pixma/Canon-MF6140dn-scanimage.ppm.xz
 
As Rolf commented in a mail from April 3 the MF6100 series is added in
GIT, so it should work now. 
so please try scanning with scanimage and see if that works over USB and
if it works over the network after todays fixes.

Kind regards, Louis



-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Problem with pixma mx535 network scanner

2015-06-27 Thread Louis Lagendijk
On Sat, 2015-06-27 at 15:33 +0100, Graham Perry wrote:
 Thanks, but I had already tried that. Tried again with the same
 result. /usr/lib64/sane only contains .1.0.25 versions.
 
Please pull the latest version of the bjnp-code from git: I added some
more debugging code and fixed a nasty missing return in the opening of
the connection to the scanner: this could have caused your problems. It
is strange however that we never encountered this before: what
compiler/version are you using?

And if it still does not work:
What does a scanimage -L return? Does it list the scanner? I would
assume it does, but I want to be sure.


Kind regards, Louis





-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Problem with pixma mx535 network scanner

2015-06-27 Thread Louis Lagendijk
On Sat, 2015-06-27 at 19:16 +0100, Graham Perry wrote:
 That seems to have done the trick, thanks. 
 
 
 http://pastebin.com/G9Ywn2tt
 
 
 
 But just for completeness:
 
 
 1. Yes, scanimage -L did find the scanner on the last git version, it
 only failed when trying to connect. The only version it doesn't find
 it on is the current stable (1.0.24).
 2. My build environment is gcc-multilib 5.1.0-4, autoconf 2.69-2,
 automake 1.15-1, binutils 2.25-5, make 4.1-1 and the kernel is
 4.0.6-1-ARCH.
 
Thanks for the confirmation that it is fixed. I suspect that gcc-4.x was
a bit more forgiving for the stupid mistake I made in the code. 

Kind regards, Louis




-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon i-Sensy MF4870dn Network Scan Issue

2015-06-17 Thread Louis Lagendijk
On Wed, 2015-06-17 at 20:45 +0300, Mehmet Onat wrote:
 Hello,
 
 My friend has Canon i-Sensy MF4870dn. He want to share scanner with
 his networks. Printer works good. But it doesn't work scan on
 networks. Outputs here:
 
what exactly are you trying to do: a scan from Linux to the network
interface of the scanner? If so, read the sane-pixma man-page for the
firewall openings that you need to make.

 
 #
 # define URI's of scanners (one per line)
 # This is only used for network scanners.
 # normally scanners will be detected by sending a broadcast
 # if this does not work under your OS, or if the scanners
 # are on a different subnet, configure your scanners URI here
 #
 # method must be bjnp
 # port number can normally be left out, port 8612 is used as default
 # Example:
  bjnp://10.60.0.17
 # bjnp://printer-1.pheasant.org
 
there should be no need to set anything here normally. 
 
 scanimage -L
 [bjnp] udp_command: ERROR - no data received
 [bjnp] bjnp_init_device_structure: Cannot read mac address, skipping this 
 scanner
 [bjnp] udp_command: ERROR - no data received
 [bjnp] add_scanner: ERROR - Cannot read scanner make  model: 
 bjnp://10.60.0.17
 Parçalama arızası
 
This looks like missing openings in the firewall. You will need to open
port 8611 for both TCP and UDP. See the man-page
kind regards, Louis



-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org

Re: [sane-devel] Canon MX870 on armhf Hosts

2015-05-18 Thread Louis Lagendijk
On Sun, 2015-05-17 at 20:03 +0200, Kai T. Hillmann wrote:
 Hi,
 
 first of all thanks for a great piece of software.
 
 Sorry for posting this additionally to the mailinglist (i posted the
 same before in irc but it seems that this will take a longer time and
 i've no bnc there - and don't want to miss some answers)
 
 I recently tried to use the newest sane versions from git after i
 realized that the adf empty bug should be fixed using Rolf Bench's ppa
 which was working very good on an xubuntu trusty.
 
 After that i wanted to use the same on my cubietruck debian jessy armhf
 host... so i had to compile it myself no problem done and with
 
 scanimage -vL
 
 - my scanner was found...
 
 but scanimage -T failed with:
 
 open of device pixma:MX870_mx870 failed: Operation was cancelled
 
 After a lot of tests (created a new trusty vm and compiled sane manually
 as well to see whether it works there and it worked as expected,
 different recompiles on cubietruck but nothing works) i've found a
 possibility to give out some debug informations - output here:
 
 http://pastebin.com/MTM3L06x
 
 The configuration of the compilation is here:
 http://pastebin.com/9dnU7LVB
 
 Output of scanimage -V : scanimage (sane-backends) 1.0.25git; backend
 version 1.0.25
 
 The uname of the kernel:
 
 Linux myhostname 3.16.0-4-armmp-lpae #1 SMP Debian 3.16.7-ckt9-3~deb8u1
 (2015-04-24) armv7l GNU/Linux
 
 Git-Version of sane:
 
 980b4f6b065a411faf7eb538b3928bdc3308f2ca
 
 Does anyone have any ideas?
 
ould you try to scan using USB first? The networking code uses the USB
code but adds a network stack to the USB interface. Therefore check
first if the device works over USB. If USB fails get the USB debug
information by setting SANE_DEBUG_PIXMA=11.
If USB works, but network scanning does not, please provide a debugfile
generated with SANE_DEBUG_BJNP=3. 
For details see man sane-pixma. If only netowrked scans fail, also check
the firewalling chapter in that man -page.



Kind regards, Louis



-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] MX895 auf Ubuntu 'Precise'

2015-04-06 Thread Louis Lagendijk
On Mon, 2015-04-06 at 11:23 +, Balthasar Nebel wrote:
 Hi sane developers, my name is Balthasar and I need your help to get
 my Cannon Pixma MX895 WLAN access work via SANE in Ubuntu (Precise).
 I'm not able to scan any page with the 'scanimage' ultility via WLAN
 (see attached 'image.net.debug.txt'), while same works fine via USB
 (see attached 'image.debug.txt'). I've used sane build #1.0.25 from
 Rolf Bensch as described here:
 https://launchpad.net/~rolfbensch/+archive/ubuntu/sane-git. The
 scanner gets identified but then the connection seems to abort in
 pixma_connect(). You can also see the trace output of the failing
 scanimage, the library image details and Ubuntu version at the bottom
 of this mail.
 The scanner seems to be supported by sane, because it works as
 expected via USB. Is it fully supported or are there restrictions?
 Does somebody use the MX985 via WLAN? Did I miss any configuration or
 installation? I thank you in advance for any hint!

hi Balthasar
Another question: 
what does nslookup D8BE0100.local return?
It could be that the printer address resolves to D8BE0100.local but
that later lookups of that name fail. I thought I did check for that
case in the code, but I need to check to be sure.

Kind regards, Louis




-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] MX895 auf Ubuntu 'Precise'

2015-04-06 Thread Louis Lagendijk
On Mon, 2015-04-06 at 11:23 +, Balthasar Nebel wrote:
 Hi sane developers, my name is Balthasar and I need your help to get
 my Cannon Pixma MX895 WLAN access work via SANE in Ubuntu (Precise).
 I'm not able to scan any page with the 'scanimage' ultility via WLAN
 (see attached 'image.net.debug.txt'), while same works fine via USB
 (see attached 'image.debug.txt'). I've used sane build #1.0.25 from
 Rolf Bensch as described here:
 https://launchpad.net/~rolfbensch/+archive/ubuntu/sane-git. The
 scanner gets identified but then the connection seems to abort in
 pixma_connect(). You can also see the trace output of the failing
 scanimage, the library image details and Ubuntu version at the bottom
 of this mail.
 The scanner seems to be supported by sane, because it works as
 expected via USB. Is it fully supported or are there restrictions?
 Does somebody use the MX985 via WLAN? Did I miss any configuration or
 installation? I thank you in advance for any hint!
 
 
Hi Balthasar,
Did you open both TCP and UDP on port 8612 in the firewall? It looks as
if port 8612 UDP is open, but TCP is not.

If that is not the problem, please send me a trace with:

export SANE_DEBUG_BJNP=5
scanimage  filename 2 mfnp_trace

Please send me the mfnp_trace file, and I will have a look at it

kind regards, Louis





-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon laser multi-functional support: MFNP protocol

2015-04-01 Thread Louis Lagendijk
On Wed, 2015-04-01 at 18:39 +0300, Michael Shigorin wrote:
 Hello Louis,
 
 thank you for the SANE efforts!
 
 
 I've curently got access to a few MFNP capable Canon multifunctionals,
 namely imageRUNNER 1133iF and i-Sensys MF6140dn/MF8540Cdn; these avoid
 any networked scans for me so far (tried both 1.0.24 and today's git
 snapshot), but I've got some debug dumps to start with; 8540 does get
 identified (but fails to scan) while 6140 and 1133 sort of show up
 with get_scanner_id but seem to fail with sanei_bjnp_find_devices.
 
 
 Trying to arrange some kind of development-mode access so I could do
 pcap dumps and provide better feedback, would it be useful to you?
 
 
 
 Note that all three of these MFPs won't scan over USB for me either;
 1133 and some other MF8xxx are marked as untested over at
 http://sane-project.org/sane-mfgs.html#Z-CANON -- my understanding of
 https://lists.alioth.debian.org/pipermail/sane-devel/2011-February/028295.html
  is that your BJNP/MFNP code might be OK for  at least for 8540 with the 
 actual backend needing to be fixed first.
 
 PS: I'm not subscribed to sane-devel@ yet (been lurking via archives
 for years though), will hopefully do as soon as I have access to my
 regular email, and it'd be good to CC the list in the meantime if this
 message is worth replying to.

Hi Mike
Before anything: if scanning over USB  does not work, trying to scan
over the network is bound to fail. Please get the mailing list to help
you with that first. 
for the MF8540 first a question: what did you use to initiate the scan?
It looks as if a scan was not attempted. Please try (over USB):
scanimage  filename
and see what happens. As you saw it is not clear whether the device is
supported with the current pixma backend. Maybe somebody on the list
that knows the backend better than I do can help you with that (the
MF8500 series is listed in pixma_imageclass.c, so it is probably
possible to get it working, I only wrote the networking code).

the ImageRunner 1133 is listed too in the same file, so getting it to
work is probably possible too

The MF6100 series is not listed, but it again might be quite possible to
get it to work.

But again: please get the devices to work over USB first before you
attempt the network. On the list you should be able to get more help. I
only wrote the network code, not the bsckend proper

Kind regards, Louis




-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] making scanbd work OOTB in debian - question about supported backends

2015-03-04 Thread Louis Lagendijk
On Wed, 2015-03-04 at 16:12 +0800, Rolf Leggewie wrote:
 On 04.03.2015 13:46, Wilhelm wrote:
  What should be the effect of this env-variable SANE_BACKEND_CONFIG_DIR?
 
  As maintainer, I currently need to copy all backend files from
  /etc/sane.d/*.conf to /etc/scanbd.  That is messy to say the least.  If
  SANE_BACKEND_CONFIG_DIR was a variable separate from SANE_CONFIG_DIR
  that wouldn't be necessary with obvious benefits to everyone.
  
  All SANE desktop applications use SANE_CONFIG_DIR. scanbd must use saned
  with a different dll.conf and therefore sets SANE_CONFIG_DIR before
  invoking saned. SANElib looks for that dll.conf and config-files in
  there and dll.d. The point is, that you can't direct SANE to another
  dll.conf. And I don't see what the help of SANE_BACKEND_CONFIG_DIR could
  be in this respect.
  
  But: is SANE_BACKEND_CONFIG_DIR a SANElib env-variable? Don't know about it.
 
 I am coming purely from a package maintainer's POV.  I haven't looked
 deeply into the interaction between scanbd and saned.  And I know very
 little about the limitations imposed on that interaction by the design
 of saned.  It seems that me looking for a way to split the general
 scanbd configuration from the location of the backends can only be done
 if saned supports that and then indeed your suggestion of the -c and -d
 parameters is probably the way to go.
Scanbd does not really need a separate config dir, if we could convince
saned to use a different dll.conf. I once had a look at implementing
this (add an environment variable SANE_DLL_CONF) that overrides the
default dll.conf. It turned out this required more complicated changes
to dll.c because of the dll.d directory being read as well (see dll.c
line. To properly solve this, one would need to add the possibility to
control reading from dll.d. I therefore never finshed this patch (and
lost it). I was indeed considering packaging scanbd for Fedora and ran
into the same problems. I therefore gave up the idea of packaging
scanbd.

Now I come to think of this again, it may be sufficient to skip reading
dll.d when we read the scanbd dll.conf (env. variable is set) but allow
dll.conf to read config files prefixed with dll.d, something like
dll.d/foo.conf. If we then add some code to scanbd (and possibly some
init files/systemd service files) to set the environment var in the
appropriate cases we might be able to solve the issue.
comments?
Kind regards, Louis



-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Error: Canon Pixma MG7550 hangs

2015-01-03 Thread Louis Lagendijk
On Fri, 2015-01-02 at 22:59 +0100, Martin wrote:
 Hi Troels
 
  *Is it USB3 (on the computer)?
 no, it is USB2
  *Do you have access to another computer, where you can try it - Does it
  work excactly the same strange way ... ?
 No,I don't have access to another computer. But I have also Windows 7 
 installed. With Windows 7 and the Canon-software it works OK. 
 
  *Does unit have ethernet connection / can you try that way?
 Yes. With the ethernet connection the printer works. Thus the IP-address 
 below 
 is correct.
 But I cannot access the scanner.
   xsane pixma:MG7500_192.168.0.3
 results in the error message illegal argument. Same thing with
   scanimage --help -d bnjp://192.168.0.3:8612
Hi Martin
If the scanner does not work on a USB port it is quite unlikely to work
over the network: the bjnp network code just carries the USB exchange
over IP.
Anyhow, you can find the name with scanimage -L (but make sure that port
8612 is not blocked by a firewall (see the man-page for sane-pixma in
the latest sources from GIT. you need to enable port 8612 for both
incoming and outgoing traffic.

Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Need help with Epson scanner problems-Fedora 20

2015-01-01 Thread Louis Lagendijk
On Thu, 2015-01-01 at 09:39 +1100, Terry Duell wrote:
 Hello All,
 I have a problem that has existed for some time, not exactly sure how long  
 as I don't use the scanner on a regular basis. I may have had the problem  
 for a year, maybe more.
 The scanner is an Epson Perfection 3490 Photo, and I have been using it  
 without problem for many years on Fedora Linux (I have been using  
 Redhat/Fedora since 2000).
 Sorry if the following is a bit long winded, but it may help to explain  
 the problem.
 I keep Fedora up to date, and for some years now have been doing a clean  
 install at each new release.
 I am reluctant to say my memory is 100% accurate on what I do to migrate  
 the scanner to each new Fedora system, so I may have missed something when  
 moving from Fedora 19 to Fedora 20...but I do use a scripted process to  
 capture the installed packages prior to installing the new system, then  
 get a package list from new system and then extract a list of missing  
 package names which are then installed. This process has worked OK for  
 many years.
 The sane related packages that are installed are (this list from Fedora  
 17, but the same for 20);
 sane-backends-drivers-scanners 1.0.23-4.fc17 x86_64
 sane-backends-libs 1.0.23-4.fc17 x86_64
 xsane-gimp 0.998-12.fc17 x86_64
 xsane-common 0.998-12.fc17 x86_64
 sane-backends 1.0.23-4.fc17 x86_64
 xsane 0.998-12.fc17 x86_64
 
 For each system upgrade I install the Epson firmware (esfw52.bin) in  
 /usr/share/sane/snapscan/ and ensure that path is in  
 /etc/sane.d/snapscan.conf.
 
 Now, finally, to the specifics of the problem.
 I can start Gimp and select File - Create:XSane dialog and the XSane  
 windows appear OK. I can select Preview and get a preview scan OK, but  
 when Scan is selected I get an error Failed to start scanner: Error  
 during device IO.
 If I reboot, and repeat the process, usually the XSane preview window  
 appears blank, and this can be remedied by closing the XSane windows and  
 Gimp, deleting my ~/.sane dir and restarting Gimp and XSane, and either  
 one preview or a normal scan can be obtained but when attempting a second  
 I get the Failed to start scanner: Error during device IO error.
 I also run Windows 8.1 in Virtualbox and can successfully do multiple  
 scans using the Epson supplied Windows software, which rules out scanner  
 or USB cable problems.
 
 I have raised the problem in the Fedora forum of Linux Questions and it  
 was suggested I ask here, although I have a feeling that there may be more  
 to explore/test that is purely Linux related.
 
 Does anyone have any experience of a problem like this, and what might be  
 causing it?
 Any ideas welcomed.
hi Terry,
Is the scanner connected to a USB3 (often blue) port? If so, move it to
a USB 2 port. There are some issues with USB3 ports that got fixed
recently in GIT but are not in the Fedora version (nor most likely any
other Linux distro's version)  
Kind regards, Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Device color and gray buttons don't scan

2014-10-10 Thread Louis Lagendijk
On Fri, 2014-10-10 at 00:40 -0700, Nicholas Alipaz wrote:
 I have xsane open and pushing the hardware color scan button while in 
 Scan mode Button-controlled scan does not scan the document.  Any ideas why.
 
 Linux Mint 17 with Canon Pixma MP610
First a question:
what version of Sane is installed (scanimage -V from the command line
will tel you). It should at be at least 1.0.24 I think.

Second: do you have the option button controlled scan in the standard
option menu ticked?

Button controlled scanning does not give you much in Xsane. Instead of
scanning immediately, it will delay the scan 'till the button is pushed
(the color or BW, I forgot which one, try it, the other button will
cancel the scan).
I you want real button controlled scanning, you will have to look into
scanbd, but that will some manual configuration

kind regards, Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] How to track a bug and fix it on a mailing list

2014-10-06 Thread Louis Lagendijk
On Sat, 2014-10-04 at 15:55 +0200, Kai Pöritz wrote:
 Hi sane folks,
 
 I have this bug that I have addresses all over the place. I was told
 this mailinglist is the place where these issues get fixed.
 
 Now I am new to mailinglists. I wrote to it but somehow I got 2 answers
 that did not solve the problem at all.
 
 How to I keep track. How do I find/contacts somehome of the sane project
 that can solve the bug/error I am having.
 
 I am willing to supply almost any info... down to a ssh login to my
 hardware. I might even travel if someone likes to meet.
 I just seriously want to solve this issue that I can not solve myself.
 I need help and have no idea how to contact the right people.
 
 thank you in advance
 
 Kai
 
Hi Kai,
As I wrote before, Rof Bensch is the maintainer of the pixma backend. He
appears to be away (IIUIC he is German, and they are having some
holidays). I am afraid you will have to wait for his return. I am sure
he will chime in when he sees your mails to the list.

Kind regards, Louis



-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MX 725 network problems

2014-08-23 Thread Louis Lagendijk
On Fri, 2014-08-22 at 22:59 +0200, HelpHelp wrote:
 Hello Louis,
 
 your were absolutely right. I tried it out with usb, and there it is the 
 same. So it might be a problem
 with the pixma driver in general.
 Should I open a new bug report, or could we solve the problem here?
 
 you can find the logs here
 
 sane-usb: https://dl.dropboxusercontent.com/u/12003240/logs/sane-usb.log
 sane-lan: https://dl.dropboxusercontent.com/u/12003240/logs/sane.network.log
 
 Thank you!
 
 Regards

I had a look at the previous trace again. I wonder whether this is a
backend problem or an issue with gscan2pdf. Can you reproduce the
problem with scanimage? 

The reason I suspect gscan2pdf is that the exceptions it throws suggest
that it may not yet be setup properly before you start a scan. Can you
please test with scanimage?
Maybe Rolf can have a look at the traces as well 
Thanks
Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MF8200C Series

2014-08-22 Thread Louis Lagendijk
On Fri, 2014-08-22 at 18:45 +0200, Troels Thomsen wrote:
  
 No dns server. Its a relatively freshly installed Mint,
 sitting behind a cable router with dhcp. 
 The  192.168.1.50 is just chosen as static ip on the printer, because
 the windows driver like it to be that way.
Which is fine for the pixma backend, it will find it as long as you are
on the same subnet.Everything will work as long as DNS does return
somethig sensible for the reverse and forward lookups (or you defined
the IP-address in /etc/hosts).
(something sensible is return a hostname or a NXDOMAIN, it looks as if
your DNS doesn't do that)

 
 Yes I removed everything else than net and pixma from dll.conf. 
 
 As you probably saw, it worked much better when I was pointed
 towards /usr/local/etc/sane.d/
 :-)
 

 I'm still puzzeled on why the ./configure BACKENDS=pixma trick
 didn't work.
 

Check for old backends in the sane libdir
(normally /usr/lib[64]/saneand in dll.conf if you compiled for the
standard locations on Linux

BR, Louis



-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MX 725 network problems

2014-08-21 Thread Louis Lagendijk
On Thu, 2014-08-21 at 07:57 +0200, HelpHelp wrote:
 Hey Luis,
 
 I forgot to mention that I am using the ADF
 
 Regards
 
 On 21.08.2014 07:51, HelpHelp wrote:
 
  Hello Luis!
  
  your patch solved the first problem. It looks like the error is gone
  - made about 12 pages without 
  errors.
  Thank you!
  
Thanks for testing, I will commit the changes to GIT.

  But one error still exist and I am not sure whether it is because of
  the backend:
  
  When I first start the scanner and start the scan right after that,
  the scan will be aborted after a short period of time, because of
  Copy text ... Error . Another problem is then, that I have to
  restart the scanner, because the scanner hangs. In the display of
  the scanner is written :Document scanning forever...
  

Can you please get me a trace with SANE_DEBUG_BJNP=5 (or higher) when
this occurs? 
The abort is the interesting part. Once a communication error occurs
between the backend and the scanner, there is normally no way to reset
the scanner from the backend, so the scanner remains confused until it
is power cycled.

Br, Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MX 725 network problems

2014-08-21 Thread Louis Lagendijk
On Thu, 2014-08-21 at 13:24 +0200, HelpHelp wrote:
 Hello Luis,
 
 was the last log not helpful? I forgot to mention that I had attached it 
 this morning in the mail. I made the log
 with SANE_DEBUG_BJNP=11.
 I will put the log again in the attachment. If you need another one, i 
 can give it to you this evening because I am at work right now.
 
 Regards

I indeed missed the attachement. I see some execeptions thrown by
Gscan2pdf (the lines starting with ***). Will look into this when I get
some time (probably not before Saturday). 
This looks like some problem with the button support. Can you please get
me a trace with BOTH 
SANE_DEBUG_BJNP=11
ans
SANE_DEBUG_PIXMA=11 
set at the same time? 
This problem does not occur over USB (just to be sure)?
Thanks, Louis



-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MF8200C Series

2014-08-21 Thread Louis Lagendijk
On Thu, 2014-08-21 at 20:40 +0200, Troels Thomsen wrote:
 
 
 
 Hi , 
 
 
 Adding 
 192.168.1.50mf8230
 
 to
 
 /etc/hosts
 
 was really effective!
 
 
 
 I still have a delay, now around 10 seconds.
 
 As seen below, its not the pixma enumeration that takes all this time
 (only one second), so I'm suspecting it's because all the backends are
 given a chance to find a device. And given the number of backends this
 will obviously take some time.
 
 But then I tried to do
 ./configure BACKENDS=pixma --without-snmp --disable-ipv6
 
 and then make
 
 Same result.
 
 
 To flip things around, I don't mind a full auto-detect taking 10
 seconds or 1 minute, if only there was a way to specify the device
 manually (from command-line, environment-variable etc)
 
 
 scanimage -d mfnp://mf8230:8610
 
 does not work, 
 - can I specify a network device on the command line like this?
 
 - and will that stop the auto-detection?
 
 
 
 any help greatly appreciated!
 
 /Troels
 

There is no way to disable auto-detection in the pixma backend (I will
consider adding such an option when I get some time). But did you remove
all other backends from dll.conf?  All backends mentioned in dll.conf
will get loaded and will probe for devices. Removing any backends you
don't need may improve startup time quite considerably. There may be
other backends that try to do a reverse lookup (which does not work in
your case. Are you running an own DNS server?). So remove all other
backends from dll.conf.

BR, Louis




-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MX 725 network problems

2014-08-19 Thread Louis Lagendijk
On Sat, 2014-08-16 at 17:16 +0200, HelpHelp wrote:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 Hello!
 
 Thanks to Rolf Bensch. He made my Scanner working. The only problem is
 that I can use the scanner only by usb. Network is very unstable. Most
 of the time I have to restart Xsane, gscan2pdf, etc. for doing just
 one scan.
 
 First I will start with my setup
 
 System: Ubuntu 14.04
 Printer: Canon MX725
 # scanimage -V
 scanimage (sane-backends) 1.0.25git; backend version 1.0.25
 
 You can find my first bug report here: 
 https://alioth.debian.org/tracker/index.php?func=detailaid=314787group_id=30186atid=410366
Hi 
can you please get me a log file with SANE_DEBUG_PIXMA=11 set:
export SANE_BUDG_PIXMA=11
scanimage 
the IP-communication fails pretty early, bu I cannot see where and why

Thank Louis




-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MX 725 network problems

2014-08-19 Thread Louis Lagendijk
On Tue, 2014-08-19 at 19:07 +0200, Louis Lagendijk wrote:
 On Sat, 2014-08-16 at 17:16 +0200, HelpHelp wrote:
  
  
  
  
  
  
  
  
  

 Hi 
 can you please get me a log file with SANE_DEBUG_PIXMA=11 set:
 export SANE_BUDG_PIXMA=11
this should have read: 
export SANE_DEBUG_BJNP=11
and then your scanimage command
 scanimage 
 the IP-communication fails pretty early, bu I cannot see where and why
 
 Thank Louis
 
 
 
 




-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MX 725 network problems

2014-08-19 Thread Louis Lagendijk
On Tue, 2014-08-19 at 20:57 +0200, HelpHelp wrote:
 Hi Lois,
 i needed a while for getting the error message.
 Therefore the log is pretty big. You will find the error on the end.
 
 Link: https://dl.dropboxusercontent.com/u/12003240/sane.log.7z

Were you scanning from the ADF here? I see  a sequence that seems to
suggest a completed page scan and a new page started. Is that correct?
If so I may have to re-open a TCP connection for that to be
possible.
Kind regards, Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


Re: [sane-devel] Canon MX 725 network problems

2014-08-16 Thread Louis Lagendijk
On Sat, 2014-08-16 at 21:24 +0200, HelpHelp wrote:
 Hi!
 
 This is strange - When I try to capture packets with wireshark it is
 really hard to reproduce the 
 error. It looks like I  have to hold an open connection between the
 scanner and the pc for scanning. Could that be true? 

Sounds lie a firewall problem? Will look into this more in a few days
Louis


-- 
sane-devel mailing list: sane-devel@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-requ...@lists.alioth.debian.org


[sane-devel] MX925: Scan via Display to SANE??

2014-05-03 Thread Louis Lagendijk
On Fri, 2014-05-02 at 21:55 +, Thomas Escher wrote:
 One question ? I own a Canon MX925. It's possible to scan from the
 display
 directly to the Windows-Machines. Is SANE the right software to scan
 from
 the display directly to a debian-machine?
 
 
 Thanks,
 
 
 Tom

Hi Tom,
Yes, Sane can be the base for button-based scanning, but you will also
need scanbd. Sane provides the interface to the scanner, scanbd will
handle the logic. Scanbd cab be found here:
http://sourceforge.net/projects/scanbd/?source=directory

best regards, Louis




[sane-devel] Issue with Fujitsu ScanSnap iX500

2014-04-14 Thread Louis Lagendijk
On Thu, 2014-04-10 at 07:41 +0200, Wolfgang Fahl wrote:
 Dear Sane developers,
 
 please find attached a zipped log with the result of my test with a
 ScanSnap iX500 (due to the 100 KByte Limit for this mailinglist I could
 not simply paste the content).
 
 This test was done on a Macbook Pro running Mavericks using the latest
 git version.
 My macports 1.0.22 Version didn't work at all.
 I had to comment out the pixma driver to avoid
 
 [bjnp] create_broadcast_socket: ERROR - bind socket to local address failed - 
 Address already in use
 
I just built sane on my old (2009) iMac with 10.6 using jhbuild. I can
not reproduce this error message. It could of course be an issue with
Mavericks or MacPorts?
What does netstat -n |grep 8612 return for you? 
 
 See also http://trac.macports.org/ticket/26194
 where the pixma driver causes a Segmentation violation. I think
 commenting out by default might be a good idea to have
 more people have success on Mac OS.
 
Same story I cannot reproduce this issue either. I did not use macports
but jhbuild, so that may be related too. But sane 1.0.22 is pretty
ancient by now.
Commenting pixma backend out is like sweeping the issue under the
carpet. It would me more useful for people using a Canon to get the bug
solved

 Cheers
   Wolfgang
 






[sane-devel] Canon MF4770N network

2014-04-09 Thread Louis Lagendijk
On Tue, 2014-04-08 at 22:35 -0700, littlesincanada wrote:
 Hi,
 Thanks to the various hints particularly from Louis, my Canon MF4770N 
 works flawlessly over the net.
 The scanner was autodetected and works out of the box as of latest git.
 
 Many thanks: you guys rock!!

Thanks for your report. The mfnp support was added quite recently as I
said before. It is good to get some feedback on the results with
different scanners
Kind regards, Louis





[sane-devel] Canon MF4770N network

2014-04-08 Thread Louis Lagendijk
On Mon, 2014-04-07 at 21:20 -0700, littlesincanada wrote:
 Hi,
 After managing to get USB scanning working with Rolf for the Canon 
 MF4770N machine, I have now put the printer onto the network and am 
 trying to get network scanning working to no avail.
 
 Assuming that it uses the BJNP protocol, I have added the scanner to 
 /etc/sane.d/pixma.conf:
 
 bjnp://192.168.1.51
As the MF4770 is a laser device it most likely does NOT use the bjnp
protocol but the mfnp protocol. This is supported only in the git
version of sane.
It requires opening port 8610 outgoing and 8612 incoming (see man
sane-pixma, section about firewalling).  If the scanner and the computer
are one the same subnet, opening these ports should be sufficient for
auto-detection of the scanner. I don't have a laser multi-functional but
have developed the mfnp support with one user that has a MF4880. That
works. Another user got it to work with a MF4570.

If you opened the firewall and it did not work, please get me a logfile
from scanimage -L with
export SANE_DEBUG_BJNP=4 
set. You may also want to try setting
mfnp://192.168.1.51 
in pixma.conf

kind regards, Louis 




[sane-devel] Canon laser multi-functional support: MFNP protocol

2014-02-11 Thread Louis Lagendijk
Hi,
I have committed  support for Canon laser multifunctional scanner
support to git. The MFNP protocol is very similar to the BJNP protocol,
so I added it to the exsiting BJNP code. If people find issues with
either BJNP (inkjet) or MFNP (laser) devices, I would appreciate a
report here.

Thanks to  Yvan L. G?linas who gave me access to his scanner, I could
add the support. It works for his MF4880DW (MF4800 family). I expect it
to work for other laser MF devices that have a network interface, but
would appreciate feedback, so we can update the supported scanner list
with this information
Thanks in advance.

Kind regards,
Louis





[sane-devel] NET BJNP Canon imageCLASS MF4880DW

2014-02-08 Thread Louis Lagendijk
On Tue, 2014-01-07 at 13:05 +0100, Louis Lagendijk wrote:
Hi Rolf,
I am working with Yvan L. G?linas gelinasyl at gmail.com to get the laser
multi-functionals to work over the mfnp protocol (usb over IP).
Yvan has kindly given me access to his scanner over a tunnel.

I found that the MF4880DW sends pretty big image blocks to the backend:
I see sizes of 261640 (just below 256K), so we exceed the currently
defined :
#define IMAGE_BLOCK_SIZE (0x) and as a result the backend crashes.

Would it be ok for you if I change  this to:
#define IMAGE_BLOCK_SIZE (0x3).

Thanks in advance for your feedback

Kind regards, Louis






[sane-devel] NET BJNP Canon imageCLASS MF4880DW

2014-02-08 Thread Louis Lagendijk
On Sat, 2014-02-08 at 00:00 +0100, Louis Lagendijk wrote:
 On Tue, 2014-01-07 at 13:05 +0100, Louis Lagendijk wrote:
 Hi Rolf,
 I am working with Yvan L. G?linas gelinasyl at gmail.com to get the laser
 multi-functionals to work over the mfnp protocol (usb over IP).
 Yvan has kindly given me access to his scanner over a tunnel.
 
 I found that the MF4880DW sends pretty big image blocks to the backend:
 I see sizes of 261640 (just below 256K), so we exceed the currently
 defined :
 #define IMAGE_BLOCK_SIZE (0x) and as a result the backend crashes.
 
 Would it be ok for you if I change  this to:
 #define IMAGE_BLOCK_SIZE (0x3).
 
 Thanks in advance for your feedback
 
 Kind regards, Louis

I realized that there may be a better option still: increase the buffer
size when we receive large blocksize. Please let me know whatg you
prefer
regards, Louis


-- next part --
A non-text attachment was scrubbed...
Name: pixma_imageclass.c.diff
Type: text/x-patch
Size: 1439 bytes
Desc: not available
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20140208/395e21a5/attachment.bin


[sane-devel] NET BJNP Canon imageCLASS MF4880DW

2014-02-08 Thread Louis Lagendijk
On Sat, 2014-02-08 at 13:07 +0100, Louis Lagendijk wrote:
 On Sat, 2014-02-08 at 00:00 +0100, Louis Lagendijk wrote:
  On Tue, 2014-01-07 at 13:05 +0100, Louis Lagendijk wrote:
  Hi Rolf,
  I am working with Yvan L. G?linas gelinasyl at gmail.com to get the laser
  multi-functionals to work over the mfnp protocol (usb over IP).
  Yvan has kindly given me access to his scanner over a tunnel.
  
  I found that the MF4880DW sends pretty big image blocks to the backend:
  I see sizes of 261640 (just below 256K), so we exceed the currently
  defined :
  #define IMAGE_BLOCK_SIZE (0x) and as a result the backend crashes.
  
  Would it be ok for you if I change  this to:
  #define IMAGE_BLOCK_SIZE (0x3).
  
  Thanks in advance for your feedback
  
  Kind regards, Louis
 
 I realized that there may be a better option still: increase the buffer
 size when we receive large blocksize. Please let me know whatg you
 prefer
 regards, Louis

I included the wrong version of the patch. Here is the correct one
(still not tested as I do not have a connection to the scanner).
kind regards, Louis


-- next part --
A non-text attachment was scrubbed...
Name: pixma_imageclass.c.diff
Type: text/x-patch
Size: 1498 bytes
Desc: not available
URL: 
http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20140208/ae1c3c6e/attachment.bin


[sane-devel] Canon MG3250 - new hardware

2014-02-05 Thread Louis Lagendijk
On Sun, 2014-02-02 at 23:09 +, Keith Wansbrough wrote:
 Hi,
 
 I have a Canon MG3250 connected via wireless (BJNP, IPv4). I see it's 
 marked as Testers needed. How can I help?
 
 I have pixma 0.17.6 (built from git), running on Ubuntu 12.04 on x86_64.
 
 scanimage -L didn't find the scanner, but putting an explicit line 
 bjnp://192.168.0.16 in /usr/local/etc/sane.d/pixma.conf made it find it.
 
 Running xsane and clicking the Acquire preview button causes the 
 scanner to move slightly, and an error dialog Error during read: Error 
 during device I/O to appear in xsane.
 
 I've attached the debug output (level 11) of the above. Any suggestions 
 for things to try? I'm happy to apply patches, collect logs, etc.
 
 Thanks,
 
 --KW 8-)
Hi Keith
Before you try the network protocol (which adds an additional layer of
complexity) it would be good to first test the scanner using the USB
connection. If that works, we can work on the network stuff (if still
applicable). I can help with the BJNP stuff, Rolf B can hopefully work
with you on the USB support

Best regards, Louis






[sane-devel] NET BJNP Canon imageCLASS MF4880DW

2014-01-07 Thread Louis Lagendijk
On Mon, 2014-01-06 at 11:49 -0500, Yvan L. G?linas wrote:
 Hi,
 
 I have a Canon imageCLASS MF4880DW and sane-backend git has been
 updated and working fine via USB  (lsusb: Bus 003 Device 004: ID
 04a9:2773 Canon, Inc.) Thanks!
 
 
 I was trying to use it via the net but it didn't worked at first. I
 noted with wireshark that this printer is not using BJNP on port 8612
 but instead MFNP on port 8610.  As such MFNP looks similar to BJNP.
 
 I changed the sane-backend/backend/pixma_bjnp_private.h/BJNP_STRING to
 MFNP and recompiled
 (#define BJNP_STRING MFNP)
 
 .After that I forced the port to 8610 in pixma.conf by adding
 bjnp://ip address:8610
 
 When using the default dpi of 75 (eg with xscanimage), it work and get
 a good scan (tried flatbed only at this time).
 
 But if I am increasing the dpi to the 150, 300, or 600, it don't work
 and I am getting a buch of logs as follow;
 
   [bjnp] bjnp_recv_header:ERROR, Received response has cmd code 80, expected 
 33
   [bjnp] Could not read response to command!
   [bjnp] bjnp_recv_header:ERROR, Received response has cmd code 10, expected 
 33
   [bjnp] Could not read response to command!
   [bjnp] bjnp_recv_header:ERROR, Received response has cmd code 4, expected 33
   [bjnp] Could not read response to command!
   [bjnp] bjnp_recv_header:ERROR, Received response has cmd code 1, expected 33
   [bjnp] Could not read response to command!
   [bjnp] bjnp_recv_header:ERROR, Received response has cmd code 0, expected 33
 
 
 Any suggestion what I should do next?
 
 
 Thanks in advance
 
First question: does it work well over USB? If scanning over USB already
fails there is no point in testing over the network.

If scanning over USB works ok even for the higher resolutions , we can
try to debug the USB over IP-protocol. to do that:
export SANE_DEBUG_PIXMA=3
scanimage  whatever options you need 2 log

and mail me the created logfile. I will have a look at it when I have
some time (I cannot promise a very quick turn around as I am quite busy
with some other projects right now). 

I we can get this to work I can include official support for it. I
cannot test this myself as I do not have a device that talks MFNP. 
I have been interested in supporting MFNP as well assuming it is similar
to BJNP.
Kind regards, Louis






[sane-devel] saned on headless Centos 6 server

2013-09-03 Thread Louis Lagendijk
On Tue, 2013-09-03 at 13:47 +1200, Jon Chamberlain wrote:
 Hi,
 
 I have configured an HP 1050 all-in-one on my Centos 6 server using
 the manual instructions on the HPLIP site.
 
 So far I am able to print and scan locally, but have been unsuccessful
 in getting it to be seen across the network. net.conf, saned.conf and
 hp,conf have been setup and I have configured xinted to start saned at
 startup.
 
 However, saned is not running as a service and is not recognised as a
 service when i try to start it.
 
Saned should get started from xinetd. What does 
chkconfig saned
return? 
If it tells you saned is on, it should be possible to use the scanner
from a remote machine through the net backend
Best regards, Louis






[sane-devel] Problems with MX712 via Network

2013-07-17 Thread Louis Lagendijk
On Wed, 2013-07-17 at 08:49 -0700, warnes wrote:
 Hi All,
 
 First, thanks for all the work that goes into running a project like this! 
 I'm providing this information to help debugging the Canon PIXMA MX710
 series support. 
 
 I have a brand new Canon Pixma MX712 ($54.99 at BJ's!). Since the sane-pixma
 1.0.23 driver wasn't happy, I've installed sane-backends 1.0.24git, and I'm
 having mixed success scanning documents.
 
 At times, everything runs nicely, other times I get connection or I/O
 errors.  Sometimes there seems to be no trigger for the errors, other times
 they seem to be triggered by a problem, such as a paper-jam in the
 auto-document feeder.
 
 O/S:Ubuntu 13.04
 Frontend: SimpleScan (when it works)
 SANE version:
scanimage -V
scanimage (sane-backends) 1.0.24git; backend version 1.0.24
 
 Results of successful scanimage -T:   success.txt
 http://sane.10972.n7.nabble.com/file/n1/success.txt  
 Results of failed scanimage -T:  failure.txt
 http://sane.10972.n7.nabble.com/file/n1/failure.txt  
 
 Turning off the printer when it is not working *sometimes* resolves the
 problem.
The dirst question is: does scanning over USB work well? If so, we can
start debugging the network code. If not, we need to look at the backend
itself

If USB works well, please try the following:
export SANE_DEBUG_BJNP=3
and perform a scan (preferably using scanimage) and mail me the
resulting logfile

Kind regards, Louis





[sane-devel] Problems with MX712 via Network

2013-07-17 Thread Louis Lagendijk
On Wed, 2013-07-17 at 09:42 -0700, warnes wrote:
 Hi Louis,
 
 
 I connected t he printer via USB and ran: 
 
 
  export SANE_DEBUG_BJNP=3
 
  scanimage | tee scanimage.log
 
 
 
 The logfile is attached.
 
 
 -Greg
Not exavlty what I asked: first determine whether the issue is in the
backend by scanning over USB. If that does not work either, the issue is
in the pixma backend code (and Rolf can probably help you there).

If scanning over USB does work, do a scan _over_the_network_ (with the
setting mentioned above). But again, this does not make sense when the
scan over USB fails too.

Louis





[sane-devel] canon pixma MX890 ADF empty test OK

2013-05-23 Thread Louis Lagendijk
On Wed, 2013-05-22 at 14:53 -0700, Tim wrote:
 Unfortunately my report was premature.  The backend did successfully 
 manage a 1 page ADF scan followed by an ADF empty test, but more normal 
 use profile failed as:
 
 o Placed 9 sheets in ADF
 
 o launched xsane w ADF/multipage=9
 
 o ask for and received preview, adjusted color with white eyedropper
 
 o ask for scan, failed
 
 After this, the MX892 was locked out regardless of several 
 retries/variations including power cycling MX892, removing ~/.sane, 
 removing cnijfilter and rebuild/reinstall 16 May git.  All variations 
 error as follows:
 
  [sanei_debug] Setting debug level of pixma to 11.
  [pixma] pixma is compiled without pthread support.
  [pixma] pixma version 0.17.2
  [pixma] Scanner model found: Name MX890(Canon PIXMA MX890 Series) matches 
  MX890 series
  [pixma] pixma_collect_devices() found Canon PIXMA MX890 Series at 
  bjnp://canon:8612
  [pixma] pixma_find_scanners() found 1 devices
  [pixma] Scanner model found: Name MX890(Canon PIXMA MX890 Series) matches 
  MX890 series
  [pixma] pixma_collect_devices() found Canon PIXMA MX890 Series at 
  bjnp://canon:8612
  [pixma] pixma_open(): Canon PIXMA MX890 Series
  [bjnp] bjnp_open_tcp: Can not connect to scanner: Connection refused
  [pixma] pixma_connect() failed EINVAL
  [pixma] pixma_open() failed EINVAL
  [pixma] pixma_close(): Canon PIXMA MX890 Series
  /tmp$ exit
  exit

Ar you scanning over the network. It would be worth testing the USB
interface first. And if you can get Rolf the logfiles of a Windows scan
and the Linux scan I am sure that he will be abler to get this sorted
out. This is definitely worth spending some effort for.

The logfile you show here may be pointing to a bug in the network code.
In other cases I have seen a faiure to open a tcp connection, this was a
bug in the network code. Did you test with the latest code from git?
Could you please try the same procedure over USB (disconnect the network
connection for the time being)

Louis 




[sane-devel] Testing Sane + Canon MG6250

2013-04-22 Thread Louis Lagendijk
On Mon, 2013-04-22 at 22:34 +0930, Ashley Arnold wrote:
 Hi,
 
 
 I'm not really sure how to do this, but the
 http://www.sane-project.org/sane-mfgs.html page said Testers needed,
 so here is what I did to get my Canon MG6250 scanner going.
 
 
 This is on xubuntu 12.10 64-bit with all current updates as at 13th
 Apr 2013. Here is my xsane version info:
 
 $ xsane --version
 xsane-0.998 (c) 1998-2010 Oliver Rauch
   E-mail: Oliver.Rauch at xsane.org
   package xsane-0.996
   compiled with GTK-2.24.12
   with color management function
   with GIMP support, compiled with GIMP-2.8.0
   XSane output formats: jpeg, pdf(compr.), png, pnm, ps(compr.), tiff,
 txt
 
 
 After installing xsane, initially it wouldn't detect the MG6250 (which
 was on the network via wireless connection). It would look for devices
 and then the process would end.
 
Is the scanner on the same network segment as your computer? BJNP
detects scanners on the same network segment only (it has to use
broadcasts). If it is and your scanner is not detected, there is most
likely a firewall blocking some of the packets. Check the system log to
seewhich ones. After 1.0.23 I have rewritten the bjnp code to be more
consistent in which ports it uses.
 
 After reading the man docs and finding the backend name for my
 printer is pixma, I did:
   * man sane-pixma (seems to be a man entry for each backend)
 tells you to that network scanners should normally be
 detected, but if not, add them directly
 to /etc/sane.d/pixma.conf
   * Edited /etc/sane.d/pixma.conf and added: 
 bjnp://ip_address
But see comments above.

   * The sane daemon wasn't running, so I started it manually (a
 friend of mine running Arch said it was for him...): 
   * Edited /etc/default/saned and set RUN=yes.
   * Then started the sane service: service saned start
This is not expected. Saned is normally NOT required for the scanning
over the network to work, but this may be a configuration issue. I only
use scand in combination with scanbd, the scanner button deamon that
requiresd scand for its operation.

   * Run xsane, it discovered the scanner and worked perfectly.
 The only issue I had is for multi-page documents, it didn't wait
 between pages, but scanned the same page over and over. This might be
 user error and nothing to do with xsane though.
 
I cannot comment on this as my scanner does not have a page feed. Does
multipage scanning work over USB? If so, I would like t see some
logfiles. I can give you the details on the required settings when you
can confirm that it works right over USB 
 
 Hopefully this is of use to someone. Again, apologies if this is not
 the forum for this kind of stuff.
Well, it is always usefull to see if BJNP works with new scanners too. I
have only a single scanner available and appreciate any feedback I can
get

Louis
(author of the BJNP stack)





[sane-devel] scanbd on Raspberry Pi Connection Failed system_bus_socket

2013-04-13 Thread Louis Lagendijk
On Fri, 2013-04-12 at 07:01 -0700, deigerwutz wrote:
 Dear all
 
 In the meanwhile I removed and installed scanbd once again.
 
 But now I get an Iteration on dbus call error.
 
 If scanbd runs from command line with option f it works perfect but not
 with auto start.
 If scanbd ist started via rc$.d the Iteration on dbus call occurs.
 
 echo $SANE_CONFIG_DIR results in an empty line.
 
 The error leaves an entry every second in the syslog file.
 
 What can be the reason, please help.
 
 Here ist the syslog from boot:
 
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: debug on: level:
 7
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: daemonize
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: dropping privs to
 uid saned
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: dropping privs to
 gid lp
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: drop privileges
 to gid: 7
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: Running as
 effective gid 7
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: drop privileges
 to uid: 107
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: Running as
 effective uid 107
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: dbus_init
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: dbus match
 type='signal',interface='org.freedesktop.Hal.Manager'
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: sane version 1.0
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: Scanning for
 local-only devices
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd:
 start_sane_threads
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: start dbus thread
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: timeout: 500 ms
 Apr 12 15:49:39 raspberrypi scanbd: /usr/local/bin/scanbd: Iteration on dbus
 call
 Apr 12 15:49:40 raspberrypi scanbd: /usr/local/bin/scanbd: Iteration on dbus
 call
 Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
 file: /etc/xinetd.d/chargen [file=/etc/xinetd.conf] [line=14]
 Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
 file: /etc/xinetd.d/daytime [file=/etc/xinetd.d/daytime] [line=28]
 Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
 file: /etc/xinetd.d/discard [file=/etc/xinetd.d/discard] [line=26]
 Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
 file: /etc/xinetd.d/echo [file=/etc/xinetd.d/echo] [line=25]
 Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
 file: /etc/xinetd.d/sane-port [file=/etc/xinetd.d/sane-port] [line=26]
 Apr 12 15:49:40 raspberrypi xinetd[1443]: Reading included configuration
 file: /etc/xinetd.d/time [file=/etc/xinetd.d/time] [line=12]
  
 
 
 
 --
 View this message in context: 
 http://sane.10972.n7.nabble.com/scanbd-on-Raspberry-Pi-Connection-Failed-system-bus-socket-tp17350p17471.html
 Sent from the SANE - Dev mailing list archive at Nabble.com.
 

you scanner is not recognised. Did your startup script specify the
SANE_CONFIG_DIR?

Kind regards, Louis





[sane-devel] Using Canon MF 4270 over network

2013-03-12 Thread Louis Lagendijk
On Tue, 2013-03-12 at 19:50 +0100, kimec.ethome.sk wrote:
 Hi everybody,
 
 according to the sane-pixma backend's man page, MF 4270 should be 
 already supported (it is listed in the 'known to work section').
 http://www.sane-project.org/man/sane-pixma.5.html
 
 Could somebody confirm if the scanner is supported only over USB or 
 also over LAN via BJNP?

It should work (with a recent enough Sane, I don't know when the MF4270
was added, but at least sane 1.0.23 seems to support it). The BJNP
support should be pretty much scanner independent.

Kind regards, Louis




[sane-devel] scanbd problem with dbus permission ?

2013-02-27 Thread Louis Lagendijk
On Wed, 2013-02-27 at 09:58 +0100, stout wrote:
 Hello,
 
 
  A few notes:
  scanbd_dbus shall be copied into /etc/dbus-1/system.d, that is what you
  referred to I guess?
 
 Yes it is.
 
  What do you use to start scanbd? Systemd? Scanbd apparently does not see
  the scanner. What is set for SANE_CONFIG_DIR? Do you have a dll.conf in
  that dir with the appropriate backend for your scanner listed? Does it
  have the config file for the backend (if needed) in that dir? 
  
 
 Yes, I use systemd to start scanbd.
 No, the SANE_CONFIG_DIR wasn't set.

1) For scanbd (and scanbm) it should be set in the service files in
(/usr)/lib/systemd/system/scanbd.service or scanbm at .service:

Here is my scanbd.service:
[Unit]
Description=Scanner button polling Service

[Service]
Type=simple
ExecStart=/usr/sbin/scanbd -f
#ExecReload=?
Environment=SANE_CONFIG_DIR=/etc/scanbd
StandardInput=null
StandardOutput=syslog
StandardError=syslog
#NotifyAccess=?

[Install]
WantedBy=multi-user.target
Also=scanbm.socket
Alias=dbus-de.kmux.scanbd.server.service

see the environment setting.
Please note that the config dir must be different for scanbd and the
user. This is why we set it here for scanbd (and in scanbm.service for
scanbm) and point it to the directory where we have a dll.conf with
reference to the backend for the scanner and (if needed) the xxx.conf
for the backend.

2) For the user we need a dll.conf in the normal location
(often /etc/sane.d) where the dll.conf only has 
net 
and the net.conf (with appropriate customization)

kind regards
Louis





[sane-devel] scanbd problem with dbus permission ?

2013-02-26 Thread Louis Lagendijk
On Tue, 2013-02-26 at 11:23 +0100, stout wrote:
 Hello,
 
 I found some solution for my problem :
 First, I noticed than the file scanbd_dbus.conf wasn't in the system.d
 folder, so I added it.
 
 The error changed : no more dbus connection error but endless
 Iteration on dbus call in the log...
 
 It seems that if I start scanbd right after inetd, this error shows.
 Bur if I start inetd, then do a scanimage -L or another use of the
 scanner via sane, then start scanbd, it works like a charm !
 
 So I modify the udev rule so that when the scanner is turned on, it
 launches inetd, then imagescan -L, then scanbd :
 
 # Epson Perfection V500 Photo
 ENV{ID_VENDOR_ID}==04b8, ENV{ID_MODEL_ID}==0130, ACTION==add,
 RUN+=/usr/sbin/service inetutils-inetd start,
 RUN+=/usr/bin/scanimage -L, RUN+=/usr/sbin/service scanbd start
 ENV{ID_VENDOR_ID}==04b8, ENV{ID_MODEL_ID}==0130, ACTION==remove,
 RUN+=/usr/sbin/service scanbd stop, RUN+=/usr/sbin/service
 inetutils-inetd stop
 
this should not be required, but you need to set the SANE_CONFIG_DIR
env. variable before starting scanbd (see below)
 I don't know if it is a configuration problem or a bug...
 
 Best regard
 
 stout
 
 
A few notes:
scanbd_dbus shall be copied into /etc/dbus-1/system.d, that is what you
referred to I guess?
What do you use to start scanbd? Systemd? Scanbd apparently does not see
the scanner. What is set for SANE_CONFIG_DIR? Do you have a dll.conf in
that dir with the appropriate backend for your scanner listed? Does it
have the config file for the backend (if needed) in that dir? 

kind regards, Louis 





[sane-devel] scanbd Canon MG6250

2013-02-07 Thread Louis Lagendijk
On Wed, 2013-02-06 at 22:27 +0100, Rolf Bensch wrote:
 Hi Matthias,
 
 Many thanks for your patch. I just committed your patch to git.
 
 I have no idea about BJNP. Please open a new thread about this issue
 here in the ml, and/or search for a BJNP maintainer in ChangeLog.
 
 Cheers,
 Rolf
 
Gents
No need for searching: please get me a log with SANE_DEBUG_BJNP=4 and I
will have a look at it. 

I have been following this thread and am surprised that you don't see
anything happening, but there is always a chance that there is something
wrong

kind regards, Louis




[sane-devel] scanbm

2013-02-07 Thread Louis Lagendijk
On Thu, 2013-02-07 at 17:32 +0100, Matthias Thon wrote:
 Hello,
 
 
 i like to setup scanbd with my Canon MG6250. scanbd -f works and
 reacts on pressing scanner buttons.
 
 Now i like to use scanimage on this machine. If i load scand and scan
 over the net backend it works. But if i try to start scanbd and setup
 scanbm in xinetd, scanbd will not interruped.
 
 Then i tryed to send to send a signal:
 
 kill -s SIGUSR1 interrupts the scanbd. kill -s SIGUSR2 restarts the
 polling.
 
 But scanbm -d -t0 --signal -a scan does not interrup the scanbd.
 
Do you have the -f option on the scanbd command line? If so, scanbd does
not create the pid-file. And scanbm uses that to find the pid of
scanbd. 

 I can't enable the dbus service on my ubuntu 12.10, because it haven't
 systemd.
 
dbus does not require systemd! It works also without systemd. Don't get
confused by the fact that the configfile de.kmux.scanbd.server.service
is in the systemd directory. That is for systemd only (and I am not even
sure that it is really required there: we do not need udev activation).
The only file really required is scanbd_dbus.conf that goes
into /etc/dbus-1/system.d (this has no relation to systemd!). That tells
udev the access rules that apply for dbus messages. Do check that it
contains the userid you use on your system (this file assume that you
use saned as userid). So if your system has udev, just install
scanbd_dbus.conf

 
 Here the output of scanbm and the syslog part.
 
 
 regards Matthias
 
 
 Terminal:
 
 sudo scanbm --signal -d -t0 -a scan
 
 
 
 Syslog:
 
 Feb  7 17:20:10 matze-Satellite-C660 saned[6115]: saned (AF-indep
 +IPv6) from sane-backends 1.0.24git starting up
 Feb  7 17:20:10 matze-Satellite-C660 saned[6115]: check_host:
 getpeername failed: Socket operation on non-socket
 Feb  7 17:20:10 matze-Satellite-C660 saned[6115]: init: access by host
 [error] denied
 Feb  7 17:20:10 matze-Satellite-C660 saned[6115]: saned exiting
 
 

Please mail me your xinetd config file and the scanbd startup script you
are using?

Thanks, Louis




[sane-devel] Scanner Button Daemon [scanbd] 1.3: parse error in config file

2013-01-19 Thread Louis Lagendijk

On Sat, 2013-01-19 at 18:54 +0100, Rolf Bensch wrote:
 Hi Wilhelm,
 
 Yesterday I started with scanbd and my CS9000F.
 
 I mentioned an error with scanbd.conf:
 
 $ /usr/local/bin/scanbd -df -c /usr/local/etc/scanbd/scanbd.conf
 /usr/local/etc/scanbd/scanbd.conf:197: no such option 'include'
 /usr/local/bin/scanbd: parse error in config file
 
 As a workaround I copied the contents of pixma.conf into scanbd.conf.
 
 It could be nice to use the 'include' function. Configuration will be
 much easier to use prepared conf files. I'll provide my conf and script
 files to the ml when everything is working.
 
 Cheers,
 Rolf

hello Rolf
include works only in between sections. It does work here with the
default config. Could you please mail me the failing configuration so I
can have a look at it? As Wilhelm already pointed out, I did most of the
changes (and bugs :-) ) for the 1.3 release

Are you running the stock 1.3 version or from subversion?
Kind regards, Louis 





[sane-devel] sane-devel Digest, Vol 91, Issue 14

2013-01-12 Thread Louis Lagendijk
On Sat, 2013-01-12 at 08:48 -0500, Michael Watson wrote:
 Louis,
 
 Udev start and stop of scanbd.service and scanbm.socket, service and socket
 not enabled:
 
 /usr/lib/udev/rules.d/99-local.rules
 # Scan Button rules for Canon CanoScan LiDE 210
 #ENV{libsane_matched}==yes, GROUP=scanner
 ENV{ID_VENDOR_ID}==04a9, ENV{ID_MODEL_ID}==190a, ACTION==add, \
 RUN+=/usr/bin/systemctl start scanbm.socket, RUN+=/usr/bin/systemctl
 start scanbd.service
 ENV{SUBSYSTEM}==usb, ENV{ID_PRODUCT_FROM_DATABASE}==CanoScan LiDE 210,
 ACTION==remove, \
 RUN+=/usr/bin/systemctl stop scanbd.service, RUN+=/usr/bin/systemctl
 stop scanbm.socket
 
 # systemctl status scanbd.service
 scanbd.service - Scanner button polling Service
   Loaded: loaded (/usr/lib/systemd/system/scanbd.service; disabled)
   Active: active (running) since Wed, 1969-12-31 19:00:16 EST; 43
 years and 0 months ago
 Main PID: 152 (scanbd)
   CGroup: name=systemd:/system/scanbd.service
   L-152 /usr/local/sbin/scanbd -f
 
 # systemctl status scanbm.socket
 scanbm.socket - scanbd/saned incoming socket
   Loaded: loaded (/usr/lib/systemd/system/scanbm.socket; disabled)
   Active: active (listening) since Wed, 1969-12-31 19:00:15 EST; 43
 years and 0 months ago
 Accepted: 0; Connected: 0
   CGroup: name=systemd:/system/scanbm.socket
 
 Also for network scanner, scanbm and saned running as user saned,
 
 /usr/lib/systemd/system/scanbm at .service
 [Unit]
 Description=Scanner Service
 Requires=scanbm.socket
 
 [Service]
 User=saned
 Group=scanner
 ExecStart=/usr/local/sbin/scanbm
 StandardInput=socket
 Environment=SANE_CONFIG_DIR=/usr/local/etc/scanbd
 
 R/
 Michael
Looks good to me. I still need to check this way of starting scanbd to
see how it works. I have been working on more automation of scanbd setup
today, so I have not yet had the time
Thanks for your input, systemd is new for me too

Kinds regards, Louis




[sane-devel] Response to systemd integration, sane-devel Digest, Vol 91, Issue 12

2013-01-11 Thread Louis Lagendijk
On Fri, 2013-01-11 at 08:38 -0500, Michael Watson wrote:
 Louis,
 
 Thank you.
 
 When I posted the integration tweaks the service complained on startup as
 simple with a dbus name.  This was solved with changing the type to dbus.  I
 have since settled on type simple and no dbus name, and it's working fine
 with no complaining.  
 
 FYI startup and shutdown:
 
 /usr/lib/udev/rules.d/99-local.rules
 ENV{ID_VENDOR_ID}==04a9, ENV{ID_MODEL_ID}==190a, ACTION==add,
 RUN+=/usr/bin/systemctl start scanbd
 ENV{SUBSYSTEM}==usb, ENV{ID_PRODUCT_FROM_DATABASE}==CanoScan LiDE 210,
 ACTION==remove, RUN+=/usr/bin/systemctl stop s$
 
 Had to snoop the messages (udevadm monitor --property) for remove to sense
 removal properly.
This is a very nice add-on. I will have a look at it to see if this
would work for me to. I will add it to the systemd integration directory

 
 At the time I though scanbm.socket had to be enabled to listen.  I was
 wrong.  I've since removed the install section and it works fine.  When
 working though this I found out xinetd was no longer necessary (see below
 root vs saned).  Archlinuxarm supports socket activation.
 
ok, good to see that there is consistency over different platforms and
systemd versions. Thanks for the report
 In summary,
 
   scanbd.service startup and shutdown with udev rules (scanbd.service
 not enabled)
Sounds pretty good.
   scanbm.socket enabled
   monitoring: saned Ssl /usr/local/sbin/scanbd -f
   net scan:   saned Ssl /usr/local/sbin/scanbd -f
   root  Ss  /usr/local/sbin/scanbm
   root  Ss  saned
   scan by button: saned Ssl /usr/local/sbin/scanbd -f
   root  S   /bin/bash
 /usr/local/etc/scanbd/ccp2pdf.script
   root  S   scanimage --device-name
Looks ok.

 genesys:libusb:001:008 --resolution ...
   
   xinetd started (e.g. udev rule) and scanbm.socket disabled
   monitoring: saned Ssl /usr/local/sbin/scanbd -f
   root  Ss  /usr/sbin/xinetd -dontfork
   net scan:   saned Ssl /usr/local/sbin/scanbd -f
   root  Ss  /usr/sbin/xinetd -dontfork
   saned Ss  scanbm
   saned Ss  saned
   scan by button: saned Ssl /usr/local/sbin/scanbd -f
   root  Ss  /usr/sbin/xinetd -dontfork
   root  S   /bin/bash
I am not sure I understand this part: what do you use xinetd for? For
scanbd it is not used at all, right? Is xinetd started by dbus on
scanner detection? 
/systemd scanbm.socket does all you need for starting scanbm/saned for
scanning.

 /usr/local/etc/scanbd/ccp2pdf.script
   root  S   scanimage --device-name
 genesys:libusb:001:008 --resolution ...
 
 With xinetd scanbm and saned run as user saned when scanning via network.
 
scanbd runs as the usert set in scanbd.conf, I need to check how this
works for scanbm right now. I will check later this weekend, but I guess
that User and Group are missing in scanbm at .service. My bad. I will
investigate this a bit further and update the examples in the svn
repository
Kind regards,
Louis




[sane-devel] Scanbd and /etc/sane.d

2013-01-11 Thread Louis Lagendijk
I am sorry for the long post, but I am afraid that I need to provide
a lot of background.

The issues

As you may recall I am packaging scanbd for Fedora. There are a few 
issues that make this a bit challenging:

1) In order to create a good user experience, I want the package to
configure the system as much as possible without any user intervention.
The sane configuration is giving me a bit of a head ache here.
In the ideal situation I would add a few files to the system and 
everything works out of the box. 
This is where dll.conf is giving me problems: user scanning apps 
require a dll.conf that has only the net backend listed, scanbd (or 
saned for that matter) need the normal dll.conf. 
With rpm I can not do this, as the scanner apps use the 
sane.d/dll.conf file. So I would need to change this. Changing files 
owned by other rpms if not allowed - checkmate.

2) Even when I solve this, sanner aps would still inherit all the 
backends listed in one of the files in the sane.d.dll.d directory. 
But that is not what I need, but I can't see a way to control this, 
other then removing these files. But these files are owned by other 
rpms and will get re-added when the packages are updated or 
additional ones added, I have no way of controlling this- 
check mate again

The other thing is for the daemon I can set an own SANE_CONFIG_DIR,
but then I need to copy all backend config files as well, OR set
SANE_CONFIG_DIR with a terminating dir separator so that backend
configuration files get searched in the standard search path as well.
This will work but it is not exactly intuitive.

It would be very nice if we could keep all configuration in one place:
the normal sane.d directory.

My proposal:

I have written a patch to dll.c that tries to load a prefix-dll.conf
before it tries to load dll.conf. 
The prefix can be set with a new environment variable SANE_DLL_PREFIX.
The prefix defaults to default (so we try to load 
default-dll.conf) unless SANE_DLL_PREFIX environment variable is
set). 

If prefix-dll.conf exists anywhere in the search path it gets used. 

If it does not exist, we fallback to dll.conf. 

With this patch, the distribtion's sane package is expected to ship 
with only dll.conf. As no xxx-dll.conf files exist, the standard 
dll.conf gets used in all cases. 

If we now install a package that needs different dll.conf files, it
drops two new dll.con files in sane.d: default-dll.conf (with probably
only the net backend) and scanbd-dll.conf (or saned-dll.conf) which is
as symbolic link to dll.conf and get used for scanbd and/or saned.

This works nicely, except for the loading of the files in dll.d. This is
unfortunately hard coded in dll.c. I have added a directive @dll.d that
can be included in dll.conf to trigger the reading of files in dll.d. 
So where-ever dll.conf contains a @dlld directive the directory gets
searched and any configuration files in there get processed.


I personally prefer option a, but I am unhappy about the
incompatibility this gives. But option b gives slightly different
semantics for dll.conf and prefix-dll.conf. That is maybe even worse. 

This mechanism could be used for saned too. I envisage that saned gets
packaged separately and would add default-dll.conf for users with only
the net backend and  saned-dll.conf as a symbolic link to dll.conf.  

Other suggestions
--
I have tried to start a discussion on this before. 
Wilhem then suggested the following:
 I can imagine to more alternatives:
 
 1) use env-var SANE_CONFIG_FILE for getting the filename of the real 
 dll.conf in the SANE_CONFIG_DIR
 
This could be done if you people prefer so, I used prefix-dll.conf as
that is more intuitive in my opinion. But this is in itself just a small
variation on the implementation as described above.

 2) add a function to the programming interface to set the name / dir for 
 the config-file (sane_init)
 
This would be different from the mechanism used for SANE_CONFIG_DIR, so
I regard it less desirable. It would also require changes to saned as
saned would also want to use this mechanism.

Conclusions/ questions
---
I propose to go for 1a and update our standard dll.conf with @dll.d as
the first line, but I have 2 questions:

1) are you ok with the approach described here?
2) if so, how do you prefer we handle the dll.d directory:
   a) change the default dll.conf to include @dlld
   b) honour @dll.d where it occurs, but still hardcode it in case we are
  using dll.conf?

Comments? Does anybody have better suggestions? 
I believe that a solution to this issue is desirable so it becomes much
easier for distributions to  ship a pre-configured saned too.

Looking forward to your feedback as  I do not want to create an
incompatibility without discussion on the list here.
Louis





[sane-devel] Scanner Button Daemon [scanbd]: release 1.3

2013-01-10 Thread Louis Lagendijk
On Sun, 2013-01-06 at 15:25 -0500, Michael Watson wrote:
 Thank you.
 
 I have 1.3 working on archlinuxarm (systemd).  Please find below
 integration tweaks:
 
 --
 /usr/lib/systemd/system/scanbd.service
 #Type=simple
 # dbus
 Type=dbus

I would recommend against changing the Type to dbus. That will 
result in scanbm triggering starting of scanbd. It is not required
for scanbm that scanb is running. In my own copy I have removed the 
BusName line from scanbd.service instead. It is superfluous.

 --
 /usr/lib/systemd/system/scanbm at .service
 # required for systemctl enable scanbm@
 [Install]
 WantedBy=multi-user.target
 
No this is wrong! scanbm.socket should be enabled and started and 
that triggers scanbm at .service when you use the scanner using the 
net backend from the client application. 
Scanbm.service should NOT have an install section.
 
 #/etc/systemd/system/multi-user.target.wants/scanbm at .service -
 /usr/lib/systemd/system/scanbm at .service
 --
 /etc/xinetd.d/sane
 service sane-port
 {
 port= 6566
 socket_type = stream
 wait= no
 user= saned
 group   = scanner
 server  = /usr/local/sbin/scanbm
 #not sure if this is required
 server_args = scanbm
 # disabled by default!
 disable = no
 }
Using systemd with scanbm.socket should take care of handling the socket
on 
port 6566. I don't even have (x)inetd installed. scanbm.socket does the
above
for you and tells systemd to start scanbm.service when you scan using
the
net backend from your application.

The above of course assumes a complete systemd that does replace
(x)inetd.
Does systemd on ArchLinux support socket activation?
Kind regards, Louis




[sane-devel] Systemd support for saned

2013-01-08 Thread Louis Lagendijk
On Tue, 2013-01-01 at 17:07 +0100, Louis Lagendijk wrote:
 On Tue, 2013-01-01 at 16:47 +0100, Louis Lagendijk wrote:
  On Sat, 2012-12-15 at 14:08 +0100, Louis Lagendijk wrote:
   Hello,
   I have made a simple patch to saned that gives full systemd socket
   activation. The big advantage is that it allows debug output to go to
   systemd instead of /dev/null. I do however need some changes to
   configure.in. I am not sure how to get these in git as I know that I
   cannot simply run an autoreconf as that kills our ltmain.sh changes.
   The autotools on my Fedora 17 seem to be newer than what was used to
   generate the current configure etc.
 
   Could somebody give me some hints on how to update the autofoo stuff or
   even better do it do? 
   I would also would appreciate a review of my changes to configure.in, as
   we seem no to use pkg-config and AC_CHECK_MODULES a style I am not used
   to.
   I have attached configure.in and frontend/Makefile.am as well as
   saned.c.
   Help is very much appreciated
   
   Kind regards, Louis
  
Does anybody have any objections to the changing saned.c? The systemd
changes do allow for all debugging output (backend debugging for example) 
to be captured by systemd, so I believe that they the changes could be 
quite useful. They are completely backward compatible (even on a systemd 
based system we do not need to use them if we do specify StdInput to be
the inetd style socket. 

I now found a machine that has an older automake 1.11 that did allow me
to regenerate the Makefile.in files. I ran autoconf, automake and
autoheader. That did regenerate all Makefile.in files. Should I check
them all in into git? Or should I only check-in 
frontend/Makefile.in, include/sane/config.h.in and saned.c?


kind regards, Louis




[sane-devel] compile problems with scanbd: undefined reference to symbol 'pthread_sigmask@@GLIBC_2.2.5'

2013-01-07 Thread Louis Lagendijk
On Sun, 2013-01-06 at 00:12 +0100, Dominik Kopp wrote:
 Louis Lagendijk wrote:
 
  On Thu, 2013-01-03 at 22:12 +0100, Dominik Kopp wrote:
  This was something missed in the autoconf configuation. I hopefully
  fixed it in svn. Can you try again?
  I also fixed the autoconf rebuilding.
 
 yes, make all was sucessfully. it compiles.
 
 Note:
 in the doc/README.txt chapter 1.1 stands, that libjpeg8-devel is required.
 however, it seems to work with libjpeg62(-devel) as well, which is installed 
 per default (nevertheless, the libjpeg8(-devel) is also available in the 
 repo)
 
I don't have a Suse installed here so I can not check myself, but
libjpeg8  is the old libjpeg8 if I understand it correctly, while
libjpeg is the new jpeg-turbo implementation. Wilhelm tested this and
libjpeg8 worked. I assume that is does not matter much, but using
libjpeg seems safer than libjpeg8 (the old one), depending on what
libsane is linked to (what does ldd /usr/lib/libsane.so | grep jpeg
return?
 next problem:
 I don't have any /etc/inetd.conf
 opensuse has /etc/xinetd.conf
 
 And this uses a different style as in chapter 3) of README.txt
 (sane-port stream tcp4 nowait ...
man scanbm should have answered that, execpt for the fact that it still
refers to scanbd rather than scanbm
Kind regards, Louis




  1   2   >