Hello,
I'm trying to communicate via serial port to an external device. In Windows, I usually use these settings:
Baud rate: 9600
Data bits: 7
Parity: Even
Stop bit: 1
Flux control: none
Following some examples, I've written some code that surely "sends something" on the line (I've seen it with the oscilloscope) but can't read anything from the line and the external device doesn't seem to understand the commands received.
I've used this configuration code:
Quote:
new_attributes.c_cflag |= CREAD;
new_attributes.c_cflag |= B9600;
new_attributes.c_cflag |= CS7;
new_attributes.c_iflag |= PARENB;
|
I think that the error is there, but I can't understand what I am missing...
Can someone help me?