You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A proposed solution might be to split the try-catch in the serial device constructor into sections and try one more time with serial_dev.native_handle() and ioctl if the baud rate option causes an exception.
MAVROS version and platform
Mavros: N/A
ROS: N/A
Ubuntu: 22.04
Best regards,
Alex
The text was updated successfully, but these errors were encountered:
I'd rather not to reinvent the wheel with that termios (as it were here at early days...).
That is true, but what is the alternative if we have to deal with hardcoded baud rates in ASIO? It worked well for me until now.
Also are you sure, your UART works fine on such high rates?
Ardupilot specifies literaly "Most stm32-based boards can support rates of up to 1500". Hardware-wise serial ports on modern controllers might work at 12.5 MBaud/s in PPP mode. On my end 1500000 bps and 2000000 bps work fine even with finicky cables.
Issue details
Serial port baud rates are dependent and restricted by the version of asio. Particularly, in the serial_port_base.ipp some baud rates might be missing but still supported by the OS with termios/termios2/ioctl. In my case, it is the 1500000 baud rate which throws the Device exceptio within MAVROS but works fine if set manually. In the latest asio master it is still missing.
https://github.com/chriskohlhoff/asio/blob/62481a25be6cf78cbe714419a4462fd89bd84ab9/asio/include/asio/impl/serial_port_base.ipp#L93C8-L101C40
A proposed solution might be to split the try-catch in the serial device constructor into sections and try one more time with serial_dev.native_handle() and ioctl if the baud rate option causes an exception.
MAVROS version and platform
Mavros: N/A
ROS: N/A
Ubuntu: 22.04
Best regards,
Alex
The text was updated successfully, but these errors were encountered: