如何从usb端口连接设备读取数据 [英] how to read data from usb port connected device

查看:416
本文介绍了如何从usb端口连接设备读取数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个测量温度的设备,它通过usb连接到我的电脑,现在我想显示设备显示屏的温度我要在我的窗体中显示,我怎么能完成这个任务,我是全新的到这种类型的任务



1.依次连接usb端口

2.我打开了端口。



但我不知道如何阅读数据...



请帮帮我....









thx提前

解决方案

首先,您必须知道此设备如何向您的代码公开。它是通过COM(串行)端口还是什么?在不知情的情况下,与设备通信是不可能的。



如果有,请参阅设备和/或SDK上的文档。

只需阅读本文,



C#USB HID接口 [ ^ ]



这应该希望完全帮助您,从这里只是从它获取数据的进展,我相信这将有助于您构建你在USB上的逻辑。



谢谢


I have a device that measures temperature and it is connected through usb to my pc, now i want to display the temperature in device display i want to display in my windows form, how can i achieve this task, i am completely new to this type of task

1. connected to usb port successively
2. i opened the port.

but i don't know how to read data...

please help me....




thx in advance

解决方案

First, you have to know how this device exposes itself to your code. Is it through a COM (serial) port or what? Without knowing that, it's IMPOSSIBLE to talk to the device.

Consult the documentation on the device and/or the SDK for it, if there is one.


Just read this,

C# USB HID Interface[^]

This should hope fully help you and from here just progress fetching data from it, i am sure this will help you build your logic on USB.

Thanks


这篇关于如何从usb端口连接设备读取数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆