usb

How to get device descriptor and configuration descriptor of usb device in Mac?

谁说我不能喝 提交于 2019-12-06 01:46:53
I have minimum exposure to xcode and I/Okit framework. I have seen device descriptor and configuration descriptor of a usb device in USB prober. I have written an xcode program using I/O kit framework which gives the usb device name as output, when we give product id and vendor id of that device as input. /*Take the vendor and product id from console*/ printf("\nEnter the vendor id : "); scanf("%lx",&usbVendor); printf("\nEnter the product id :"); scanf("%lx",&usbProduct); /* Set up a matching dictionary for the class */ matchingDict = IOServiceMatching(kIOUSBDeviceClassName); if (matchingDict

Enum USB devices in Linux/C++

眉间皱痕 提交于 2019-12-06 01:39:00
Im writing IO routines for a linux device that will have various and changing USB devices connected to it. To this end I need to be able to figure out which device is connected to which port so I can open it with the correct software. Something akin to 'udevinfo' would be ideal but I have no idea how to start in writing such. Suggestions on c++ apis to read? Take a look at libudev++ . It seems to be what you're looking for. See libusb 's libusb_get_device_list , libusb_get_bus_number , libusb_get_device_address . GIO should help you in that. Connecting to the volume-added and volume-removed

USB Driver Installation Issue for Microcontroller using Custom INF

℡╲_俬逩灬. 提交于 2019-12-06 01:13:01
I'm working with the NXP LPC1788 microcontroller and I'm trying to create a driver on the host computer to communicate with it via USB. I believe that I've managed to get the device handling standard USB requests properly (the PC is able to read the string descriptors properly). I'm having trouble writing a sample USB driver and installing it for the device, though. I'm working with Microsoft Visual Studio 2013. My steps were: Creating a WinUSB Application, which produces a "Driver" and "Driver Package" project. Modifying the generated INF file to use my device's VID and PID. Building the

USB relay commands

╄→尐↘猪︶ㄣ 提交于 2019-12-05 23:15:09
I have this USB Relay: http://www.ebay.com/itm/5V-USB-Relay-2-Channel-Programmable-Computer-Control-For-Smart-Home-/141097843081?pt=LH_DefaultDomain_0&hash=item20da163989 Al I need is to send close/open to the device (to turn on & off an LED light) How can I do that using C# or C++? Thanks Boaz Here's what you need (tested on Linux) : HIDAPI from http://www.signal11.us/oss/hidapi/ USBRELAY from https://github.com/darrylb123/usbrelay/blob/master/README.md Use it like : usbrelay ZG4HU_1=1 usbrelay ZG4HU_1=0 to switch the first relay on and off. ZG4HU_2 addresses the second relay and without

iOS USB HID programming

邮差的信 提交于 2019-12-05 19:15:42
I am trying to make some code regarding USB HID devices. I have found an article about Bluetooth programming which uses Game Kit Framework . Now I'm looking for some tutorial or maybe some code to work on connecting HID device via USB. Where should I look? Is Game Kit the right way? Is it difficult to implement communication between iOS and HID device? You can use IOKit for USB, but it's a private framework on iOS - so it depends if you want to deploy to the App Store. Here is the USB Intro for Mac , I'm not sure if it's the same on iOS - but just to get the idea. Actually I just found out

How can I use Java to communicate to device through USB port?

别说谁变了你拦得住时间么 提交于 2019-12-05 18:22:34
问题 I just recently learn Java and try to communicate to the device through USB port connection. I've have used C# with OpenNETCF which allows me to send file and retrieve file on the device through USB port; how can I achieve this with java? I seearch on stackoverflow thread, How to communicate with a USB device under Windows and Java?, the comment made by christoffer is to hack the native code, but I don't quite which native code api that he referred to. RAPI, maybe? 回答1: The only USB API I

How to change Android usb connect mode to charge only?

痞子三分冷 提交于 2019-12-05 18:15:13
问题 I've seen HTC android devices have connect mode selection when connected to PC via usb line, while mine always pops up a USB massive storage device dialog with a button turn on massive storage , which is boring, because sometimes my line could be loose, and off/on randomly, so the pop up always show up suddenly and intrudes my input when I'm doing something else. Is the a way to fix this? 回答1: The HTC devices have the PCSII.apk which allow them to select usb connect mode. For your device, you

How to determine USB port version on Windows?

大城市里の小女人 提交于 2019-12-05 17:52:21
I'm running Windows 7 and Python 3.5. Once USB stick is connected, my goal is to identify what port version (2.0, 3.0, 3.1) is it connected to and what version of USB is supported by USB stick. Any thoughts are appreciated. You should look at USBView by Microsoft. It uses Windows APIs to get information about each USB port and each device and display it. This information includes what speeds the USB port supports and speed the device is using. You can run it as a GUI or you can run it with an argument like this to make it save its data to text file: usbview /saveall:usb.txt Here is a snippet

UsbConnection.bulkTransfer returns “-1”. What does it mean?

て烟熏妆下的殇ゞ 提交于 2019-12-05 17:17:27
According to the doc negative response means failure. How to know what's wrong? is there any full doc about error types? For more curious: I'm trying to upload arduino sketch via USB. First i'm getting bootloader attention by turning DTR/RTS off/on and then sending data using Stk500 protocol. It's working fine if running on mac/arduino via usb (rxtx serial is used) so i think it should work on android AS-IS (just change serial), but it fails to send the data after DTR/RTS toggling. Well, after diving into log i was able to handle it - don't close/open usb few times in a row From the

Problems trying to get USB Debugging working on Windows 7 (Android)

旧巷老猫 提交于 2019-12-05 16:45:53
I am using Windows 7 64bit and I am trying to get my computer to detect my HTC Desire, but it's not picking it up. I have everything available installed through the Android Updater and I have got my phone running through Ubuntu, so it is definitely a problem with Windows. Does anyone know what's wrong or how to get it working or both? I am using Windows 7 64 bit I have a HTC Desire running Stock 2.2 (Froyo) that works with USB Debugging on my Ubuntu machine Windows does detect that my phone is plugged in. It shows as a mass storage device. I have all the available things installed via the