LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   [help]how to set baud rate up to 230400 in linux? (https://www.linuxquestions.org/questions/programming-9/%5Bhelp%5Dhow-to-set-baud-rate-up-to-230400-in-linux-594462/)

uni_apollo 10-25-2007 05:40 AM

[help]how to set baud rate up to 230400 in linux?
 
I do a serial commucation in a embedded which cpu is s3c2410,and run 2.4.18 linux,I want to set a baud rate to 230400 or high, but it is said that the high baud rate in linux is 115200, if you want set higher baud rate you should change kernel.In fact, i didn't change kernel and compile the program in 230400 baud rate , but it does't work,what should i do?

rjlee 10-25-2007 07:58 AM

You haven't said how you are trying to set the baud rate.
The basic shell command to set the baud rate of the nth serial port is
Code:

setserial /dev/ttySn baud_base 230400
You should probably try this and see if it makes any difference. If not, it could be that you also neet to set the uart. For details try:
Code:

man setserial
Looking around on Google, it seems like there are several ways to get high-speed serial comms, and it largely depends on what kind of serial port hardware you are using. http://mhonarc.axis.se/dev-etrax/msg06754.html is one example.

You might also try upgrading your kernel; newly supported hardware features are being added all the time and 2.4.18 was released in Febuary 2002 (the current "backport" version is 2.4.35, which may be your safest bet). I don't know if high-speed serial support has been added, but this may be an easier upgrade than having to apply kernel patches and so on by hand.

Hope that's of some help,

—Robert J Lee


All times are GMT -5. The time now is 02:06 AM.