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 thought maybe it was just my terminal so I wrote some rust to try sending bytes to /dev/ttyUSB0 where the rpi4 was connected:
//using serialport 3.0.0
fn write_to_serial_device(input: &str) {
let port_name = "/dev/ttyUSB0";
let mut settings: SerialPortSettings = Default::default();
settings.timeout = Duration::from_millis(100);
settings.baud_rate = 9600;
match serialport::open_with_settings(port_name, &settings) {
Ok(mut port) => {
if let Err(e) = writeln!(port, "{}", input) {
eprintln!("Error writing to serial port {}: {}", port_name, e);
} else {
println!("Successfully wrote to serial port {}", port_name);
}
}
Err(e) => {
eprintln!("Error opening serial port {}: {}", port_name, e);
}
}
}
that code didnt report any errors when executing, but still nothing was echoed in the console after running it.
fair warning, It is entirely possible that I am just misunderstanding something or making a dumb mistake because I have never worked with embedded rust before this so let me know if I shouldn't have opened this issue :))
The text was updated successfully, but these errors were encountered:
I remember my pi3's serial interface is malfunctioned, so I buy a new pi4 and everything works fine
I think you can test your serial interface on pi3 with some loop back test to see if it's hardware issue, also the usb to serial converter may also be considered as a source of issue
My os: Ubuntu 22
Problem:
I cant input anything, and when I type in characters to the console, nothing is echoed.
I tried running the kernel in qemu, and on my rpi4, but neither worked.
Example output that seems to be working fine from 09:
I thought maybe it was just my terminal so I wrote some rust to try sending bytes to /dev/ttyUSB0 where the rpi4 was connected:
that code didnt report any errors when executing, but still nothing was echoed in the console after running it.
fair warning, It is entirely possible that I am just misunderstanding something or making a dumb mistake because I have never worked with embedded rust before this so let me know if I shouldn't have opened this issue :))
The text was updated successfully, but these errors were encountered: