Port libccid to QNX 8.0 with USB device enumeration#178
Conversation
|
How is the author of |
Thanks for the review! I’ll get that copyright header updated. Just as a heads-up, I used GitHub Copilot (Claude 4.5 Haiku) to help develop this patch, and I'll be sure to include that in the commit message. |
Add libusb API shim layer for QNX using native libusbdi. Enables USB device discovery and CCID reader detection on QNX 8.0 Neutrino systems. - Implement libusb_shim.h and libusb_shim_qnx.c with libusbdi integration - Add CMake build system for QNX aarch64le cross-compilation - Modify ccid_usb.c/h for conditional QNX includes - Update documentation with QNX support and build instructions Tested on QNX Raspberry Pi: enumeration working, CCID detection verified AI assistance used: GitHub Copilot(Claude Haiku 4.5)
|
You write: I do not (yet) have this device in my list of CCID devices. What is used to build the driver? meson or CMake? |
|
@LudovicRousseau Apologies for the confusion. To clarify, the Pico 2 is not CCID-compliant. Since I lack a commercial CCID device for testing, I used an un-provisioned RP2350 with a dummy VID/PID and hardcoded a fallback on line #705 to simulate compliance. I plan to patch my local firmware with a valid VID/PID for testing and remove this hardcoded logic from libusb_shim_qnx.c if that make sense, please advice. The primary goal of this PR is to port libccid and subsequently the pcsc tool to QNX for educational purposes (using QNX hobbyist license). I am also currently working on pcsc port.
I initially tried Meson but found it difficult to manually configure the cross-file environment. CMake’s platform modules provided much smoother auto-detection after sourcing qnx_sdp.env. Consequently, I will remove the QNX-specific changes from meson.build as they are no longer required for this cross-compilation flow |
- Refactor src/libusb_shim_qnx.c to use perform_synchronous_transfer helper for bulk and interrupt transfers. - Implement synchronous behavior using pthread_cond_wait and usbd_io callbacks. - Map QNX USBD_STATUS_* codes to libusb error codes (e.g., TIMEOUT, STALL). - Update libusb_claim_interface to properly open pipes for all endpoints and handle configuration iteration. - Remove synthetic descriptor fallback; use real descriptors from QNX stack. - Add examples/test_transfer.c for verifying transfer functionality. - Add examples/qnx_reference_test.c and examples/linux_verify.py as reference tools. - Update QNX_PORTING_GUIDE.md to reflect current status (Synchronous Transfers: Working). - Update CMakeLists.txt to build test utilities. - Cleanup meson.build and qnx-toolchain.cmake. AI assitant use: Github Copilot(Gemini)
|
@LudovicRousseau Please find screenshot below and attached test output logs for your reference. |

Add libusb API shim layer for QNX using native libusbdi. Enables USB device discovery and CCID reader detection on QNX 8.0 Neutrino systems.
Tested on QNX Raspberry Pi interfaced to a RP2350 running pico-hsm: enumeration working, CCID detection verified
AI assistance used: GitHub Copilot(Claude Haiku 4.5)