从已经在通信的USB端口捕获数据 [英] capture data from already communicating usb port

查看:73
本文介绍了从已经在通信的USB端口捕获数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我用usb端口将设备连接到电脑。我运行连接到设备的软件并读取所需信息。



我正在寻找能从该端口捕获数据的代码。我只需要自定义数据并准备设备软件无法提供的不同报告。



有人可以帮我这个吗?



谢谢你,

rizz

Hi,

I connect my device to my pc with usb port. i run the software which connects to the device and reads the required information.

I am looking for a code which will capture the data from that port. I just need to customise the data and prepare a different report which the device software is not able to.

can anyone please help me on this?

Thank you,
rizz

推荐答案

问题是你在想您可以将USB端口视为串行或并行端口。你不能。看看USB代表什么:Universial Serial BUS 。这是一个扩展总线,与主板上的插槽不同。它不是一个端口。



你能够拦截通信的唯一方法是使用内核级代码,特别是编写USB客户端驱动程序。



如果您不知道我在说什么,请启动 here [ ^ ]。可以找到更多资源此处 [ ^ ]



祝你好运!



哦!我差点忘了......你不会在VB.NET或C#中这样做。好吧,除非你喜欢在你的代码中重写大量的C常量,枚举,结构......,以及PInvoking所有类型的驱动函数。
The problem is that you''re thinking that you can treat the USB "port" the same as a serial or parallel port. You can''t. Look at what USB stands for: Universial Serial BUS. It''s an expansion bus, not unlike the slots on your motherboard. It''s not a port.

The only way you''re going to be able to intercept communication is with Kernel-level code, specifically, writing a USB Client Driver.

If you don''t know what I''m talking about, start here[^]. More resources can be found here[^]

Good Luck!

Oh! I almost forgot... You''re not going to do this in VB.NET or C#. Well, not unless you like rewriting lots of C constants, enums, structures, ..., in your code and PInvoking all kinds of driver functions.


这篇关于从已经在通信的USB端口捕获数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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