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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no 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 Path: g2news2.google.com!postnews.google.com!bl1g2000vbb.googlegroups.com!not-for-mail From: tonyg Newsgroups: comp.lang.ada Subject: Re: GNAT.Serial_Communications Date: Fri, 15 Apr 2011 17:07:07 -0700 (PDT) Organization: http://groups.google.com Message-ID: <0d509f1c-4ca7-4595-a026-65c108558d76@bl1g2000vbb.googlegroups.com> References: <9af0087d-9637-40d9-8c30-2e06c2d1e4f4@o26g2000vby.googlegroups.com> <31dd80b2-3fd3-4078-8774-c396a52c94a0@r6g2000vbz.googlegroups.com> NNTP-Posting-Host: 82.46.232.121 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1302912427 1522 127.0.0.1 (16 Apr 2011 00:07:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 16 Apr 2011 00:07:07 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: bl1g2000vbb.googlegroups.com; posting-host=82.46.232.121; posting-account=28F2IwkAAACL1Z5nRC-dE7zuvWdbWC7P User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.04 (lucid) Firefox/3.6.16,gzip(gfe) Xref: g2news2.google.com comp.lang.ada:19776 Date: 2011-04-15T17:07:07-07:00 List-Id: On Apr 15, 7:49=A0pm, Simon Clubley wrote: > On 2011-04-15, tonyg wrote: > > > > > > > The minicom values along the bottom are > > > 1115200 , 8N1 , NOR > > > the port in my code is set with > > > =A0 =A0 =A0 GNAT.Serial_Communications.Set (Port =3D> The_Port, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 Rate =3D> > > GNAT.Serial_Communications.B115200, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 Bits =3D> > > GNAT.Serial_Communications.CS8, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 Stop_Bits =3D> > > GNAT.Serial_Communications.one, > > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 Parity =3D> > > 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 This is making a lot of sense to me. Minicom is working perfectly with setting the commands on the electronics. However for some reason, the same commands relayed by the ada program are simply not received. There does not seem a way in GNAT.Serial_Communications to disable hardware and software flow control, I'll have a look at how linux does it.