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.
Open driver needs 5 seconds to close
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Open driver needs 5 seconds to close
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.
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
Hi itzalak2,
welcome to the forum!
For your info: I just deleted the double posting.
Please only one posting for one question, thanks!
Best
Klaus
welcome to the forum!
For your info: I just deleted the double posting.
Please only one posting for one question, thanks!
Best
Klaus
-
- Livecode Opensource Backer
- Posts: 9388
- Joined: Fri Feb 19, 2010 10:17 am
- Location: Bulgaria
Re: Open driver needs 5 seconds to close
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?
My computer has more than one USB port, so how do I know through which port to pump the data?