USB/Serial issue

J. Landman Gay jacque at hyperactivesw.com
Sat Nov 18 21:15:49 EST 2006


Jean-Jacques Wagner can't seem to post to some of the lists he 
subscribes to, so has asked me to post this for him. He can read your 
answers, he just can't generate posts right now. I've told him Rev 
doesn't natively support USB access but it isn't clear to me what he is 
using as an interface, so maybe someone has comments about the post below.

====
Hi
I use to write/read string through the USB Port using a FTDI device. It 
seems to me that the serial port write/read commands does not work as it 
  should.

a) write to USB
open driver name for binary update
write var to driver  name
(read from driver name until empty)
close driver name

To trigger physically the write data, (so that the chars are 
electrically sent through the port) I have to follow the write command 
with a read statement, which is definitely a wrong praxis.
Why? Should the var end with a special char to trigger electrically the 
send command?

b) read from USB
open driver name for binary update
read from driver name until empty
close driver name

When the string sent to the USB device from the external device is less 
than 32 chars, then read is returning the whole string. If the string 
contents more than 32 chars, the first 32 chars are swallowed by 
revolution and does not appear on the read result. However in some 
obscure circumstances, which relates to the timing between the time the 
string is send from the external device and the time the request is send 
from revolution to read, the hole string is passed to the read result.

Does anyone have an idea about this strange but very annoying behavior. 
OSX ahall have a clean serial port management.

I use Mac OSX and 2.7.3.
Using a Mac with OS9, HC and the commconnect serial XCMD, the 
transmission of data to the usb device works perfectly.

Many thanks for help!

Jean-Jacques Wagner



-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com



More information about the use-livecode mailing list