You are not logged in.
Pages: 1
I'mtrying to write to the serial port in c++ but is doesn't seem to work. In windows in use a program called docklit or something like that . And the rs232, gadget is working fine.
The gadget relpy at OK when i transmit a I sleep 2 ms and then an R
Settings for the serial port should be 9600Baud, 8 databit 1 stop bit rest doesn't matter
Trying to do the same in linux with a c program i get nothing. can someon plz help me write at simple c++ program the target the rs232 port with the above settings and when written R to the port listens for reply on the same port.
Offline
just open the proper /dev/ttyS0X node like a normal file and write/read...
std::fstream f("/dev/ttyS01",std::ios::out);
f << "hello world" << std::endl;
...should work
Offline
Pages: 1