Dana ponedeljak 11. februar 2002. 19:46 napisali ste: > On Mon, 11 Feb 2002, [utf-8] Duško Rusmir wrote: > > No at all 38400 : 20 = 1920 > > Right is 115200 : 20 = 5760 > > 5760 don't work although it is a possible dividor 20! > > I think you misunderstand me. The baud_base of a 16550a _is_ > 115200. There is no way for setserial to change it. It is not > progammable. You are allowed to change it in case you have some > other hardware, but if you do, you only make the comm driver > calculate the wrong divisor for whatever speed the app asks for, > and generally confuse everyone. > > In this example, I set the baud base to 38400, open the comm > port at 38400, and the actaul DTE speed reported by the modem is > 115200. Then I use a speed of 19200, and the DTE speed is 57600. > Unfortunately, neither of my modems will work at 5760, so I > can't show you exactly that > > with a baud_base 115200 spd_cust divisor 20 > 38400 is really 5760. 19200 is 19200. 57600 is 57600. but > 38400 is 5760. > > 9600 works also fine. > > 115200 : 12 = 9600 but it works whit 115200 and divisor 0!!! > > The serial driver only uses divisor when the comm port is opened > at 38400 and the spd_cust flag is set. otherwise it calculates > a divisor >from speed and baud_base. All Right, I have unterstand. > > Yes, I can't get 5726 from 38400, 57600 or 115200 at all, but > > it works in Windoze very well. I think it is a Way to get > > 5726, but Gates don't give the source. > > Windows might give the appearance of working at 5726, but I bet > it is really using 5760 or 7200 or something. Yes, app want 5726 I write 38400, app got 5760 and work! > > I have tryied some possibility. > > Take a Look on Attachment Wine-COM.tgz, please. > > > > Thanks much, I am waiting for resolution. I think I have the Solution. Make two scripts: first for 5760: baud_base 115200, spd_cust divisor 20, call 38400 from app "setserial /dev/ttyS0 baud_base 115200 spd_cust divisor 20" second for 9600: baud_base 115200, spd_cust divisor 0, call 9600 from app "setserial /dev/ttyS0 baud_base 115200 spd_cust divisor 0" Put one in /etc/init.d/boot.local and if I which others Baudrate call others script. > AFAICT, you didn't try it the way I suggested. > > baud_base 115200 spd_cust divisor 20 > _and_ > ... baudrate 38400 > in one of the logs. Yes I have forgotten this, but now I have tried and have got success with 5760. Take a Look on Attachment Wine-COM1.tgz, please. Thanks many for Yours Help, this is very nice from You. -- MfG / With best Regards Rusmir Duško Registered Linux user: #130654 http://counter.li.org
Attachment:
Wine-COM1.tgz
Description: GNU Zip compressed data