Motherboard Forums


Reply
Thread Tools Display Modes

Sun netra 210 Serial port parameters

 
 
tiran
Guest
Posts: n/a
 
      10-14-2008, 08:55 PM
I wanna use the serial port of sun netra 210 for communication channel
with an external system. However when I look at the documentation, the
communation parameters are 9600, 8, n and they are not changeable.
Does anyone can help me to find a way to change parameters of serial
port programmatically. Further, If it is possible to change
parameters, what is maximum baud rate that the port can communicate?

Best regards
 
Reply With Quote
 
 
 
 
Darren Dunham
Guest
Posts: n/a
 
      10-14-2008, 11:50 PM
tiran <(E-Mail Removed)> wrote:
> I wanna use the serial port of sun netra 210 for communication channel
> with an external system. However when I look at the documentation, the
> communation parameters are 9600, 8, n and they are not changeable.


What documentation is that?

> Does anyone can help me to find a way to change parameters of serial
> port programmatically. Further, If it is possible to change
> parameters, what is maximum baud rate that the port can communicate?


Your application should set the parameters after it opens the port. If
you're using hardware flowcontrol, it should go reasonably fast, but I
haven't worked with netra hardware in a very long time.

--
Darren
 
Reply With Quote
 
 
 
 
tiran
Guest
Posts: n/a
 
      10-15-2008, 05:17 AM
On 15 Ekim, 02:50, (E-Mail Removed) (Darren Dunham) wrote:
> tiran <(E-Mail Removed)> wrote:
> > I wanna use the serial port of sun netra 210 for communication channel
> > with an external system. However when I look at the documentation, the
> > communation parameters are 9600, 8, n and they are not changeable.

>
> What documentation is that?
>
> > Does anyone can help me to find a way to change parameters of serial
> > port programmatically. Further, If it is possible to change
> > parameters, what is maximum *baud rate that the port can communicate?

>
> Your application should set the parameters after it opens the port. *If
> you're using hardware flowcontrol, it should go reasonably fast, but I
> haven't worked with netra hardware in a very long time.
>
> --
> Darren


The Documentation is ALOM documentation. In ALOM the commands are used
to just to see the serial port params and it is stated that the params
cannot be changed.
 
Reply With Quote
 
Fran Horan
Guest
Posts: n/a
 
      10-15-2008, 04:29 PM

"tiran" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I wanna use the serial port of sun netra 210 for communication channel
> with an external system. However when I look at the documentation, the
> communation parameters are 9600, 8, n and they are not changeable.
> Does anyone can help me to find a way to change parameters of serial
> port programmatically. Further, If it is possible to change
> parameters, what is maximum baud rate that the port can communicate?
>
> Best regards


references:
Stevens, Advance Prog in UNIX Enviro, Chapt 11, pg.563
man pages on termio(7I), termios(3C)

example code snippets that may help:

#include <fcntl.h>
#include <termios.h>

static char *serial_device_names[] = {
"/dev/ttya",
"/dev/ttyb"};
static char *sunSerialPort = "/dev/ttya"; /* default sun serial port */
#define SUN_SERIAL_PORT_BAUD B9600
static int Fd;
struct termios term;

Fd = open(sunSerialPort, O_RDWR)

term.c_cflag = CS8 | /* 8-bit data */
CREAD | /* enable receiver */
CLOCAL; /* ignore modem status lines */
/* no parity, 1 stop bit */
term.c_oflag &= ~OPOST; /* turn off post processing */
term.c_iflag = IXON | IXOFF | /* Xon/Xoff flow control */
IGNBRK; /* ignore breaks */
/* ISTRIP | */ /* strip input to 7 bits */
/* IGNCR; */ /* ignore received CR */
term.c_lflag = 0; /* everything off in local flag:
disables canonical mode, disables
signal generation, disables echo */
term.c_cc[VMIN] = 1; /* 1 byte at a time, no timer */
term.c_cc[VTIME] = 0; /* block reader indefinitely */
cfsetispeed(&term, SUN_SERIAL_PORT_BAUD);
cfsetospeed(&term, SUN_SERIAL_PORT_BAUD);
tcsetattr(Fd, TCSANOW, &term); /* set attributes now */

printf(" execute '/usr/ucb/stty -a > %s' in a shelltool to display serial
port settings.\n", sunSerialPort);


 
Reply With Quote
 
Darren Dunham
Guest
Posts: n/a
 
      10-15-2008, 09:54 PM
tiran <(E-Mail Removed)> wrote:
> The Documentation is ALOM documentation. In ALOM the commands are used
> to just to see the serial port params and it is stated that the params
> cannot be changed.


ALOM is only for communication to the system console. It's not the
general serial port for applications to use on the system.

See the man page for the serial driver on that hardware. (Looking at
the device that /dev/cua/0 points to would be a good hint for the driver
name).

--
Darren
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
EOL of the Netra 210? Tim Hogard Sun Hardware 2 05-10-2008 04:43 AM
FIPS cryptcards for Netra 210 Tim Hogard Sun Hardware 0 05-06-2008 10:05 AM
SUN Type 6 Key boards and Sun Netra T server shamang Sun Hardware 0 02-21-2007 11:45 PM
External DVD-ROM (USB) on SUN Fire 210, Sun Fire 240? Ewald Jenisch Sun Hardware 2 04-05-2005 09:18 PM
External DVD-ROM (USB) on SUN Fire 210, Sun Fire 240? Ewald Jenisch Sun Hardware 0 04-05-2005 03:07 PM


All times are GMT. The time now is 06:12 PM.


Welcome!
Welcome to Motherboard Point
 

Advertisment