usb

Monitoring (Sniffing) /dev/ttyUSB0 created by FTDI USB Serial Converter

落爺英雄遲暮 提交于 2019-12-10 17:35:56
问题 I want to monitor (sniff) the traffic of my /dev/ttyUSB0 which is created by FTDI USB Serial Converter. I've written my own application in Windows and now I try to port it to linux and use /dev/tty/USB0. I want to debug the communication that actually happens. The software strace is not an option for me because it only shows the syscalls to ioctl. Using Windows the software "Free Serial Port Monitor" did it by sniffing COM1. Output of dmesg: [16975.000221] usb 7-1: new full-speed USB device

I'm having trouble finding example code for libftdi's mpsse (SPI) mode

a 夏天 提交于 2019-12-10 17:06:32
问题 This is not a homework problem, though it is a work problem. Where months ago, I would have just written up a specification and the boss would have contracted it out, money's tight. So I'm trying to do this myself. I'm a weak C coder, and I'm lucky if gcc spits out something that will run without segfaulting, or sometimes anything at all. Still, I manage. Libftdi is built, I've carefuly perused both its example executables/code, and the documentation. But I'm still lost. Does anyone know of a

Killing power to a USB port

与世无争的帅哥 提交于 2019-12-10 17:02:40
问题 Is there a way to programatically turning off the power or killing a USB port on the Mac? 回答1: I believe that the USB power typically comes directly from the power supply. It might go through the motherboard or some other hardware to combine it with the data lines, but I don't think the voltage ever goes through any programmable circuitry. If you wanted to deactivate the data transfer, that would probably be possible since that is handled by an extension file (IOUSBMassStorageClass.kext), but

Trouble installing custom inf in Windows 10 Professional. Windows overrides it with OEM driver

拈花ヽ惹草 提交于 2019-12-10 16:54:29
问题 I have made a signed USB Serial inf file for a custom device and created an installer that successfully installs the driver to Windows 7 (32/64), Windows 8.1 (64) but not Windows 10. This applies to the default installation (right-click, install) directly on the file, using Device Manager and using PNPUTIL. The device driver successfully installs but the OEM usbser driver is used instead. After clicking "Update Driver" and selecting my driver in Device Manager, Windows prompts me with "The

What is an Alternate Setting in a USB interface?

眉间皱痕 提交于 2019-12-10 16:39:58
问题 What is an Alternate Setting? Example of device that needs them? The USB spec has a lot of talk about them, but never tells what one is and - most importantly - why I would use one. I never saw a USB device that uses alternate settings. 回答1: Alternate setting is used to provide the advantage of having two configurations on the fly even though the device has only one configuration. The alternate setting of a USB interface is define by the bAlternateSetting attribute in the Standard Interface

Register(/bind/match) a device with a driver

纵饮孤独 提交于 2019-12-10 15:47:59
问题 I am writing a usb driver (for a gamepad) on linux, and when I plug it in, ti loads usbhid. How can I make it so it loads my driver (gp_driver)? I did the unbind usbhid and bind to my driver trick, but I don't want to do it every single time. Should I have my driver already loaded? Should I code something in my driver? I have the vendor and product id in my driver.. thanks 回答1: You will want to create a udev rule for your device, which can take care of creating your device file, setting

Detecting input from any USB HID in C# using HidLibrary

点点圈 提交于 2019-12-10 15:36:46
问题 First of all i am new to C#. I want to create an application that detects any usb hid device (I have used HidLibrary and it detects the HIDs) but i want to get input from the hid as well (I have used Raw input but that doesn't work i think its only for keyboards). for example if i have connected a mouse then any type of input from that mouse either movement or clicks will cause a function to run. All i want to know is that which function is executed in the HidLibrary when an input comes from

Programmatically restart USB device in Windows

吃可爱长大的小学妹 提交于 2019-12-10 15:33:37
问题 Some software I am developing requires the presence of a USB device (which I interact with as a SerialPort, with a USB-to-UART bridge). Sometimes, after a computer is being restarted from hibernation, the device is not being detected, and I can no longer write to, or read from, the device through its serial port. Having read/write access to the device is necessary. I cannot rely on the user to take any action (physical or otherwise), so I need a way to restart the device programmatically. How

Controlling voltage supply on usb port using c or any programming language

心不动则不痛 提交于 2019-12-10 11:56:20
问题 I don't have much konwledge in electronics. i wanted to turn on/off led connected to usb port using program. usb port consists 4 line (data+,data-,voltage ,ground) if i connect voltage and ground lines to led , it will glow. i've been searching on internet this issue and i find that it is not possible to control led connected to usb using program because supply over datapin is too low which can not be used to tun on off led. but what if i connect my led to vol and ground pin and control the

UWP USB (Hid) Device Won't Connect

我们两清 提交于 2019-12-10 11:41:27
问题 This is my Hid library. It supports UWP, and Android. https://bitbucket.org/MelbourneDeveloper/hid.net/src/master/ This is an example of the library being used with the Trezor hardware wallet: https://github.com/MelbourneDeveloper/Trezor.Net I can connect to the Trezor with no problem on UWP, but I cannot connect to the KeepKey or Ledger which are other hardware wallets. This is the code I use to connect to both devices in my library. It looks through a list of devices, tries to connect and