libusb-1.0

How do I link a simple example project to libusb?

你离开我真会死。 提交于 2019-12-11 19:01:32
问题 I'm trying to make use of LibUSB to interact with a small programmable LED device I've built. I have working code on Windows using the libusb-win32 port but I'm having trouble porting this to the MAC. I've cloned LibUSB to a local git repository and compiled it using XCode I think is the preferred method on the MAC. After a bit of digging (including showing the hidden Library folder), it looks like XCode outputs to /Users/jon/Library/Developer/Xcode/DerivedData/libusb

Difficulty installing python modules after installing anaconda

落爺英雄遲暮 提交于 2019-12-11 17:13:02
问题 I just started working with anaconda. Earlier I was working with Python 2.7 on my system. I was writing a script for devices connected to my laptop via usb. For this, I needed the usb module/package. I initially tried doing in Python 27. I installed using: easy_install libusb1 The output with this is ( screenshot is also there) : Searching for libusb1 Best match: libusb1 1.4.0 Processing libusb1-1.4.0-py3.4.egg libusb1 1.4.0 is already the active version in easy-install.pth Using c:\users\eku

Issues porting libusb USB firmware over to Windows 10

為{幸葍}努か 提交于 2019-12-11 13:43:49
问题 I'm working with a custom USB firmware written in C utilizing the libusb API. The goal is to have this firmware compatible with Linux, Mac, and Windows. Thus far, testing w/a Beaglebone Black with debug probe on Ubuntu & Mac has yielded proper USB enumeration and operations with the respective OS's host application. However, trying to connect the board to Windows 10 results in 'This device cannot start. (Code 10) An invalid parameter was passed to a service or function.' I have primarily been

Android NDK : make: *** No rule to make target. Stop

时光怂恿深爱的人放手 提交于 2019-12-11 04:27:00
问题 I am trying to build libusb using the NDK. Here is my Android.mk and Application.mk I have checked this thread Android NDK: No rule to make target but it didn't work for me. Android.mk include $(CLEAR_VARS) LOCAL_MODULE := libusb LOCAL_SRC_FILES := libusb/core.c libusb/descriptor.c libusb/io.c libusb/sync.c libusb/os/linux_usbfs.c LOCAL_LDLIBS := -llog include $(BUILD_SHARED_LIBRARY) Application.mk APP_ABI:= all APP_LDFLAGS:= -llog APP_STL:= stlport_shared APP_CPP_FEATURES:= exceptions APP

libusb-1.0 debug informations

扶醉桌前 提交于 2019-12-11 01:23:29
问题 I’m wondering if libusb_set_debug() works. I can’t get any output from it. I can turn on debug logging if I configure and build with --enable-debug-log. Should I get about the same output as enable-debug-log if I set libusb_set_debug() to 3? I don’t have the LIBUSB_DEBUG env variable set. I assume I’m missing something simple. Thanks, 回答1: The libusb debugging options don't work as documented. How they actually work is like this: If you configure with --enable-debug-log then, when compiling,

Using libusb in Android application: how to allow application to access USB

我们两清 提交于 2019-12-10 13:05:44
问题 I'd like to use libusb in my Android app (java GUI + native(C++) core). I have already compiled libusb and tried calling its functions, but libusb_open return LIBUSB_ERROR_ACCESS. I suppose there is a problem with USB access permissions, but I don't know how to resolve the issue. So, 2 questions here: 1) How to get libusb running on a rooted Android 3.1 device? 2) Is it possible to use libusb on an unrooted, factory-default device? Thanks in advance. P. S. As for question 1, I've tried chmod

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

Linking libusb in Mac OS X

你说的曾经没有我的故事 提交于 2019-12-09 22:49:51
问题 I have this very simple piece of code that I'm trying to compile. I'm fairly new to GCC from the command line, so please forgive me. I've tried a quite few different things with GCC, but I'm still unable to get it to compile. I do have libusb installed. How can I get this piece of code to compile? Libusb: anything:usb mymac$ brew list libusb /usr/local/Cellar/libusb/1.0.9/include/libusb-1.0/libusb.h /usr/local/Cellar/libusb/1.0.9/lib/libusb-1.0.0.dylib /usr/local/Cellar/libusb/1.0.9/lib

Error message 'Interface not claimed' from libusb

余生长醉 提交于 2019-12-06 22:32:34
问题 I'm trying to use libusb, but I am get the following error message: usbfs: process 24665 (myprogram) did not claim interface 0 before use I don't really understand why, because as far as I can tell, I'm doing it according to the description found in the library. Here's my code: #include <stdio.h> #include <stdlib.h> #include <sys/types.h> #include <libusb.h> int main(void) { int result; struct libusb_device_descriptor desc; libusb_device **list; libusb_device *my_device = NULL; result =

Pyusb on Windows 7 cannot find any devices

你说的曾经没有我的故事 提交于 2019-12-06 05:51:39
问题 So I installed Pyusb 1.0.0-alpha-1 Under Windows, I cannot get any handles to usb devices. >>> import usb.core >>> print usb.core.find() None I do have 1 usb device plugged in(idVendor=0x04d8, idProduct=0x0042), and I tried usb.core.find(idVendor=0x04d8, idProduct=0x0042) but that failed too. Under Ubuntu, with the same versions of pyusb and python (2.6), I am able to successfully find my device with that code, and communicate with it. So how can I get pyusb to find usb devices on Windows 7?