Serial communication

Sarah Reichelt sarahr at genesearch.com.au
Sun Dec 2 18:22:01 EST 2001


Hi Bill,

I have sucessfully sent & received through a serial port, only with Mac OS
9.1 but I don't see why it wouldn't work with OS X.

The Keyspan adapter allows it's port 1 to be referred to as "printer:" so
that should work without any problem.

You need to set the serialControlString to show the parameters for your
communications e.g. "BAUD=9600 PARITY=N" etc etc, rather than setting it to
the name of your port. Or don't set it at all to use the defaults, but
that's probably a bad idea.

I have a test communications stack that I can make available or send to
anyone that is interested.

Cheers,
Sarah


> 
> I want to receive information coming in via a serial connection and
> capture for processing in Rev. When I use a terminal application (ZTerm)
> the info comes across as plain text so it looks like it will be easy to
> capture. I'm using Mac OS X and a KeySpan USB to serial adapter. The
> Rev. docs say that Rev expect Mac serial ports to be "Printer:" or
> "Modem:" but the KeySpan driver doesn't allow renaming. ZTerm lists the
> port name as "KeyUSA28X91.1". I have created a stack in the IDE (Rev
> 1.1) with a field to display the data and have written the following
> card script which doesn't seem to do anything:
> 
> on openCard
> open file "KeyUSA28X91.1:"
> end openCard
> 
> on idle
> set the serialControlString to "KeyUSA28X91.1"
> read from file "KeyUSA28X91.1:" for 1 line
> put it after field "Incoming"
> end idle
> 
> When I run this it doesn't appear to do anything. I think I see the
> insertion point blinking but it may also be my imagination. Eventually I
> will want to send commands out the serial port to but I want to get this
> working first. The settings of the device match the defaults for Rev
> (i.e. baud rate, etc.)
> 
> Bill Vlahos
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution
> 




More information about the use-livecode mailing list