Serial standard communication (stty)

Hello friends, I am trying to communicate with a programmer memory from Unix (HP-UX) via serial port.

Well, I have some code ready stty parameters to achieve communicating the device with the computer, but I have my doubts. I would like to know if you have some code fragment where you use the stty command, something generic for a connection to the serial port:D.

stty 115200-parenb -parodd cs8 -cstopb -hupcl
cread clocal -loblk -crts -ignbrk
-brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr
-icrnl -iuclc -ixon -ixany -ixoff -rtsxoff -ctsxon
-ienqak -isig -icanon iexten -xcase -echo -echoe -echok
-echonl -noflsh -opost -olcuc -onlcr -ocrnl -onocr
-onlret -ofill -ofdel -tostop </dev/ttym01

What options you use depends on what options you need.

What options you need depend on how the programmer talks.

In other words, what are you expecting? Does it send and receive lines of text like a modem, or does it send packets of unescaped binary data, or does it respond when you bit-bang control bits, or what?

You have xon-xoff flow control turned off and rts-cts control also turned off.
You should lower the baud rate to no more than 9600, and you may get it to work.
How many wires are in the circuit? What is the pin-out?
What does the manufacturer of the device you are connecting to suggest, and what are the defaults? Is the device even RS232, or maybe RS485?

Thank you all for your time and help. The device is a programmer NEC have a communication for the console so I want to send and receive text lines.

Serial interface (RS-232C) capable of handling communication at 9,600 (minimum) baud up to 115,200 baud. The DB-9 (female) PINOUT is configured this way:

SERIAL HOST -----------SIGNAL NAME
1------------------------------NC
2------------------------------RxD
3------------------------------TxD
4------------------------------NC
5------------------------------Vss (GND)
6------------------------------NC
7------------------------------RTS
8------------------------------CTS
9------------------------------NC

The RS-232C data transfer conditions are 9,600 baud, 8 data bits, 1 stop bit, no parity and selectable hardware handshake. The baud rate may be selected from 9,600 bps (default), 19,200 bps, 38,400 bps, 57,600 bps or 115,200 bps.

This is information about the device:
[URL="http://documentation.renesas.com/doc/DocumentServer/U15260EJ4V0UM00.pdf"]

Excuse, I'm new in UNIX, I'm trying learn.

What do you want to do with it? Are you trying to talk to it on a terminal? Use minicom for that. Or are you trying to script something?

I'm trying to do both, first gain communicate via terminal and then make a script in BT-Basic that can reliably do this automatically for a project.

sub IniRS232(Port$,Baudrate)
    global  @RS232
    dim STTY1$[512]
    STTY1$ = "stty "& val$(Baudrate) & " -parenb -parodd cs8 -cstopb -hupcl "
    STTY1$ = STTY1$ & "cread clocal -loblk -crts -ignbrk "
    STTY1$ = STTY1$ & "-brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr "
    STTY1$ = STTY1$ & "-icrnl -iuclc -ixon -ixany -ixoff -rtsxoff -ctsxon "
    STTY1$ = STTY1$ & "-ienqak -isig -icanon iexten -xcase -echo -echoe -echok "
    STTY1$ = STTY1$ & "-echonl -noflsh -opost -olcuc -onlcr -ocrnl -onocr "
    STTY1$ = STTY1$ & "-onlret -ofill -ofdel -tostop < "
    RS232_Dev$ ="/dev/" & Port$
    assign @RS232 to RS232_Dev$; read, write
    timeout @RS232, 0.8
    execute STTY1$ & RS232_Dev$; append
subend