From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,cc65ab136f46904d X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!85.214.198.2.MISMATCH!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail From: Simon Clubley Newsgroups: comp.lang.ada Subject: Re: GNAT.Serial_Communications Date: Fri, 15 Apr 2011 18:49:44 +0000 (UTC) Organization: A noiseless patient Spider Message-ID: References: <9af0087d-9637-40d9-8c30-2e06c2d1e4f4@o26g2000vby.googlegroups.com> <31dd80b2-3fd3-4078-8774-c396a52c94a0@r6g2000vbz.googlegroups.com> Injection-Date: Fri, 15 Apr 2011 18:49:44 +0000 (UTC) Injection-Info: mx01.eternal-september.org; posting-host="4pjzwDT2MPp9AkNxUo/C4Q"; logging-data="9814"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+8zxfKwNqTxOP74ut0FeQ3VmITQp/SyNM=" User-Agent: slrn/0.9.8.1 (VMS/Multinet) Cancel-Lock: sha1:q1HhmjeIiIV9GAx39lucipBCcy8= Xref: g2news1.google.com comp.lang.ada:18804 Date: 2011-04-15T18:49:44+00:00 List-Id: On 2011-04-15, tonyg wrote: > > The minicom values along the bottom are > > 1115200 , 8N1 , NOR > > the port in my code is set with > > GNAT.Serial_Communications.Set (Port => The_Port, > Rate => > GNAT.Serial_Communications.B115200, > Bits => > GNAT.Serial_Communications.CS8, > Stop_Bits => > GNAT.Serial_Communications.one, > Parity => > GNAT.Serial_Communications.None); > > I'm not sure what NOR means and if this is some to do with flow > control, there seems to be no option to set this within the > gnat.serial_communications package. The electronics I am working with > has no hardware or software handshaking. Is handshaking the same as > flow control ? The settings in minicom also has no hardware or > software flow control. hhhmmm Yes, handshaking is the same as flow control. You _really_ need to look at the _full_ stty settings for the comms port when Minicom is running and when your program is running. One possible failure mode (there are many others): If your remote device does not manipulate the RTS/CTS lines, and if Minicom reconfigures the port while it's running to also ignore the RTS/CTS lines, then Minicom will work. However, _if_ the default setting for the Linux/Unix comms port your Ada program is opening is to implement RTS/CTS flow control then your remote device will never receive data because the Linux/Unix system will be waiting for the CTS line to be asserted by your remote device (which will never happen). _If_ hardware flow control is enabled on your Linux/Unix PC comms port, you need to either reconfigure the comms port (either within your program or using stty) to disable the flow control or implement flow control on the remote device. If you do the latter, don't forget to use a correctly wired serial cable. Simon. -- Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP Microsoft: Bringing you 1980s technology to a 21st century world