Home/Support/Support Forum/RS 232 port com 0 configuration Net+OS 7.3
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

RS 232 port com 0 configuration Net+OS 7.3

0 votes

I am total new user. I recieved my development kit Connect-Me a week ago.
But I couldn't manage to configure my port com 0 and open it.

7 bit data
1 bit stop
Parity Even
hardware None

How can I open the port?

Cheers mate
asked Aug 12, 2008 in NET+OS by darapuce New to the Community (4 points)
recategorized Dec 18, 2013 by tuxembb

Please log in or register to answer this question.

2 Answers

0 votes
This is support forum without support from digi....

There are two way how to access serial port:
1) using STDIO, its the same as it is in linux, you can use printf, getchar ...
2) direct acces to serial port - I guess that this is what you need.

If you want to use direct access, you need to switch off stdio output. You can find it here: properties of your project-> NET+OS -> Options->bsp_sys.h->STDIO Port-> set to NULL

Now try this code:

#include "termios.h"

int fd = open("/com/0",O_RDWR);
if(fd < 0)
// handle error
char data[10];
close fd;

So if you want to configure serial port you have to use this functions:

int tcsetattr(int fd, int optional_actions, struct termios * termios_p );
int tcgetattr(int fd, struct termios * termios_p );

See documentation for this functions or see this page

answered Aug 13, 2008 by kubiajir Community Contributor (61 points)
0 votes
Hello Jirka,

Many thanks mate.
I spent the morning to configure my RS 232 port without hardware handshaking.
With your help I could manage to send from the port to the hyperterminal.

Thanks again mate for the advice...
answered Aug 14, 2008 by darapuce New to the Community (4 points)