Comments (12)
and sometimes can not recv any data...
from aioserial.py.
Do you have baud and other settings configured correctly?
from aioserial.py.
@changyuheng
yes, i make sure the configure is correct.
self.ins = aioserial.AioSerial(port=self.port,
baudrate=self.baudrate, stopbits=self.stopbit, bytesize=self.databit)
from aioserial.py.
Are you able to get correct information through other terminal applications such as minicom?
from aioserial.py.
yes, i use pyserial-asyncio, it's correct...
from aioserial.py.
Can you please try with pySerial as the APIs of it are more similar with aioserial?
And please also post both code snippets based on pySerial and aioserial and their results here.
from aioserial.py.
I make two serial port COM5
and COM7
, and connect them together, i send very simple data to COM5
, so COM7
can print the data, the code is very simple, just like as the read me:
self.ins = aioserial.AioSerial(port=self.port, baudrate=self.baudrate,
stopbits=self.stopbit, bytesize=self.databit)
while True:
print((await self.ins.read_async()).decode(errors='ignore'), end='', flush=True)
just open a port, and keep reading, and use many other serial port tools to send data.
from aioserial.py.
Hi, I see you may be a Chinese. Do you want to talk in Chinese instead? 中文可能比較方便溝通
from aioserial.py.
可以的。
就是我有2根USB串口线互联,分别对应COM5和COM7, 用串口工具测试收发数据,aioserial的发送总是正常的,但是接收是错误的数据。
from aioserial.py.
Can you please do the same test with both pySerial
and aioserial
, respectively? Please also post the results of both of the tests here. Because the major difference between pySerial
and aioserial
are the async feature of the functions provided in aioserial
, I hope to see 2 similar test codes and their results side by side. Another reason reason I chose pySerial
here for benchmarking is, aioserial
pretty much just call the APIs provided by pySerial
with an async wrapper, the root cause might be in pySerial
.
可以麻煩分別用 pySerial
和 aioserial
做一樣的測試,並把程式碼和結果都在這邊分別列出來嗎?因為 pySerial
和 aioserial
的 API 非常像,差別只在於 aioserial
的 API 是 async,希望您能用相似的測試程式碼分別以二個不同的 library 為基礎做測試,並分別列出結果。選用 pySerial
來做比較除了因為 API 相似外,還因為 aioserial
的所有 API 都是直接以 pySerial
的 API 為基礎,問題很有可能是出在 pySerial
身上。
Test cases:
- pySerial send() -> pySerial receive()
- pySerial send() -> aioserial receive()
- aioserial send() -> pySerial receive()
- aioserial send() -> aioserial receive()
from aioserial.py.
ok, i will do that later, for now i must complete my project stuff first..
from aioserial.py.
Any updates @xzzh999?
from aioserial.py.
Related Issues (19)
- Data never received HOT 5
- class error HOT 3
- get_running_loop is only available in python 3.7 HOT 1
- loop setter and getter point to different members HOT 1
- setting and clearing RTS seems not to work
- Support for opening via `serial_for_url`
- Baud rate of 3000000 is not working, worked with PySerial
- How to process incoming serial data HOT 1
- Getting "coroutine was expected" error while running example HOT 2
- Add tests
- Reading from Two Serial Ports Example HOT 2
- 有读写的例程吗? HOT 1
- Flush unread data
- Serial data missed/skipped
- Collaboration HOT 2
- Communication with arduino sometime error
- `cancel_read()` does not work
- Example in README.MD does not work
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 aioserial.py.