Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong Baudrate for Baudrate >=460800 are possible #4

Closed
StefanD986 opened this issue Dec 13, 2015 · 3 comments
Closed

Wrong Baudrate for Baudrate >=460800 are possible #4

StefanD986 opened this issue Dec 13, 2015 · 3 comments

Comments

@StefanD986
Copy link

@StefanD986 StefanD986 commented Dec 13, 2015

When screen is used as a serial port interface client, Baudrate >= 460800 is set, the actual Baudrate falls back to a level of 9600 Baud.

Steps to reproduce:

  1. Connect a USB<-->Serial converter (most popular are probably the FTDI chips, or some Arduino thing)
  2. Open the Serial port with a baudrate of 460800 with screen (the device may be different on other computers): screen /dev/tty.usbserial-1421A 460800
  3. Transmit something and observe the actual speed of the transmission e.g. with an oscilloscope / Logic analyzer / bus pirate

(I guess the bug can also be traced on code level. Oscilloscope was just the easiest way for me.)

@StefanD986

This comment has been minimized.

Copy link
Author

@StefanD986 StefanD986 commented Dec 13, 2015

Note: The same bug occurs with the version of screen that comes with OSX.
But it does not occur in the version that comes with Ubuntu 14.04 (which comes with screen version 4.1.0~20120320gitdb59704-9)

@StefanD986

This comment has been minimized.

Copy link
Author

@StefanD986 StefanD986 commented Feb 2, 2016

I finally found a solution. I wrote about it here: https://cervisial.wordpress.com/2016/02/02/using-serial-adapters-with-baudrates-230400-on-osx/
So the problem doesn't seem to be specific to screen.
In short: stty can be used to set the correct baudrate. But OSX resets the terminal to the wrong baudrate again. So stty has to set the baudrate, and then send to the background and immediatly after that screen (or any other terminal program) can be used to open the serial terminal with the intended baudrate:

stty -f /dev/cu.usbserial-141A 460800 & screen /dev/cu.usbserial-141A 460800

@FreedomBen

This comment has been minimized.

Copy link
Owner

@FreedomBen FreedomBen commented Feb 2, 2016

Interesting, thanks for the followup @StefanD986

@FreedomBen FreedomBen closed this Feb 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.