usb

What's going on after DTR/RTS is sent to an FTDI-based Arduino board?

末鹿安然 提交于 2019-12-10 09:11:11
问题 I'm working over a sketch to enable uploading from an Android device to an Arduino board, and it works for Duemilanove (FTDI-based) and Arduino Uno (ATmega-based) when testing for PC/Arduino using rxtx (pure Java). But it does not work when using the USB-Android library as the setDTR/setRTS methods are not yet implemented. FTDI Android drivers allow the sending of setDTR/setRTS signals, but it fails to send/read data after it. So the problem is in the Android USB API and I can't figure out

Windows PC as a USB slave to emulate a thumbdrive

不羁岁月 提交于 2019-12-10 04:24:36
问题 I need to create a application that will allow a Windows PC (XP/Vista) to emulate a thumbdrive. That is, when the PC is plugged into either another Windows system, or in this case, a piece of hardware that allows for USB thumbdrives to be plugged in, a folder on the computer looks like a giant thumbdrive. Any thoughts on where a guy would start to investigate this? Update (more specific description): I need to connect my PC to one of the newer multifuction devices that support scanning to a

Can't receive broadcast Intent of UsbManager.ACTION_USB_DEVICE_ATTACHED/UsbManager.ACTION_USB_DEVICE_DETACHED

萝らか妹 提交于 2019-12-10 03:36:39
问题 I am coding an USB host App recently, but it's stucked because I can't detect the device attached/detached event, I followed the coding note of http://developer.android.com/guide/topics/connectivity/usb/host.html and refer to other's coding in the network, After checking several times, I still can't find the problem. After my debugging, it seems that the UsbManager.ACTION_USB_DEVICE_ATTACHED/UsbManager.ACTION_USB_DEVICE_DETACHED intent is not happened, Because I try to use Context

Get access to USB device on Linux (libusb-1.0)?

自古美人都是妖i 提交于 2019-12-10 02:37:39
问题 I am writing a small program to communicate with a specific USB HID product (identified by vendor and product IDs), using libusb-1.0 on Linux. Right now, I have to run the program as root because "libusb requires write access to USB device nodes". Is there a way to change the permissions on the device I need so that I don't need to run my program as root? 回答1: On modern Linux systems, udevd ( man 7 udev ) creates the device nodes for USB devices when they're plugged in. Add a udev rule that

VirtualBox从USB设备启动

佐手、 提交于 2019-12-10 02:04:17
方法/步骤 1. 将系统盘下的C:\WINDOWS\system32\cmd.exe 文件,复制到你的VirtualBox的安装目录下. 比如我的: D:\>copy "C:\WINDOWS\system32\cmd.exe" "D:\Program Files\Oracle\VirtualBox" 2. 运行VirtualBox安装目录下的cmd.exe 3. 生成usb.vmdk 在打开的cmd输入: VBoxManage internalcommands createrawvmdk -filename F:\usb.vmdk -rawdisk \\.\PhysicalDrive1 或者事先在记事本里编辑好,在复制也可以。 3.1 注意下: -filename后面 F:\usb.vmdk这句指的是:在F盘内建了一个usb.vmdk文件。 - -rawdisk后面的 \\.\PhysicalDrive1这句指的是:你的U盘的磁盘编号,就是上面显示的U盘编号1。 如果不是编号1的,请自行修改为其他编号。如:编号为2,应该为\\.\PhysicalDrive2。 通过磁盘管理器,可查看。可直接运行命令diskmgnt.msc查看. 执行命令后,得到返回结果。如下图: 再查看下对应磁盘下是否创建了usb.vmdk文件. 4. 现在打开VirtualBox,并新建一个VM 5. 点击设置

Accessing USB port programmatically

落爺英雄遲暮 提交于 2019-12-09 23:58:05
问题 I was doing some work on MSP430 series MCU. I have designed a GUI (using wxPython). Now I want to control microcontroller with GUI, but I can't find any modules in python that can send data to the USB port so that the microcontroller can identify it. Does there exist any module that can send and receive data to/from USB port? Thanks in advance. 回答1: libusb is what you're after. PyUSB may be worth taking a look at also. 回答2: Does the board expose a serial port over the USB? If so, I highly

libusb - How to select an alternate setting of a usb-soundcard for stereo recording?

那年仲夏 提交于 2019-12-09 23:52:38
问题 I have a USB sound card that has the following setup and allows for stereo recording with 48000hz 2 channels 16 bit, so I'm trying to set it up that way: UsbConfiguration[mId=1,mName=null, mAttributes=160, mMaxPower=50, mInterfaces=[ UsbInterface[mId=0,mAlternateSetting=0,mName=null,mClass=1,mSubclass=1,mProtocol=0, mEndpoints=[] UsbInterface[mId=1,mAlternateSetting=0,mName=null,mClass=1,mSubclass=2,mProtocol=0, mEndpoints=[] UsbInterface[mId=1,mAlternateSetting=1,mName=null,mClass=1

Android USB I/O

百般思念 提交于 2019-12-09 22:58:55
问题 OK, so i have seen all the stuff about how acting as a USB host is impossible on vanilla android, but is there anything in the Android API that would allow an app to override the default USB behavior in order to manually control the USB i/o responses, in order to support some other protocol? I have not seen anything that would facilitate this, but is it possible without hacking the kernel? This seems like the sort of thing which should be relatively easy, but i haven't found anything. Forgive

Android detect headset plugin through USB port

笑着哭i 提交于 2019-12-09 20:51:56
问题 There is a new technology of headset that soon will be popular with more devices. Devices has a type-C jack only without 3.5MM jack (Aux), and I would like to detect a plugin connection for listen music. The regular way to detect Aux connection is ACTION_HEADSET_PLUG Please help me find a solution for this problem. Thanks. 来源: https://stackoverflow.com/questions/38498831/android-detect-headset-plugin-through-usb-port

WinUSB Installation

China☆狼群 提交于 2019-12-09 19:34:40
问题 I wanted to experiment a bit with WinUSB. I've installed the WinDDK and I'm about to create my first INF-file for my driver. I'm following the MSDN guide to do this. The guide contains a sample INF file and the instructions to "changing USB_Install in section names to an appropriate DDInstall value". Fair enough, only problem is I have no idea what 'appropriate DDInstall values' are. I'm not really an expert with INF files and I can only guess that the guide probably wants me to change the