当前位置:网站首页>Using SylixOS virtual serial port, serial port free implementation system
Using SylixOS virtual serial port, serial port free implementation system
2022-08-10 21:28:00 【ScilogyHunter】
In the blog "Open the second serial port command line of the virtual machine", I talked about how to make the virtual machineThe serial port is connected to the virtual serial port or physical serial port of the Windows system.In the simulator, not all platforms have a second serial port, only bsp support is required, and at most there can only be a second serial port but not a third or fourth serial port.For an actual physical board, the number of serial ports is naturally fixed.
So, can you add any virtual serial port to SylixOS like the virtual serial port on Windows?The answer is yes, the author has recently developed a set of SylixOS virtual device related programs, one of which is to create virtual character devices.The virtual serial port is a character device, so it is natural to create a virtual serial port. In fact, the virtual character device is designed according to the character device framework, and does not care about the specific device type, and the device name can be arbitrarily specified.
Start a virtual machine and view the device list as follows. It can be seen that the system currently has only one serial port, and it has been used as a system command line.
Next, install the VCD virtual character device kernel module
Create a virtual device "dev/tty1"

Start a serial port application, the function is to return the received content as it is.At the same time, use the network debugging assistant to connect the socket of the virtual serial port, and send data to it to see if there is a response.

View the current status of the virtual device
printen command is used to dynamically enable or disable the debugging printing of the corresponding virtual device for test analysis.

This example logic diagram
Another practical scenario is: Originally, the device and the host computer are connected through the serial port for debugging, but the actual device development and the host computer development are not in the same city, so the same logical connection can be achieved with the help of virtual serial port and intranet penetration.


To sum up briefly, the virtual serial port (or any virtual character device) is installed and run as a kernel module (either a physical machine or a virtual machine, no difference), and the vcd command is provided, which can be freely created and viewed through command operations.Delete the virtual device.One end of the virtual device provides a standard device file interface, which can be called indiscriminately by applications (compared to the real device);Software such as application programs, virtual serial ports, or network-to-serial ports.The application is very flexible and convenient.
From now on, you can add as many virtual serial port devices as you like, no matter whether you are using SylixOS as a virtual machine or a physical machine, for application calls.
边栏推荐
- ACM模板笔记:最长不下降/上升子序列
- Before implementing MES management system, these three questions to consider
- ENVI自动生成地面控制点实现栅格影像的自动地理配准
- LeetCode-498-对角线遍历
- 突破次元壁垒,让身边的玩偶手办在屏幕上动起来!
- Future-oriented IT infrastructure management architecture - Unified IaaS
- 社区分享|货拉拉通过JumpServer纳管大规模云上资产
- 2021DASCTF实战精英夏令营暨DASCTF July X CBCTF 4th
- D. Game With Array
- 论配置化系统的配置
猜你喜欢

【Windows】你不能访问此共享文件夹,因为你组织的安全策略阻止未经身份验证的来宾访问,这些策略可帮助保护你的电脑

【PCBA scheme design】Bluetooth skipping scheme

直播课堂系统08-腾讯云对象存储和课程分类管理

优化是一种习惯●出发点是'站在靠近临界'的地方

【SQL刷题】Day3----SQL必会的常用函数专项练习

LeetCode-402-移掉K位数字

JS中的filter、map、reduce

C#【必备技能篇】Hex文件转bin文件的代码实现

Mark!画出漂亮的神经网络图!神经网络可视化工具集锦搜集

带你一文读懂SaaS版多租户商城系统对多品牌企业的应用价值
随机推荐
Application of Spatial 3D Model Reconstruction Based on Pix4Dmapper - Spatial Analysis and Site Selection
DDL:CREATE 创建数据库——《mysql 从入门到内卷再到入土》
[Golang]如何优雅管理系统中的几十个UDF(API)
ArcGIS自动随机生成采样点的方法
PostgreSQL — Installation and Common Commands
Auto.js找图找色常用功能
图数据库(Neo4j)入门
基于Pix4Dmapper的运动结构恢复法无人机影像三维模型重建
C#【必备技能篇】Hex文件转bin文件的代码实现
PPT的两个实用技巧
PostgreSQL 介绍
GAN CFOP
2022.8.9 模拟赛
DDL:ALTER 修改数据库——《mysql 从入门到内卷再到入土》
Live Classroom System 09--Tencent Cloud VOD Management Module (1)
apr_thread使用内存之谜
这些不可不知的JVM知识,我都用思维导图整理好了
npm warn config global `--global`, `--local` are deprecated. use `--location=global` instead.
《mysql 从入门到内卷再到入土》——Mysql基础 学习笔记目录
PostgreSQL — 安装及常用命令