LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
LinkBack Search this Thread
Old 12-31-2008, 05:14 AM   #1
agostain
LQ Newbie
 
Registered: Dec 2008
Posts: 5

Rep: Reputation: 0
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
 
Old 01-01-2009, 12:27 AM   #2
asymptote
Member
 
Registered: Mar 2008
Posts: 236

Rep: Reputation: 37
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.
 
Old 01-02-2009, 03:37 AM   #3
agostain
LQ Newbie
 
Registered: Dec 2008
Posts: 5

Original Poster
Rep: Reputation: 0
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 !!!!
 
Old 01-02-2009, 07:56 AM   #4
asymptote
Member
 
Registered: Mar 2008
Posts: 236

Rep: Reputation: 37
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assistance With Termios Settings Please Peatmoss Linux - Newbie 3 06-01-2008 09:54 PM
managing termios for ser ports DavidHB Linux - Software 2 09-21-2006 07:37 AM
problem with serial port in loopback mode .. (termios) mta Programming 1 06-06-2006 11:56 AM
Figuring out a 'c_oflag'(man termios) that will help in stdout supression. Tarts Programming 13 08-11-2003 09:04 AM
Baudrate support mritunjay Linux - Networking 0 03-19-2002 06:16 AM


All times are GMT -5. The time now is 11:16 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration