S
s13884
I have been working on serial port of one embedded linux device. We are managing one controller using serial port.
Here is my Serial port settings
Baudrate:9600
tio.c_cflag = BAUDRATE | CS8 | CLOCAL | CREAD | CRTSCTS;
tio.c_iflag = IGNPAR;
tio.c_oflag = 0;
tio.c_lflag = 0;
tio.c_cc[VTIME] = 0;
tio.c_cc[VMIN] = 1;
Here is the data I am writing on Serial port
FEFF2801008120002100001100000000000000000000000000 00000000000000000000000000000000FCEF
If the controller received above data correctly than it should return "feff0520000227ef".
It returns 8 bytes when we write the 43 bytes.
Here is the output of tx/rx
root@5_15_60_0:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A mmio:0x18020000 irq:11 tx:257 rx:29 brk:6 RTS|CTS|DTR|DSR|CD
root@5_15_60_0:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A mmio:0x18020000 irq:11 tx:300 rx:37 brk:6 RTS|CTS|DTR|DSR|CD
root@5_15_60_0:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A mmio:0x18020000 irq:11 tx:343 rx:45 brk:6 RTS|CTS|DTR|DSR|CD
root@5_15_60_0:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A mmio:0x18020000 irq:11 tx:386 rx:53 brk:6 RTS|CTS|DTR|DSR|CD
It says 0 bytes in input buffer when run IOCTL command FIONREAD but I can see the value of tx and rx values are increasing as expected. Also unable to read the bytes.
I have removed following line from /etc/inittab file
ttyS0::askfirst:/bin/ash --login
Also removed the console=ttyS0 from bootargs.
So anyone please guide me to resolve the same? Can anyone point out the something to resolve this issue?
Continue reading...
Here is my Serial port settings
Baudrate:9600
tio.c_cflag = BAUDRATE | CS8 | CLOCAL | CREAD | CRTSCTS;
tio.c_iflag = IGNPAR;
tio.c_oflag = 0;
tio.c_lflag = 0;
tio.c_cc[VTIME] = 0;
tio.c_cc[VMIN] = 1;
Here is the data I am writing on Serial port
FEFF2801008120002100001100000000000000000000000000 00000000000000000000000000000000FCEF
If the controller received above data correctly than it should return "feff0520000227ef".
It returns 8 bytes when we write the 43 bytes.
Here is the output of tx/rx
root@5_15_60_0:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A mmio:0x18020000 irq:11 tx:257 rx:29 brk:6 RTS|CTS|DTR|DSR|CD
root@5_15_60_0:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A mmio:0x18020000 irq:11 tx:300 rx:37 brk:6 RTS|CTS|DTR|DSR|CD
root@5_15_60_0:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A mmio:0x18020000 irq:11 tx:343 rx:45 brk:6 RTS|CTS|DTR|DSR|CD
root@5_15_60_0:~# cat /proc/tty/driver/serial
serinfo:1.0 driver revision:
0: uart:16550A mmio:0x18020000 irq:11 tx:386 rx:53 brk:6 RTS|CTS|DTR|DSR|CD
It says 0 bytes in input buffer when run IOCTL command FIONREAD but I can see the value of tx and rx values are increasing as expected. Also unable to read the bytes.
I have removed following line from /etc/inittab file
ttyS0::askfirst:/bin/ash --login
Also removed the console=ttyS0 from bootargs.
So anyone please guide me to resolve the same? Can anyone point out the something to resolve this issue?
Continue reading...