usb

Matlab reading from serial port at specific sampling rate

℡╲_俬逩灬. 提交于 2019-12-13 06:24:37
问题 I am trying to read values from two sensors (on my arduino) that are being sent to the serial port, with the matlab code below. However, it errors saying ??? Attempted to access sensor1(1); index out of bounds because numel(sensor1)=0 and if the error does not occur the results are not accurate. I know this because I simply sent 1 and 2 as the sensor values to the com port and the resulting two arrays contained some zeros too (when one should be all 1's and the other all 2's). Thanks any help

win32_USBDevice is missging from Win32 Classes

孤者浪人 提交于 2019-12-13 05:49:21
问题 I am trying to retrieve PID and VID of a connected USB device. Starting with this line of C# code: System.Management.ManagementClass USBClass = new ManagementClass("Win32_USBDevice"); Then I got exception "ManagementException not found" , Later I run into this link: http://msdn.microsoft.com/en-us/library/windows/desktop/aa394084(v=vs.85).aspx It turned out Win32_USBDevice was not on the list at all. Tried Win32_USBController but didn't get what I wanted. Could anyone let me know if there is

C# Disable/Enable USB ports

元气小坏坏 提交于 2019-12-13 05:31:30
问题 I want to disable/enable all usb ports at once. I tried the following: Changed the registry (with admin privileges): //disable USB storage... Microsoft.Win32.Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR", "Start", 4, Microsoft.Win32.RegistryValueKind.DWord); //enable USB storage... Microsoft.Win32.Registry.SetValue(@"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\USBSTOR", "Start", 3, Microsoft.Win32.RegistryValueKind.DWord); I also tried Hardware

Using Java to access SainSmart 4 Relay with Mac OS 10.8.5 doesn't work

蓝咒 提交于 2019-12-13 05:06:52
问题 I have the issue while using the SainSmart 4 Relay USB with my Mac (10.8.5). I am trying to access over Java while using the d2xx/fdti driver. This is my Java Code: public class Demo { public static void main(String[] args) throws InterruptedException { try { List<FTDevice> fTDevices; fTDevices = FTDevice.getDevices(); for (FTDevice fTDevice : fTDevices) { System.out.println("fTDevice:" + fTDevice); System.out.println("fTDevice.DevType:" + fTDevice.getDevType()); System.out.println("fTDevice

Android USB Debugging on Samsung Infuse 4G

喜欢而已 提交于 2019-12-13 04:33:52
问题 I am trying to test an Android application through the Eclipse plugin on a real device. It is a Samsung Infuse 4G. I believe I have followed all steps on the Android page for testing on devices. First of all, I cannot figure out what the Android OS version is because it does not show up in the settings. I can see that the firmware version is 2.2.1, so I assume I am running that version of Android OS as well. Next, when I connect the device to my computer (running Vista, 64 bit), I get

How can I get pid vid of a usb when it is plugged in?

百般思念 提交于 2019-12-13 03:01:08
问题 I coded with c# in visual studio, windows form application. I want to see pid and vid of a USB when ıt is plugged in. I wrote this code but there is an error in foreach (ManagementObject service in s.Get()) . In s.Get() part. It runs in Form1_Load part but it gets stuck in WNDProc . protected override void WndProc(ref Message m) { base.WndProc(ref m); if(m.Msg == WM_DEVICECHANGE) switch ((int)m.WParam) { case DBT_DEVICEARRIVAL: listBox1.Items.Add("New Device Connected");

Iphone syncing via cable

拈花ヽ惹草 提交于 2019-12-13 02:33:58
问题 I've made an IPhone App that communicates to a service by calling a webservice and exchanging data as xml. For this to take place, there should be WIFI access. What I'm trying to do now is to do the same but in places without WIFI access. The only way I can think of doing this would be through the USB cable (dock cable?). Unfortunately, no amount of searching online has revealed a way to do this. Is it even possible? Does anyone know how to do this? Some pointers on at least where to look for

How do I get the Vendor and Product strings in case of a HID device on Windows?

☆樱花仙子☆ 提交于 2019-12-13 02:07:10
问题 I need to get information about the idProduct and idVendor of a plugged in HID device on my Windows machine. How do I get the USB_DEVICE_DESCRIPTOR for a given HID device? I searched the internet, but I only found examples of devices being queried using the WinUSB library and getting the USB_DEVICE_DESCRIPTOR. My understanding that I cannot use WinUSB for plugged in HID device. What do I need to use for a HID device then? 回答1: If you're using HidLibrary, you can get a device like this:

Identifying a device by retrieving its USB ID

我怕爱的太早我们不能终老 提交于 2019-12-13 00:35:53
问题 I'd like my application to be able to detect a where a particular USB device has been mounted, and adapt accordingly. Ideally, I'd associate paths with a USB serial number, rather than with a given path. However, I cannot figure out a simple way to access these unique IDs from VB.Net code. Has anybody succeeded in doing this? 回答1: You should use WMI to query for the Win32_USBControllerDevice class. Here is a blog entry showing some sample code with Powershell which you should be able to adapt

How to detect USB device in Android tablet which acts as USB Host?

冷暖自知 提交于 2019-12-12 22:01:31
问题 This question was migrated from Android Enthusiasts Stack Exchange because it can be answered on Stack Overflow. Migrated 7 years ago . I have tried developing a sample app with the help of the code from Developers.android.com. My code looks like this public class MainActivity extends Activity { UsbManager manager; HashMap<String, UsbDevice> deviceList; Button scanButton; UsbDevice device; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);