[sane-devel] Fwd: book scanner recognized as v4l device - Invalid argument VIDIOCSPICT

netukar201409+sane at mailbox.org netukar201409+sane at mailbox.org
Fri Oct 2 08:55:57 BST 2020


Hi,

thank you for the hint with the colon. Now the scanimage command gives 
the following output:


SANE_DEBUG_V4L=128 scanimage -v -d v4l:/dev/video2

Output format is not set, using pnm as a default.
[08:32:10.656977] [sanei_debug] Setting debug level of v4l to 128.
[08:32:10.657002] [v4l] SANE v4l backend version 1.0 build 5 from 
sane-backends 1.0.30-970-gd00af49e3
[08:32:10.657090] [v4l] attach: trying to open /dev/bttv0
[08:32:10.657114] [v4l] attach: failed to open device `/dev/bttv0': No 
such file or directory
[08:32:10.657122] [v4l] attach: trying to open /dev/video0
[08:32:10.671591] [v4l] attach: found videodev `USB2.0 HD UVC WebCam: 
USB2.0 HD' on `/dev/video0'
[08:32:10.671713] [v4l] attach: trying to open /dev/video1
[08:32:10.671913] [v4l] attach: failed to open device `/dev/video1': 
Invalid argument
[08:32:10.671930] [v4l] attach: trying to open /dev/video2

[08:32:10.675048] [v4l] attach: found videodev `JY-VP216: JY-VP216' on 
`/dev/video2'

[08:32:10.675089] [v4l] attach: trying to open /dev/video3
[08:32:10.675110] [v4l] attach: failed to open device `/dev/video3': No 
such file or directory

[08:32:10.675130] [v4l] sane_open: device /dev/video2 found in devlist
[08:32:10.678262] [v4l] sane_open: 1 channels, 0 audio devices
[08:32:10.678296] [v4l] sane_open: minwidth=1280, minheight=720, 
maxwidth=4896, maxheight=3672
[08:32:10.678308] [v4l] sane_open: V4L device can capture to memory
[08:32:10.678333] [v4l] sane_open: channel 0 (Camera 1), tuners=0, 
flags=0x0, type=2, norm=0
[08:32:10.678362] [v4l] sane_open: input is camera input
[08:32:10.679064] [v4l] sane_open: brightness=26214, hue=0, 
colour=30583, contrast=34952
[08:32:10.679076] [v4l] sane_open: whiteness=0, depth=24, palette=4
[08:32:10.679525] [v4l] sane_open: ioctl VIDIOCSPICT failed (Invalid 
argument)

[08:32:10.679536] [v4l] sane_open: x=0, y=0, width=2048, height=1536
[08:32:10.679548] [v4l] sane_get_option_descriptor: option 0 (Number of 
options)
[08:32:10.679557] [v4l] sane_control_option: get option 0 (Number of 
options)
[08:32:10.679588] [v4l] sane_get_option_descriptor: option 0 (Number of 
options)
[08:32:10.679597] [v4l] sane_control_option: get option 0 (Number of 
options)
[08:32:10.679606] [v4l] sane_get_option_descriptor: option 1 (Scan Mode)
[08:32:10.679615] [v4l] sane_get_option_descriptor: option 2 (mode)
[08:32:10.679625] [v4l] sane_get_option_descriptor: option 3 (channel)
[08:32:10.679635] [v4l] sane_get_option_descriptor: option 4 (Geometry)
[08:32:10.679645] [v4l] sane_get_option_descriptor: option 5 (tl-x)
[08:32:10.679656] [v4l] sane_get_option_descriptor: option 6 (tl-y)
[08:32:10.679665] [v4l] sane_get_option_descriptor: option 7 (br-x)
[08:32:10.679675] [v4l] sane_get_option_descriptor: option 8 (br-y)
[08:32:10.679685] [v4l] sane_get_option_descriptor: option 9 (Enhancement)
[08:32:10.679697] [v4l] sane_get_option_descriptor: option 10 (brightness)
[08:32:10.679706] [v4l] sane_get_option_descriptor: option 11 (hue)
[08:32:10.679716] [v4l] sane_get_option_descriptor: option 12 (color)
[08:32:10.679726] [v4l] sane_get_option_descriptor: option 13 (contrast)
[08:32:10.679736] [v4l] sane_get_option_descriptor: option 14 (white-level)
[08:32:10.679746] [v4l] sane_control_option: get option 7 (br-x)
[08:32:10.679756] [v4l] sane_control option: option is inactive
[08:32:10.679766] [v4l] sane_control_option: get option 5 (tl-x)
[08:32:10.679776] [v4l] sane_control option: option is inactive
[08:32:10.679785] [v4l] sane_control_option: get option 8 (br-y)
[08:32:10.679796] [v4l] sane_control option: option is inactive
[08:32:10.679805] [v4l] sane_control_option: get option 6 (tl-y)
[08:32:10.679815] [v4l] sane_control option: option is inactive
[08:32:10.679827] [v4l] sane_control_option: get option 5 (tl-x)
[08:32:10.679837] [v4l] sane_control option: option is inactive
[08:32:10.679847] [v4l] sane_get_option_descriptor: option 7 (br-x)
scanimage: ignored request to set inactive option br-x

[08:32:10.679860] [v4l] sane_control_option: get option 6 (tl-y)
[08:32:10.679870] [v4l] sane_control option: option is inactive
[08:32:10.679880] [v4l] sane_get_option_descriptor: option 8 (br-y)
scanimage: ignored request to set inactive option br-y

scanimage: output is not a file, exiting
[08:32:10.679903] [v4l] sane_close: trying to close handle 0x55fd2b1e8220
[08:32:10.679922] [v4l] sane_exit: all devices freed


Regards,

---

Michael Dittmer

FSFE fellower

Am 2020-09-27 um 10:47 schrieb Olaf Meeuwissen:
> Hi,
>
> netukar201409+sane at mailbox.org  writes:
>
>> Hi,
>>
>> thank you for your hints. I reconnected the book scanner and was now
>> recognized as video2.
> The number is likely to change between power-cycling of the device.
>
>> scanimage --list-devices
>> device `v4l:/dev/video2' is a Noname JY-VP216: JY-VP216 virtual device
>> device `v4l:/dev/video0' is a Noname USB2.0 HD UVC WebCam: USB2.0 HD
>> virtual device
>>
>> Then I tried
>>
>> scanimage -d v4l:/dev/video2 --help --all-options
>>
>> with result
>>
>> Usage: scanimage [OPTION]...
>> Start image acquisition on a scanner device and write image data to
>> standard output.
>> [...]
>> Options specific to device `v4l:/dev/video2':
>> Scan Mode:
>> --mode Gray|Color [Gray]
>> Selects the scan mode (e.g., lineart, monochrome, or color).
>> --channel Camera 1 [inactive]
>> Selects the channel of the v4l device (e.g. television or video-in.
>> Geometry:
>> -l 0..-513pel (in steps of 1) [inactive]
>> Top-left x position of scan area.
>> -t 0..-209pel (in steps of 1) [inactive]
>> Top-left y position of scan area.
>> -x 1280..767pel (in steps of 1) [inactive]
>> Width of scan-area.
>> -y 720..511pel (in steps of 1) [inactive]
>> Height of scan-area.
>> Enhancement:
>> --brightness 0..255 [102]
>> Controls the brightness of the acquired image.
>> --hue 0..255 [0]
>> Controls the "hue" (blue-level) of the acquired image.
>> --color 0..255 [119]
>> Sets the picture's color.
>> --contrast 0..255 [136]
>> Controls the contrast of the acquired image.
>> --white-level 0..255 [0]
>> Selects what radiance level should be considered "white".
>>
>> All options specific to device `v4l:/dev/video2':
>> [same output ...]
>>
>> Geometry settings seem not to be supported by V4L module.
>>
>> I also tried successlessly
>>
>> SANE_DEBUG_V4L=128 scanimage -v -d v4l*/dev/video2
>> Output format is not set, using pnm as a default.
>> scanimage: open of device v4l*/dev/video2 failed: Invalid argument
> Is that asterisk a typo in your command?  It should be a colon.
>
> Whoops, I now see that typo was in my suggestion.  Sorry.
> # That's what I get for mixing Japanese and US ASCII keyboards.
>
>> Regards,
>>
>> ---
>>
>> Michael Dittmer
>>
>> FSFE fellower
>>
>> Am 2020-09-06 um 08:18 schrieb Olaf Meeuwissen:
>>> Hi,
>>>
>>> Suggestions inlined below.
>>>
>>> netukar201409+sane at mailbox.org   writes:
>>>
>>>> ---------- Ursprüngliche Nachricht ----------
>>>> Von: Michael Dittmer
>>>> An:"sane-devel at alioth-lists.debian.net"
>>>> <sane-devel at alioth-lists.debian.net>
>>>> Datum: 23.08.2020 12:00
>>>> Betreff: book scanner recognized as v4l device
>>>>
>>>> I bought a book scanner
>>>>
>>>> JOURIST BT16
>>>>
>>>> from a german dealer
>>>>
>>>> looks like:
>>>> http://www.scanner.expert/de/images/products/buchscanner/description/5_JOURIST_Buchscanner_BS16_Standalone.jpg
>>>>
>>>>
>>>> It takes photos from the pages with a camera like a CZUR book
>>>> scanner. My bookscanner camera also can be opened by
>>>>
>>>> guvcview
>>>>
>>>> It has maximum resolution of
>>>>
>>>> 4608x3456
>>>>
>>>> pixels for A3 scan (resolution can be selected by gucview and is shown
>>>> later when starting xsane).
>>>>
>>>> When I plug it onto a usb port, several devices are recognized (dmesg
>>>> output)
>>>>
>>>> [...]
>>>>
>>>> All book scanner manufacturers seem to deliver only twain drivers. So
>>>> I tried to handle the scanner as an generic v4l device
>>>>
>>>> My linux mint 19.3 (based on Ubuntu 18.04) distribution has a sane
>>>> backend package (1.0.27) without compiled v4l backend.
>>>> After compiling current 1.0.30 sources with v4l-dev libraries I
>>>> obtained the v4l backend
>>>>
>>>> scanimage --list-devices
>>>> device `v4l:/dev/video3' is a Noname JY-VP216: JY-VP216 virtual device
>>>>
>>>> but xsane and scanimage are not able to perform scan ("illegal argument")
>>> Check the supported settings and allowed values with
>>>
>>>     scanimage -d v4l:/dev/video3 --help --all-options
>>>
>>>> SANE_DEBUG_SANEI_USB=4 scanimage -v -d v4l:/dev/video3 --format tiff > output.tif
>>>> scanimage: ignored request to set inactive option br-x
>>>> scanimage: ignored request to set inactive option br-y
>>>> scanimage: sane_start: Invalid argument
>>> Try
>>>
>>>     SANE_DEBUG_V4L=128 scanimage -v -d v4l*/dev/video3
>>>
>>> and see if that sheds any light upon your issue.
>>>
>>>> Another program
>>>>
>>>> simple scan
>>>>
>>>> from Ubuntu distribution is able to scan into pdf with 1600x1200 pixel
>>>> but not with maximum resolution.
>>>>
>>>> It seems for me that the v4l backend has to support higher
>>>> resolutions, like 4608x3456 e.g.
> Hope this helps,
> --
> Olaf Meeuwissen, LPIC-2            FSF 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 Foundationhttps://my.fsf.org/join



More information about the sane-devel mailing list