[sane-devel] Doubt about sane_get_devices
m. allan noah
kitno455 at gmail.com
Fri Apr 25 02:58:58 UTC 2008
ahh, but you dont just query the list again, you call sane_exit and
sane_init first. just call sane_get_devices, and see if that helps.
allan
On 4/24/08, tobias alarcon <extobias at gmail.com> wrote:
> Nop, doesnt work. Maybe im doing something wrong.
> I got this logs.
>
> Log 1
>
> ##Start the program with scanner disconnected
> [sanei_debug] Setting debug level of fujitsu to 30.
> [fujitsu] sane_init: start
> [fujitsu] sane_init: fujitsu backend 1.1.59, from sane-backends 1.1.0-cvs
> [fujitsu] sane_init: finish
> [fujitsu] sane_get_devices: start
> [fujitsu] find_scanners: start
> [fujitsu] find_scanners: reading config file fujitsu.conf
> [fujitsu] find_scanners: setting "buffer-size" to 65536
> [fujitsu] find_scanners: looking for 'scsi FUJITSU'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1041'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1042'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1095'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1096'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1097'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10ad'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10ae'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10af'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e0'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e1'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e2'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e7'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10f2'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10fe'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1135'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x114d'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1155'
> [fujitsu] find_scanners: found 0 scanner(s)
> [fujitsu] find_scanners: finish
> [fujitsu] sane_get_devices: finish
> ##Connect scanner and wait a seconds, query list
> [fujitsu] sane_exit: start
> [fujitsu] sane_exit: finish
> [sanei_debug] Setting debug level of fujitsu to 30.
> [fujitsu] sane_init: start
> [fujitsu] sane_init: fujitsu backend 1.1.59, from sane-backends 1.1.0-cvs
> [fujitsu] sane_init: finish
> [fujitsu] sane_get_devices: start
> [fujitsu] find_scanners: start
> [fujitsu] find_scanners: reading config file fujitsu.conf
> [fujitsu] find_scanners: setting "buffer-size" to 65536
> [fujitsu] find_scanners: looking for 'scsi FUJITSU'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1041'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1042'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1095'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1096'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1097'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10ad'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10ae'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10af'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e0'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e1'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e2'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e7'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10f2'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10fe'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1135'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x114d'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1155'
> [fujitsu] find_scanners: found 0 scanner(s)
> [fujitsu] find_scanners: finish
> [fujitsu] sane_get_devices: finish
> [fujitsu] sane_exit: start
> [fujitsu] sane_exit: finish
>
> Log 2
>
> [doors at localhost ~]$ export SANE_DEBUG_FUJITSU=30
> [doors at localhost ~]$ doors
> [sanei_debug] Setting debug level of fujitsu to 30.
> [fujitsu] sane_init: start
> [fujitsu] sane_init: fujitsu backend 1.1.59, from sane-backends 1.1.0-cvs
> [fujitsu] sane_init: finish
> [fujitsu] sane_get_devices: start
> [fujitsu] find_scanners: start
> [fujitsu] find_scanners: reading config file fujitsu.conf
> [fujitsu] find_scanners: setting "buffer-size" to 65536
> [fujitsu] find_scanners: looking for 'scsi FUJITSU'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1041'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1042'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1095'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1096'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1097'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10ad'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10ae'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10af'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e0'
> [fujitsu] attach_one: start
> [fujitsu] attach_one: looking for 'libusb:003:003'
> [fujitsu] connect_fd: start
> [fujitsu] connect_fd: opening USB device
> [fujitsu] wait_scanner: start
> [fujitsu] do_usb_cmd: start
> [fujitsu] cmd: writing 31 bytes, timeout 500
> [fujitsu] cmd: >>
> [fujitsu] 000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] cmd: wrote 31 bytes, retVal 0
> [fujitsu] stat: reading 13 bytes, timeout 500
> [fujitsu] stat: <<
> [fujitsu] 000: 53 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] stat: read 13 bytes, retVal 0
> [fujitsu] do_usb_cmd: finish
> [fujitsu] wait_scanner: finish
> [fujitsu] connect_fd: finish
> [fujitsu] init_inquire: start
> [fujitsu] do_usb_cmd: start
> [fujitsu] cmd: writing 31 bytes, timeout 10000
> [fujitsu] cmd: >>
> [fujitsu] 000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 010: 00 00 00 12 00 00 00 60 00 00 00 00 00 00 00
> [fujitsu] cmd: wrote 31 bytes, retVal 0
> [fujitsu] in: reading 96 bytes, timeout 10000
> [fujitsu] in: retVal 0
> [fujitsu] in: read 96 bytes
> [fujitsu] in: <<
> [fujitsu] 000: 06 00 02 02 5b 00 00 10 46 55 4a 49 54 53 55 20
> [fujitsu] 010: 66 69 2d 35 31 32 30 43 64 6a 20 20 20 20 20 20
> [fujitsu] 020: 30 45 30 30 00 00 00 00 00 00 00 00 03 0c 00 00
> [fujitsu] 030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] stat: reading 13 bytes, timeout 10000
> [fujitsu] stat: <<
> [fujitsu] 000: 53 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] stat: read 13 bytes, retVal 0
> [fujitsu] do_usb_cmd: finish
> [fujitsu] init_inquire: Found FUJITSU scanner fi-5120Cdj version 0E00
> at libusb:003:003
> [fujitsu] inquiry options
> [fujitsu] color offset: 0 lines
> [fujitsu] long color scan: 1
> [fujitsu] long gray scan: 1
> [fujitsu] 3091 duplex: 0
> [fujitsu] background front: 1
> [fujitsu] background back: 1
> [fujitsu] emulation mode: 0
> [fujitsu] duplex offset: 0 lines
> [fujitsu] init_inquire: finish
> [fujitsu] init_vpd: start
> [fujitsu] do_usb_cmd: start
> [fujitsu] cmd: writing 31 bytes, timeout 10000
> [fujitsu] cmd: >>
> [fujitsu] 000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 010: 00 00 00 12 01 f0 00 68 00 00 00 00 00 00 00
> [fujitsu] cmd: wrote 31 bytes, retVal 0
> [fujitsu] in: reading 104 bytes, timeout 10000
> [fujitsu] in: retVal 0
> [fujitsu] in: read 104 bytes
> [fujitsu] in: <<
> [fujitsu] 000: 06 f0 02 00 6b 02 58 02 58 11 02 58 02 58 00 32
> [fujitsu] 010: 00 32 ff fc 00 00 14 c0 00 00 4f b0 8f 00 00 00
> [fujitsu] 020: 92 0a 01 00 00 00 00 00 ef bf 00 04 00 00 00 00
> [fujitsu] 030: 00 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] 050: 00 00 00 ff 00 00 41 01 a8 40 08 00 00 00 00 00
> [fujitsu] 060: 00 00 02 00 01 78 01 78
> [fujitsu] stat: reading 13 bytes, timeout 10000
> [fujitsu] stat: <<
> [fujitsu] 000: 53 00 00 00 00 00 00 00 00 00 00 00 00
> [fujitsu] stat: read 13 bytes, retVal 0
> [fujitsu] do_usb_cmd: finish
> [fujitsu] init_vpd: length=6b
> [fujitsu] standard options
> ....
> [fujitsu] init_vpd: finish
> [fujitsu] init_ms: start
> [fujitsu] prepick: 1
> [fujitsu] sleep: 1
> [fujitsu] duplex: 0
> [fujitsu] rand: 0
> [fujitsu] bg: 1
> [fujitsu] df: 1
> [fujitsu] dropout: 1
> [fujitsu] buff: 0
> [fujitsu] auto: 1
> [fujitsu] lamp: 0
> [fujitsu] jobsep: 0
> [fujitsu] init_ms: finish
> [fujitsu] init_model: start
> [fujitsu] init_model: finish
> [fujitsu] init_user: start
> [fujitsu] init_user: finish
> [fujitsu] init_options: start
> [fujitsu] init_options: finish
> [fujitsu] disconnect_fd: start
> [fujitsu] disconnecting usb device
> [fujitsu] disconnect_fd: finish
> [fujitsu] attach_one: finish
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e1'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e2'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e7'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10f2'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10fe'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1135'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x114d'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1155'
> [fujitsu] find_scanners: found scanner libusb:003:003
> [fujitsu] find_scanners: found 1 scanner(s)
> [fujitsu] find_scanners: finish
> [fujitsu] sane_get_devices: finish
> Name: fujitsu:libusb:003:003
> ##disconnect scanner, wait a seconds. Connect and wait a seconds again
> [fujitsu] sane_exit: start
> [fujitsu] disconnect_fd: start
> [fujitsu] disconnect_fd: finish
> [fujitsu] sane_exit: finish
> [sanei_debug] Setting debug level of fujitsu to 30.
> [fujitsu] sane_init: start
> [fujitsu] sane_init: fujitsu backend 1.1.59, from sane-backends 1.1.0-cvs
> [fujitsu] sane_init: finish
> [fujitsu] sane_get_devices: start
> [fujitsu] find_scanners: start
> [fujitsu] find_scanners: reading config file fujitsu.conf
> [fujitsu] find_scanners: setting "buffer-size" to 65536
> [fujitsu] find_scanners: looking for 'scsi FUJITSU'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1041'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1042'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1095'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1096'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1097'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10ad'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10ae'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10af'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e0'
> [fujitsu] attach_one: start
> [fujitsu] attach_one: looking for 'libusb:003:003'
> [fujitsu] connect_fd: start
> [fujitsu] connect_fd: opening USB device
> [fujitsu] connect_fd: could not open device: 4
> [fujitsu] connect_fd: finish
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e1'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e2'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10e7'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10f2'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x10fe'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1135'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x114d'
> [fujitsu] find_scanners: looking for 'usb 0x04c5 0x1155'
> [fujitsu] find_scanners: found 0 scanner(s)
> [fujitsu] find_scanners: finish
> [fujitsu] sane_get_devices: finish
>
> From this line [fujitsu] attach_one: looking for 'libusb:003:003' , i
> thing there is some value that is never cleaned. if this is a bug,
> there something i can do? i REALLY need this work.
> Well thanks like always
>
> Tobias
>
>
> On Thu, Apr 24, 2008 at 6:21 PM, m. allan noah <kitno455 at gmail.com> wrote:
> > it should, but i take it from your question that it does not? :)
> >
> >
> > allan
> >
> > On 4/24/08, tobias alarcon <extobias at gmail.com> wrote:
> > > So in the fujitsu backend should work?
> > >
> > > On Thu, Apr 24, 2008 at 3:43 PM, m. allan noah <kitno455 at gmail.com> wrote:
> > >
> > > > this depends entirely on the backend. i have tried to make sure that
> > > > the backends i maintain will re-find scanners at every call, but other
> > > > backends may not.
> > > >
> > > > allan
> > > >
> > > >
> > > >
> > > > On 4/24/08, tobias alarcon <extobias at gmail.com> wrote:
> > > > > Hi all
> > > > >
> > > > > Im just wanna know if this function retrives the list of devices at
> > > > > every moment.
> > > > > Let me explain, i launch my program with the scanner disconected, then
> > > > > i conect it and
> > > > > call this function. Doc say "This function can be called repeatedly to
> > > > > detect when
> > > > > new devices become available" but this is not my case, i get a null pointer.
> > > > >
> > > > > thanks in advance
> > > > > Tobias.
> > > > >
> > > > >
> > > > > --
> > > > > sane-devel mailing list: sane-devel at lists.alioth.debian.org
> > > > > http://lists.alioth.debian.org/mailman/listinfo/sane-devel
> > > > > Unsubscribe: Send mail with subject "unsubscribe your_password"
> > > > > to sane-devel-request at lists.alioth.debian.org
> > > > >
> > > >
> > > >
> > > > --
> > > > "The truth is an offense, but not a sin"
> > > >
> > >
> >
> >
> > --
> >
> >
> > "The truth is an offense, but not a sin"
> >
>
--
"The truth is an offense, but not a sin"
More information about the sane-devel
mailing list