[sane-devel] MacOSX 10.3.2 and Fujitsu fi-4120C

m. allan noah anoah at pfeiffer.edu
Wed Dec 24 17:25:18 GMT 2003


yeap, henning is right. all the commands that you sent to the scanner 
(before the first error) appear to be commands sent by the original parent 
process. the first command that fails is scsi opcode 0x28 (read). which if 
memory serves, is a command only sent by the reader child process. we do 
use fork() to get this child, and apparently osX does not pass open 
usb device handles between processes.

giovanni- do you have the ability to do compilations on your box? are you 
able to work with me to convert the fujitsu backend to work with 
threading?

anyone else got any pointers on how to do this?

allan 

On Wed, 24 Dec 2003, Henning Meier-Geinitz wrote:

> Hi,
> 
> On Wed, Dec 24, 2003 at 02:52:10PM +0100, avv. Giovanni Rocchi wrote:
> > after posted here my problem this morning I set SANE_DEBUG_SANEI_USB to 
> > 255.
> > 
> > Running scanimage -L I have this:
> 
> [works only with debugging enabled]
> 
> That's the known problem with libusb (or the MacOS X USB system?).
> 
> > >PB17:/usr/local/bin grocchi$ ./scanimage > ~grocchi/test.pnm
> [...]
> 
> > >[sanei_debug] Setting debug level of fujitsu to 0.
> 
> Can you enable debugging for fujitsu also? It's easier to understand
> if the fujitsu messages are also enabled.
> 
> > >[sanei_usb] sanei_usb_read_bulk: trying to read 13 bytes
> > >usb_bulk_read: ep addr = 0x81
> > >Converting ep address to pipeRef.
> > >ep_to_pipeRef: Pipe 1: DIR: 1 number: 1
> > >ep_to_pipeRef: pipeRef for ep address 0x81 found: 0x01
> > >usb_bulk_read: endpoint=0x81 size=13 timeout=30.000000sec
> > >[sanei_usb] 0000: 53 00 00 00 00 00 00 00 00 00 00 00 00          
> > >S...............
> > >[sanei_usb] sanei_usb_read_bulk: wanted 13 bytes, got 13 bytes
> > >[sanei_usb] sanei_usb_write_bulk: trying to write 31 bytes
> > >[sanei_usb] 0000: 43 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 
> > >C...............
> > >[sanei_usb] 0010: 00 00 00 28 00 00 00 00 00 00 77 04 00 00 00    
> > >...(......w.....
> > >Converting ep address to pipeRef.
> > >ep_to_pipeRef: an error occurred getting pipe information on pipe 1
> > >ep_to_pipeRef: No connection to IOService
> 
> This seems to be the first error.
> 
> My guess is: the fujitsu backend uses fork () and this doesn't work
> correctly on MacOS X. So if you want support for your scanner, the
> fujitsu backend must be converted to use the sanei_thread API instead
> of fork().
> 
> Have a look at the archive of sane-devel for a discussion about the
> fork problems.
> 
> Bye,
>   Henning
> 
> 

-- 
"so don't tell us it can't be done, putting down what you don't know.
money isn't our god, integrity will free our souls" - Max Cavalera






More information about the sane-devel mailing list