usb接口

Getting USB Device path from USB port

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am looking for a sample that gives USB device path (\?\usb#vid_04a9&pid_1097#207946#{28d78fad-5a12-11d1-ae5b-0000f803a8c2}) using USB port name (USB001). I got a sample to get the device path of all installed ports. But I want to map USB port to USB printer Device path. Code: static const GUID GUID_DEVINTERFACE_USBPRINT = {0x28d78fad,0x5a12,0x11D1,0xae,0x5b,0x00,0x00,0xf8,0x03,0xa8,0xc2}; HDEVINFO devs; SP_DEVINFO_DATA devinfo; SP_DEVICE_INTERFACE_DATA devinterface; GUID intfce; PSP_DEVICE_INTERFACE_DETAIL_DATA interface_detail; ULONG

UsbManager.getDeviceList() returns empty

匿名 (未验证) 提交于 2019-12-03 02:31:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to use the UsbManager API by wrote following code: In the Activity code: UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE); HashMap<String, UsbDevice> deviceList = manager.getDeviceList(); Log.d(TAG, "size =" + deviceList.size()); In the Manifest: <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" /> <permission android:name="android.hardware.usb.host" > </permission> <uses-feature android:name="android.hardware.usb.host" android:required="true" /> I also followed this question , checked my Galaxy

PyUSB ValueError: No backend available

匿名 (未验证) 提交于 2019-12-03 01:58:03
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am runing Python 2.7.8 at Win 7 operation system. I am trying to communicate a USB device (Numato 32 channel GPIO device) by PyUSB. I downloaded walac-pyusb-7071ad3 from URL: http://walac.github.io/pyusb I stop at receiving "ValueError: No backend available". Could any Python expert tell me where is wrong? Here is the code: import sys import usb import usb.core import usb.util import usb.backend.libusb1 backend = usb.backend.libusb1.get_backend(find_library=lambda C:'\Python27') numato = usb.core.find(idVendor=00000006,idProduct = 00000000

Pyusb on Windows 7 - NotImplemented Error :is_kernal_driver_active

匿名 (未验证) 提交于 2019-12-03 01:48:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using escposprinter python library for printing my data in thermal printer. It depends on pyusb. the library is working fine in linux . While in windows 7 ,i get the it have some issues. Here are output i get. File "main.py", line 1, in <module> from app import app File "D:\freeth-in-erp-60ab8eb96fad\app\__init__.py", line 94, in <module> from .api_routes import * File "D:\freeth-in-erp-60ab8eb96fad\app\api_routes.py", line 44, in <module> from .printer import pos File "D:\freeth-in-erp-60ab8eb96fad\app\printer\pos.py", line 14, in

Access to serial port for windows store apps

匿名 (未验证) 提交于 2019-12-03 01:45:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am looking for a solution to send an escape sequence to a serial port in a windows store app. Maybe my understanding of windows store apps is wrong. I don't want to run this app on a windows RT device, but on a normal windows 8 PC. I know, that windows RT devices do only support very less communication with connected devices, but not serial ports. 回答1: Well, as I know it's not possible to do something like that by using WinRT library. It's sandboxed and you can't access lots of features Windows OS is supplying. Your only choice is to

How to access USB port using pySerial (Windows)?

匿名 (未验证) 提交于 2019-12-03 01:26:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am trying to open USB port in Python (using pySerial). I ran port listing tool, but it only shows COM ports. I'd like to open USB port instead (trying to communicate with tablet, but that's not relevant, I suppose). I know it is possible (and quite easy) on Linux, but I am on Windows 8, so there's nothing like "/dev/tty...". I'd like to show you some of my code, but I can't, because I have none yet (I need to know how to open USB port to be able to start coding, I am just testing yet). Maybe I will have to install some other module, but I

How app can access files on USB OTG storages in Android 6.0 (API level 23) without root?

匿名 (未验证) 提交于 2019-12-03 01:23:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Android 6.0 Developer Preview (API level 23) can natively mounts external removable USB OTG storages out-of-the-box without any additional apps (for more info please see: https://goo.gl/0UvsyN ). When user connects USB OTG storage, it shows up in the system storage menu and it is accessible with the built-in file manager. User can access all files on the USB OTG external storage using the new built-in file manager without root rights. When I connect my USB OTG storage to my Android device, it mounts at /storage/A03E-1DF5 and also at /mnt

Which drivers are used by usb mouse in linux kernel?

匿名 (未验证) 提交于 2019-12-03 01:17:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I read from LDD3 chapter 14 about hotplug drivers.I need to write a usb mouse driver which load when I plug the hardware. Now, doing some experiment I come to know that there is a driver named "hid-generic" which is called when plug-unplug. [ 6654.232046] usb 3-1: new low-speed USB device number 3 using uhci_hcd [ 6654.462061] usb 3-1: New USB device found, idVendor=093a, idProduct=2510 [ 6654.462067] usb 3-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 6654.462071] usb 3-1: Product: USB OPTICAL MOUSE [ 6654.462074] usb 3-1:

USB type-c headset detection in Android

匿名 (未验证) 提交于 2019-12-03 01:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: Sorry for question. It's my first time here. I did some search on net but no result. Really need help to clarify this problem. I have two question about USB headset detection and status query. My target device is running Android version 7.1.1. The device has a USB type-c connector and support USB type-c headset. However it seems AudioService will not send intent when USB headset status changed. Does OEM have to implement his own intent for this case? For traditional wire headset, I can use AudioManager.isWiredHeadsetOn() to check it's status

PyUSB 1.0: NotImplementedError: Operation not supported or unimplemented on this platform

匿名 (未验证) 提交于 2019-12-03 00:59:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I just began to use pyusb, and basically I'm playing with the sample code here . I'm using Windows7 64 bit, and downloaded the zip version from https://walac.github.io/pyusb/ . Backend is libusb-1.0.19 that is downloaded the windows binary from http://libusb.info/ . All of my code is: dev = usb . core . find ( idVendor = 3544 , idProduct = 9736 ) if dev is None : sys . stdout . write ( "No device found" ) return ; print "deviceClass = " + str ( dev . bDeviceClass ); for cfg in dev : sys . stdout . write ( "configuration: " + str (