libusb

How to set up libusb on Mac OS X?

放肆的年华 提交于 2019-11-28 07:16:13
I'd like to try to make a user-space device driver using libusb on Mac, but I'm confused where to start. In the SDK installer (which I got from http://www.ellert.se/twain-sane ) it said something about examples which I couldn't find anywhere on my computer. Could anyone please describe how do I set up libusb for development on OS X? May I use Xcode? What should I include in my code? spade78 I tried to install the SDK from the aforementioned website and couldn't find a trace of it once the installer finished. Though I did find some libusb items at /usr/local/Developer/SDKs/MacOSX10.6.sdk/usr

USB Programming with Objective-C

白昼怎懂夜的黑 提交于 2019-11-28 03:50:07
问题 Can anyone tell me how to program USB devices with Objective-C as an iPhone application? I want to access USB device contents through iPhone 回答1: You can't. While it is possible to build USB based accessories for iPhone if you join the Made for iPhone program using the ExternalAccessory framework, you cannot access arbitrary USB devices. The SDK gives you access to devices that use a custom interface on top of USB, the exact details of which you get after signing up for the program and

USB Programming with Qt

僤鯓⒐⒋嵵緔 提交于 2019-11-27 17:00:26
问题 Is there anyway I can do USB programming in Qt? I am using Qt Creator 2.6 which is based on Qt version 5.0.0 and it is the latest Qt Creator which works with the Microsoft Visual Studio 2010 compiler. I have the toy called "Dreamcheeky Thunder Missile Launcher" and I need to program this USB based device. I have tried LibUSB but it messed up everything. It even renamed the device port and I had to undo everything using USBDview software. But I guess I installed it incorrectly. I followed

libusb_open returns 'LIBUSB_ERROR_NOT_SUPPORTED' on Windows 7

给你一囗甜甜゛ 提交于 2019-11-27 07:50:37
问题 I have been developing USB drivers using LibUSB on Linux, but now I want to have one of my drivers compiled for Windows (this is the first time I am doing it). My environment I am working on Windows 7 using the MinGW compiler (also using Dev-cpp IDE), and I am using a pre-compiled libusb library downloaded from this link. My device: It's a HID touch device. So no drivers are required for Windows. I have an additional endpoint to get certain debug data. My code: I have compiled code to list

More than one file was found with OS independent path 'lib/x86/libusb.so'

ぐ巨炮叔叔 提交于 2019-11-27 06:47:27
问题 I am using libusb in my android application. When I am trying to build libusb native library then I get below error message, *.so files generated. Error:Execution failed for task ':app:transformNativeLibsWithMergeJniLibsForDebug'. More than one file was found with OS independent path 'lib/x86/libusb.so' build.gradle import org.apache.tools.ant.taskdefs.condition.Os apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android {

Pyusb on windows - no backend available

匆匆过客 提交于 2019-11-27 04:14:18
I'm trying to have my python application interface with an NFC device via USB. The best option seems to be pyusb, but I can't get it to connect to the libusb backend. I keep getting ValueError: No backend available I've looked at the stack trace, and found that usb/backend/libusb10.py (which is part of pyusb) is trying to load libusb-1.0.dll to use as the backend, but it can't find it. It's not that its not in my path, its not on my computer at all! I have installed libusb-win32 ( http://libusb.org/wiki/libusb-win32 ), but the resulting directory only seems to include libusb0.dll. Where is

Libusb undefined reference to

冷暖自知 提交于 2019-11-27 03:27:10
问题 I'm trying to set up libusb API on my OS. I downloaded libusb api on libusb.org. I followed the standard installation procedure: cd into directory ./configure make make check //without errors make install Then I launched Eclipse C/C++ and copied some code from the tutorial found on the internet. But when trying to build it I got following output: main.cpp:(.text+0x19): undefined reference to `libusb_init' main.cpp:(.text+0x76): undefined reference to `libusb_set_debug' main.cpp:(.text+0x8a):

How to set up libusb on Mac OS X?

两盒软妹~` 提交于 2019-11-27 01:46:42
问题 I'd like to try to make a user-space device driver using libusb on Mac, but I'm confused where to start. In the SDK installer (which I got from http://www.ellert.se/twain-sane) it said something about examples which I couldn't find anywhere on my computer. Could anyone please describe how do I set up libusb for development on OS X? May I use Xcode? What should I include in my code? 回答1: I tried to install the SDK from the aforementioned website and couldn't find a trace of it once the

Simple way to query connected USB devices info in Python?

主宰稳场 提交于 2019-11-27 00:09:55
How can we query connected USB devices info in Python? I want to get UID Device Name (ex: SonyEricsson W660), path to device (ex: /dev/ttyACM0) And also what would be the best Parameter out of above info to be used as identifying the device whenever it's connected again? (UID?) I am working on Ubuntu 11.04. ATM I have this code (using pyUSB) busses = usb.busses() for bus in busses: devices = bus.devices for dev in devices: print repr(dev) print "Device:", dev.filename print " idVendor: %d (0x%04x)" % (dev.idVendor, dev.idVendor) print " idProduct: %d (0x%04x)" % (dev.idProduct, dev.idProduct)

关于linux的头文件和库文件

蹲街弑〆低调 提交于 2019-11-26 19:13:56
1. 头文件 1)系统标准头文件位置: /usr/include下 安装库的头文件位置:/usr/local/include/ 如 #include<linux/can.h> 对应 /usr/include/linux/can.h #include<stdio.h> 对应 /usr/include/stdio.h #include <libusb-1.0/libusb.h> 对应 /usr/local/include/libusb-1.0/libusb.h 2)使用 -I 来指示非标准位置的头文件 如 gcc -I/usr/local/include test.c 指示编译器不仅在标准位置也在/usr/local/include位置查找头文件 2. 库文件 -系统标准库文件位置:/lib /usr/lib -用户安装库位置: /usr/local/lib 默认只搜索标准c语言库,对于系统标准库中的其他库以及安装库,需要在编译时指定库名。对于非系统标准库还需通过-L来指定库文件位置。 1)C标准库,不需要-l 以及-L,编译时自动连接/lib/x86_64-linux-gnu/libc.so.6:gcc -o test test.c 2)标准库中的其他库,如libmath.so:gcc -o test test.c -lm 安装库:如:libusb-1.0.so,gcc -o