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: g2news1.google.com!postnews.google.com!f31g2000pri.googlegroups.com!not-for-mail From: tonyg Newsgroups: comp.lang.ada Subject: Re: GNAT.Serial_Communications Date: Wed, 13 Apr 2011 14:12:05 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: 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 1302729126 17410 127.0.0.1 (13 Apr 2011 21:12:06 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 13 Apr 2011 21:12:06 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: f31g2000pri.googlegroups.com; posting-host=82.46.232.121; posting-account=28F2IwkAAACL1Z5nRC-dE7zuvWdbWC7P User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-GB; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16 GTB7.1 ( .NET CLR 3.5.30729; .NET4.0E) GTBA,gzip(gfe) Xref: g2news1.google.com comp.lang.ada:18787 Date: 2011-04-13T14:12:05-07:00 List-Id: On Apr 13, 3:12=A0pm, "Alex Mentis" wrote: > tonyg wrote: > > I was fishing to see if anyone had used the > > serial communications and could confirm it was all working etc or had > > a suggestion on why etc. Thanks for your help Brian > > I've used GNAT.Serial_Communications on Windows and Linux to transmit > commands to/receive responses from robots via a USB Bluetooth > transceiver. > > The package worked as expected for me. I certainly didn't have any > issues with the package blocking on writes. Where is your program > blocking? Is it: > > a) right after the Ada statement prior to the Write, but before any > data is transmitted over the serial port > > b) mid-transmission (i.e., some of the data is received at the distant > end, but not all of it) > > c) after transmitting all data, but before executing the next Ada > statement > > Alex Its actually blocking on top of the write. Also I've discovered after much experimentation that the writes are not doing the job when it does not block up. Usually it blocks up after 3-4 write attempts. I expect I need to discover what is happening at the other end of the wire, but its my first experience of using a serial port for anything. I suspect there is an option I am not engaging in the setting up of the port. I am using the gpl version so I was thinking there could be a bug that is not in the gnat pro version, but I don't want to be a bad craftsman :) and gnat are usually pretty much on top of stuff like that from previous experience, but then again its a relatively new addition to the gnat compiler and no ones perfect. But.... its usually me..... Saying that though I am successfully reading from the port the incoming messages although they do appear in sections and I have to keep re reading the port to get the full message...