Page 1 of 1

Open driver needs 5 seconds to close

Posted: Tue Feb 21, 2012 7:56 pm
by itzalak2
I'm trying serial writing and reading from osx usb port. I can send and receive data but I discovered that when I change the open for writing to reading it needs 5 seconds to close the port.

sample:

open driver thePort for write --open driver thePort to send data
// send data to usb
close driver thePort --close the port

(needs about 5 seconds)

open driver thePort for read ---open driver thePort to receive data
// receive data
close driver thePort

Between closing the driver port and opening for receive data needs about 5 seconds.

Could somebody tell me if this delay is "normal"


Thanks to everybody.

Re: Open driver needs 5 seconds to close

Posted: Tue Feb 21, 2012 8:04 pm
by itzalak2
I just found the solution. Instead use of:

open driver thePort for write and

and:

open driver thePort for send

You can use:

open driver thePort for update

This let you to send and receive data without closing the driver.

Re: Open driver needs 5 seconds to close

Posted: Wed Feb 22, 2012 12:53 pm
by Klaus
Hi itzalak2,

welcome to the forum! :D

For your info: I just deleted the double posting.
Please only one posting for one question, thanks!


Best

Klaus

Re: Open driver needs 5 seconds to close

Posted: Wed Mar 18, 2015 8:18 pm
by richmond62
What does "thePort" refer to?

My computer has more than one USB port, so how do I know through which port to pump the data?