当前位置:网站首页>1315_Use the LOOPBACK simulation mode to test whether the pyserial installation is successful
1315_Use the LOOPBACK simulation mode to test whether the pyserial installation is successful
2022-07-30 04:47:00 【grey_csdn】
All learning summary: GreyZhang/g_serial: Some serial learning notes which may be usefull in embedded system debugging. (github.com)
I tried the installation of pyserial and the generation of documents before. This time I found a way to test whether the package was successfully installed.
The working way of pyserial I found two kinds from the document, one is to use the physical real serial port to communicate directly, and the other is the simulation mode.

There is such a chapter in the documentation, in fact, there are some corresponding instructions here.

I mainly read the loop:// URL here, and after reading it, I found that this is actually a simulated behavior.For this, in fact, you can do a functional test of a basic software package, without the need for an actual serial port physical device.At first, I may have misunderstood and thought that LOOP may be related to loops. In fact, this is the abbreviation of LOOPBACK.

In another place in the document, there is an example of reading by line, which uses the above URL.In fact, this example can be used directly as a test example for a simple module test.Next, transcribe the code to do a test.

An error occurred in my test environment, I tried to make some changes to the code.

Remove this part directly.After that, the effect of the test:

The test passed, but this actually means that there is no interactive information of the serial port.In fact, I can try to modify the above content again to see how the serial port information can be obtained.


This is the modified code and the effect of running. The interactive information of the serial port can be seen initially.However, this test feels that the execution speed is not very fast in my test environment, and the reason for this has not been found for the time being.
边栏推荐
- 模拟问题(中)
- Chapter8 支持向量机
- Shanxi group (enterprises) in the second network security skills competition part problem WP (8)
- Become a qualified cybersecurity, do you know this?
- 2.6 Merge Sort
- Small program npm package--API Promise
- 成为一个合格的网安,你知道这些吗?
- Unity3D Application simulation enters the front and background and pauses
- SaaS多租户数据隔离的三种解决方案
- 2.5 Quick Sort
猜你喜欢

模拟问题(中)

斐波那契数列的递归优化《备忘录递归》

六、读取应用配置+日志配置

1315_使用LOOPBACK模拟模式pyserial安装是否成功的测试

Xiamen SenseCore Technology MC3172(1): Introduction and Environment Construction

复现XXL-JOB 任务调度中心后台任意命令执行漏洞

2.6 Radix sort (bucket sort)

nSoftware.PowerShell.Server.2020
![handler+message [message mechanism]](/img/4b/981d5eb2f1afc98a4ceab38c505325.png)
handler+message [message mechanism]

Introduction to Thymeleaf
随机推荐
"Translation" Envoy Fundamentals, this is a training course, make people to more quickly using Envoy Proxy..
Golang eight-legged text finishing (continuous handling)
解决报错SyntaxError: (unicode error) ‘utf-8‘ codec can‘t decode byte 0xb7 in position 0: invalid start b
五、视图解析与模板引擎
POJ1321 棋盘问题(详解)
Shanxi group (enterprises) in the second network security skills competition part problem WP (7)
js 操作在当前日期加减(天、周、月、年数)
See you in shenzhen!Cloud native to accelerate the application building special: see cloud native FinOps, SRE, high-performance computing scenario best practices
[Android development] Splash interface / user agreement and privacy policy pop-up window / interface development
The Azure developer news 丨 memorabilia in July
三、依赖配置管理
How with Mexico Volkswagen VW EDI connection to Mexico
How to use labelme
(Problem practice) Conditional probability + weight line segment tree + FWT + suffix array
Excellent MySQL interview questions, 99% must ask in preparation for August!I can't pass the interview
Introduction to database - MySQL simple introduction
Chapter8 Support Vector Machines
1315_使用LOOPBACK模拟模式pyserial安装是否成功的测试
Simulation problem (below)
Plan for many situations in the processing chain