Date: Wed, 25 Jun 2003 14:37:38 +0200 From: Bernd Walter <ticso@cicely12.cicely.de> To: Danny Braniss <danny@cs.huji.ac.il> Cc: ticso@cicely.de Subject: Re: USB, select/poll for ucom Message-ID: <20030625123737.GE52854@cicely12.cicely.de> In-Reply-To: <E19V9N4-000CpW-00@cs.huji.ac.il> References: <20030625120837.GC52854@cicely12.cicely.de> <E19V9N4-000CpW-00@cs.huji.ac.il>
next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 25, 2003 at 03:27:30PM +0300, Danny Braniss wrote: > > On Wed, Jun 25, 2003 at 01:13:56PM +0300, Danny Braniss wrote: > > > hi, > > > while trying to port an application that works with tty to uplcom/ucom, > > > (and it doesn't work :-), and looking at the kernel sources and > > > trying to figure out USB, i think that select(2)/poll(2) will not work, > > > correct? > > > > I've seen Problemes with non 8n1 communications and I've also seen > > problems because most USB adapters only deliver 5.5V to the lines. > > I never noticed any select/poll problems and I don't think we have any > > because this is handled in common code at tty level. > > > > If you have any condition that shows something different please let > > us know. > > > > 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. -- B.Walter BWCT http://www.bwct.de ticso@bwct.de info@bwct.de
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030625123737.GE52854>