usb

Two webcams on one usb hub - bandwidth issues

最后都变了- 提交于 2019-12-18 09:07:14
问题 I'm using OpenCV 2.3 to capture video from two webcams on a Linux computer(Ubuntu 10.04) which only has one USB hub. I'm getting an error "videoc_streamon: No space left on device" when cv.QueryFrame is called for the second camera the first time and "vidioc_qbuf: invalid argument" on subsequent calls. I know that this is a USB bandwidth issue, so I tried lowering the resolution to 320 x 240 with cv.SetCaptureProperty, which appears to not change anything (confirmed by a call to cv

Eject Memory card from Card Reader C#

南楼画角 提交于 2019-12-18 07:23:07
问题 I have a custom developed USB card reader. I am using the following code to interact and iterrate over the device: http://www.codeproject.com/KB/system/usbeject.aspx The code above provides an 'eject' method using the following line: Native.CM_Request_Device_Eject_NoUi(device.InstanceHandle, IntPtr.Zero, null, 0, 0); However this 'eject' method unmounts the entire drive instead of simply ejecting the media card. Why this is a problem is because I want to 'eject' the media card, then put in a

detect usb drive/device using delphi

主宰稳场 提交于 2019-12-18 07:15:43
问题 i can't figure out the formatting rules here .. too many lines of code in my example to add 4 spaces to each line, so here is the link to the code i need help with http://nitemsg.blogspot.com/2011/01/heres-unit-written-in-delphi-7-that-you.html The problem I have is that I don't know enough about delphi to use this code with a form. I am a drag and drop programmer only. An example with a showmessage('friendly name =' + ... ) when a USB device is detected is what I need. cheers, 回答1: If you

Control USB ports

雨燕双飞 提交于 2019-12-18 07:09:31
问题 can i send specific signals to USB ports using Ruby or C++, also the operating system is Windows, so this is like totally new 4 me (to program for windows), so i'm trying to do it as a DLL file, can this DLL contain Ruby code ?? by the way this is just a training project, so it dosn't matter that much, i'm just practicing on those stuff under windows. 回答1: I see two separate questions here. So I'll try to anwser them separatly. How to control USB Devices from your code Yes you can control USB

UWP app cannot find/connect to USB device

。_饼干妹妹 提交于 2019-12-18 06:13:03
问题 I am trying to make a UWP app which connects to a USB device and then executes a series of commands, like retrieving data from the internal sensor (think of an accelerometer). I started of with following these guidelines: https://msdn.microsoft.com/en-us/library/windows/hardware/dn303343(v=vs.85).aspx So, I also tried making a blank app, and adjusted the manifest accordingly: <Capabilities> <DeviceCapability Name="usb"> <Device Id="vidpid:1CBE 0003"> <Function Type="classId:ff 00 00" /> <

C# detect usb device ClassCode (usb device type)

岁酱吖の 提交于 2019-12-18 05:47:45
问题 I need to know what kind of USB devices currently used in system. There is a USB specification about class codes of USB devices. But I cant get device type, WMI request WQL: select * from Win32_UsbHub give null values on Class code, Subclass code, Protocol type fields. Any ideas how to detect USB device type currently in use? My current code: ManagementObjectCollection collection; using (var searcher = new ManagementObjectSearcher(@"Select * From Win32_USBHub")) { collection = searcher.Get();

Read/write on a pen drive using libusb: libusb_bulk_transfer()

♀尐吖头ヾ 提交于 2019-12-18 05:18:10
问题 I am trying to perform read and write operations on a pen drive. Details: Vendor ID: 8564 and Product ID: 1000. It is a Transcend JetFlash mass storage device. I am keen to know that whether it is possible to achieve a read/write on a pen drive. If it is, then is it going to happen the way I have tried in the code provided below. I have learnt the methods to get the device id, product id and endpoint addresses. This is what I have implemented. Here the device is getting acknowledged and

transfer files from android to computer via usb programmatically

别说谁变了你拦得住时间么 提交于 2019-12-18 04:54:31
问题 I am looking for a solution which uses Android API to transfer a text file from an Android powered device to a computer through USB cable. I have found USB host but I cannot use this because the computer can not act as a device for the Android host. Do you have any suggestions how I can achieve this? 回答1: I have solved this problem by using adb status-window to continuously check for device status, and when a new device is connected, the required files are transferred to the computer using

How to send data to USB device in node.js using libusb

。_饼干妹妹 提交于 2019-12-18 04:11:33
问题 I have try to get data from device (USB thermometer), following this docs https://www.npmjs.org/package/usb, but I have not any result. For getting themperature data from device, I should send the data like that 'd\n'. This is my code: var usb = require('usb'), term = usb.findByIds(65535, 2); term.open(); var endpoints = term.interfaces[0].endpoints, inEndpoint = endpoints[0], outEndpoint = endpoints[1]; inEndpoint.transferType = 2; inEndpoint.startStream(1, 64); inEndpoint.transfer(64,

How to send data to USB device in node.js using libusb

无人久伴 提交于 2019-12-18 04:10:03
问题 I have try to get data from device (USB thermometer), following this docs https://www.npmjs.org/package/usb, but I have not any result. For getting themperature data from device, I should send the data like that 'd\n'. This is my code: var usb = require('usb'), term = usb.findByIds(65535, 2); term.open(); var endpoints = term.interfaces[0].endpoints, inEndpoint = endpoints[0], outEndpoint = endpoints[1]; inEndpoint.transferType = 2; inEndpoint.startStream(1, 64); inEndpoint.transfer(64,