Giter Site home page Giter Site logo

libusb / hidapi Goto Github PK

View Code? Open in Web Editor NEW
1.5K 38.0 370.0 3.39 MB

A Simple cross-platform library for communicating with HID devices

Home Page: https://libusb.info/hidapi/

License: Other

Makefile 1.13% Shell 0.61% M4 5.88% C 81.88% C++ 3.51% Objective-C 0.54% CMake 6.25% Meson 0.21%
usb usb-hid bluetooth hidapi hid hidraw hidapi-library android bsd c

hidapi's Introduction

libusb

Build Status Build Status Coverity Scan Build Status

libusb is a library for USB device access from Linux, macOS, Windows, OpenBSD/NetBSD, Haiku, Solaris userspace, and WebAssembly via WebUSB. It is written in C (Haiku backend in C++) and licensed under the GNU Lesser General Public License version 2.1 or, at your option, any later version (see COPYING).

libusb is abstracted internally in such a way that it can hopefully be ported to other operating systems. Please see the PORTING file for more information.

libusb homepage: https://libusb.info/

Developers will wish to consult the API documentation: http://api.libusb.info

Use the mailing list for questions, comments, etc: http://mailing-list.libusb.info

(Please use the mailing list rather than mailing developers directly)

hidapi's People

Contributors

aeikum avatar alexdupre avatar be-ing avatar cmorty avatar djm00n avatar edorfaus avatar endolith avatar iakov avatar joergatgithub avatar jonasmalacofilho avatar jrcutler avatar ludovicrousseau avatar luzpaz avatar mrpippy avatar nh2 avatar ntfreak avatar paulepanter avatar qbicz avatar rpavlik avatar signal11 avatar slouken avatar swt2c avatar thp avatar todbot avatar triplef avatar veelo avatar vitalys avatar vlovich avatar youw avatar z3ntu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hidapi's Issues

AppVeyor project under libusb organisation

AppVeyor the build configuration is working, but currently working under @Youw personal configuration: https://ci.appveyor.com/project/Youw/hidapi

@LudovicRousseau, can you create a project as libusb organisation project?
To do so:

Sign in as GitHub Organisation to https://ci.appveyor.com
Projects -> New Project -> GitHub -> libusb/hidapi
All projects settings are fine to be default except one:
custom config


Original message: #37 (comment)
As discussed - to be managed in August.

hid_set_nonblocking() is not effective

Hello world, maybe there is a bug in the version 0.9.0:
the function (int HID_API_EXPORT HID_API_CALL hid_set_nonblocking(hid_device *dev, int nonblock))is not effective.

Unable to open device (access denied)

Hi,

I'm attempting to access my keyboard to configure the RGB lights etc using DuckyAPI that makes use of the original hidapi library.

I have One2 TKL which is different model to the one this project was targeted to but the same manufacturer. I've updated to the correct PID for my device and and am hoping they use the same protocol for all their devices.

When I try and open my device hid_read_timeout() in hid.c executes res = ReadFile(dev->device_handle, dev->read_buf, dev->input_report_length, &bytes_read, &dev->ol) which is returning 0. Checking GetLastError() returns 5 (ERROR_ACCESS_DENIED). I'm running in an elevated administrator process.

Just to confirm I'm getting this same result when I compile the master branch of this project directly, running entirely separate from the DuckyAPI project, just using the hidtest.exe after having updated the vid / pid to my device.

Hopefully you can point me in the right direction as this is far beyond my knowledge set!

This is the output from hidtest, I've filtered it to my device:

Device Found
  type: 04d9 0356
  path: \\?\hid#vid_04d9&pid_0356&mi_02&col04#7&1ca74182&0&0003#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
  serial_number: (null)
  Manufacturer: DuckyChannel International Co., Ltd.
  Product:      Ducky Keyboard
  Release:      120
  Interface:    2
  Usage (page): 0x6 (0x1)

Device Found
  type: 04d9 0356
  path: \\?\hid#vid_04d9&pid_0356&mi_02&col02#7&1ca74182&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number: (null)
  Manufacturer: DuckyChannel International Co., Ltd.
  Product:      Ducky Keyboard
  Release:      120
  Interface:    2
  Usage (page): 0x1 (0xc)

Device Found
  type: 04d9 0356
  path: \\?\hid#vid_04d9&pid_0356&mi_00#7&28baf2ff&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}\kbd
  serial_number: (null)
  Manufacturer: DuckyChannel International Co., Ltd.
  Product:      Ducky Keyboard
  Release:      120
  Interface:    0
  Usage (page): 0x6 (0x1)

Device Found
  type: 04d9 0356
  path: \\?\hid#vid_04d9&pid_0356&mi_02&col03#7&1ca74182&0&0002#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number: (null)
  Manufacturer: DuckyChannel International Co., Ltd.
  Product:      Ducky Keyboard
  Release:      120
  Interface:    2
  Usage (page): 0x2 (0x1)

Device Found
  type: 04d9 0356
  path: \\?\hid#vid_04d9&pid_0356&mi_01#7&4e3b53d&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}
  serial_number: (null)
  Manufacturer: DuckyChannel International Co., Ltd.
  Product:      CY040356014C0102 EU
  Release:      120
  Interface:    1
  Usage (page): 0x1 (0xff00)

Manufacturer String: DuckyChannel International Co., Ltd.
Product String: Ducky Keyboard
Unable to read serial number string
Serial Number String: (0)
Indexed String 1: Ducky Keyboard
Unable to send a feature report.
Unable to get a feature report.
Incorrect function.Unable to write()
Error: Access is denied.
Unable to write() (2)
Unable to read()
Data read:

Unable to use hid_open in android

Hi,
thank you for you solution to https://github.com/libusb/hidapi/issues/24, I have build android .so lib。
first,I have use "hid_init()",and the result is 0;
second,I have got "hid_device_info" from the method "hid_enumerate(0x0, 0x0)" , and the result is (
info = HidDeviceInfo{path='0003:0003:00', vendor_id=D197, product_id=E0A097}
info = HidDeviceInfo{path='0003:000b:00', vendor_id=D1B1, product_id=E78083}
info = HidDeviceInfo{path='0003:000b:01', vendor_id=D1B1, product_id=E78083}
)
third,When i use hid_open(vendor_id, product_id, NULL) from hidapi.h(vendor_id and product_id from hid_device_info),but it is not working, and log result is "unable to open device"。
then,i was tested "hid_open" in hid.c,flag "handle = hid_open_path(path_to_open);",go into this method,i do not know why "hid_open_path" return NULL。
can you help me? thanks

Windows: unable to interrupt blocking hid_read call

Currently hidapi is not able to close open device handle in a thread-safe manner. This is due to CancelIo function being used instead of CancelIoEx for closing a win32 device handle.

Upgrading to CancelIoEx would cause a WinXP support to be dropped (signal11/hidapi#48), however a fallback could be used to try and load CancelIoEx dynamically to keep a somewhat buggy WinXP experience (signal11/hidapi#208).

Something needs to be done about this issue as hidapi is being used in multi-threaded environment more and more. I would personally propose to drop WinXP support altogether as there is no point in beating a dead horse, however I would like to hear what you guys think.

04f2:1670 Chicony Electronics Co., Ltd keyboard is broken by hidapi example (hidapi-libusb)

Hello. I'm trying to test hidapi and possibly use it to set fn_lock of my keyboard. I grabbed the example code and tried to see if it runs. https://github.com/libusb/hidapi#what-does-the-api-look-like

Then suddenly my keyboard stops responding, lsusb doesn't list it anymore. The id was 0x17ef, 0x60b5 now becomes 0x04f2, 0x1670 (I tested it while unplug and plug).

Is there any way of restoring my keyboard? Thank you!

Meson wrap support

Documentation: http://mesonbuild.com/Wrap-dependency-system-manual.html

Basically, it's a part of the meson build system that can download (and build) missing dependencies which is pretty convenient especially on platforms without native package managers (so Windows).

This works by including a meson.build file into the source tree (theoretically it would also be possible to keep that separate), e.g. https://github.com/z3ntu/hidapi/blob/razer_test/meson.build (note: this file works but just has support for hidraw linux, darwin/macOS and windows) that "declares" the dependency so it can be used from another meson project. The consuming project would just need something like https://github.com/z3ntu/razer_test/blob/master/subprojects/hidapi.wrap - and best case this would be submitted to the Meson WrapDB which puts this hidapi.wrap file into a central git repo that can be used with meson wrap install hidapi which adds that file into the local source tree.

I'll open a PR once I have it working on most/all supported platforms.

hidtest build fails on macOS: No rule to make target `hidtest.cpp'

On macOS (Mojave 10.4.6) I have the error:

± make
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-recursive
Making all in mac
make[2]: Nothing to be done for `all'.
Making all in hidtest
make[2]: *** No rule to make target `hidtest.cpp', needed by `hidtest.o'.  Stop.
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

This is a regression caused by d98c408

If I rename the source code to hidtestx.c and adapt the Makefile.am I fix the issue.

I don't know why it fails. Maybe make is confused because the directory, the source code and the target have the same name?

± make -v
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for i386-apple-darwin11.3.0

NodeJs library

Hi Team,

We want to use this library as node module. Having issues in using node-hid library. Can you please let us know if this library has node library?

Regards,
Gayathri

mac: Option to open device in non-exclusive mode

Example: If you open a mouse currently (on macOS), the mouse input doesn't reach the OS, so you can't move the cursor with the mouse anymore while the device is opened in hidapi. That can be solved by not opening the device in exclusive mode, so z3ntu@fc9077c / signal11/hidapi#297

For my specific use case I have to look if it's possible to open a different usb device interface from the same device that doesn't block mouse input, but it seems that this feature is wanted by at least one other person too.

Automated code formatter

I've already seen some places where it's "tab 4x space tab", so some automated code formatter would be good.

I'm using clang-format for my own projects, which is very configurable; but something like astyle is also not bad :)

3dConnexion Universal Receiver - Linux OK, Windows and MacOS not

Hi, I'm using hidapi (via cython-hidapi) to access a 3dConnexion Spacemouse. The mouse is supplied with a USB Universal Receiver. On Linux, I can open this device and read from it quite happily. But on both Windows and MacOS, although I can open the device, no data is ever returned from a read.
I am opening using the path returned from enumeration.
Also, on both Windows and MacOS, if I plug the same mouse into the computers using a USB cable, they both get mouse data OK (of course, they are then using a different vid:pid).
I don't really know that much about USB, HID, etc. so I am hoping someone can suggest where the problem lies.

Here's what lsusb -v on Linux says about the device...

Thanks.

Bus 001 Device 077: ID 256f:c652  
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        32
  idVendor           0x256f 
  idProduct          0xc652 
  bcdDevice            1.02
  iManufacturer           1 3Dconnexion
  iProduct                2 3Dconnexion Universal Receiver
  iSerial                 0 
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength          134
    bNumInterfaces          5
    bConfigurationValue     1
    iConfiguration          4 3DX01.02_B0003
    bmAttributes         0xa0
      (Bus Powered)
      Remote Wakeup
    MaxPower               98mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     448
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        1
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     129
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        2
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     129
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x83  EP 3 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        3
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     129
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        4
      bAlternateSetting       0
      bNumEndpoints           1
      bInterfaceClass         3 Human Interface Device
      bInterfaceSubClass      0 No Subclass
      bInterfaceProtocol      0 None
      iInterface              0 
        HID Device Descriptor:
          bLength                 9
          bDescriptorType        33
          bcdHID               1.11
          bCountryCode            0 Not supported
          bNumDescriptors         1
          bDescriptorType        34 Report
          wDescriptorLength     129
         Report Descriptors: 
           ** UNAVAILABLE **
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x85  EP 5 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0020  1x 32 bytes
        bInterval               1
Device Status:     0x0000
  (Bus Powered)

How to build for Android

$ ~/Android/Sdk/ndk-bundle/ndk-build
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-16.    
/mnt/hdd/Android/Sdk/ndk-bundle/build/core/build-binary.mk:672: Android NDK: Module hidapi depends on undefined modules: usb1.0    
/mnt/hdd/Android/Sdk/ndk-bundle/build/core/build-binary.mk:685: *** Android NDK: Aborting (set APP_ALLOW_MISSING_DEPS=true to allow missing dependencies)    .  Stop.
$ env APP_ALLOW_MISSING_DEPS=true ~/Android/Sdk/ndk-bundle/ndk-build
Android NDK: APP_PLATFORM not set. Defaulting to minimum supported version android-16.    
/mnt/hdd/Android/Sdk/ndk-bundle/build/core/build-binary.mk:672: Android NDK: Module hidapi depends on undefined modules: usb1.0    
/mnt/hdd/Android/Sdk/ndk-bundle/build/core/build-binary.mk:672: Android NDK: Module hidapi depends on undefined modules: usb1.0    
/mnt/hdd/Android/Sdk/ndk-bundle/build/core/build-binary.mk:672: Android NDK: Module hidapi depends on undefined modules: usb1.0    
/mnt/hdd/Android/Sdk/ndk-bundle/build/core/build-binary.mk:672: Android NDK: Module hidapi depends on undefined modules: usb1.0    
[arm64-v8a] Compile        : hidapi <= hid.c
/home/luca/Dev/hidapi/android/jni/../../libusb/hid.c:47:10: fatal error: 'libusb.h' file not found
#include <libusb.h>
         ^~~~~~~~~~
1 error generated.
make: *** [/home/luca/Dev/hidapi/android/obj/local/arm64-v8a/objs/hidapi/__/__/libusb/hid.o] Error 1

With the following modifications to the Android.mk file, the build succeeds (using ~/Android/Sdk/ndk-bundle/ndk-build):

diff --git a/android/jni/Android.mk b/android/jni/Android.mk
index 527b43f..32e3442 100644
--- a/android/jni/Android.mk
+++ b/android/jni/Android.mk
@@ -1,8 +1,16 @@
-LOCAL_PATH:= $(call my-dir)
+MY_LOCAL_PATH:= $(call my-dir)
+
+LOCAL_PATH := $(MY_LOCAL_PATH)
 
 HIDAPI_ROOT_REL:= ../..
 HIDAPI_ROOT_ABS:= $(LOCAL_PATH)/../..
 
+include /tmp/libusb/android/jni/libusb.mk
+
+# hidapi
+
+LOCAL_PATH := $(MY_LOCAL_PATH)
+
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES := \
[armeabi-v7a] Install        : libhidapi.so => libs/armeabi-v7a/libhidapi.so

See also https://developer.android.com/ndk/guides/android_mk#my-dir

can't communicate with device Freestyle libre glucometer

Hi , i use yours library to communicate with an HID device (Freestyle libre abbot)

i used the example code, the device is detectable, here is the logout

`Device Found
type: 1a61 3650
path: IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/XHC1@14/XHC1@14000000/PRT1@14100000/ADC Reader@14100000/Hid Interface@0/IOUSBHostHIDDevice@14100000,0
serial_number:
Manufacturer: Abbott Diabetes Care
Product: ADC Reader
Release: 100
Interface: 0

hid device opened
Manufacturer String: A
Product String: A
Serial Number String: (0)
Indexed String 1: `

is it normal ? why the manufacturer change ?

the execution of the code is blocked in this line :

`// Toggle LED (cmd 0x80). The first byte is the report number (0x0).
buf[0] = 0x80;
//buf[1] = 0x80;
res = hid_write(handle, buf, 64); // HERE

// Request state (cmd 0x81). The first byte is the report number (0x0).
buf[0] = 0x81;
//buf[1] = 0x81;
res = hid_write(handle, buf, 64);`

i don't have any answer from the device !

i know that the first frame to initializ the communication is a buffer [64] , with buffer[0] = 0x04
i already do it in java without initialing set/get repport

here is somme documentation that i can't really understand about settings usb freestyle libre
`These devices appears on the USB bus as a HID device. The communication between the software and the device happens through HID Set Report/Get Report interfaces, in a way that is compatible with the Linux hidraw interface.

In particular the packets are sent on the Control endpoint, as Class Interface messages (bRequestType = 0x21, bRequest = 0x09, wValue = 0x0200, wIndex = 0x0000), and received on the interrupt endpoint (0x81). Report numbers are not used.

The “reports” are not following the HID standard. They are of a fixed 64-bytes size, even if most of the commands themselves are shorter. Replies can span multiple inbound reports.`

did you have any idea please ? thank's

Possible regression in mac get_feature_report

Prior to /pull/3 being merged get_feature_report was working identically for me on all platforms. Now the mac driver is failing as the returned buffer is different from the other platforms. My device does use report ids.
Is it possible that the behavior of OSX was changed from when this change was originally requested back in 2015?
Can anyone reproduce this issue?

Handle GetOverlappedResult blocking forever on read/write

Hello,

We were investigating a blocking issue when write command GetOverlappedResult is blocking forever. It is a follow up from signal11/hidapi#88

This occurs when maximal speed of USB HID is reached, e.g. 1000 frames per second. If target is just sending data at this rate, it is ok. Some frames are still lost due to computer speed, windows management and other USB frames requested by windows checking target status.
Problem cames when communication goes both ways. When sending commands from the computer if line IO_PENDING flag is true, there is not enought bandwidth and GetOverlappedResult is blocking forever.
We experienced with 64bytes frame data in/out.

Solution from signal11/hidapi#88 was implemented in hid.c file and sucessfully tested. When ERROR_IO_PENDING is detected write function waits until previous transaction is complete. Also limit maximal transfer frames rate to 1000 (1000 read or 1000 write or 500 read/write)

Here is attached hid.c file:
hid.zip

Building for android Unity

Anyone know how I can use this for an android project, built from Unity? Trying to get this plugin to work on android, which it seemingly doesn't at the moment and I think it might be because it uses HIDAPI which isn't compatible with android? Can I use android.mk instead?

Different behavior of nonblocking hid_read on different OSs?

The Linux libusb and macOS backends maintain an internal buffer of 30 (where did this number come from?) input reports. If I understand correctly, when hid_read is called repeatedly, one input report is returned at a time in the order they were received. If that is correct, then I think the correct way to use nonblocking calls to hid_read on a polling timer would be to loop until hid_read returns <= 0. However, the Windows implementation does not seem to maintain such an internal buffer, so I'm not sure how many times to call hid_read on each polling iteration. I have searched for examples of how to use hid_read in the nonblocking mode but have not found any useful information about this.

For background context, in Mixxx, our current use of HIDAPI has separate threads for reading and writing with the reading thread using hid_read_timeout with a 500ms timeout. However, a Windows user found that when writing data frequently, Mixxx would stop reading incoming data. We presume this is because of the read and write thread trying to access the device concurrently, so we are trying to move both reading and writing into the same thread and use polling, nonblocking reading. I'm not entirely certain that was the issue, so switching to using polling might be moot.

mixxxdj/mixxx#2179
https://mixxx.zulipchat.com/#narrow/stream/113295-controller-mapping/topic/Is.20shutdown.20called.20when.20reloading.20script.3F

cython-hidapi

Hi!

I am the current maintainer of cython-hidapi - a python binding for hidapi. I see you've resurrected the hidapi project and I'd like to ask you whether you would like to take part in maintainership of cython-hidapi package as well (i.e. move the package under your libusb organization where we'd maintain the package together).

CMake build system

As a common CMake user I'd suggest it is very convenient to have CMake supported by the project off-the-box.

A platform like MSVC would gain a great benefit - won't need to have MSVC-2010/2015/2017/2019/etc. separate projects.

I'm ready to prepare the whole infrastructure if the team/community don't have anything against it.

Continuous integration

I'm working on CI scripts for:

Target CI provider Duration Notes
msbuild AppVeyor 20 sec
cygwin AppVeyor 1 min 45 sec
mingw builds.sr.ht 70 sec Cross-compiled on Fedora
freebsd builds.sr.ht 55 sec
macos Travis CI 53 sec
alpine builds.sr.ht 30 sec
archlinux builds.sr.ht 28 sec

This makes sure at least that hidapi builds for most/all supported platforms.

how to build hidapi on Android project

hi

what's the steps to build and work with the library in android os ?

before talking about android.mk ? there is no other operation ?

download the ndk or what exactly ? thank's

Linux: Hanging inside hid_close()

For catching this hanging need just open device by hid_open() or hid_open_path() and close it by hid_close(), see simple example:

#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "hidapi.h"

int main(int argc, char* argv[])
{
hid_device *handle;
struct hid_device_info *devs, *cur_dev;

 if (hid_init())
      return -1; 
 int i;
 for (i =0 ; i < 10000; i++) { 
      handle = hid_open(0x22c9, 0x0901, NULL);
      if (!handle) {
           printf("unable to open device\n");
           return 1;
      }
      printf("iteration: %d, going to call hid_close() \n", i); 
      hid_close(handle);
      printf("iteration: %d, hid_close() done \n", i); 
 }   
 /* Free static HIDAPI objects. */
 hid_exit();
 return 0;

}

Test GUI build error on windows

Hi!

I want to build the library with Test GUI using Cygwin on windows. But after adding --enable-testgui argument to ./configure and run make it gives me many undefined reference to ... errors. But without --enable-testgui argument the library is built successfully.
the whole make output command is as follow:

make  all-recursive
make[1]: Entering directory '/cygdrive/d/hidapi-master'
Making all in windows
make[2]: Entering directory '/cygdrive/d/hidapi-master/windows'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/cygdrive/d/hidapi-master/windows'
Making all in hidtest
make[2]: Entering directory '/cygdrive/d/hidapi-master/hidtest'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/cygdrive/d/hidapi-master/hidtest'
Making all in testgui
make[2]: Entering directory '/cygdrive/d/hidapi-master/testgui'
  CXXLD    hidapi-testgui.exe
test.o: In function `FX::FXMainWindow::FXMainWindow()':
/cygdrive/d/hidapi-master/testgui/./../../hidapi-externals/fox/include/FXMainWindow.h:46: undefined reference to `FX::FXTopWindow::FXTopWindow()'
/cygdrive/d/hidapi-master/testgui/./../../hidapi-externals/fox/include/FXMainWindow.h:46:(.text+0x27): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `FX::FXTopWindow::FXTopWindow()'
test.o: In function `MainWindow::handle(FX::FXObject*, unsigned int, void*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:113: undefined reference to `FX::FXMetaClass::search(unsigned int) const'
/cygdrive/d/hidapi-master/testgui/test.cpp:113:(.text+0x7f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `FX::FXMetaClass::search(unsigned int) const'
test.o: In function `MainWindow::onClear(FX::FXObject*, unsigned int, void*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:475: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:475:(.text+0xf8): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:475: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:475:(.text+0x10b): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:475: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:475:(.text+0x123): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `FX::FXString::~FXString()'
test.o: In function `MainWindow::onConnect(FX::FXObject*, unsigned int, void*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:230: undefined reference to `FX::FXList::getItem(int) const'
/cygdrive/d/hidapi-master/testgui/test.cpp:230:(.text+0x1e6): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `FX::FXList::getItem(int) const'
/cygdrive/d/hidapi-master/testgui/test.cpp:246: undefined reference to `FX::FXApp::addTimeout(FX::FXObject*, unsigned int, unsigned int, void*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:246:(.text+0x247): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `FX::FXApp::addTimeout(FX::FXObject*, unsigned int, unsigned int, void*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:249: undefined reference to `FX::FXString::FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:249:(.text+0x24f): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `FX::FXString::FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:250: undefined reference to `FX::FXString::format(char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:250:(.text+0x268): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `FX::FXString::format(char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:251: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:251:(.text+0x280): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:251: undefined reference to `FX::operator+(FX::FXString const&, wchar_t const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:251:(.text+0x293): additional relocation overflows omitted from the output
/cygdrive/d/hidapi-master/testgui/test.cpp:251: undefined reference to `FX::FXString::operator+=(FX::FXString const&)'
/cygdrive/d/hidapi-master/testgui/test.cpp:251: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:251: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:252: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:252: undefined reference to `FX::operator+(FX::FXString const&, wchar_t const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:252: undefined reference to `FX::FXString::operator+=(FX::FXString const&)'
/cygdrive/d/hidapi-master/testgui/test.cpp:252: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:252: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:253: undefined reference to `FX::FXLabel::setText(FX::FXString const&)'
/cygdrive/d/hidapi-master/testgui/test.cpp:259: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:259: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:249: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:240: undefined reference to `FX::FXMessageBox::error(FX::FXWindow*, unsigned int, char const*, char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:252: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:252: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:249: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:259: undefined reference to `FX::FXString::~FXString()'
test.o: In function `MainWindow::onDisconnect(FX::FXObject*, unsigned int, void*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:270: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:270: undefined reference to `FX::FXLabel::setText(FX::FXString const&)'
/cygdrive/d/hidapi-master/testgui/test.cpp:270: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:277: undefined reference to `FX::FXApp::removeTimeout(FX::FXObject*, unsigned int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:270: undefined reference to `FX::FXString::~FXString()'
test.o: In function `MainWindow::onRescan(FX::FXObject*, unsigned int, void*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:287: undefined reference to `FX::FXList::clearItems(unsigned char)'
/cygdrive/d/hidapi-master/testgui/test.cpp:295: undefined reference to `FX::FXString::FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:296: undefined reference to `FX::FXString::FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:297: undefined reference to `FX::FXString::format(char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:298: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:298: undefined reference to `FX::operator+(FX::FXString const&, wchar_t const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:298: undefined reference to `FX::FXString::operator+=(FX::FXString const&)'
/cygdrive/d/hidapi-master/testgui/test.cpp:298: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:298: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:299: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:299: undefined reference to `FX::operator+(FX::FXString const&, wchar_t const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:299: undefined reference to `FX::FXString::operator+=(FX::FXString const&)'
/cygdrive/d/hidapi-master/testgui/test.cpp:299: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:299: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:300: undefined reference to `FX::FXString::format(char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:301: undefined reference to `FX::FXString::operator+=(FX::FXString const&)'
test.o: In function `FX::FXListItem::FXListItem(FX::FXString const&, FX::FXIcon*, void*)':
/cygdrive/d/hidapi-master/testgui/./../../hidapi-externals/fox/include/FXList.h:78: undefined reference to `FX::FXString::FXString(FX::FXString const&)'
test.o: In function `MainWindow::onRescan(FX::FXObject*, unsigned int, void*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:303: undefined reference to `FX::FXList::appendItem(FX::FXListItem*, unsigned char)'
/cygdrive/d/hidapi-master/testgui/test.cpp:296: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:295: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:309: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:309: undefined reference to `FX::FXList::appendItem(FX::FXString const&, FX::FXIcon*, void*, unsigned char)'
/cygdrive/d/hidapi-master/testgui/test.cpp:309: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:309: undefined reference to `FX::FXString::~FXString()'
test.o: In function `FX::FXListItem::FXListItem(FX::FXString const&, FX::FXIcon*, void*)':
/cygdrive/d/hidapi-master/testgui/./../../hidapi-externals/fox/include/FXList.h:78: undefined reference to `FX::FXObject::~FXObject()'
test.o: In function `MainWindow::onRescan(FX::FXObject*, unsigned int, void*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:296: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:295: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:299: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:299: undefined reference to `FX::FXString::~FXString()'
test.o: In function `MainWindow::create()':
/cygdrive/d/hidapi-master/testgui/test.cpp:207: undefined reference to `FX::FXMainWindow::create()'
/cygdrive/d/hidapi-master/testgui/test.cpp:217: undefined reference to `FX::FXApp::addTimeout(FX::FXObject*, unsigned int, unsigned int, void*)'
test.o: In function `MainWindow::onTimeout(FX::FXObject*, unsigned int, void*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:502: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:502: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:503: undefined reference to `FX::FXText::setBottomLine(int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:506: undefined reference to `FX::FXApp::addTimeout(FX::FXObject*, unsigned int, unsigned int, void*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:486: undefined reference to `FX::FXString::FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:487: undefined reference to `FX::FXString::format(char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:495: undefined reference to `FX::FXString::operator+=(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:489: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:489: undefined reference to `FX::FXString::FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:490: undefined reference to `FX::FXString::format(char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:491: undefined reference to `FX::FXString::operator+=(FX::FXString const&)'
/cygdrive/d/hidapi-master/testgui/test.cpp:493: undefined reference to `FX::FXString::operator+=(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:497: undefined reference to `FX::FXString::operator+=(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:499: undefined reference to `FX::FXText::setBottomLine(int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:486: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:502: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:486: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:489: undefined reference to `FX::FXString::~FXString()'
test.o: In function `MainWindow::MainWindow(FX::FXApp*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:116: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:116: undefined reference to `FX::FXMainWindow::FXMainWindow(FX::FXApp*, FX::FXString const&, FX::FXIcon*, FX::FXIcon*, unsigned int, int, int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:116: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:121: undefined reference to `FX::FXVerticalFrame::FXVerticalFrame(FX::FXComposite*, unsigned int, int, int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:123: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:123: undefined reference to `FX::FXLabel::FXLabel(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:123: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:124: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:124: undefined reference to `FX::FXFont::FXFont(FX::FXApp*, FX::FXString const&, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:124: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:125: undefined reference to `FX::FXLabel::setFont(FX::FXFont*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:127: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:128: undefined reference to `FX::FXLabel::FXLabel(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:127: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:129: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:133: undefined reference to `FX::FXLabel::FXLabel(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:129: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:134: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:136: undefined reference to `FX::FXLabel::FXLabel(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:134: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:137: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:141: undefined reference to `FX::FXLabel::FXLabel(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:137: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:142: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:142: undefined reference to `FX::FXLabel::FXLabel(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:142: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:145: undefined reference to `FX::FXHorizontalFrame::FXHorizontalFrame(FX::FXComposite*, unsigned int, int, int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:147: undefined reference to `FX::FXHorizontalFrame::FXHorizontalFrame(FX::FXComposite*, unsigned int, int, int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:147: undefined reference to `FX::FXList::FXList(FX::FXComposite*, FX::FXObject*, unsigned int, unsigned int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:148: undefined reference to `FX::FXVerticalFrame::FXVerticalFrame(FX::FXComposite*, unsigned int, int, int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:149: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:149: undefined reference to `FX::FXButton::FXButton(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:149: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:150: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:150: undefined reference to `FX::FXButton::FXButton(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:150: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:152: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:152: undefined reference to `FX::FXButton::FXButton(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:152: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:153: undefined reference to `FX::FXHorizontalFrame::FXHorizontalFrame(FX::FXComposite*, unsigned int, int, int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:155: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:155: undefined reference to `FX::FXLabel::FXLabel(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:155: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:157: undefined reference to `FX::FXHorizontalFrame::FXHorizontalFrame(FX::FXComposite*, unsigned int, int, int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:160: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:160: undefined reference to `FX::FXGroupBox::FXGroupBox(FX::FXComposite*, FX::FXString const&, unsigned int, int, int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:160: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:161: undefined reference to `FX::FXMatrix::FXMatrix(FX::FXComposite*, int, unsigned int, int, int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:162: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:162: undefined reference to `FX::FXLabel::FXLabel(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:162: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:163: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:163: undefined reference to `FX::FXLabel::FXLabel(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:163: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:164: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:164: undefined reference to `FX::FXLabel::FXLabel(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:164: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:167: undefined reference to `FX::FXTextField::FXTextField(FX::FXComposite*, int, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:168: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:168: undefined reference to `FX::FXTextField::setText(FX::FXString const&, unsigned char)'
/cygdrive/d/hidapi-master/testgui/test.cpp:168: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:169: undefined reference to `FX::FXTextField::FXTextField(FX::FXComposite*, int, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:170: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:170: undefined reference to `FX::FXButton::FXButton(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:170: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:175: undefined reference to `FX::FXTextField::FXTextField(FX::FXComposite*, int, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:176: undefined reference to `FX::FXTextField::FXTextField(FX::FXComposite*, int, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:177: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:177: undefined reference to `FX::FXButton::FXButton(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:177: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:180: undefined reference to `FX::FXTextField::FXTextField(FX::FXComposite*, int, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:181: undefined reference to `FX::FXWindow::FXWindow(FX::FXComposite*, unsigned int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:182: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:182: undefined reference to `FX::FXButton::FXButton(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:182: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:187: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:187: undefined reference to `FX::FXGroupBox::FXGroupBox(FX::FXComposite*, FX::FXString const&, unsigned int, int, int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:187: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:188: undefined reference to `FX::FXVerticalFrame::FXVerticalFrame(FX::FXComposite*, unsigned int, int, int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:189: undefined reference to `FX::FXHorizontalFrame::FXHorizontalFrame(FX::FXComposite*, unsigned int, int, int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:189: undefined reference to `FX::FXText::FXText(FX::FXComposite*, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:190: undefined reference to `FX::FXText::setEditable(unsigned char)'
/cygdrive/d/hidapi-master/testgui/test.cpp:191: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:191: undefined reference to `FX::FXButton::FXButton(FX::FXComposite*, FX::FXString const&, FX::FXIcon*, FX::FXObject*, unsigned int, unsigned int, int, int, int, int, int, int, int, int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:191: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:116: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:191: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:116: undefined reference to `FX::FXMainWindow::~FXMainWindow()'
test.o: In function `FX::FXTextField::getText() const':
/cygdrive/d/hidapi-master/testgui/./../../hidapi-externals/fox/include/FXTextField.h:257: undefined reference to `FX::FXString::FXString(FX::FXString const&)'
test.o: In function `MainWindow::getDataFromTextField(FX::FXTextField*, char*, unsigned long)':
/cygdrive/d/hidapi-master/testgui/test.cpp:321: undefined reference to `FX::FXString::~FXString()'
test.o: In function `MainWindow::onGetFeatureReport(FX::FXObject*, unsigned int, void*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:444: undefined reference to `FX::FXMessageBox::error(FX::FXWindow*, unsigned int, char const*, char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:453: undefined reference to `FX::FXString::FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:454: undefined reference to `FX::FXString::format(char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:462: undefined reference to `FX::FXString::operator+=(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:456: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:456: undefined reference to `FX::FXString::FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:457: undefined reference to `FX::FXString::format(char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:458: undefined reference to `FX::FXString::operator+=(FX::FXString const&)'
/cygdrive/d/hidapi-master/testgui/test.cpp:460: undefined reference to `FX::FXString::operator+=(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:464: undefined reference to `FX::FXString::operator+=(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:466: undefined reference to `FX::FXText::setBottomLine(int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:453: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:449: undefined reference to `FX::FXMessageBox::error(FX::FXWindow*, unsigned int, char const*, char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:456: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:453: undefined reference to `FX::FXString::~FXString()'
test.o: In function `FX::FXTextField::getText() const':
/cygdrive/d/hidapi-master/testgui/./../../hidapi-externals/fox/include/FXTextField.h:257: undefined reference to `FX::FXString::FXString(FX::FXString const&)'
test.o: In function `MainWindow::getLengthFromTextField(FX::FXTextField*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:352: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:360: undefined reference to `FX::FXMessageBox::error(FX::FXWindow*, unsigned int, char const*, char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:352: undefined reference to `FX::FXString::~FXString()'
test.o: In function `MainWindow::onSendOutputReport(FX::FXObject*, unsigned int, void*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:389: undefined reference to `FX::FXMessageBox::error(FX::FXWindow*, unsigned int, char const*, char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:397: undefined reference to `FX::FXMessageBox::error(FX::FXWindow*, unsigned int, char const*, char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:384: undefined reference to `FX::FXMessageBox::error(FX::FXWindow*, unsigned int, char const*, char const*, ...)'
test.o: In function `MainWindow::onSendFeatureReport(FX::FXObject*, unsigned int, void*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:420: undefined reference to `FX::FXMessageBox::error(FX::FXWindow*, unsigned int, char const*, char const*, ...)'
/cygdrive/d/hidapi-master/testgui/test.cpp:428: undefined reference to `FX::FXMessageBox::error(FX::FXWindow*, unsigned int, char const*, char const*, ...)'
test.o:/cygdrive/d/hidapi-master/testgui/test.cpp:415: more undefined references to `FX::FXMessageBox::error(FX::FXWindow*, unsigned int, char const*, char const*, ...)' follow
test.o: In function `MainWindow::handle(FX::FXObject*, unsigned int, void*)':
/cygdrive/d/hidapi-master/testgui/test.cpp:113: undefined reference to `FX::FXMainWindow::handle(FX::FXObject*, unsigned int, void*)'
test.o: In function `MainWindow::~MainWindow()':
/cygdrive/d/hidapi-master/testgui/test.cpp:196: undefined reference to `FX::FXMainWindow::~FXMainWindow()'
test.o: In function `__static_initialization_and_destruction_0':
/cygdrive/d/hidapi-master/testgui/test.cpp:113: undefined reference to `FX::FXMetaClass::FXMetaClass(char const*, FX::FXObject* (*)(), FX::FXMetaClass const*, void const*, unsigned int, unsigned int)'
/cygdrive/d/hidapi-master/testgui/test.cpp:113: undefined reference to `FX::FXMetaClass::~FXMetaClass()'
test.o: In function `main':
/cygdrive/d/hidapi-master/testgui/test.cpp:526: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:526: undefined reference to `FX::FXString::FXString(char const*)'
/cygdrive/d/hidapi-master/testgui/test.cpp:526: undefined reference to `FX::FXApp::FXApp(FX::FXString const&, FX::FXString const&)'
/cygdrive/d/hidapi-master/testgui/test.cpp:526: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:526: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:527: undefined reference to `FX::FXApp::init(int&, char**, bool)'
/cygdrive/d/hidapi-master/testgui/test.cpp:529: undefined reference to `FX::FXApp::create()'
/cygdrive/d/hidapi-master/testgui/test.cpp:530: undefined reference to `FX::FXApp::run()'
/cygdrive/d/hidapi-master/testgui/test.cpp:526: undefined reference to `FX::FXApp::~FXApp()'
/cygdrive/d/hidapi-master/testgui/test.cpp:532: undefined reference to `FX::FXString::~FXString()'
/cygdrive/d/hidapi-master/testgui/test.cpp:526: undefined reference to `FX::FXApp::~FXApp()'
/cygdrive/d/hidapi-master/testgui/test.cpp:526: undefined reference to `FX::FXString::~FXString()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x20): undefined reference to `FX::FXObject::onDefault(FX::FXObject*, unsigned int, void*)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x28): undefined reference to `FX::FXObject::tryHandle(FX::FXObject*, unsigned int, void*)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x30): undefined reference to `FX::FXTopWindow::save(FX::FXStream&) const'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x38): undefined reference to `FX::FXTopWindow::load(FX::FXStream&)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x58): undefined reference to `FX::FXTopWindow::detach()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x60): undefined reference to `FX::FXTopWindow::destroy()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x68): undefined reference to `FX::FXWindow::GetDC() const'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x70): undefined reference to `FX::FXWindow::ReleaseDC(void*) const'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x78): undefined reference to `FX::FXTopWindow::resize(int, int)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x80): undefined reference to `FX::FXWindow::doesOverrideRedirect() const'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x88): undefined reference to `FX::FXTopWindow::GetClass() const'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x90): undefined reference to `FX::FXTopWindow::getDefaultWidth()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x98): undefined reference to `FX::FXTopWindow::getDefaultHeight()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0xa0): undefined reference to `FX::FXWindow::getWidthForHeight(int)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0xa8): undefined reference to `FX::FXWindow::getHeightForWidth(int)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0xb0): undefined reference to `FX::FXWindow::canFocus() const'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0xb8): undefined reference to `FX::FXTopWindow::setFocus()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0xc0): undefined reference to `FX::FXTopWindow::killFocus()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0xc8): undefined reference to `FX::FXWindow::changeFocus(FX::FXWindow*)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0xd0): undefined reference to `FX::FXWindow::setDefault(unsigned char)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0xd8): undefined reference to `FX::FXWindow::enable()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0xe0): undefined reference to `FX::FXWindow::disable()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0xe8): undefined reference to `FX::FXWindow::attach(void*)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0xf0): undefined reference to `FX::FXWindow::setShape(FX::FXRegion const&)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0xf8): undefined reference to `FX::FXWindow::setShape(FX::FXBitmap*)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x100): undefined reference to `FX::FXWindow::setShape(FX::FXIcon*)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x108): undefined reference to `FX::FXWindow::clearShape()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x110): undefined reference to `FX::FXTopWindow::raise()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x118): undefined reference to `FX::FXWindow::lower()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x120): undefined reference to `FX::FXTopWindow::move(int, int)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x128): undefined reference to `FX::FXTopWindow::position(int, int, int, int)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x130): undefined reference to `FX::FXShell::recalc()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x138): undefined reference to `FX::FXTopWindow::layout()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x140): undefined reference to `FX::FXWindow::reparent(FX::FXWindow*, FX::FXWindow*)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x148): undefined reference to `FX::FXTopWindow::show()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x150): undefined reference to `FX::FXTopWindow::hide()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x158): undefined reference to `FX::FXComposite::isComposite() const'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x160): undefined reference to `FX::FXWindow::dropEnable()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x168): undefined reference to `FX::FXWindow::dropDisable()'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x170): undefined reference to `FX::FXWindow::contains(int, int) const'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x178): undefined reference to `FX::FXWindow::setBackColor(unsigned int)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x180): undefined reference to `FX::FXWindow::doesSaveUnder() const'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x188): undefined reference to `FX::FXWindow::tr(char const*, char const*) const'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x190): undefined reference to `FX::FXTopWindow::show(unsigned int)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x198): undefined reference to `FX::FXTopWindow::maximize(unsigned char)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x1a0): undefined reference to `FX::FXTopWindow::minimize(unsigned char)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x1a8): undefined reference to `FX::FXTopWindow::restore(unsigned char)'
test.o:test.cpp:(.rdata$_ZTV10MainWindow[_ZTV10MainWindow]+0x1b0): undefined reference to `FX::FXTopWindow::close(unsigned char)'
test.o:test.cpp:(.rdata$.refptr._ZN2FX11FXMetaClassD1Ev[.refptr._ZN2FX11FXMetaClassD1Ev]+0x0): undefined reference to `FX::FXMetaClass::~FXMetaClass()'
test.o:test.cpp:(.rdata$.refptr._ZN2FX12FXMainWindow9metaClassE[.refptr._ZN2FX12FXMainWindow9metaClassE]+0x0): undefined reference to `FX::FXMainWindow::metaClass'
test.o:test.cpp:(.rdata$.refptr._ZTVN2FX10FXListItemE[.refptr._ZTVN2FX10FXListItemE]+0x0): undefined reference to `vtable for FX::FXListItem'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:502: hidapi-testgui.exe] Error 1
make[2]: Leaving directory '/cygdrive/d/hidapi-master/testgui'
make[1]: *** [Makefile:556: all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/d/hidapi-master'
make: *** [Makefile:440: all] Error 2

Am I wrong somewhere?

HID connection status?

Hi, this is more a question than an issue. I am new to HID over USB. I found the lib. I use it via Lazarus / free pascal binding. All seems to be working but I have some questions. How do I detect the connection status? Let's say you pull out the USB device and push it back in. Or you lose connection to the device and want to retry the connection. I only see an Open and Close API.

Windows 7 32 bit Problem: Carriage Return every 64 chars?

I am using hid_read_timeout read measurement data from a HID device. This works fine under Linux and Windows 10 64 bit. Usually, I do

hid_read_timeout( _handle, readBuf, MAX_STR, static_cast(_recvTimeout->value()*1000) );

and scan the buffer until I find a Carriage Return. In Linux and Windows 64 bit the length of the buffer until carriage return is about 180. However, My software was used on a Windows 7 32 bit machine and there my buffers contain a Carriage Return already after 64 characters. What could be a possible reason?

macOS: location of IOKit.framework

Hi there,

according to

https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/OSX_Technology_Overview/SystemFrameworks/SystemFrameworks.html

IOKit.framework is located at "/System/Library/Frameworks/", but mac/hid.c:hidapi_IOHIDDeviceGetService() tries to find it at "/System/Library/".

--- a/hidapi/mac/hid.c
+++ b/hidapi/mac/hid.c
@@ -305,7 +305,7 @@ static io_service_t hidapi_IOHIDDeviceGe
 	 * and the fallback method will be used.
 	 */
 	if (iokit_framework == NULL) {
-		iokit_framework = dlopen("/System/Library/IOKit.framework/IOKit", RTLD_LAZY);
+		iokit_framework = dlopen("/System/Library/Frameworks/IOKit.framework/IOKit", RTLD_LAZY);
 
 		if (iokit_framework != NULL)
 			dynamic_IOHIDDeviceGetService = (dynamic_IOHIDDeviceGetService_t) dlsym(iokit_framework, "IOHIDDeviceGetService");

Regards,
Dennis

Please add link to release DLL to readme

In the DOWNLOAD section of the readme on the main page for libusb/hidapi here: https://github.com/libusb/hidapi PLEASE add that the latest release version of hidapi can be downloaded from:
https://github.com/libusb/hidapi/releases

I did not want to download the entire repository and figure out how to build it myself, I just wanted the last stable release so I could use it with easyhid for python under windows, and I could not figure it out at all.

I have been looking for this for DAYS it does not show up on ANY google searches when you do a search for HIDAPI.DLL and it's impossible for anyone who just needs the latest release dll to find it.

Finally someone was kind enough to point me to the link, if not I would still not be able to find it.. searching for it doesn't work because it's in a zip file.

macOS Catalina testgui segfault libdyld.dylib stack_not_16_byte_aligned_error

I built the hidapi and testgui on macOS Catalina, when I launch the TestGUI app, it halts with the following debug info

Process: hidapi-testgui [99735]
Path: /Users/USER/Downloads/*/TestGUI.app/Contents/MacOS/hidapi-testgui
Identifier: us.signal11.hidtestgui
Version: 1.0
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: hidapi-testgui [99735]
User ID: 501

Date/Time: 2020-01-21 16:29:47.519 -0800
OS Version: Mac OS X 10.15.2 (19C57)
Report Version: 12
Bridge OS Version: 3.0 (14Y906)
Anonymous UUID: F53BEB53-80E0-55AC-99A8-F1D3BFFB00E4

Sleep/Wake UUID: CDAFBF1B-7E33-46E1-962F-31426BDCCAC8

Time Awake Since Boot: 2800000 seconds
Time Since Wake: 190000 seconds

System Integrity Protection: enabled

Crashed Thread: 0 Dispatch queue: com.apple.main-thread

Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [99735]

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libdyld.dylib 0x00007fff691872be stack_not_16_byte_aligned_error + 0
1 ??? 0x0000600003598a50 0 + 105553172466256

Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000001438 rbx: 0x000000000000008c rcx: 0x0000000000000070 rdx: 0x0000000000000001
rdi: 0x0000600003598a50 rsi: 0x000000000000000c rbp: 0x0000600003598a50 rsp: 0x00007ffee5da11a8
r8: 0x0000000000000195 r9: 0x0000000000000070 r10: 0x00007fbd948026e8 r11: 0x000000010a044030
r12: 0x0000000000000006 r13: 0x0000000000000070 r14: 0x0000000000000018 r15: 0x0000000000000400
rip: 0x00007fff691872be rfl: 0x0000000000010202 cr2: 0x000000010b28b908

Logical CPU: 4
Error Code: 0x00000000
Trap Number: 13

I found some other folks having the similar issue in other projects and they suggest that adding -fno-stack-check to CFLAGS is a workaround, but I dont know where to add it.

Add official support for the Haiku operating system

The Haiku operating system already has a port that makes hidapi successfully compile on the operating system (some software depends on it as well), but the way it gets compiled is through additional patches that add the necessary configurations in the build system.

I think that it would be a better idea if the source got integrated into the upstream tree. I attempted to update the recipe from a version from 2016 to 0.9.5, but it was later brought up that another contributor had already made a tree with the necessary changes.

Before proceeding with a pull request (after getting some fine details done), I'd like to ask whether it would be okay before doing so.

hidapi-libusb don't reattach kernel driver

For instance in case of following code, the hid device (mouse) freeze after the program exits. Please change the VendorID and ProductID in the code during testing.

#ifdef WIN32
#include <windows.h>
#endif
#include <stdio.h>
#include <stdlib.h>
#include <hidapi/hidapi.h>

#define MAX_STR 255

int main(int argc, char* argv[])
{
	int res;
	unsigned char buf[65];
	wchar_t wstr[MAX_STR];
	hid_device *handle;
	int i;

	// Initialize the hidapi library
	res = hid_init();

	if (res==0)
		wprintf(L"HID Initialized.\n");

	// Open the device using the VID, PID,
	// and optionally the Serial number.
	handle = hid_open(0x46d, 0xc534, NULL);
	if (handle != NULL)
		wprintf(L"Device Opened with handle %d\n", handle);
	else{
		wprintf(L"Device not Opened.\n", handle);
		exit(1);
	}

	// Read the Manufacturer String
	res = hid_get_manufacturer_string(handle, wstr, MAX_STR);
	wprintf(L"Manufacturer String: %ls\n", wstr);

	// Read the Product String
	res = hid_get_product_string(handle, wstr, MAX_STR);
	wprintf(L"Product String: %ls\n", wstr);

	// Read the Serial Number String
	res = hid_get_serial_number_string(handle, wstr, MAX_STR);
	if(res==0)
		wprintf(L"Serial Number String: (%d) %ls\n", wstr[0], wstr);

	hid_close(handle);

	// Finalize the hidapi library
	res = hid_exit();

	return 0;
}

Compiling the program with -lhdiapi-libusb result in frozen device after program run (no issue found with -lhdiapi-hidraw). Same issue (link) was filed for signal11/hidapi.

macOS cannot open device with some specific paths

macOS cannot open device with path IOService:/AppleACPIPlatformExpert/PCI0@0/AppleACPIPCI/XHC1@14/XHC1@14000000/HS03@14300000/USB2.0 Hub@14300000/AppleUSB20Hub@14300000/AppleUSB20HubPort@14310000/HELLOKEY-8F3A4DEAFF1A0D6A@14310000/IOUSBHostInterface@0/IOUSBHostHIDDevice@14310000,0

Using 'node-hid' can open the device on Windows and Linux, but it cannot be opened on macOS.

I've submitted in 'node - hid issue, and discussed this matter todbot, specific can look here: node-hid/node-hid#348


I tested it on my colleague's computer today, and found that macOS Mojave 10.14.6 could open the device, but macOS Mojave 10.14.5 could not open the device, I will try to upgrade the system when I have time

hidapi license - closed source project

Hi,
hidapi may be used in a closed source project (proprietary software). It will be included in the software which is distributed in binary form.
I have seen the three possible licenses for hidapi.

Will it be correct and sufficient for a closed source project to add to the the own copyright notice a paragrph like

Part of the code for USB communication is
Copyright 2009, Alan Ott, Signal 11 Software.
All Rights Reserved.

or what will be the right way (i.e. text) to fullfil the license.
There is another USB device controlled by the software, but it is a HID.

Thanks for clarification !

Open non-zero interface of HID keyboard/mouse device on Windows

I want to use hidapi to open a Corsair K70 RGB keyboard device on Windows and Linux. The keyboard's latest firmware causes it to expose two interfaces - interface 0 and interface 1. Both interfaces use the HidUsb driver according to Zadig. The keyboard interface seems to be interface 0, as if I override the driver in Zadig the keyboard stops sending input to the PC. Interface 1 seems to be for the RGB control. I tried using libusb with the WinUSB filter driver and I could control the RGB on interface 1 but it prevented the keyboard from operating as a keyboard.

I also had some code from an old project that used the Windows USB API directly and it had an option to select the interface when opening the device by VID/PID. The code can be found here:

https://gitlab.com/CalcProgrammer1/KeyboardVisualizer/blob/master/KeyboardVisualizerCommon/UsbDevice.cpp#L43

I changed the GetDeviceHandle arguments to GetDeviceHandle(vendor, product, MI)

If I use this code, I can access the keyboard with this line:

dev.OpenDevice(CORSAIR_RGB_KEYBOARD_VID, CORSAIR_RGB_KEYBOARD_K70_PID, 1)

If I use hidapi, it fails to open the device. It looks like hidapi's hid_open function isn't finding the second interface or something. I would prefer using hidapi for both Windows and Linux instead of the Windows-only API directly.

Add Windows quirks to documentation and potential Windows libusb backend

Using hidapi on windows is constrained by multiple issues, i.e. the inability to gain exclusive access to many devices (see signal11/hidapi#231) and no access to mouse & keyboard devices (signal11/hidapi#313) . The latter is important since it affects fancy keyboards that offer lighting effects, and the most obvious approach would be to use hidapi, while this actually requires dealing with zadig and libusb.

Things like this should be added to the docs, so Windows users don't need to rediscover these issues all the time.

crash on device unplug on macOS Catalina (10.15)

Typical usage scenario (simplified):

hid_init();
dev = hid_open(...);
// use the device
// ...

// device physically disconnected somewhere here

// ...
// all further hid_* funcitons are gracefully failing

hid_close(dev); // ok here

hid_exit(); // <-- macOS Catalina - crash here

The cause (in hid_close):

hidapi/mac/hid.c

Lines 1122 to 1124 in 65d22a9

if (!dev->disconnected) {
IOHIDDeviceClose(dev->device_handle, kIOHIDOptionsTypeSeizeDevice);
}

+

hidapi/mac/hid.c

Lines 1097 to 1104 in 65d22a9

if (!dev->disconnected) {
IOHIDDeviceRegisterInputReportCallback(
dev->device_handle, dev->input_report_buf, dev->max_input_report_len,
NULL, dev);
IOHIDDeviceRegisterRemovalCallback(dev->device_handle, NULL, dev);
IOHIDDeviceUnscheduleFromRunLoop(dev->device_handle, dev->run_loop, dev->run_loop_mode);
IOHIDDeviceScheduleWithRunLoop(dev->device_handle, CFRunLoopGetMain(), kCFRunLoopDefaultMode);
}

The original comment from Alan:

hidapi/mac/hid.c

Lines 1119 to 1121 in 65d22a9

/* Close the OS handle to the device, but only if it's not
been unplugged. If it's been unplugged, then calling
IOHIDDeviceClose() will crash. */

it's been unplugged, then calling
IOHIDDeviceClose() will crash

Apparently that was the case for the version of macOS, where this was originally developed.
In Catalina (10.15) update - it is the opposite case: if we skip closing the device, the app crashes on hid_exit() (IOHIDManagerClose).


Ideally, of course, we should always close all handles, and avoid any resource leaks. Unfortunately, cannot do it unconditionally as some users on older systems might experience crashes as the original author.


Currently I have access only to macOS Catalina and cannot check the behaviour on other systems.
Would be great to check how it behaves on older systems, at least up(down) to 10.10.

macOS: Bluetooth HID devices have the same path

hidapi returns the same path IOService:/IOResources/IOBluetoothHCIController/AppleBroadcomBluetoothHostController/IOBluetoothDevice/IOBluetoothL2CAPChannel/IOBluetoothHIDDriver

For every Bluetooth HID device connected. Tested with:
Nintendo Switch JoyCon (L)
Nintendo Switch JoyCon (R)
Nintendo Switch ProController
Microsoft Bluetooth Mouse 5000

(all devices have unique product IDs and serial numbers)

As a result, hid_open(vendor_id, product_id, serial_number) does not open the correct device if there is more than one bluetooth device paired since it eventually calls hid_open_path, and all the paths are identical. It looks like it will always try to open the device that was paired first.

I can open the correct device if I store a copy of the IOHIDDeviceRef in hid_device_info and create an IOHIDDevice with the reference rather than looking up the IORegistry entry from the path.

This is on a MacBookPro11,1 running macOS 10.14.6.

Why did the call to hid_open () fail?

As USB host, am5728 evm board is connected with dlp module through USB HID V1.11.
The test function uses hidtest. in hidapi-master open source Running the test function on the ti am5728 evm board
failed to call hid_open (). Why did the call to hid_open () fail? Do you need to write dlp driver on 5728 single board?
Usb1.0 and udev libraries are currently used. Are there any restrictions on the version of the library? Thank you!
root@am57xx-evm:# ./hid_test
no device
unable to open device
Segmentation fault
root@am57xx-evm:#

The same test function can also correctly read dlp information in ubuntu, as follows:
[root@tl hid_test]# ./hid_test
Device Found
type: 0e0f 0003
path: /dev/hidraw0
serial_number:
Manufacturer: VMware
Product: VMware Virtual USB Mouse
Release: 103
Interface: 0

Device Found
type: 0451 6401
path: /dev/hidraw1
serial_number: LCR2
Manufacturer: Texas Instruments Inc.
Product: DLPC350
Release: 0
Interface: 0

Device Found
type: 0451 6401
path: /dev/hidraw2
serial_number: LCR2
Manufacturer: Texas Instruments Inc.
Product: DLPC350
Release: 0
Interface: 1

hid open dlp ok!
Manufacturer String: Texas Instruments Inc.
Product String: DLPC350
Serial Number String: (76) LCR2
Unable to read indexed string 1
Indexed String 1:
Feature Report

waiting...
waiting...
waiting...

When the dlp module is connected to the am5728 through the USB interface, the following information is printed:
root@am57xx-evm:/lib# [ 4071.898196] usb 1-1.2: new full-speed USB device number 9 using xhci-hcd
[ 4072.005095] usb 1-1.2: New USB device found, idVendor=0451, idProduct=6401
[ 4072.012029] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4072.019560] usb 1-1.2: Product: DLPC350
[ 4072.023426] usb 1-1.2: Manufacturer: Texas Instruments Inc.
[ 4072.029165] usb 1-1.2: SerialNumber: LCR2
[ 4072.067017] hid-generic 0003:0451:6401.000D: hiddev0: USB HID v1.11 Device [Texas Instruments Inc. DLPC350] on usb-xhci-hcd.1.auto-1.2/input0
[ 4072.087137] input: Texas Instruments Inc. DLPC350 as /devices/platform/44000000.ocp/48880000.omap_dwc3_1/48890000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.2/1-1.2:1.1/0003:0451:6401.000E/input/input9
[ 4072.158539] hid-generic 0003:0451:6401.000E: input: USB HID v1.11 Keyboard [Texas Instruments Inc. DLPC350] on usb-xhci-hcd.1.auto-1.2/input1

root@am57xx-evm:~# cat /proc/bus/input/devices
I: Bus=0019 Vendor=0001 Product=0001 Version=0100
N: Name="gpio_keys"
P: Phys=gpio-keys/input0
S: Sysfs=/devices/platform/gpio_keys/input/input1
U: Uniq=
H: Handlers=kbd event0
B: PROP=0
B: EV=100003
B: KEY=16c0 0 0 0

I: Bus=0000 Vendor=0000 Product=0000 Version=0000
N: Name="palmas_pwron"
P: Phys=palmas_pwron/input0
S: Sysfs=/devices/platform/44000000.ocp/48070000.i2c/i2c-0/0-0058/48070000.i2c:tps659038@58:tps659038_pwr_button/input/input0
U: Uniq=
H: Handlers=kbd event1
B: PROP=0
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0003 Vendor=0451 Product=6401 Version=0111
N: Name="Texas Instruments Inc. DLPC350"
P: Phys=usb-xhci-hcd.1.auto-1.2/input1
S: Sysfs=/devices/platform/44000000.ocp/48880000.omap_dwc3_1/48890000.usb/xhci-hcd.1.auto/usb1/1-1/1-1.2/1-1.2:1.1/0003:0451:6401.0008/input/input6
U: Uniq=LCR2
H: Handlers=sysrq kbd mouse0 event2
B: PROP=0
B: EV=120017
B: KEY=1f0000 0 0 800000 0 e0b0ffdf 1cfffff ffffffff fffffffe
B: REL=3
B: MSC=10
B: LED=1f

There is a usbhid module on am5728 single board, but see hid code, there is no dlp drive, do you need to add dlp driver?
root@am57xx-evm:#
root@am57xx-evm:# lsmod
Module Size Used by
ipv6 317996 26
hid_generic 941 0
usbhid 27328 0
gdbserverproxy 4477 0
cryptodev 36191 1
cmemk 29155 0
xhci_plat_hcd 4469 0
xhci_hcd 102093 1 xhci_plat_hcd
usbcore 191588 3 xhci_plat_hcd,usbhid,xhci_hcd

Add the 99-hid rule file to/ etc/ udev/ rules. d, which is modified to:

HIDAPI/hidraw
KERNEL=="hidraw*", ATTRS{busnum}=="1", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="003f", MODE="0666"

There are libraries of usb1.0 and udev on the am5728 veneer, as follows:
root@am57xx-evm:/lib# ls -all

lrwxrwxrwx 1 root root 17 Dec 29 2015 libudev.so.0 -> libudev.so.0.13.1
-rwxr-xr-x 1 root root 45928 Dec 29 2015 libudev.so.0.13.1
lrwxrwxrwx 1 root root 16 Oct 8 00:00 libudev.so.1 -> libudev.so.1.6.4
-rwxr-xr-x 1 root root 108816 Oct 7 23:27 libudev.so.1.6.4
lrwxrwxrwx 1 root root 19 Dec 29 2015 libusb-0.1.so.4 -> libusb-0.1.so.4.4.4
-rwxr-xr-x 1 root root 14628 Dec 29 2015 libusb-0.1.so.4.4.4
lrwxrwxrwx 1 root root 19 Dec 29 2015 libusb-1.0.so.0 -> libusb-1.0.so.0.1.0
-rwxr-xr-x 1 root root 81652 Dec 29 2015 libusb-1.0.so.0.1.0

drwxr-xr-x 5 root root 4096 Dec 29 2015 udev
root@am57xx-evm:/lib#

Non-free files? And to remove DDK build scripts.

Debian had code to remove windows/ddk_build/makefile and testgui/mac_support.cpp from the tarball in their debian/rules file

windows/ddk_build/makefile:

 Copyright (C) Microsoft Corporation 1995, 1996
       All Rights Reserved.

testgui/mac_support.cpp:

Some of this code is from Apple Documentation, most notably
 http://developer.apple.com/legacy/mac/library/documentation/AppleScript/Conceptual/AppleEvents/AppleEvents.pdf 

and the pdf (archived at http://web.archive.org/web/20141226100754/http://developer.apple.com/legacy/library/documentation/AppleScript/Conceptual/AppleEvents/AppleEvents.pdf) has a footer Copyright © 2005, 2007 Apple Inc. All Rights Reserved.

hiadpi venv python modue does not build on FreeBSD via pip

Hello world :-)

hidapi does not build on FreeBSD via python 3.6 venv pip. Looks like -lusb-1.0 problem as FreeBSD has its own libusb implementation that should use simply -lusb.

Also noted warning related to iconv type casting:

    hidapi/libusb/hid.c:458:18: warning: passing 'const char **' to parameter of type 'char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
            res = iconv(ic, &inptr, &inbytes, &outptr, &outbytes);
                            ^~~~~~
    /usr/include/iconv.h:58:41: note: passing argument to parameter here
    size_t  iconv(iconv_t, char ** __restrict,
                                             ^
    1 warning generated.

Details below:

    Running setup.py install for hidapi ... error
    ERROR: Command errored out with exit status 1:
     command: /(..)/venv36bsd/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rhbcnebq/hidapi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rhbcnebq/hidapi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-e8k1rl3a/install-record.txt --single-version-externally-managed --compile --install-headers /(..)/venv36bsd/include/site/python3.6/hidapi
         cwd: /tmp/pip-install-rhbcnebq/hidapi/
    Complete output (25 lines):
    running install
    running build
    running build_ext
    cythoning hid.pyx to hid.c
    /tmp/pip-install-rhbcnebq/hidapi/.eggs/Cython-0.29.13-py3.6-freebsd-12.0-RELEASE-p10-amd64.egg/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-install-rhbcnebq/hidapi/hid.pyx
      tree = Parsing.p_module(s, pxd, full_module_name)
    building 'hid' extension
    creating build
    creating build/temp.freebsd-12.0-RELEASE-p10-amd64-3.6
    creating build/temp.freebsd-12.0-RELEASE-p10-amd64-3.6/hidapi
    creating build/temp.freebsd-12.0-RELEASE-p10-amd64-3.6/hidapi/libusb
    cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/(..)/venv36bsd/include -I/usr/local/include/python3.6m -c hid.c -o build/temp.freebsd-12.0-RELEASE-p10-amd64-3.6/hid.o
    cc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -fstack-protector-strong -fno-strict-aliasing -fPIC -Ihidapi/hidapi -I/usr/include/libusb-1.0 -I/(..)/venv36bsd/include -I/usr/local/include/python3.6m -c hidapi/libusb/hid.c -o build/temp.freebsd-12.0-RELEASE-p10-amd64-3.6/hidapi/libusb/hid.o
    hidapi/libusb/hid.c:458:18: warning: passing 'const char **' to parameter of type 'char **' discards qualifiers in nested pointer types [-Wincompatible-pointer-types-discards-qualifiers]
            res = iconv(ic, &inptr, &inbytes, &outptr, &outbytes);
                            ^~~~~~
    /usr/include/iconv.h:58:41: note: passing argument to parameter here
    size_t  iconv(iconv_t, char ** __restrict,
                                             ^
    1 warning generated.
    creating build/lib.freebsd-12.0-RELEASE-p10-amd64-3.6
    cc -shared -lpthread -L/usr/local/lib -fstack-protector-strong build/temp.freebsd-12.0-RELEASE-p10-amd64-3.6/hid.o build/temp.freebsd-12.0-RELEASE-p10-amd64-3.6/hidapi/libusb/hid.o -L/usr/local/lib -lusb-1.0 -lpython3.6m -o build/lib.freebsd-12.0-RELEASE-p10-amd64-3.6/hid.so
    /usr/bin/ld: error: unable to find library -lusb-1.0
    cc: error: linker command failed with exit code 1 (use -v to see invocation)
    error: command 'cc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /(..)/venv36bsd/bin/python3.6 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-rhbcnebq/hidapi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-rhbcnebq/hidapi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-e8k1rl3a/install-record.txt --single-version-externally-managed --compile --install-headers /(..)/venv36bsd/include/site/python3.6/hidapi Check the logs for full command output.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.