Skip to content

Commit

Permalink
Merge #768: jade: update Jade api to 1.0.33
Browse files Browse the repository at this point in the history
f4f7fe5 jade: update Jade api to 1.0.33 (Jamie C. Driver)
21f6025 jade setup_environment: tweak qemu clone following issue with upstream repo (Jamie C. Driver)

Pull request description:

  This extends the serial api to recognise recently supported hardware.

ACKs for top commit:
  achow101:
    ACK f4f7fe5

Tree-SHA512: 3f830d67ab96aa59e543832cf4997c3c237bbaf16de1881dfc75bd83e1d703039e7e8968428b06c8ab7d1780946db500e8c1f4bfadd022916e97b94a0a9ac86d
  • Loading branch information
achow101 committed Dec 11, 2024
2 parents 9ebf888 + f4f7fe5 commit 3174515
Show file tree
Hide file tree
Showing 6 changed files with 305 additions and 24 deletions.
4 changes: 2 additions & 2 deletions hwilib/devices/jade.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

from .jadepy import jade
from .jadepy.jade import JadeAPI, JadeError
from .jadepy.jade_serial import JadeSerialImpl

from serial.tools import list_ports

Expand Down Expand Up @@ -58,7 +59,6 @@
# The test emulator port
SIMULATOR_PATH = 'tcp:127.0.0.1:30121'

JADE_DEVICE_IDS = [(0x10c4, 0xea60), (0x1a86, 0x55d4), (0x0403, 0x6001), (0x1a86, 0x7523)]
HAS_NETWORKING = hasattr(jade, '_http_request')

py_enumerate = enumerate # To use the enumerate built-in, since the name is overridden below
Expand Down Expand Up @@ -533,7 +533,7 @@ def _get_device_entry(device_model: str, device_path: str) -> Dict[str, Any]:
# Scan com ports looking for the relevant vid and pid, and use 'path' to
# hold the path to the serial port device, eg. /dev/ttyUSB0
for devinfo in list_ports.comports():
if (devinfo.vid, devinfo.pid) in JADE_DEVICE_IDS:
if (devinfo.vid, devinfo.pid) in JadeSerialImpl.JADE_DEVICE_IDS:
results.append(_get_device_entry('jade', devinfo.device))

# If we can connect to the simulator, add it too
Expand Down
2 changes: 1 addition & 1 deletion hwilib/devices/jadepy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

This is a slightly stripped down version of the official [Jade](https://github.com/Blockstream/Jade) python library.

This stripped down version was made from tag [0.1.38](https://github.com/Blockstream/Jade/releases/tag/0.1.38)
This stripped down version was made from tag [1.0.33](https://github.com/Blockstream/Jade/releases/tag/1.0.33)

## Changes

Expand Down
2 changes: 1 addition & 1 deletion hwilib/devices/jadepy/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from .jade import JadeAPI
from .jade_error import JadeError

__version__ = "0.2.0"
__version__ = "1.0.33"
Loading

0 comments on commit 3174515

Please sign in to comment.