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!e8g2000vbz.googlegroups.com!not-for-mail From: tonyg Newsgroups: comp.lang.ada Subject: Re: GNAT.Serial_Communications Date: Sat, 16 Apr 2011 03:19:18 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <9af0087d-9637-40d9-8c30-2e06c2d1e4f4@o26g2000vby.googlegroups.com> <31dd80b2-3fd3-4078-8774-c396a52c94a0@r6g2000vbz.googlegroups.com> <0d509f1c-4ca7-4595-a026-65c108558d76@bl1g2000vbb.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 1302949161 16530 127.0.0.1 (16 Apr 2011 10:19:21 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Sat, 16 Apr 2011 10:19:21 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: e8g2000vbz.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:19782 Date: 2011-04-16T03:19:18-07:00 List-Id: On Apr 16, 9:29=A0am, Simon Clubley wrote: > On 2011-04-15, tonyg wrote: > > > > > 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. > > Have you compared the _full_ output from stty yet when Minicom and your > program are running ? > > As I mention above, there are other possible failure modes and the full > output from stty will tell you if flow control is enabled on the port or > not. Checking the flow control is just the first thing I would check; > it is not the only thing. > > Read the man page for stty. :-) You may save yourself quite a bit of time > if the flow control settings are not the problem. > > Simon. > > -- > Simon Clubley, clubley@remove_me.eisner.decus.org-Earth.UFP > Microsoft: Bringing you 1980s technology to a 21st century world This is the full output when minicom is running tony@tony-workstation:~$ stty --file=3D/dev/ttyUSB0 speed 115200 baud; line =3D 0; eof =3D ^A; min =3D 1; time =3D 5; ignbrk -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke tony@tony-workstation:~$ This is the full output when the ada program is running tony@tony-workstation:~$ tony@tony-workstation:~$ stty --file=3D/dev/ttyUSB0 speed 115200 baud; line =3D 0; eof =3D ^A; min =3D 0; time =3D 100; -brkint -icrnl -imaxbel -opost -onlcr -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke tony@tony-workstation:~$ The differences are ignbrk flag is up on the minicom readout and min =3D1. I assume the time=3D100 bit is from the timeout parameter set procedure in gnat.serial_communication. Another thing occurred to me is that do I need to open the same port twice for my read calls and my write calls. i.e. have two variables read_port, write_port : gnat.serial_communications.serial_port; which both open ttyUSB0 ? or I am barking up the wrong tree