-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
RTPS Serial Port Initialisation Insufficient #9428
Comments
I agree. Can you send a PR please? |
drisebor
added a commit
to drisebor/Firmware
that referenced
this issue
May 8, 2018
…ion. As per issue PX4#9428, this code change locks down the termios configuration for the UART to non-canonical, binary tx/rx, 8 bits, 1 stop bit, no parity.
PR done. It should be ok. It's a very comprehensive lockdown of the Termios configuration. |
LorenzMeier
pushed a commit
that referenced
this issue
May 11, 2018
…ion. As per issue #9428, this code change locks down the termios configuration for the UART to non-canonical, binary tx/rx, 8 bits, 1 stop bit, no parity.
Solved. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The msg/templates/urtps/microRTPS_transport.cpp file only sets up one of the termios configuration flags for the serial port, ie in UART_node::init() :
// Clear ONLCR flag (which appends a CR for every LF)
uart_config.c_oflag &= ~ONLCR;
This causes unpredictable behaviour on some platforms depending on the previous serial port setup.
When running posix_sitl_rtps on Ubuntu, accessing the same serial port beforehand as used for RTPS using PuTTY but with different settings causes serial communications to fail (no bytes received). For example setting up odd parity using putty prevents any communication over RTPS. Communication may also fail immediately after Ubuntu boots.
The setup code needs to be modified to lock down all relevant flags and variables in termios to non-canonical, binary transmit and receive, 8 bits, 1 stop bit, no parity, which is what RTPS over serial on the Pixhawk currently defaults to.
The text was updated successfully, but these errors were encountered: