Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jun 2003 16:09:49 +0300
From:      Danny Braniss <danny@cs.huji.ac.il>
To:        ticso@cicely.de
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: USB, select/poll for ucom 
Message-ID:  <E19VA21-000FQ4-00@cs.huji.ac.il>
In-Reply-To: Your message of Wed, 25 Jun 2003 14:37:38 %2B0200 .

next in thread | raw e-mail | index | archive | help
[...]
> > i turned debug on and i could not see any calls to ucomread,
> > the program calls select(...) - but select does not initiate anything,
> > it justs waits to be woken when something is received (in the case of reading),
> > now, unless im wrong - which well could be :-), the read in this case must be
> > started - usb is a master/slave protocol, and this is not happening.
> 
> Because you don't talk to ucom directly - you talk to tty layer.
> See src/sys/kern/tty*
> 
> > 	if(select(fdset,...)) {
> > 		if(FD_ISSET(ifd, fdset))
> > 			read(ifd, ...
> > 		...
> > 	}
> > danny
> > PS: im using 5.1-current, and im trying to get a Towitoko smartcard reader to
> >     work.
> 
> Forget it - if I'm not wrong Towitoko readers use 7 bit transfers and
> that's your problem.
> It's doesn't with at least uplcom and uftdi - Towitoko is using PL2303
> chips in their own USB product.
> The only thing you can do to get this working is by fixing 7 bit
> transfers.

You are correct, the Towitoko/USB is using PL2303:

ucom0: Prolific Technology PL2303 Serial adapter (ATEN/IOGEAR UC232A), rev 
1.10/2.02, addr 2

debugging the RS232, i see that it starts at 1200bps/7bits but switches to
9600 bps/ 8 bits very early on, i'll have to check the Towitoko driver to see 
if it
can do without the initial 1200/7bits.

danny




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E19VA21-000FQ4-00>