Serial comm differences between PC & Mac?

runrev at jkvaldez.com runrev at jkvaldez.com
Thu Dec 2 10:07:38 EST 2004


First, as always, thanks for the tremendous participation on this list!
Your efforts are very appreciated.

Short version
I'm connected via a serial cable to a device on OSX & all's well. I read
"1 int1" of data & receive data including control characters like 4, 7, 6.
Unplug serial cable & plug into PC. Now the control characters are unusual
values like -84 & other unexpected values occur along with the expected
values. Any idea why the data is different from OSX to PC?

Long version

I am connected via a serial cable (on OSX with a Keyspan serial adapter)
to our phone system to capture our call data. Thanks to Sarah's serial
stack (THANKS, SARAH!), I got up & running quickly & everything works
great. But when I unplug from my mac & plug into com1 on the PC & use my
program, I'm getting different results.

I'm filtering out control characters sent by our phone system & using only
the alphanumeric values. On OSX I may read 4, 7, 6, 67, 65, etc. I drop
the control characters (4, 7, 6) & convert the others to characters
(numToChar(67)=C, numToChar(65)=A). On the PC, however, the control
characters are very different, but the alphanumeric characters are fine.
On the PC I may read -84, 36 (which is a numToChar(36)=$, but a $ should
never appear from the phone system). But the actual call data is fine.

So my question is, why would the same program using the same cable yield
different results? Is there a difference in the values read by "read from
driver" verses "read from file"? Any ideas? TIA!!!


More information about the use-livecode mailing list