Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!apple!goofy.apple.com!chesley From: chesley@goofy.apple.com (Harry Chesley) Newsgroups: comp.sys.mac.hypercard Subject: Re: Problems with Apple's Hypercard serial XCMDs Message-ID: <2417@internal.Apple.COM> Date: 20 Jun 89 00:04:55 GMT References: <2416@quanta.eng.ohio-state.edu> Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 65 I wrote the Serial Port Toolkit, but don't have current responsibility for maintaining it (I'm now in the Advanced Technology Group doing more researchy sorts of things). I'll try to answer some of the questions. For current plans/state/etc. you might try talking to Mike Holm, the Product Manager for HyperCard. Steve Maller was maintaining all of the Toolkits, but I'm not sure if that's still true now. In article <2416@quanta.eng.ohio-state.edu> czei@quanta.eng.ohio-state.edu (Michael S. Czeiszperger) writes: > First, the overall design of the kit is very good. Thanks. In article <2416@quanta.eng.ohio-state.edu> czei@quanta.eng.ohio-state.edu (Michael S. Czeiszperger) writes: > Xon/Xoff still does not work on input or output. It does not, and is not spec'd to work on incoming data (yes, it probably should), only on outgoing data. But it should definitely work on outgoing. I just tried it out and looked in the source code and you're absolutely right, it isn't working correctly. My apologies. I'm not sure how that sneaked out, since we definitely tested the flow control portion. What's actually happening is that when x-on/x-off flow control is turned on, it will use random characters for flow control, hence the other problem you reported, the eating of characters. This is because the code is not setting the right pair of flow control characters before calling the driver to enable flow control. I will report this internally to be fixed in the next release. In the meantime, if you have MPW, you can fix the source code. In the file SPortUtil.inc, in the routine SetUpSPortGlobals, there is some code that sets up the handshaking configuration record; it's preceeded by "with shakes do". There's several things set to initial values. Add "xOn := 17; xOff := 19;". That should do it (note: I haven't tried this yet, so if there's any problem, let me know). If it's a viable solution for you, you can still use signal flow control without making any changes to the XCMDs. For incoming data, I just set the buffer size to a large number (like 10K, which is lots to a serial port, but not really much to HyperCard). In article <2416@quanta.eng.ohio-state.edu> czei@quanta.eng.ohio-state.edu (Michael S. Czeiszperger) writes: > It does not strip linefeeds from the incoming data stream, > regardless of whether that option is set or not. There is no option to strip linefeeds from the incoming data stream. There is an option to append linefeeds to carriage returns, and one which strips all control characters except carriage return and backspace, including linefeed. This is the stripControlsOn option. I just tried this, and it works just fine. A note about setting options in general: the option have must be typed in exactly right ("stripControlsOn" for control character striping and "XOnOutOn" for X-on/X-off) or it won't work (i.e., it doesn't recognize just the first few characters but rather the whole word). Note: I posted this reply to the newgroup as a whole in case other people had similar problems/questions/etc., but it's probably better to take any follow-up discussion off-line. I'm reachable as chesley@apple.com. Hope that helps.