Nitrokey / pynitrokey

Python client for Nitrokey devices
Apache License 2.0
94 stars 28 forks source link

Get rid of libusbio #523

Open sosthene-nitrokey opened 3 months ago

sosthene-nitrokey commented 3 months ago

Needs testing on windows and macos edit: meissner hijacking this

daringer commented 1 week ago

updated PR desc

mmerklinger commented 1 week ago

Tested on macOS 14 (ARM64). Listing and reading the version works. Then I attempted an update of the NK3. This fails, leaving the NK3 in bootloader mode. Running the update again returns the same error. Removing the forced two-step update process has the same outcome.

nitropy_output.txt nitropy.log.iymm54or.txt

daringer commented 6 days ago

ah ok - the error on mac is the same as on linux:

230      WARNING pynitrokey.cli An unhandled exception occurred
Traceback (most recent call last):
  File "/Users/testuser/Projects/pynitrokey/venv/lib/python3.9/site-packages/pynitrokey/trussed/bootloader/lpc55_upload/utils/interfaces/device/usb_device.py", line 78, in open
    self._device = hid.device.open_path(self.path)
TypeError: descriptor 'open_path' for 'hid.device' objects doesn't apply to a 'bytes' object

quite obviously it is not using hid.device correctly....

daringer commented 6 days ago

works with lpc on linux for me now, @mmerklinger please check