1

For serial communication, We need to set a series of settings(speed and the number of data bits and something)

However, I have found that I could read data from a serial device(e.g. /dev/ttyS0) through cat command without and settings in some cases.

How and when could it be possible?

Does each serial device file have the default settings for a serial?

1 Answer 1

1

You can access a device on a serial port directly if the port's current configuration matches the settings (baud rate, parity bits, etc.) that the device expects.

You can use the setserial utility to change a serial port's parameters. It issues a TIOCSSERIAL ioctl to change the serial port parameters. These parameters are stored in the kernel and remain in place until they are next changed or as long as the serial driver remains loaded, i.e. generally until the next reboot.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .