1. This forum section is a read-only archive which contains old newsgroup posts. If you wish to post a query, please do so in one of our main forum sections (here). This way you will get a faster, better response from the members on Motherboard Point.

Sun netra 210 Serial port parameters

Discussion in 'Sun Hardware' started by tiran, Oct 14, 2008.

  1. tiran

    tiran Guest

    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
    tiran, Oct 14, 2008
    #1
    1. Advertising

  2. tiran <> 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
    Darren Dunham, Oct 15, 2008
    #2
    1. Advertising

  3. tiran

    tiran Guest

    On 15 Ekim, 02:50, (Darren Dunham) wrote:
    > tiran <> 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.
    tiran, Oct 15, 2008
    #3
  4. tiran

    Fran Horan Guest

    "tiran" <> wrote in message
    news:...
    > 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);
    Fran Horan, Oct 15, 2008
    #4
  5. tiran <> 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
    Darren Dunham, Oct 15, 2008
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ewald Jenisch
    Replies:
    2
    Views:
    552
    Michael Laajanen
    Apr 5, 2005
  2. Ewald Jenisch
    Replies:
    0
    Views:
    345
    Ewald Jenisch
    Apr 5, 2005
  3. shamang
    Replies:
    0
    Views:
    279
    shamang
    Feb 21, 2007
  4. Tim Hogard

    FIPS cryptcards for Netra 210

    Tim Hogard, May 6, 2008, in forum: Sun Hardware
    Replies:
    0
    Views:
    743
    Tim Hogard
    May 6, 2008
  5. Tim Hogard

    EOL of the Netra 210?

    Tim Hogard, May 8, 2008, in forum: Sun Hardware
    Replies:
    2
    Views:
    758
    Tim Hogard
    May 10, 2008
Loading...

Share This Page