Open driver needs 5 seconds to close

Deploying to Mac OS? Ask Mac OS specific questions here.

Moderators: Klaus, FourthWorld, heatherlaine, kevinmiller, robinmiller

Post Reply
itzalak2
Posts: 8
Joined: Tue Feb 21, 2012 5:06 pm

Open driver needs 5 seconds to close

Post by itzalak2 » Tue Feb 21, 2012 7:56 pm

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.

itzalak2
Posts: 8
Joined: Tue Feb 21, 2012 5:06 pm

Re: Open driver needs 5 seconds to close

Post by itzalak2 » Tue Feb 21, 2012 8:04 pm

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.

Klaus
Posts: 11576
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Open driver needs 5 seconds to close

Post by Klaus » Wed Feb 22, 2012 12:53 pm

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

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 4146
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Open driver needs 5 seconds to close

Post by richmond62 » Wed Mar 18, 2015 8:18 pm

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?

Post Reply

Return to “Mac OS”