Skip to content

Commit

Permalink
Merge pull request #489 from tadeubas/wondermv_simulator_fix
Browse files Browse the repository at this point in the history
WonderMV docs + img
  • Loading branch information
odudex authored Dec 9, 2024
2 parents 831954d + ffba652 commit e7153d3
Show file tree
Hide file tree
Showing 18 changed files with 145 additions and 15 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<img src="https://selfcustody.github.io/krux/img/maixpy_dock/logo-151.png" width="144">
<img src="https://selfcustody.github.io/krux/img/maixpy_yahboom/logo-156.png" width="116">
<img src="https://selfcustody.github.io/krux/img/maixpy_cube/logo-200.png" width="120">
<img src="https://selfcustody.github.io/krux/img/maixpy_wonder_mv/logo-152.png" width="116">
</p>

Krux is an open-source firmware facilitating the creation of Bitcoin signing devices from readily available components, such as Kendryte K210 devices. It transforms these devices into airgapped tools capable of handling transactions for both single and multisignature wallets, supporting offline signing via QR code or SD card, thus empowering users to securely self-custody their Bitcoin.
Expand Down Expand Up @@ -148,6 +149,9 @@ poetry run poe simulator-yahboom

# Run simulator on the device cube, then use keyboard (arrow keys UP or DOWN and ENTER)
poetry run poe simulator-cube

# Run simulator with the touch device wonderMV, then use mouse to navigate
poetry run poe simulator-wonder-mv
```

Note: With emulated SD card it is possible to store settings, encrypted mnemonics, also drop and sign PSBTs. After some time running, the simulator may become slow. If that happens, just close and open again!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Extract the latest version of Krux you downloaded and enter the folder:
unzip {{latest_krux}}.zip && cd {{latest_krux}}
```

Connect the device to your computer via USB (for Maix Amigo, make sure you’re using bottom port), power it on, and run the following, replacing `DEVICE` with either `m5stickv`, `amigo`, `bit`, `cube`, `dock` or `yahboom` (to yahboom you may need to manually specify the port, for example `/dev/ttyUSB0` on Linux or `COM6` on Windows):
Connect the device to your computer via USB (for Maix Amigo, make sure you’re using bottom port), power it on, and run the following, replacing `DEVICE` with either `m5stickv`, `amigo`, `bit`, `cube`, `dock`, `yahboom` or `wonder_mv` (to yahboom you may need to manually specify the port, for example `/dev/ttyUSB0` on Linux or `COM6` on Windows):
```bash
./ktool -B goE -b 1500000 maixpy_DEVICE/kboot.kfpkg
```
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started/installing/from-source.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ unzip kboot.kfpkg -d ./kboot/
```

### Flash the firmware onto the device
Connect the device to your computer via USB (for Maix Amigo, make sure you’re using bottom port), power it on, and run the following, replacing `DEVICE` with either `m5stickv`, `amigo`, `bit`, `cube`, `dock` or `yahboom`:
Connect the device to your computer via USB (for Maix Amigo, make sure you’re using bottom port), power it on, and run the following, replacing `DEVICE` with either `m5stickv`, `amigo`, `bit`, `cube`, `dock`, `yahboom` or `wonder_mv`:
```bash
# flash firmware to DEVICE
./krux flash maixpy_DEVICE
Expand Down
18 changes: 18 additions & 0 deletions docs/getting-started/installing/from-test-release.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,3 +124,21 @@ See the correct port at Device Manager > Ports (COM & LPT), in the example below
```pwsh
.\ktool-win.exe -B goE -b 1500000 -p COM6 maixpy_yahboom\kboot.kfpkg
```

#### Hiwonder WonderMV Vision Recognition Module
To Flash WonderMV you need to pass the `-B dan` parameter.

##### Linux
```bash
./ktool-linux -B dan -b 1500000 maixpy_wonder_mv/kboot.kfpkg
```

##### Mac
```bash
./ktool-mac -B dan -b 1500000 maixpy_wonder_mv/kboot.kfpkg
```

##### Windows
```pwsh
.\ktool-win.exe -B dan -b 1500000 maixpy_wonder_mv\kboot.kfpkg
```
2 changes: 1 addition & 1 deletion docs/getting-started/settings.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Here you choose between Thermal, CNC or none (default). Leave this setting to "n

<div style="clear: both"></div>

#### Touchscreen (Maix Amigo and Yahboom only)
#### Touchscreen (Maix Amigo, Yahboom and WonderMV only)
<img src="../../img/maixpy_amigo/touchscreen-150.png" align="right">

If your device has touchscreen you can change the touch detection threshold. If it is being too sensitive or detecting false or ghost touches, you should increase the threshold value, making it less sensitive. The other way is also valid, reduce the threshold to make the screen more sensitive to touches.
Expand Down
Binary file added docs/img/maixpy_wonder_mv/logo-152.en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion docs/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ hide:
<img src="img/maixpy_dock/logo-151.png" width="144">
<img src="img/maixpy_yahboom/logo-156.png" width="116">
<img src="img/maixpy_cube/logo-200.png" width="120">
<img src="img/maixpy_wonder_mv/logo-152.png" width="116">

Krux is an open-source firmware that transforms off-the-shelf Kendryte K210 devices, such as the Maix Amigo, M5StickV and [more](parts.md), into versatile bitcoin transaction signers. Beyond its core functionality, Krux is a flexible platform that can adapt to devices with different form factors, providing a suite of tools to assist with the creation and recovery of mnemonic backups, some of which include encryption options for enhanced security.

Devices like the Maix Amigo and Yahboom come ready to use, with large touchscreens that make it easy and user-friendly to operate. These devices are ideal for those looking for a plug-and-play solution. On the other hand, Krux also supports development board kits, which are perfect for DIY enthusiasts who enjoy customizing and building their own hardware setups.
Devices like the Maix Amigo, Yahboom or WonderMV come ready to use, with large touchscreens that make it easy and user-friendly to operate. These devices are ideal for those looking for a plug-and-play solution. On the other hand, Krux also supports development board kits, which are perfect for DIY enthusiasts who enjoy customizing and building their own hardware setups.

Interacting seamlessly with leading coordinator wallets through QR codes, SD cards, and even thermal printers, the user-friendly firmware offers unique features to support transactions and mnemonic backups in an offline environment.

Expand Down
17 changes: 15 additions & 2 deletions docs/parts.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

### Comparative Table

| Device | M5StickV | Maix Amigo | Maix Dock | Maix Bit | Yahboom k210 module | Maix Cube | WonderMV
| Device | M5StickV | Maix Amigo | Maix Dock | Maix Bit | Yahboom k210 module | Maix Cube | WonderMV |
| ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- | ------------- |
| Price range | US$ 50-55 | US$ 50-85 | US$ 27-35 | US$ 32-42 | US$ 45-61 | US$ 34-49 | US$ 58-86 |
| Screen size / resolution | 1.14" / 135*240 | 3.5" / 320*480 | 2.4" / 240*320 | 2.4" / 240*320 | 2" / 240*320 | 1.3" / 240*240 | 2" / 240*320 |
Expand Down Expand Up @@ -95,6 +95,19 @@ Below is a list of some distributors where you can find this device:

<div style="clear: both"></div>

### WonderMV
<img src="../img/maixpy_wonder_mv/logo-152.png" align="right" width="116">

It comes with a compatible 32G card, an USB card reader, and two Molex 51004 4-pin male-to-male cable (to connect to a [thermal printer](#optional-ttl-serial-thermal-printer)). Below is a list of some distributors where you can find this device:

- [AliExpress](https://www.aliexpress.com/w/wholesale-k210-wondermv.html)
- [Amazon](https://www.amazon.com/s?k=k210+WonderMV)
- [Hiwonder Store](https://www.hiwonder.com/products/wondermv)
- [Ruten](https://www.ruten.com.tw/item/show?22351444721094)
- [飆機器人](https://shop.playrobot.com/products/veo0116)

<div style="clear: both"></div>

### Maix Dock and Maix Bit
<img src="../img/maixpy_dock/logo-151.png" align="right" width="144">

Expand Down Expand Up @@ -135,4 +148,4 @@ Krux has the capability to print all QR codes it generates, including those for
Many TTL serial thermal printers may be compatible, but currently, the [Goojprt QR203](https://www.aliexpress.com/w/wholesale-Goojprt-QR203.html) has the best support (except this printer only supports ASCII or Chinese characters, non-ASCII characters will be printed as Chinese). The [Adafruit printer starter pack](https://www.adafruit.com/product/600) can also be a convenient option to get started, as it includes all the necessary components for printing (except the conversion cable). To ensure proper functionality, enable the printer driver in the [Krux settings](./getting-started/settings.md/#thermal), set the Tx pin and baud rate value to either 19200 or 9600 (depends on the printer), as explained in this [Adafruit printer tutorial](https://learn.adafruit.com/mini-thermal-receipt-printer/first-test). You will need to connect the device's Tx to the printer's Rx and device's ground to the printer's ground, do not connect any other pins because a wrong connection may damage your device. The printer requires a dedicated power supply, typically with an output of 5 to 9V (or 12V) and capable of supplying at least 2A. For more information, [see this discussion](https://github.com/selfcustody/krux/discussions/312).

#### (Optional) Conversion Cable for Thermal Printer
To connect the printer to M5StickV, Amigo or Cube, you will need a [grove conversion cable](https://store-usa.arduino.cc/products/grove-4-pin-male-to-grove-4-pin-cable-5-pcs) with a 4-pin male Grove connector on one end (to connect to the device) and 4-pin male jumpers on the other end (to connect to the printer). Check your device and printer model connection first, Yahboom comes with PH2.0 4Pin female connector; Dock and Bit doesn't have a connector. For a more reliable connection, it is recommended to cut and solder the wires of your custom cables instead of using jumpers.
To connect the printer to M5StickV, Amigo or Cube, you will need a [grove conversion cable](https://store-usa.arduino.cc/products/grove-4-pin-male-to-grove-4-pin-cable-5-pcs) with a 4-pin male Grove connector on one end (to connect to the device) and 4-pin male jumpers on the other end (to connect to the printer). Check your device and printer model connection first, Yahboom comes with PH2.0 4Pin female connector; Dock and Bit doesn't have a connector; WonderMV comes with [Molex 51004 4-pin connector](https://www.digikey.ca/en/products/detail/molex/0530150410/1785079) (used with smart servo). For a more reliable connection, it is recommended to cut and solder the wires of your custom cables instead of using jumpers. Here we have a description of some [inter-integrated circuit (I2C) connector standards](https://www.cable-tester.com/i2c-pin-out/).
2 changes: 1 addition & 1 deletion docs/snippets/camera-scan-tips.en.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
If you are in a dark environment, you can hold down the `ENTER` button of the M5StickV or Maix Amigo to turn on their LED light to potentially increase visibility. Some cameras (`OV7740`, `OV2640` and `GC2145`) have an anti-glare mode to better capture images from high brightness screens or with incident light, they are present on M5StickV, Amigo, Cube and Yahboom. To enable/disable the anti-glare mode on a supported device just press the `PAGE` button while scanning.
If you are in a dark environment, you can hold down the `ENTER` button of the M5StickV or Maix Amigo to turn on their LED light to potentially increase visibility. Some cameras (`OV7740`, `OV2640` and `GC2145`) have an anti-glare mode to better capture images from high brightness screens or with incident light, they are present on M5StickV, Amigo, Cube, Yahboom and WonderMV. To enable/disable the anti-glare mode on a supported device just press the `PAGE` button while scanning.
Binary file modified simulator/assets/maixpy_wonder_mv.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified simulator/assets/maixpy_wonder_mv_mask.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 4 additions & 5 deletions simulator/kruxsim/devices.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,11 +138,10 @@ def screenshot_rect(device):
screen.get_rect().center[1] - 13,
)
elif device == WONDER_MV:
# Todo: Adjust the rect for the Wonder MV device
rect.width -= 134
rect.height -= 155
rect.width -= 88
rect.height -= 129
rect.center = (
screen.get_rect().center[0],
screen.get_rect().center[1] + 29,
screen.get_rect().center[0] - 0,
screen.get_rect().center[1] + 10,
)
return rect
17 changes: 17 additions & 0 deletions simulator/sequences/wonder-mv/_load-12-word-mnemonic.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
include _wait-for-logo.txt

# Navigate to via QR
x3 press BUTTON_A

qrcode 12-word-mnemonic.png
wait 0.5

# Confirm words
press BUTTON_A

# Don't add a passphrase
press BUTTON_C
press BUTTON_A

# Confirm fingerprint
press BUTTON_A
17 changes: 17 additions & 0 deletions simulator/sequences/wonder-mv/_load-12-word-mnemonic_b.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
include _wait-for-logo.txt

# Navigate to via QR
x3 press BUTTON_A

qrcode 12-word-mnemonic_b.png
wait 0.5

# Confirm words
press BUTTON_A

# Don't add a passphrase
press BUTTON_C
press BUTTON_A

# Confirm fingerprint
press BUTTON_A
17 changes: 17 additions & 0 deletions simulator/sequences/wonder-mv/_load-24-word-mnemonic.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
include _wait-for-logo.txt

# Navigate to via QR
x3 press BUTTON_A

qrcode 24-word-mnemonic.png
wait 0.5

# Confirm words
press BUTTON_A

# Don't add a passphrase
press BUTTON_C
press BUTTON_A

# Confirm fingerprint
press BUTTON_A
11 changes: 11 additions & 0 deletions simulator/sequences/wonder-mv/_mnemonic-24-word.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
include _load-24-word-mnemonic.txt

press BUTTON_A
wait 1

# Navigate to Mnemonic
x2 press BUTTON_A

screenshot mnemonic-24-word-1.png

press BUTTON_A
33 changes: 33 additions & 0 deletions simulator/sequences/wonder-mv/_sign-psbt.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
include _load-12-word-mnemonic.txt
press BUTTON_A
wait 1

# Navigate to Sign
x2 press BUTTON_C
press BUTTON_A

press BUTTON_A
screenshot sign-psbt-wallet-not-loaded-warning.png

press BUTTON_A
qrcode singlesig-psbt-p1of5.png
wait 0.5
qrcode singlesig-psbt-p2of5.png
wait 0.5
qrcode singlesig-psbt-p3of5.png
wait 0.5
qrcode singlesig-psbt-p4of5.png
wait 0.5
qrcode singlesig-psbt-p5of5.png
wait 0.5

screenshot sign-psbt-sign-prompt.png

press BUTTON_A
wait 0.5
screenshot sign-psbt-signed-qr.png
wait 0.5
screenshot sign-psbt-signed-qr-2.png
wait 0.5

press BUTTON_A
6 changes: 3 additions & 3 deletions simulator/simulator.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,9 @@ def run_krux():
AMIGO_SIZE = (150, 252)
M5STICKV_SIZE = (125, 247)
DOCK_SIZE = (151, 258)
YAHBOOM_SIZE = (156,220)
CUBE_SIZE = (200,212)
WONDER_MV_SIZE = (156, 220)
YAHBOOM_SIZE = (156, 220)
CUBE_SIZE = (200, 212)
WONDER_MV_SIZE = (152, 220)

# Handle screenshots scale and alpha bg
# When exporting the mask from GIMP uncheck "Save info about transparent pixels color"
Expand Down

0 comments on commit e7153d3

Please sign in to comment.