LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
  Search this Thread
Old 10-26-2015, 10:06 AM   #1
btsavage
LQ Newbie
 
Registered: Oct 2015
Posts: 1

Rep: Reputation: Disabled
Setting Baud Rate on Ubuntu 14.04


I have a C++ application that requires the ability to dynamically change the baud rate of a serial port. My test setup is one machine with Ubuntu connected to a windows PC using TeraTerm. The send/recieve works fine and I can change the baud rate on the linux box using the stty from the command line. However, my calls to tcgetattr/tcsetattr are not returning error but do not change the baud rate.

Any advice?
 
Old 10-26-2015, 11:50 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,879
Blog Entries: 13

Rep: Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930Reputation: 4930
Post your code. The proper procedure is tcgetattr(), cfsetspeed(), tcflush(), and tcsetattr()
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
serial USB converter baud rate noir911 Linux - Hardware 1 02-02-2008 06:33 PM
Need help setting serial port baud rate to 4800. mathew1468 Linux - Hardware 2 07-14-2006 03:06 PM
Change the network baud rate zaheer031 Linux - Software 1 05-15-2006 11:37 PM
Setting Baud Rate on Comm2 Question steve_f60 Linux - General 2 06-21-2005 01:30 PM
rs232 at non-standard baud rate possible? scgadgets Programming 1 09-14-2001 08:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 12:04 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration