All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Westermann <mw@microdata-pos.de>
To: linux-serial@vger.kernel.org
Subject: Re: Connect with various serial devices
Date: Thu, 11 Dec 2003 10:33:52 +0100	[thread overview]
Message-ID: <20031211103352.G12637@microdata-pos.de> (raw)
In-Reply-To: <33369.192.168.192.123.1071130475.squirrel@www.clientes.sedifa.com>; from informatic@sedifa.com on Thu, Dec 11, 2003 at 09:14:35AM +0100

Hello,

On Thu, Dec 11, 2003 at 09:14:35AM +0100, Albert Cervera Areny wrote:


> Thanks for your suggestion, but it doesn't work either. If I set
> O_NONBLOCK it doesn't block in the read statement but it never receives
> anything. The problem must be that data isn't sent correctly either as the
> device would do something if it received it correctly (though I might not
> receive a response).
I think you you will read raw from the device, please set 

	t.c_iflag		= 0;
	t.c_oflag		= 0;
	t.c_cflag 		= B4800 | CS7 | CLOCAL | CREAD | PARENB;
	t.c_cc[VMIN]		= count;
	t.c_cc[VTIME]		= time; 	
	t.c_cc[VSTOP]		= 0;
	t.c_cc[VSTART]		= 0;
	t.c_lflag		= 0;
	t.c_oflag		= 0;

VMIN and VTIM are most probably described in a serial HOWTO

> Any other ideas?

Particulary, I think ICANON is wrong in this context.
Use select(2)  ;-)

Michael

  reply	other threads:[~2003-12-11  9:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-10 20:33 Connect with various serial devices Albert Cervera Areny
2003-12-11  1:38 ` whitnl73
2003-12-11  8:14   ` Albert Cervera Areny
2003-12-11  9:33     ` Michael Westermann [this message]
2003-12-11 12:12       ` Albert Cervera Areny
2003-12-11 12:29         ` Michael Westermann
2003-12-11 13:08           ` Albert Cervera Areny
2003-12-11 13:27             ` Michael Westermann
2003-12-15 19:00               ` Albert Cervera Areny
2003-12-16  7:23                 ` Michael Westermann
2003-12-11 14:47             ` Gerald Emig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20031211103352.G12637@microdata-pos.de \
    --to=mw@microdata-pos.de \
    --cc=linux-serial@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.