Re: [sane-devel] 39ceeae6 breaks md5 auth

2018-01-04 Thread Olaf Meeuwissen
Hi James,

James Ring writes:

> Hi Olaf,
>
> On Tue, Jan 2, 2018 at 11:15 PM, Olaf Meeuwissen
>  wrote:
>> Hi James,
>>
>> Thanks for the report.
>>
>> James Ring writes:
>>
>>> Confirmed that with the offending patch, md5.c produces incorrect
>>> digests for known input/output pairs. We should roll it back.
>>>
>>> Also I couldn't reproduce (with gcc 7.2.0) the compiler warning that
>>> the original change was supposed to fix.
>>
>> Hmm, neither can I.  In neither the debian-8-mini nor debian-9-mini CI
>> environments.  But you can still see it in the CI logs for the last
>> pipeline that ran before the offending commit.
>>
>>   https://gitlab.com/sane-project/backends/pipelines/4150861
>>
>> Only the fedora-24-clang log doesn't have it.
>
> Unrelated note: if I read those logs correctly, the CI doesn't run
> `make check`, which maybe they should. It would also be nice to have a
> test case that exercises authentication, though I suspect it is an
> infrequently used feature. I tried adding one, but I couldn't figure
> out how to update the makefiles to include my test.

A `make check` requires /dev/usb to be present in the Docker container
used for the builds in order to pass.  While I have no problem doing
that locally, I haven't tried (or don't recall doing so ;-) on the
shared GitLab.com CI runners.  The VMs that these run on may not even
*have* /dev/usb.

A for an auth test case, a patch with the test is welcome.  I can update
the automake files to integrate the test in the `make check` target.

>>> On Tue, Jan 2, 2018 at 9:57 AM, James Ring  wrote:
 [...snip...]

 Reverting that commit restores the functionality. I haven't figured
 out what the problem is from a cursory inspection of the code, I'll
 continue staring at it.
>>
>> I was about to revert the commit but looking at it now I'm wondering
>> what I was thinking when I committed that :-(  Changing the pointer
>> type to something of a different size *obviously* screws up the array
>> indexing!
>>
>> I've cooked up a fix for that (based on e895ee55).  Could you give the
>> attached patch a try?
>
> Yes, this works! I can't help wondering if it might be better to
> introduce an external dependency on, e.g. libxcrypt or libssl to
> implement md5? That way the sane project is not maintaining an md5
> fork.

Thanks for the testing.  Patch has been pushed.

As for the alternative libraries, thanks for the suggestion.  I noticed
that there is also libcrypt which comes with glibc.  Not sure if there
is anything similar for musl or any of the other OSs that are nominally
supported by sane-backends.  At present, it is less work to maintain the
included code than switch to some "standard" library.

Hope this helps,
--
Olaf Meeuwissen, LPIC-2FSF Associate Member since 2004-01-27
 GnuPG key: F84A2DD9/B3C0 2F47 EA19 64F4 9F13  F43E B8A4 A88A F84A 2DD9
 Support Free Softwarehttps://my.fsf.org/donate
 Join the Free Software Foundation  https://my.fsf.org/join

-- 
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 preview scan?

2018-01-04 Thread Jeff Sadowski
correction

scanimage --batch=preview.jpg --batch-count=1 --format=jpeg -d  -x  -y  -l 0 -t 0 

On Thu, Jan 4, 2018 at 11:46 AM, Jeff Sadowski  wrote:
> Because I will use the default resolution I will leave out that
> argument and I though about if the default scan area for -l and -t
> might not always be 0 so maybe I should do this
>
> scanimage --batch=preview.jpg --batch-count=1 --format=jpeg -d  device> --test-picture=Grid -x  -y  -l 0 -t 0
>
> On Thu, Jan 4, 2018 at 11:36 AM, Jeff  wrote:
>> On 04/01/18 19:14, Jeff Sadowski wrote:
>>> I'm thinking my best bet is to use the default resolution with max x and 
>>> max y.
>>
>> Exactly. A resolution of 1 is too small. This works fine for me:
>>
>> scanimage --batch=preview.jpg --batch-count=1 --format=jpeg -d test:1
>> --resolution=50 --test-picture=Grid -x 200 -y 200
>>
>> Regards
>>
>> Jeff
>>
>>
>> --
>> 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] ask for adding support of Canon's i-SENSYS MF620 series

2018-01-04 Thread Rolf Bensch
Hi Markus,

I just changed the doc files
(http://www.sane-project.org/lists/sane-backends-cvs.html#S-PIXMA).

Many thanks for your help.

Cheers,
Rolf


Am 04.01.2018 um 14:03 schrieb Markus Heiser:
> Hi Rolf,
> 
>> Am 03.01.2018 um 20:09 schrieb Rolf Bensch :
>>
>> Hi Markus,
>>
>> I just added your scanner to SANE sources.
> 
> great :) .. thanks a lot!
> 
> What I have tested while connected via USB:
> 
>   $ sudo sane-find-scanner 
>   ...
>   found USB scanner (vendor=0x0bda [Generic], product=0x0129 [USB2.0-CRW]) at 
> libusb:003:002
>   found USB scanner (vendor=0x04a9 [Canon,Inc.], product=0x27b4 [MF620C 
> Series]) at libusb:003:003  ...
>   ...
>   $ sudo scanimage -vL
>   device `pixma:04A927B4_f48139e3ba8e' is a CANON Canon i-SENSYS MF620 Series 
> multi-function peripheral
> 
>> I set max. page width to 216mm.
>>
>> Please check scans with max. page width and the document feeder.
> 
> $ sudo scanimage -l 216 --source "Automatic Document Feeder" > test.pnm
> scanimage: rounded value of tl-x from 216 to 215.731
> 
> .. is this what you asking for?
> 
> From my POV: scan works like a charm / Thanks again.
> 
> -- Markus --
> 
> 

-- 
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 preview scan?

2018-01-04 Thread Jeff Sadowski
Because I will use the default resolution I will leave out that
argument and I though about if the default scan area for -l and -t
might not always be 0 so maybe I should do this

scanimage --batch=preview.jpg --batch-count=1 --format=jpeg -d  --test-picture=Grid -x  -y  -l 0 -t 0

On Thu, Jan 4, 2018 at 11:36 AM, Jeff  wrote:
> On 04/01/18 19:14, Jeff Sadowski wrote:
>> I'm thinking my best bet is to use the default resolution with max x and max 
>> y.
>
> Exactly. A resolution of 1 is too small. This works fine for me:
>
> scanimage --batch=preview.jpg --batch-count=1 --format=jpeg -d test:1
> --resolution=50 --test-picture=Grid -x 200 -y 200
>
> Regards
>
> Jeff
>
>
> --
> 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] xsane preview scan?

2018-01-04 Thread Jeff
On 04/01/18 19:14, Jeff Sadowski wrote:
> I'm thinking my best bet is to use the default resolution with max x and max 
> y.

Exactly. A resolution of 1 is too small. This works fine for me:

scanimage --batch=preview.jpg --batch-count=1 --format=jpeg -d test:1
--resolution=50 --test-picture=Grid -x 200 -y 200

Regards

Jeff



signature.asc
Description: OpenPGP digital signature
-- 
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 preview scan?

2018-01-04 Thread Jeff Sadowski
I'm thinking my best bet is to use the default resolution with max x and max y.


On Thu, Jan 4, 2018 at 10:51 AM, Jeff Sadowski  wrote:
> I have been working on a php implementation of a scanner interface.
>
> I am making some progress. I have my code at
> https://bitbucket.org/jeffsadowski/phpsaneng
>
> (Not anywhere ready for mainstream as for now it just lists the
> options selected when I hit scan.)
>
> I'm at the point where I want to start a preview and I need to make a
> decision of how to get a preview.
>
> I don't see a preview option to scanimage and am curious how xsane
> gets it's preview.
>
> When I try a preview with xsane with test:1 scanner I get a perfect
> grid. (I had set the "Select the test picture" to Grid)
>
> using scanimage '-h' '-d' 'test:1'
>
> I saw the options for test:1
>
> So I tried
>
> scanimage  '--batch=preview.jpg' '--format' 'jpeg' '--batch-count' '1'
> '-d' 'test:1' '--test-picture' 'Grid'
>
> which did not come up with the same grid I get in the preview that xsane 
> shows.
>
> I thought well maybe it is getting the max x and y so I tried
>
> scanimage  '--batch=preview.jpg' '--format' 'jpeg' '--batch-count' '1'
> '-d' 'test:1' '--test-picture' 'Grid' '-x' '200' '-y' '200'
>
> that wasn't it either.
>
> Then I noticed xsane can only set x and y up to 20 which is weird.
> even the defaults are 80 for x and 100 for y
>
> I tried 20x20 and 80x100
> but those didn't result in an image that xsane did either.
> I also tried lowest resolutions that isn't it either. So I am curious
> how xsane acquires a preview?
> Or better yet what is the best way to acquire a preview with scanimage?
>
> I think I would want to have the scanner scan as fast as possible so I
> thought lowest resolution.
> I also think I want my preview of the full bed so max x and max y
> the image I get when I try
>
> scanimage '--batch=preview.jpg' '--format' 'jpeg' '--batch-count' '1'
> '-d' 'test:1' '--resolution' '1' '--test-picture' 'Grid' '-x' '200'
> '-y' '200'
>
> doesn't even look like a grid at all.
>
> So I thought I'd ask this list for some help.

-- 
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] xsane preview scan?

2018-01-04 Thread Jeff Sadowski
I have been working on a php implementation of a scanner interface.

I am making some progress. I have my code at
https://bitbucket.org/jeffsadowski/phpsaneng

(Not anywhere ready for mainstream as for now it just lists the
options selected when I hit scan.)

I'm at the point where I want to start a preview and I need to make a
decision of how to get a preview.

I don't see a preview option to scanimage and am curious how xsane
gets it's preview.

When I try a preview with xsane with test:1 scanner I get a perfect
grid. (I had set the "Select the test picture" to Grid)

using scanimage '-h' '-d' 'test:1'

I saw the options for test:1

So I tried

scanimage  '--batch=preview.jpg' '--format' 'jpeg' '--batch-count' '1'
'-d' 'test:1' '--test-picture' 'Grid'

which did not come up with the same grid I get in the preview that xsane shows.

I thought well maybe it is getting the max x and y so I tried

scanimage  '--batch=preview.jpg' '--format' 'jpeg' '--batch-count' '1'
'-d' 'test:1' '--test-picture' 'Grid' '-x' '200' '-y' '200'

that wasn't it either.

Then I noticed xsane can only set x and y up to 20 which is weird.
even the defaults are 80 for x and 100 for y

I tried 20x20 and 80x100
but those didn't result in an image that xsane did either.
I also tried lowest resolutions that isn't it either. So I am curious
how xsane acquires a preview?
Or better yet what is the best way to acquire a preview with scanimage?

I think I would want to have the scanner scan as fast as possible so I
thought lowest resolution.
I also think I want my preview of the full bed so max x and max y
the image I get when I try

scanimage '--batch=preview.jpg' '--format' 'jpeg' '--batch-count' '1'
'-d' 'test:1' '--resolution' '1' '--test-picture' 'Grid' '-x' '200'
'-y' '200'

doesn't even look like a grid at all.

So I thought I'd ask this list for some help.

-- 
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] scan from network: Canon's i-SENSYS MF620 series scan from network

2018-01-04 Thread Markus Heiser
Hi SANE developers,

I'am trying to scan from a Canon MF623Cn which is a AIO device
from Canon's i-SENSYS MF620 series.

I'am a bit confused by the naming 'i-SENSYS' and 'PIXMA' from
SANE's POV. What is the difference (or is there a difference)
between i-SENSYS and PIXMA? Especially, can we use the bjnp
protocol (bjnp://myscanner.my.domain:8612) for Canon's i-SENSYS
devices when connected via IP?

The device is connected via IP and I added device's URL
(bjnp://192.168.1.119) to 

 /usr/local/etc/sane.d/pixma.conf

But this results in:

 $ sudo scanimage -v -L
 [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.119:8612/timeout=1000

I am grateful for any help / Thanks

 -- Markus --
-- 
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] ask for adding support of Canon's i-SENSYS MF620 series

2018-01-04 Thread Markus Heiser
Hi Rolf,

> Am 03.01.2018 um 20:09 schrieb Rolf Bensch :
> 
> Hi Markus,
> 
> I just added your scanner to SANE sources.

great :) .. thanks a lot!

What I have tested while connected via USB:

  $ sudo sane-find-scanner 
  ...
  found USB scanner (vendor=0x0bda [Generic], product=0x0129 [USB2.0-CRW]) at 
libusb:003:002
  found USB scanner (vendor=0x04a9 [Canon,Inc.], product=0x27b4 [MF620C 
Series]) at libusb:003:003  ...
  ...
  $ sudo scanimage -vL
  device `pixma:04A927B4_f48139e3ba8e' is a CANON Canon i-SENSYS MF620 Series 
multi-function peripheral

> I set max. page width to 216mm.
> 
> Please check scans with max. page width and the document feeder.

$ sudo scanimage -l 216 --source "Automatic Document Feeder" > test.pnm
scanimage: rounded value of tl-x from 216 to 215.731

.. is this what you asking for?

>From my POV: scan works like a charm / Thanks again.

-- Markus --


-- 
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