LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   set baudrate to 256000 within termios.h (https://www.linuxquestions.org/questions/linux-hardware-18/set-baudrate-to-256000-within-termios-h-694033/)

agostain 12-31-2008 05:14 AM

set baudrate to 256000 within termios.h
 
hello,

i need help to manage a usb<->serial adapter which uses a ftdi chip. i have to implement a C programm that communicates with the /dev/ttyUSB0. my problem is to configure my serial ports baudrate. the communication speed of my device is 256000 baud per sec. and in the termios.h lib there isn't declared such baudrate. does anybody know how i can configure my device with that baudrate???

thanks

asymptote 01-01-2009 12:27 AM

You're dealing with things that I could never possibly comprehend but I'm just going to suggest something and if it's way off I apologize in advance. I need to use my laptop to configure network devices like switches and routers and I use a program called Minicom. I have a PL203 cable that goes from USB (laptop) to Serial (network device) and Minicom allows the user to set the baud rate for communication.

agostain 01-02-2009 03:37 AM

yes i know minicom. i've tried to use it but you can't set a custom baudrate. the one which is near 256000 is 230400 but i need to set it to 256000. in winXP all works fine. perhaps i have to modify the driver of the ftdi chip??? i have read a lot of stuff about ftdi and i found out that i can set the baudrate via application. hope someone can help me !!!!

asymptote 01-02-2009 07:56 AM

Another suggestion and again this is WAY over my head but if you can understand the source code of minicom, could you just modify the source to allow for different baud rates than those that are listed? Minicom probably depends on some intricate library that is difficult to modify or if you modify it your whole system will crash but that was the first thought that came to mind. There has to be some way to set a custom baud rate.


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