Comments (5)
Hello @pandakka, this looks strange indeed. If there is data on the rx line after the port gets opened, than I would expect it to be received.
Just the overcautious question: Is there actually data sent to the serial port you are running the snipped above on?
Could you please cross-check the reception of data with this serial port using a second adapter, crossed RX and TX lines, and hardware_check.rs
from the latest main branch? For example:
$ cargo run --release --example hardware_check -- --loopback-port /dev/tty.usbserial-11230 /dev/tty.usbserial-11240
Transmitting data back and forth between these two serial ports, should report success like (at least for the test cases not using flow control):
Testing paired ports '/dev/tty.usbserial-11240' and '/dev/tty.usbserial-11230':
Transmitting from /dev/tty.usbserial-11240 to /dev/tty.usbserial-11230...
At 2000000,8,n,1,noflow...
success
success
At 115200,8,n,1,noflow...
success
success
At 57600,8,n,1,noflow...
success
success
At 10000,8,n,1,noflow...
success
success
At 9600,8,n,1,noflow...
success
success
At 9600,8,n,1,softflow...
success
success
At 9600,8,n,1,hardflow...
success
success
from serialport-rs.
@sirhcel Thank for your help ! Thank you for your advice๏ผ that I find my embedded linux board have a little diffent from PC,which need take some special setting ๐
Now it works. Thanks again : )
from serialport-rs.
I'm glad to hear that! So there is nothing more to do here.
May I just ask out of curiosity what finally caused the data not being received?
from serialport-rs.
Maybe is my first time touch embedded programing, I try a lot and find the path is /dev/ttymxc3 ๐.
By the way available_ports() works well on my pc .But on my board side file style in "/sys/class/tty/ttymxc3/device/* is different ,which may cause the function() can't find the port ,so i need try by my hand๐.
from serialport-rs.
This sounds like you are running into #66 on your embedded device. On Linux without libudev, the enumeration is done using sysfs and apparently the paths from /sys
and not the actual devices files from /dev
are returned.
What's your environment on the target? Is udev really not available there? How are you buildilng serialport-rs and your application for the embedded target? Could you please leave a comment in #66 if you are building without udev support?
from serialport-rs.
Related Issues (20)
- Missing serial_number HOT 4
- Encountered a problem during the process of making this library into a Flutter plugin HOT 8
- Bootstrap (or resurrect) a cross-platform port-to-port serial transmit/receive test application HOT 4
- UsbPorts are detected as PciPorts on Raspberry Pi 4b HOT 9
- Dependency on unmaintained crates HOT 12
- Publish 4.2.2 version on crates.io HOT 2
- Type of a serialport HOT 2
- Last port.write does not send all bytes on FTDI dongle HOT 7
- Serial write stalls application on some Windows machines HOT 7
- Windows USB001 possible? HOT 2
- Wrong informations with Com port HOT 2
- FlowControl::Hardware not set on Siliconlabs Ember dongle on Linux HOT 9
- Linux: `serialport::available_ports()` returns generic USB strings instead of actual descriptor values HOT 3
- Add supported architecture HOT 2
- After dropping lock serialport is still locked HOT 5
- New release? HOT 8
- Hardware flow control permanently asserts RTS HOT 2
- how to open a COM port with serialport::new in Windows HOT 1
- Read not reading all the data off a TTY port HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serialport-rs.