Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 892841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T14:07:30+00:00 2026-05-15T14:07:30+00:00

I have a USB device I’m trying to communicate with over a virtual serial

  • 0

I have a USB device I’m trying to communicate with over a virtual serial port provided by the ftdi_sio kernel module. However, I’m having some trouble setting the baud rate of the port to 14400:

  • termios.h doesn’t specify a constant for 14400, so I can’t use cfsetispeed and cfsetospeed.
  • In the source for the ftdi_sio kernel module, baud base is set to 24000000 and there doesn’t seem to be a way to change it. This means I can’t use a custom divisor with the TIOCSSERIAL ioctl and get a 14400 baud rate that way.
  • The module source has a comment making it sound like setting the alt_speed member of the tty_struct structure for the port to 14400 would do what I want, but there doesn’t seem to be any way to set it to 14400 given the existing interfaces.

Does anyone have any ideas about this? It’d be pretty easy to fix this by hacking up the kernel module, but I’m really looking for a solution that doesn’t require kernel changes.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T14:07:31+00:00Added an answer on May 15, 2026 at 2:07 pm

    You can’t change baud base, I suppose it is hardware related. So messing with the module won’t do you any good. In your third point you only talk about the first method proposed for setting a custom baudrate, where you need to access the tty->alt_speed. It seems there is no interface to directly set tty struct from userspace, at least not with the ftdi_sio driver.
    However, there is another method explained in the comments :

         * 3. You can also set baud rate by setting custom divisor as follows
         *    - set tty->termios->c_cflag speed to B38400
         *    - call TIOCSSERIAL ioctl with (struct serial_struct) set as
         *      follows:
         *      o flags & ASYNC_SPD_MASK == ASYNC_SPD_CUST
         *      o custom_divisor set to baud_base / your_new_baudrate
    

    Did you try it ?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.