[Rxtx] Virtual serial port (USB CDC ACM) timeout not working...cross posted
Kustaa Nyholm
Kustaa.Nyholm at planmeca.com
Mon Mar 15 03:36:22 MDT 2010
Hi,
cross posting this as I'm not sure where to turn to for the answer.
I've implemented a USB CDC ACM device which appears modem in Mac OS X
(and Linux and Windows, but so far I'm concentrating on Mac OS X),
in '/dev/tty.usbmodemxxx' .
I open the modem, enable the timeouts and with FTDI serial port dongle,
reads timeout if there is not (enough) data.
However with my own device (a PIC18F4550 with my own USB CDC ACM firmware)
reads block until the requested amount of bytes have been read.
So this is probably my firmware.
I guess this hangs (pun intended) around the fact that my firmware
does not setup data and turn the IN endpoint over to the
SIE unless the device has something to send. I'm not sure
if the SIE responds with ACK or NACK to the host in this situation,
and I'm not sure how this should be handled on the
device side to get the host driver to return a timeout
to the calling application.
So any thought are appreciated.
br Kusti
More information about the Rxtx
mailing list