Using setserial in lInux
HI,
Pls tell me how to use setserial to set the baud rate of the serial port in lInux. Man pages not clear.[ |
To set the com port speed you can do that with stty
stty -F /dev/ttyS0 115200 To setup the DCE speed of the modem you can use setserial like this.. setserial /dev/ttyS0 spd_hi There are some oddities involved with setting the speed of a port however that could actually cause the performance to be reduced using a speed that's too high for the line so testing should be done. With setserial what you set is not actually what you get depending on the hardware. Check this out for a detailed explaination... http://www.ibiblio.org/pub/Linux/doc...dem-HOWTO.html |
this post was helpful to me in that indeed my port was set to 9600 baud.
this is on ubuntu hoary hedgehog this is an external serial modem hooked up to a usb port by a usb--> serial converter. It is at /dev/ttyUSB0 I was able to reset it by stty -F /dev/ttyS0 115200 command, but it is not saving it on reboot. any suggestions thanks dan |
I would add the command string to /etc/rc.local
|
didn't try that here is what I ended up doing:
Apparently udev hasn't been started at all when this module (usbserial)is loaded. So I deferred setting the baud until the very end of the boot process. there is a file called /etc/init.d/bootmisc.sh , which runs at the very end. You can move the stty statement into /etc/init.d/bootmisc.sh. so in essence what i did was sudo gedit /etc/init.d/bootmisc.sh and added stty -F /dev/ttyUSB0 115200 at the very end of the sh file just before it exits. it changes my baud rate from 9600 to 15200 on each boot. is working much better and faster now. This is working very well for me and was suggested to me by a friend....thank you very much for responding. |
I also use a prolific usb to serial converter.How do I set it up to use /dev/ttyS0? It is detected in /dev/ttyusb0
|
I don't use knoppix so I am not familiar with it but on the internet confiuration I simply manually entered it into the network configuration as /dev/ttyUSB0
because it was not able to automatically detect it in ubuntu so I pointed it to the usb. if it has detected it at usb0 what is the problem? I have no idea how to make it see it as a serial port when it is plugged into the usb port am not even sure if you can? |
the problem is that the serial\modem is not working.when I query the modem in kppp it sort of "detects" the modem but there are no lights that show modem activity when I query.Then I detached the modem form the usb to serial converter and query the modem in kppp-it still detects the modem!
so kppp "sees" the usb to serial converter circuitry as the "modem". I'm stumped. BTW,modem and usb converster works perfectly in xp. |
ok found a live knoppix cd laying around.
couldn't get it to boot without freezing up on my amd64 but I think it was the usb mouse/keyboard it was choking on. So booted it up on a 32 bit with ps2 mouse/keyboard.That particular machine has an external serial modem on it. configured kpp dialer it dials but then refuses to connect. seems to me I have had problems with kpp dialer on the other 2 distros i tried also. On fedora core 3, I finally just switched to the gnome desktop and it was a piece of cake. On ubuntu could not get it to work right either. I use the pppconfig for it and then use poff and pon from a terminal. So you might check to see if there is another dialer available for knoppix? Have noticed also on mine that I have to use msn/username for login as I have msn dialup maybe something similar on yours? If i just entered username and password it would not validate. |
Thanks for replying.
Now I use kanotix bughunter.Installed it and I got the touch pad scroll to work.also the usb thumb drive displays its icon on desktop when I plug it in. forgot to mention that the internal modem works on the laptop(toshiba tecra a3).had to install the driver tho.so the kppp dialer works for me. I have an old practical peripherals ext modem which I want to work also and at the same time test the usb to serial conv. |
Problem solved:
ln -b /dev/ttyUSB0 /dev/modem |
cool, what exactly does that string do for you?
|
dmesg shows that the usb-serial conv is in ttyUSB0 so I created a link to /dev/modem to use the modem I connected to the serial side of the converter.Had to google a lot to arrive to this but this is linux so it is all "trial and error".I may have to do the same whenever I connect another serial device.
One of the primary reasons why linux at this stage will never be a "mainstream" OS. |
Quote:
|
All times are GMT -5. The time now is 01:32 PM. |