TOP
SSV SOFTWARE SYSTEMS REGISTER  REGISTER
Log in to check your private messages  Log in to check your private messages
START FAQ SEARCH MITGLIEDER PROFILE  Log in 
SSV-Forum
COM2 ttyAT1 sendet nicht, Empfang geht

 
Post new topic   Reply to topic    SSV-Forum Forum Index >>> DNP/9265
<<< Previous topic - Next topic >>>  
Display posts from previous:   
Author Message
hne



Joined: 11 Jul 2008
Posts: 210
Location: Hannover

PostPosted: 05.09.2011, 15:16    Post subject: COM2 ttyAT1 sendet nicht, Empfang geht Reply with quote

Eine Frage aus dem Support:
Quote:
Am COM1 (ttyAT1) des DNP/EVA6 mit DNP/9265 werden keine Zeichen gesendet. Empfang ist jedoch möglich.


COM2 besitzt keine Handshake-Leitungen.
Diese müssen in der Applikation deaktiviert werden.

Im Minicom erreicht man das durch
Code:
Hardware Flow Control : No


An der Konsole wird dazu stty mit "-crtscts" aufgerufen, z.B.:

Code:
stty 115200 -crtscts clocal -echo cread </dev/ttyAT1


In eigenen C-Programmen sind die Inhalte der Struktur "termios" zu ändern. Am einfachsten per cfmakeraw, was dann etwa so aussieht:

Code:
int fd;
struct termios termios;

fd = open ("/dev/ttyAT1", O_RDWR);
tcgetattr (fd, &termios);
cfmakeraw (&termios);      /* see "man cfmakeraw" */
tcsetattr (fd, TCSANOW, &termios);

write (fd, "Hallo Welt\r\n", 12);

_________________
Henry Nestler
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SSV-Forum Forum Index >>> DNP/9265 All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

SSV SOFTWARE SYSTEMS

Dünenweg 5
30419 Hannover

Fon: +49(0)511  ·  40 000-0
Fax: +49(0)511  ·  40 000-40

sales@ssv-embedded.de


Impressum    ·    Datenschutz    ·    AGB

© 2024 SSV SOFTWARE SYSTEMS GmbH. Alle Rechte vorbehalten.

ISO 9001:2015