当前位置:网站首页>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.
边栏推荐
- 全流程调度——Azkaban入门与进阶
- Protobuf compound data types, speaking, reading and writing
- 2.5 Quick Sort
- 【线性表】- LeetCode力扣三道练习题详解
- Discourse Custom Header Links
- Small programs use npm packages to customize global styles
- [C language] Program environment and preprocessing
- (RCE) Remote Code/Command Execution Vulnerability Vulnerability Exercise
- 1315_使用LOOPBACK模拟模式pyserial安装是否成功的测试
- file system two
猜你喜欢
Go study notes (84) - Go project directory structure

Discourse 自定义头部链接(Custom Header Links)

See you in shenzhen!Cloud native to accelerate the application building special: see cloud native FinOps, SRE, high-performance computing scenario best practices

DAY17、CSRF 漏洞

Discourse Custom Header Links

Excellent MySQL interview questions, 99% must ask in preparation for August!I can't pass the interview

2.6 Merge Sort

Some understanding of YOLOv7

How with Mexico Volkswagen VW EDI connection to Mexico

VUX Datetime 组件compute-days-function动态设置日期列表
随机推荐
Chapter8 Support Vector Machines
1. Get data - requests.get()
Xiamen SenseCore Technology MC3172(1): Introduction and Environment Construction
Protobuf compound data types, speaking, reading and writing
Some understanding of YOLOv7
KubeMeet 报名 | 「边缘原生」线上技术沙龙完整议程公布!
22. Why do you need a message queue?What are the advantages of using the message queue?
Verify that the addShutdownHook hook takes effect
String Problem (Part 1)
QT(39)-vs development qt program prompts that the source file cannot be opened
file system two
Naive Bayes Classification
WPF recursively obtains the list of specified control types in the form
山西省第二届网络安全技能大赛(企业组)部分赛题WP(九)
Go 学习笔记(84)— Go 项目目录结构
- B + tree index and MySQL series 】 【 what is the difference between a HASH index
Shanxi group (enterprises) in the second network security skills competition part problem WP (8)
模拟问题(中)
聊一聊什么是SaaS,以及遇到的问题......
Simulation problem (middle)