serial –unit=0 –speed=115200 –word=8 –parity=no –stop=1
terminal –timeout=5 console serial
title GDB — openSUSE 12.1 – 3.1.0-1.3-desktop
kernel /boot/vmlinuz-3.1.0-1.3-desktop-mod root=/dev/disk/by-id/ata-HTS541040G9SA00_MPBBP0X2JNDPTM-part2 showopts nmi_watchdog=0 kgdb=ttyS0,115200 kgdboc=ttyS0,115200 vga=0x31b kgdbwait s
###Don’t change this comment – YaST2 identifier: Original name: linux-ttyS0###
title TTY — openSUSE 12.1 – 3.1.0-1.3-desktop
kernel /boot/vmlinuz-3.1.0-1.3-desktop-mod root=/dev/disk/by-id/ata-HTS541040G9SA00_MPBBP0X2JNDPTM-part2 showopts console=tty0 console=ttyS0,115200n8 vga=0x31b
minicom 中如果发现长宽不对可以用resize 重置，如果发现乱码可以用reset重置
语 法：setserial [-abgGqvVz][设备][串口参数]
2．在/dev/目录下执行：setserial -a -g ttyS* 查看所有的扩展串口设备链接情况
How speed is set in hardware: the divisor and baud_base
Speed is set by having the serial port’s clock change frequency. But this change happens not by actually changing the frequency of the oscillator driving the clock but by “dividing” the clock’s frequency. For example, to divide by two, just ignore every other clock tick. This cuts the speed in half. Dividing by 3 makes the clock run at 1/3 frequency, etc. So to slow the clock down (meaning set speed), we just send the clock a divisor. It’s sent by the serial driver to a register in the port. Thus speed is set by a divisor.
If the clock runs at a top speed of 115,000 bps (common), then here are the divisors for various speeds (assuming a maximum speed of 115,200): 1 (115.2k), 2 (57.6k), 3 (38.4k), 6 (19.2k), 12 (9.6k), 24 (4.8k), 48 (2.4k), 96 (1.2k), etc. The serial driver sets the speed in the hardware by sending the hardware only a “divisor” (a positive integer). This “divisor” divides the “maximum speed” of the hardware resulting in a slower speed (except a divisor of 1 obviously tells the hardware to run at maximum speed).
There are exceptions to the above since for certain serial port hardware, speeds above 115.2k are set by using a very high divisor. Keep that exception in mind as you read the rest of this section. Normally, if you specify a speed of 115.2k (in your communication program or by stty) then the serial driver sets the port hardware to divisor 1 which sets the highest speed.
Besides using a very high divisor to set high speed, the conventional way to do it is as follows: If you happen to have hardware with a maximum speed of say 230.4k (and the 230.4k speed has been enabled in the hardware), then specifying 115.2k will result in divisor 1. For some hardware this will actually give you 230.4k. This is double the speed that you set. In fact, for any speed you set, the actual speed will be double. If you had hardware that could run at 460.8k then the actual speed would be quadruple what you set. All the above assumes that you don’t use “setserial” to modify things.
Setting the divisor, speed accounting
To correct this accounting (but not always fix the problem) you may use “setserial” to change the baud_base to the actual maximal speed of your port such as 230.4k. Then if you set the speed (by your application or by stty) to 230.4k, a divisor of 1 will be used and you’ll get the same speed as you set.
If you have very old software which will not allow you to tell it such a high speed (but your hardware has it enabled) then you might want to look into using the “spd_cust” parameter. This allows you to tell the application that the speed is 38,400 but the actual speed for this case is determined by the value of “divisor” which has also been set in setserial. I think it best to try to avoid using this kludge.
There are some brands of UARTs that uses a very high divisor to set high speeds. There isn’t any satisfactory way to use “setserial” (say set “divisor 32770”) to get such a speed since then setserial would then think that the speed is very low and disable the FIFO in the UART.
Crystal frequency is higher than baud_base
Note that the baud_base setting is usually much lower than the frequency of the crystal oscillator since the crystal frequency of say 1.8432 MHz is divided by 16 in the hardware to get the actual top speed of 115.2k. The reason the crystal frequency needs to be higher is so that this high crystal speed can generate clock ticks to take a number of samples of each bit to determine if it’s a 1 or a 0.
Actually, the 1.8432 MHz “crystal frequency” may be obtained from a 18.432 MHz crystal oscillator by dividing by 10 before being fed to the UART. Other schemes are also possible as long as the UART performs properly.
该程序设置spped ，特殊终端符号等。注意和setserial 的区别。
最常用的用法，获得指定串口的tty设置：stty -a -F /dev/ttyS0
设置tty速度 stty 115200 -F /dev/ttyS0
<ctrl+j> ctty sane <ctrl+j>
minicom ctrl+z 无效的解决方法：
启动时加参数 minicom -m 将用ESC -> z 取代<Ctrl-z>