usb

Android usb enumeration

混江龙づ霸主 提交于 2020-01-01 05:37:06
问题 I am writing an android USB host application for which I am trying to enumerate the devices connected with tablet. I follow the code in the android USB host documentation in the developer site. My code is as follows AndroidUSBActivity public class AndroidUSBActivity extends Activity { /** Called when the activity is first created. */ @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); USBClass usb = new USBClass();

Can I install SQL Server on a USB drive?

邮差的信 提交于 2020-01-01 05:31:09
问题 I'm a developer and I often work remotely when I can rather than commuting to work. I would like to be able to take the dev database environment with me. I know I can access the database remotely, but it slow. I sometimes work where there's no wireless connection. Any ideas? 回答1: Yes, it's possible. See this thread on MSDN. 回答2: You can store the data files on an external drive. The server software itself, though, I'd install naively on each machine you use. This method assumes that your

How do I reset USB devices using the Windows API?

自古美人都是妖i 提交于 2020-01-01 04:59:06
问题 Do you know a way to use the Windows XP API to reset the USB bus? In other words, I'd like the OS to kick out any USB devices that are currently connected, and then auto-detect everything anew. I'm aware of devcon, and I suppose I could do system calls out to it, but I'm hoping for a direct call into the API. 回答1: From kernel mode: You can force a specific USB device to be re-connected, as if it was unplugged and replugged again, by sending an IOCTL_INTERNAL_USB_CYCLE_PORT to its PDO. (This

How to usb-connect android devices with adb under ubuntu [closed]

旧巷老猫 提交于 2020-01-01 04:52:05
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . Other may have experienced problems with adb debugging under ubuntu linux. The symptom is the availability of usb connected android devices e.g. with eclipse. You may test this with adb usb When you get error: insufficient permissions for device you probably run into the same problem like me.

Determine USB device file Path

这一生的挚爱 提交于 2020-01-01 04:37:07
问题 How can i get USB device file path correctly in Linux. I used command: find / -iname "usb" and got the result as below: /dev/bus/usb /sys/bus/usb /sys/bus/usb/drivers/usb /sys/kernel/debug/usb Under /dev/bus/usb i see: 001 002 003 004 005 006 But I think they aren't files as i need. Under /sys/bus/usb/devices/: sh-3.2# ls /sys/bus/usb/devices/ 1-0:1.0 1-1:1.0 3-0:1.0 5-0:1.0 usb1 usb3 usb5 1-1 2-0:1.0 4-0:1.0 6-0:1.0 usb2 usb4 usb6 And Under /sys/bus/scsi/devices/ when i pluged an USB i see:

How can I detect a USB disconnect event? (Windows, .NET C# application)

隐身守侯 提交于 2020-01-01 01:49:12
问题 Currently how I do this is I poll for a masked list of USB devices (masked specifically for the device I'm working with) and if it's there, I continue, if not then I notify the user that the device is not connected. The method for getting a list of USB devices is provided for me through a USB peripheral controller chip manufacturer's .NET library. Is there an event somewhere for a USB device disconnect? 回答1: I ended up using this: http://msdn.microsoft.com/en-us/library/aa363480(VS.85).aspx

Sending hex over serial with python

守給你的承諾、 提交于 2020-01-01 00:23:12
问题 This weekend I am going to make a little project. Got a solarcell inverter (Danfoss ULX 3600i) which I will try to connect to my linux machine, to see if I can grab the data from it, how much energy created eg for stats. There is an input for RJ45 connection on it, but with RS485. I got the cables to connect it through my usb port in the pc with an RS485 converter in between the pc and the inverter. I am then writing a small python code to make request. However I cant figure out how to send

Sending hex over serial with python

拜拜、爱过 提交于 2020-01-01 00:22:07
问题 This weekend I am going to make a little project. Got a solarcell inverter (Danfoss ULX 3600i) which I will try to connect to my linux machine, to see if I can grab the data from it, how much energy created eg for stats. There is an input for RJ45 connection on it, but with RS485. I got the cables to connect it through my usb port in the pc with an RS485 converter in between the pc and the inverter. I am then writing a small python code to make request. However I cant figure out how to send

How to detect USB device in Android

半腔热情 提交于 2019-12-31 23:13:13
问题 I have USB host android device for that I need to connect USB device. to detect usb device to host I written following code. public class ReadData extends Activity { UsbManager usbManager; PendingIntent mPermissionIntent; UsbDevice usbDevice; Intent intent; @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_read_data); usbManager = (UsbManager) getSystemService(Context.USB_SERVICE); final String ACTION_USB

How to communicate with USB 3G modem?

好久不见. 提交于 2019-12-31 21:34:46
问题 I have a D-Link DWM-156 3G USB modem that I want to send AT-commands to from my application (C# .NET 4.0 running on Windows XP SP3). After plug-in and installation of drivers the modem shows up like this: In Device Manager , two serial ports are added: D-Link HSPADataCard Diagnostics Interface (COM4) D-Link HSPADataCard NMEA Device (COM5) In Control Panel, Phone and Modem Options , a new modem is added: D-Link HSPADataCard Proprietary USB Modem (attached to COM19) QUESTION: Which com port