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
I implemented a small application to interact with a serial port that controls some stuff. While the involved USB-to-UART converter (CH340N) officially seems to support only the common baud rates, the original driver for this device used a baud rate of 10000. For whatever reason that seems the only baud rate to be reliably working.
While working on my application I noticed that the serialport library seems to default to a baud rate of 9600, atleast that is what port.baud_rate().unwrap() returns. I dumped the systemcalls of a reliably working Python script and my application and noticed following call missing from my application:
Neither setting the baud rate with serialport::new nor setting the value before opening it with baud_rate seems to change anything. Any suggestions how I could get that custom baud ate properly running?
The text was updated successfully, but these errors were encountered:
I need serialport-rs to support setting arbitrary baud rates.
This is the current state of things attempting to force serialport-rs to use 14400 by calling open_native():
Available serial ports: /dev/ttyS0 /dev/ttyUSB0 /dev/ttyS1
Using: /dev/ttyUSB0
thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/serialport-4.3.0/src/posix/tty.rs:558:18:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I implemented a small application to interact with a serial port that controls some stuff. While the involved USB-to-UART converter (CH340N) officially seems to support only the common baud rates, the original driver for this device used a baud rate of
10000
. For whatever reason that seems the only baud rate to be reliably working.While working on my application I noticed that the serialport library seems to default to a baud rate of
9600
, atleast that is whatport.baud_rate().unwrap()
returns. I dumped the systemcalls of a reliably working Python script and my application and noticed following call missing from my application:Neither setting the baud rate with
serialport::new
nor setting the value before opening it withbaud_rate
seems to change anything. Any suggestions how I could get that custom baud ate properly running?The text was updated successfully, but these errors were encountered: