From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <4F68A133.5090801@domain.hid> Date: Tue, 20 Mar 2012 16:24:35 +0100 From: Gilles Chanteperdrix MIME-Version: 1.0 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Xenomai-help] Linux Serial Does not work with CONFIG_XENO_OPT_PERVASIVE enabled List-Id: Help regarding installation and common use of Xenomai List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Glen Wernersbach Cc: xenomai@xenomai.org On 03/20/2012 04:17 PM, Glen Wernersbach wrote: > Don't have a full dev enviroment on my embedded arm. Here is the program. > Very very basic: > close(fd); > > > > > > > fd = open("/dev/ttyS4", O_RDWR | O_NOCTTY | O_NDELAY); Why closing and reopening? Are you sure this does not reset configuration? > if (fd == -1) { > printf("open /dev/ttyS0 Failed, errno: %d\r\n", errno); > return 0; > } > > > //write the data to my device which echos them back > write(fd, buf, sizeof(buf)-1); missing return value check. > -- Gilles.