获取串口连接的设备名称
我搜索如何获取连接到串口的材料的设备名称。
我有两种不同类型的材料可以在上面连接。
第一个:打印机(只接收数据,不发回任何数据) 第二个:余额(只发送数据,不接收任何内容)
我如何区分这两种类型的材料?
谢谢。
I search how to get the device name of the material connected to the serial port.
I've two different types of material that can connect on it.
First one : a printer (only receives data and send nothing back)
Second one : a balance (only send data and receives nothing)
How can I distinguish this two types of material?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
试试这个:
try this:
没有识别串行端口 (UART RS232) 设备的通用方法。
除非设备有特殊命令,您可以发送到设备并让它响应识别信息,否则您无能为力。
通常,依赖于串行端口的应用程序会有一个标准设置屏幕,用户可以使用该屏幕来配置设备连接到的串行端口、波特率、奇偶校验位、停止位和数据位等端口配置。如果可以在同一端口上切换多个设备,则操作员将负责在与目标设备通信之前为目标设备选择正确的配置。
这是 USB 等新技术的优势,其中设备识别已内置于标准中。
There is no univeral way of identifying serial port (UART RS232) devices.
Unless the devices have special commands that you can send to the device and have it respond with identifying information there is not much you can do.
Typically application that rely on the serial port will have a standard setting screen that the user would use to configure the serial port the device is connected to, port configuration for things like baud rate, parity bits, stop bits and data bits. If mutiple devices can be switched on the same port, the operator would then be responsible for selecting the correct configuration for the target device before communicating with the device.
This is the advantage of newer technologies like USB etc. where device identification is built into the standard.
http ://www.seeques.com/20766280/the-port-name-is-illegal-or-couldnt-be-connected-to-the-device.html
端口名称非法 错误消息如何就这样……菲奥.!
http://www.seeques.com/20766280/the-port-name-is-illegal-or-couldnt-be-connected-to-the-device.html
the port name is illegal how is an error message like that...fio.!
这在 win11 上不起作用,有时在 win10 上不起作用,请尝试这个,使用带有参数 hwids =ports 的 devcon.exe
This wont work on win11, and win10 sometimes, Try this instead, use devcon.exe with the argument hwids =ports