Mocking USB input

前端 未结 5 794
庸人自扰
庸人自扰 2020-12-03 20:08

Our product includes some custom hardware, that connects to a PC via USB. We\'ve started looking into automatic testing, but so far I\'m unable to find a tool that can recor

相关标签:
5条回答
  • 2020-12-03 20:30

    Mocking usb devices using umockdev

    Umockdev is a linux based application which record the behaviour as well as properties of hardware and run the software independent of actual hardware it is running on. Hardware devices can be simulated in virtual environments without disturbing the whole system.It currently supports sysfs, uevents, basic support for /dev devices, and recording/mocking usbdevfs ioctls (for PtP/MTP devices). It helps for creating integration test for hardware related libraries.

    source code and examples

    umockdev home page

    0 讨论(0)
  • 2020-12-03 20:41

    I don't know if any USB analyzers have option for replay they have for sure option for record. Right now I can think of only LeCroy but there are others companies that make USB analyzers. But they cost similar, LeCroy would be rather top price. Here you should get fair comparison of USB analyzers and their price. www.osronline.com/article.cfm?id=533 (have to register to see article)

    0 讨论(0)
  • 2020-12-03 20:46

    Hardware solution,

    Do you want to generate USB traffic. It's long since I used it, but the CATC protocol analyzer can also generate traffic. http://www.lecroy.com/tm/products/ProtocolAnalyzers/usbtt.asp?menuid=67 And off course, you can write scripts to generate these traffic ...

    Software solution,

    Write your own application to send packets to the USB bus driver, and also check the usbview (shipped with Windows DDK) source code. You can send data directly to any USB pipe. This is less expensive, but a bit difficult than the hardware solution ...

    HTH

    0 讨论(0)
  • 2020-12-03 20:46

    There are a couple of test tools on the usb.org tools page, not sure if that's what you need.

    0 讨论(0)
  • 2020-12-03 20:49

    You can develop a simple program using Usblib. Its easy to use.

    0 讨论(0)
提交回复
热议问题