开发语言 C#中实现串口通讯和网口通讯(使用SerialPort和Socket类) - xmlns:local="
仅作自己学习使用
1 准备部份
串口通讯需要两个调试软件commix和Virtual Serial Port Driver,分别用于监视串口和创造虚拟串口。网口通讯需要一个网口调试助手,网络上有很多资源,我在这里采用的是微软商店中的TCP/UDP网络调试助手,其中也有和commix一样功能的串口调试模块。
第一个软件是这样的: 资源在这里:免费下载:Commix 也可以前往官网下载:Bwsensing— Attitude is everything 点击Download即可
第二个软件是这样的: 官方下载链接:Virtual Serial Port Driver
第三个软件是这样的: 可以看到其实这个软件也有串口通讯调试的功能。 官方下载链接:TCP UDP网络调试助手
2 串口通讯
2.1 Xaml代码
界面做得很丑,能用就行,关键是原理:
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WPF_ZhaoXi_0205" 拼多多帮助力入口
mc:Ignorable="d"
Title="MainWindow" Height="450" Width="800">,开发语言