Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace libusbsio with hidapi #35

Merged
merged 1 commit into from
Aug 12, 2024
Merged

Replace libusbsio with hidapi #35

merged 1 commit into from
Aug 12, 2024

Conversation

robin-nitrokey
Copy link
Member

@robin-nitrokey robin-nitrokey commented Aug 6, 2024

This commit is extracted from: Nitrokey/pynitrokey#523

If the hid module cannot be loaded, a warning is raised so that the SDK
can still be used for other devices if hidapi is not working correctly.


Depends on:

@robin-nitrokey robin-nitrokey changed the title Replace libusbsio with hid Replace libusbsio with hidapi Aug 7, 2024
@robin-nitrokey robin-nitrokey marked this pull request as ready for review August 7, 2024 14:02
@sosthene-nitrokey
Copy link
Contributor

When using it from nitropy (NKDEV=true nitropy nk3 list) I get:

File "/mnt/bigdrive/soso-nitrokey/Code/pynitrokey/venv/lib/python3.12/site-packages/nitrokey/trussed/_bootloader/lpc55_upload/utils/interfaces/device/usb_device.py", line 172, in enumerate
    for dev in hid.enumerate(vendor_id=vid or 0, product_id=pid or 0):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: enumerate() got an unexpected keyword argument 'vendor_id'

@sosthene-nitrokey
Copy link
Contributor

Right I may have messed up the make-update order. After cleaning the venv and recreating it it works.

This commit is extracted from: Nitrokey/pynitrokey#523

If the hid module cannot be loaded, a warning is raised so that the SDK
can still be used for other devices if hidapi is not working correctly.

Co-authored-by: Sosthène Guédon <[email protected]>
@robin-nitrokey robin-nitrokey merged commit 20df11f into main Aug 12, 2024
22 checks passed
@robin-nitrokey robin-nitrokey deleted the libusbsio branch August 12, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants