Hello.
How can I access to rs232c port to take signal in QNX ??
Thanks !
Pasus
Hello.
How can I access to rs232c port to take signal in QNX ??
Thanks !
Pasus
U can acces port by this way, but before u mast init your port. I do this
with stty command.
int rs1;
char data = 0;
rs1 = open("/dev/ser1",O_RDWR);
data = 0xAA;
write(rs1,&data,1);
read(rs1,&data,1);
close(rs1);
–
Gregory V.Zaytcev
Your init can be done using the tcsetattr and tcgetattr function
calls. You can also use devctl to set other attrs of the serial port.
E.
Gregory V.Zaytcev <zeegear@chat.ru> wrote:
U can acces port by this way, but before u mast init your port. I do this
with stty command.int rs1;
char data = 0;
rs1 = open("/dev/ser1",O_RDWR);
data = 0xAA;
write(rs1,&data,1);
read(rs1,&data,1);
close(rs1);–
Gregory V.Zaytcev
take a look at my code under the subject
“porting RS232 serial comms code from solaris->qnx”
in the news:qdn.public.qnxrtp.os newsgroup.
there’s a complete program there and that should
be enough to get you started with the POSIX serial
stuff…also you should read and understand
http://www.easysw.com/~mike/serial/serial.html
if you want the entire “fixed” QNX source, let me know.
jim
Pasus wrote:
Hello.
How can I access to rs232c port to take signal in QNX ??
Thanks !Pasus