de-vri-es / serial2-rs

Cross platform serial ports for Rust
Other
41 stars 10 forks source link

List available_ports not work #1

Closed josejachuf closed 2 years ago

josejachuf commented 2 years ago

Hi @de-vri-es I see that it is a new project. Congratulations

I tell you, yesterday I tried to use the example [1]. I did not give me a mistake, but do not list the port with the serialport crate [2] if it works fine.

Jose

[1] https://github.com/de-vri-es/serial2-rs/blob/main/examples/list-ports.rs [2] https://docs.rs/serialport/4.0.1/serialport/

de-vri-es commented 2 years ago

Hey,

Thanks for reporting the issue. Could you tell me a bit more about your system? Listing serial ports is very platform specific. Are you on Linux, Windows, macOS, BSD, and which version of that OS?

Could you also tell me which serial port you were trying to use, and what the name/path of the device should be? For example, on Linux it could be called /dev/ttyUSB0, or on Windows it could be called COM6.

josejachuf commented 2 years ago

Hi, I'm using FreeBSD 13.0-Release I hope to find the port: /dev/cuaU0 I was not trying to use it, but to list it

de-vri-es commented 2 years ago

Thanks for the information, that really helps! I was basing the expected port names on this: https://docs.freebsd.org/en/books/handbook/serialcomms/

I've added ttyU* and cuaU* to the list for FreeBSD. Could you test again using the main branch to verify that it now picks up the port correctly?

josejachuf commented 2 years ago

In Linux works fine. tomorrow I will try something more in FreeBSD and I will tell you

josejachuf commented 2 years ago

Now works fine in Freebsd.

Found 2 ports /dev/ttyU0 /dev/cuaU0

Thanks very much

de-vri-es commented 2 years ago

Thanks for testing! I've released the fix as 0.1.4.