Skip to content

hidapi-0.12.0 Test matrix #407

Closed
Closed

Description

@Youw

Latest release candidate: hidapi-0.12.0-rc1

Activity

  1. added
    Release
    on May 3, 2022
  2. mcuee commented on May 3, 2022

    @mcuee
    Member

    I should be able to test under the following system. I will use CMake on most of the systems. Then I will also test the VS solution using VS2019.

    For hiapttester, I will try similar testing as mentioned in #285.

    macOS 12 ARM64 (mac Mini M1)

    • build: Apple clang 13.1.6, library built is okay but not hidtest if using CMake
    • run: hidtest (failed to build under CMake but okay under auto-tools) and hidapitester

    macOS 12 x86_64 using Rosetta Translation, not native (mac Mini M1)

    • build: Apple clang 13.1.6, library built is okay but not hidtest if using CMake
    • run: hidtest (failed to build under CMake but okay under auto-tools) and hidapitester

    Linux x86_64 (Ubuntu 20.04)

    • build: gcc 9.4 (using CMake and auto-tools)
    • run: hidtest and hidaptester

    Linux ARM32 (Raspberry Pi 400 running Raspberry Pi OS Bullseye 32 bit)

    • build: gcc 10.2.1
    • run: hidtest (okay) and hidaptester (failed but probably due to the OS)

    Linux ARM64 (Raspberry Pi 400 running Raspberry Pi OS Bullseye 64 bit)

    • build: gcc 10.2.1
    • run: hidtest and hidaptester

    Windows VS2019 solution 64 bit (Windows 11 x64 laptop)

    • build: okay
    • run: hidtest

    Windows VS2019 solution 32 bit (Windows 11 x64 laptop)

    • build: okay
    • run: hidtest

    Windows VS2019 CMake 64 bit (Windows 11 x64 laptop)

    • build: okay
    • run: hidtest

    Windows VS2022 CMake 64 bit (Windows 11 x64 laptop)

    • build: okay
    • run: hidtest

    Windows MinGW 64 bit (Windows 11 x64 laptop)

    • build: MSYS2 MinGW-w64 64bit GCC
    • run: hidtest and hidaptester

    Windows MinGW 32 bit (Windows 11 x64 laptop)

    • build: MinGW-w64 32 bit GCC
    • run: hidtest and hidaptester

    FreeBSD 13.0 Release x86_64 (VirtualBox VM under Windows 11 x64 laptop)

    • build: FreeBSD clang + CMake
    • run: hidtest and hidaptester (hidapitester needs some twist to build)
  3. mcuee commented on May 3, 2022

    @mcuee
    Member

    I can not test macOS Intel but I am sure there are people who can test it. Same for FreeBSD. Then I am probably not good at testing cython-hidapi and node-hid but again other people can test.

    Hopefully someone can test macOS Intel and older macOS versions, old Windows XP/Vista/7 32bit/64bit versions. It will be good too that the users of the language bindings can test as well.

    Then it will be helpful if Linux distro maintainers of hidapi can check out this new release as well.

    The hope is to have the release in two weeks' time.

    My Wish list of some people can help to carry out the test. hidtest, hidapitester or other test application can be used based on the devices the tester has.

    But for the release we should be okay even if some of the configurations are not tested.

    hidapi 0.12.0-rc1

    • Windows 7 64 bit (by JoergAtGithub using VS2019+Cmake)
    • Windows 7 32bit
    • Windows XP 32bit ??
    • Linux distro -- Debian
    • Linux distro -- Fedora
    • Linux distro -- Arch
    • Linux RISC-V ??
    • FreeBSD x86_64 -- FreeBSD clang 11.0.1+CMake, done by Xiaofan
    • macOS x86_64
    • Mac OS X Snow Leopard i386 ??
    • Mac OS X Leopard Power PC ??

    Language binding: cython-hidapi

    • Windows 10/11 64bit
    • Linux x86_64
    • macOS Intel x86_64
    • macOS ARM64
    • FreeBSD x86_64

    Language binding: node-hid

    • Windows 10/11 64bit
    • Linux x86_64
    • macOS Intel x86_64
    • macOS ARM64
    • FreeBSD x86_64

    macports seem to provide a good one for macOS support.
    Ref: https://ports.macports.org/port/hidapi/details/

    From here for HIDAPI Version: 0.11.2
    https://ports.macports.org/port/hidapi/details/

    • Monterey (arm64)
    • Monterey (x86_64)
    • Big Sur (arm64)
    • Big Sur (x86_64)
    • Catalina
    • Mojave
    • High Sierra
    • Sierra
    • El Capitan
    • Yosemite
    • Mavericks
    • Mountain Lion
    • Lion
    • Snow Leopard (x86_64)
    • Snow Leopard (i386)
    • Leopard (ppc legacy) -->???
  4. mcuee commented on May 3, 2022

    @mcuee
    Member

    BTW, github actions have already tested the build of hidapi 0.12.0-rc1 under the following platform
    https://github.com/libusb/hidapi/actions/runs/2263027445

    1. macOS 11 automake and cmake using Apple clang
    2. Ubuntu 20.04 cmake
    3. Windows Server 2022 cmake: msvc (VS2022), nmake (VS2022) and MinGW gcc 8.1.0

    Take note there are warnings under macOS github action build.

    Run make install
      make install
      shell: /bin/bash -e {0}
    [ 50%] Building C object src/mac/CMakeFiles/hidapi_darwin.dir/hid.c.o
    /Users/runner/work/hidapi/hidapi/hidapisrc/mac/hid.c:793:39: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion]
                            return IOServiceGetMatchingService(NULL, IORegistryEntryIDMatching(entry_id));
                                                               ^~~~
    /Applications/Xcode_13.[2](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:2).1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/1[3](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:3).0.0/include/stddef.h:89:16: note: expanded from macro 'NULL'
    #  define NULL ((void*)0)
                   ^~~~~~~~~~
    /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:[4](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:4)19:14: note: passing argument to parameter 'mainPort' here
            mach_port_t     mainPort,
                            ^
    /Users/runner/work/hidapi/hidapi/hidapisrc/mac/hid.c:798:34: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion]
                    return IORegistryEntryFromPath(NULL, path);
                                                   ^~~~
    /Applications/Xcode_13.2.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/include/stddef.h:89:16: note: expanded from macro 'NULL'
    #  define NULL ((void*)0)
                   ^~~~~~~~~~
    /Applications/Xcode_13.2.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:964:1[5](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:5): note: passing argument to parameter 'mainPort' here
            mach_port_t             mainPort,
                                    ^
    2 warnings generated.
    [[10](https://github.com/libusb/hidapi/runs/6270984049?check_suite_focus=true#step:5:10)0%] Linking C shared library hidapi.framework/hidapi
    
    
  5. mcuee commented on May 3, 2022

    @mcuee
    Member

    hidapitest log under Ubuntu 20.04 (x86_64).

    ~/build/hidapitester$ ./hidapitester --vidpid 0925:7001  -l 3 --open --send-output 2,2,3 --read-input
    Opening device, vid/pid: 0x0925/0x7001
    Writing output report of 3-bytes...wrote 3 bytes:
     02 02 03
    Reading 3-byte input report 0, 250 msec timeout...read 3 bytes:
     01 02 03
    Closing device
    
    ./hidapitester --vidpid 0925:7001  -l 4 --open --send-feature 3,4,5,6 --read-feature 4
    Opening device, vid/pid: 0x0925/0x7001
    Writing 4-byte feature report...wrote 4 bytes:
     03 04 05 06
    Reading 4-byte feature report, report_id 4...read 3 bytes:
     04 04 05 00
    Closing device
    
    

    Under Windows 11 and MSYS2 MinGW 32/64bit

    
    (py39x64venv) PS C:\work\libusb\hidapitester> .\hidapitester_mingw32.exe --vidpid 0925:7001  -l 3 --open --send-output 2,2,3 --read-input
    Opening device, vid/pid: 0x0925/0x7001
    Writing output report of 3-bytes...wrote 3 bytes:
     02 02 03
    Reading 3-byte input report 0, 250 msec timeout...read 3 bytes:
     01 02 03
    Closing device
    (py39x64venv) PS C:\work\libusb\hidapitester> .\hidapitester_mingw32.exe --vidpid 0925:7001  -l 4 --open --send-feature 3,4,5,6 --read-feature 4
    Opening device, vid/pid: 0x0925/0x7001
    Writing 4-byte feature report...wrote 4 bytes:
     03 04 05 06
    Reading 4-byte feature report, report_id 4...read 3 bytes:
     04 04 05 00
    Closing device
    

    Under Mac Mini M1.

    mcuee@mcuees-Mac-mini hidapitester % ./hidapitester --vidpid 0925:7001  -l 3 --open --send-output 2,2,3 --read-input
    Opening device, vid/pid: 0x0925/0x7001
    Writing output report of 3-bytes...wrote 3 bytes:
     02 02 03
    Reading 3-byte input report 0, 250 msec timeout...read 3 bytes:
     01 02 03
    Closing device
    mcuee@mcuees-Mac-mini hidapitester % ./hidapitester --vidpid 0925:7001  -l 4 --open --send-feature 3,4,5,6 --read-feature 4
    Opening device, vid/pid: 0x0925/0x7001
    Writing 4-byte feature report...wrote 4 bytes:
     03 04 05 06
    Reading 4-byte feature report, report_id 4...read 3 bytes:
     04 04 05 00
    Closing device
    

    Somehow it failed for the loopback of output report to input report, under Raspberry Pi 400 (Raspberry Pi OS 32bit). But I think hidapi is probably okay and it is rather a problem with the Raspberry Pi OS 32bit. My OS is not up to date so I will try again after updating the OS.

    pi@raspberrypi:~/build/libusb/hidapitester $ sudo ./hidapitester --vidpid 0925:7001  -l 3 --open --send-output 2,2,3 --read-input 
    Opening device, vid/pid: 0x0925/0x7001
    Writing output report of 3-bytes...wrote 3 bytes:
     02 02 03
    Reading 3-byte input report 0, 250 msec timeout...read 0 bytes:
    Closing device
    
    pi@raspberrypi:~/build/libusb/hidapitester $ sudo ./hidapitester --vidpid 0925:7001  -l 4 --open --send-feature 3,4,5,6 --read-feature 4
    Opening device, vid/pid: 0x0925/0x7001
    Writing 4-byte feature report...wrote 4 bytes:
     03 04 05 06
    Reading 4-byte feature report, report_id 4...read 3 bytes:
     04 04 05 00
    Closing device
    
    

    No problem under Raspberry Pi OS 64 bit.

    mcuee@raspberrypi:~/build/hidapi/hidapitester $ sudo ./hidapitester --vidpid 0925:7001  -l 3 --open --send-output 2,2,3 --read-input
    Opening device, vid/pid: 0x0925/0x7001
    Writing output report of 3-bytes...wrote 3 bytes:
     02 02 03
    Reading 3-byte input report 0, 250 msec timeout...read 3 bytes:
     01 02 03
    Closing device
    mcuee@raspberrypi:~/build/hidapi/hidapitester $ sudo ./hidapitester --vidpid 0925:7001  -l 4 --open --send-feature 3,4,5,6 --read-feature 4
    Opening device, vid/pid: 0x0925/0x7001
    Writing 4-byte feature report...wrote 4 bytes:
     03 04 05 06
    Reading 4-byte feature report, report_id 4...read 3 bytes:
     04 04 05 00
    Closing device
    
    
    
  6. mcuee commented on May 3, 2022

    @mcuee
    Member

    @todbot If possible, please help to carry out some tests using node-hid and hidapitester as you seem to have many working device FW to test hidapi.

  7. mcuee commented on May 3, 2022

    @mcuee
    Member

    @Youw
    The Darwin CMake build failed (for hidtest) under my Mac Mini M1 (Apple clang), either for the native build or the x86_64 build under Rosetta.

    Same thing happened if I use "brew install hidapi --HEAD".

    github action does not detect this since it does not build hidtest.

    
    mcuee@mcuees-Mac-mini build % make
    [ 25%] Building C object src/mac/CMakeFiles/hidapi_darwin.dir/hid.c.o
    /Users/mcuee/build/hidapi/hidapi-hidapi-0.12.0-rc1/mac/hid.c:793:39: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion]
                            return IOServiceGetMatchingService(NULL, IORegistryEntryIDMatching(entry_id));
                                                               ^~~~
    /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/stddef.h:89:16: note: expanded from macro 'NULL'
    #  define NULL ((void*)0)
                   ^~~~~~~~~~
    /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:419:14: note: passing argument to parameter 'mainPort' here
            mach_port_t     mainPort,
                            ^
    /Users/mcuee/build/hidapi/hidapi-hidapi-0.12.0-rc1/mac/hid.c:798:34: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion]
                    return IORegistryEntryFromPath(NULL, path);
                                                   ^~~~
    /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/stddef.h:89:16: note: expanded from macro 'NULL'
    #  define NULL ((void*)0)
                   ^~~~~~~~~~
    /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:964:15: note: passing argument to parameter 'mainPort' here
            mach_port_t             mainPort,
                                    ^
    2 warnings generated.
    [ 50%] Linking C shared library libhidapi.dylib
    [ 50%] Built target hidapi_darwin
    [ 75%] Building C object hidtest/CMakeFiles/hidtest.dir/test.c.o
    /Users/mcuee/build/hidapi/hidapi-hidapi-0.12.0-rc1/hidtest/test.c:40:10: fatal error: 'hidapi_darwin.h' file not found
    #include <hidapi_darwin.h>
             ^~~~~~~~~~~~~~~~~
    1 error generated.
    make[2]: *** [hidtest/CMakeFiles/hidtest.dir/test.c.o] Error 1
    make[1]: *** [hidtest/CMakeFiles/hidtest.dir/all] Error 2
    make: *** [all] Error 2
    
    

    Auto-tools build is okay.

    
    mcuee@mcuees-Mac-mini build_auto % make
    /Library/Developer/CommandLineTools/usr/bin/make  all-recursive
    Making all in mac
      CC       hid.lo
    ../../mac/hid.c:793:39: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion]
                            return IOServiceGetMatchingService(NULL, IORegistryEntryIDMatching(entry_id));
                                                               ^~~~
    /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/stddef.h:89:16: note: expanded from macro 'NULL'
    #  define NULL ((void*)0)
                   ^~~~~~~~~~
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:419:14: note: passing argument to parameter 'mainPort' here
            mach_port_t     mainPort,
                            ^
    ../../mac/hid.c:798:34: warning: incompatible pointer to integer conversion passing 'void *' to parameter of type 'mach_port_t' (aka 'unsigned int') [-Wint-conversion]
                    return IORegistryEntryFromPath(NULL, path);
                                                   ^~~~
    /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/stddef.h:89:16: note: expanded from macro 'NULL'
    #  define NULL ((void*)0)
                   ^~~~~~~~~~
    /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Headers/IOKitLib.h:964:15: note: passing argument to parameter 'mainPort' here
            mach_port_t             mainPort,
                                    ^
    2 warnings generated.
      CCLD     libhidapi.la
    Making all in hidtest
      CC       test.o
      CCLD     hidtest
    make[2]: Nothing to be done for `all-am'.
    
  8. Youw commented on May 3, 2022

    @Youw
    MemberAuthor

    Interesting, when I checked locally, mach_port_t was defined as a pointer to some forward declarated type.

  9. Youw commented on May 3, 2022

    @Youw
    MemberAuthor
    /Users/mcuee/build/hidapi/hidapi-hidapi-0.12.0-rc1/hidtest/test.c:40:10: fatal error: 'hidapi_darwin.h' file not found
    #include <hidapi_darwin.h>
             ^~~~~~~~~~~~~~~~~
    

    I remember I've been fixing it. Maybe the fix got lost in a merge conflict or smth.
    Thanks for finding it. I'll update the CI script to test this as well.

  10. JoergAtGithub commented on May 3, 2022

    @JoergAtGithub
    Contributor

    I compiled it on Windows 7 VisualStudio 2019 CMake. All I tried, works as before!

  11. Youw commented on May 4, 2022

    @Youw
    MemberAuthor

    #409 with the fix

  12. mcuee commented on May 6, 2022

    @mcuee
    Member

    #409 is good and it has fixed the warnings and hidtest build issues under macOS. It has been merged.
    As far as I am concerned it is good to go. But let's probably wait a few days more to see if anything popping up.

  13. mcuee commented on Aug 1, 2022

    @mcuee
    Member

    hidapi 0.12.0 has been released on 25 May 2022. So this can be closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Release

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions