如何通过USB线发送命令并接收答案? [英] How do I send a command and receive an answer over a USB cable?
问题描述
我希望能够通过连接到我的Windows 10计算机的USB电缆控制我的Ham Radio,FT-991。我不知道如何使用C#访问USB电缆。任何建议都将不胜感激。
I want to be able to control my Ham Radio, FT-991, through the USB Cable connecting it to my Windows 10 computer. I have no idea how to access the USB cable using C#. Any suggestions would be greatly appreciated.
谢谢,
GaryBob41
GaryBob41
推荐答案
你好GaryBob41,
Hi GaryBob41,
感谢您在此发帖。
无法直接从窗口中的用户模式应用程序访问USB设备(或任何其他设备),这是由设备$ b完成的$ b driver。以下链接将给你一些解释。
HTTP://www.d eveloperfusion.com/article/84338/making-usb-c-friendly /
据我们所知,如果您想通过USB发送/接收数据,可以使用SerialPort类连接串口。
有一个关于如何通过SerialPort Class使用SerialPort类
的链接。
https://msdn.microsoft.com/en-us/library/system.io.ports.serialport.aspx
此外,您可以参考以下链接,您可以选择您的要求。
https://social.msdn.microsoft.com/Search/en-US?query=send%20data%20to%20USB%20device&beta=0&ac=8 跨度>
最好的问候,
Wendy
这篇关于如何通过USB线发送命令并接收答案?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!