USB/Serial issue

Sarah Reichelt sarah.reichelt at gmail.com
Mon Nov 20 00:16:50 EST 2006


On 11/19/06, J. Landman Gay <jacque at hyperactivesw.com> wrote:
> 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.
>


I use the Rev serial commands with an FTDI EasySync adapter all the
time and it works very well. Do you have the latest drivers from FTDI?
(They now have universal binaries for Intel as well as PPC Macs).

What sort of device are you communicating with? Are the serial
parameters set up correctly for this device?

My uses don't echo back what is sent, but send a result in response to
a command, but I have never seen any problems sending without a
receive.

If you like to send me an example of your scripts off-list, I'd be
happy to have a look and see if I can work out what is going wrong.

Cheers,
Sarah



More information about the use-livecode mailing list