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!news4.google.com!feeder.news-service.com!cyclone03.ams2.highwinds-media.com!news.highwinds-media.com!npeersf01.ams.highwinds-media.com!newsfe15.ams2.POSTED!00000000!not-for-mail From: Chris Moore User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: GNAT.Serial_Communications References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 110414-1, 14/04/2011), Outbound message X-Antivirus-Status: Clean Message-ID: NNTP-Posting-Host: 82.18.136.180 X-Complaints-To: http://netreport.virginmedia.com X-Trace: newsfe15.ams2 1302803564 82.18.136.180 (Thu, 14 Apr 2011 17:52:44 UTC) NNTP-Posting-Date: Thu, 14 Apr 2011 17:52:44 UTC Organization: virginmedia.com Date: Thu, 14 Apr 2011 18:52:34 +0100 Xref: g2news1.google.com comp.lang.ada:18793 Date: 2011-04-14T18:52:34+01:00 List-Id: On 13/04/2011 22:12, tonyg wrote: > > 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..... I suspect it's the speed setting. Serial ports default to 9600 baud which is slow so you're filling the buffers up with the first few writes as they're unable to get the data out quick enough and then they start to block cos there's nowhere to put the data. > 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... This is how serial interfaces usually work. The lowest level read function returns the number of bytes actually read.