diff --git a/README.md b/README.md index 18b5c114d..d37610cf0 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ +
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. @@ -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! diff --git a/docs/getting-started/installing/from-pre-built-release.en.md b/docs/getting-started/installing/from-pre-built-release.en.md index 541f600d1..2ff00025a 100644 --- a/docs/getting-started/installing/from-pre-built-release.en.md +++ b/docs/getting-started/installing/from-pre-built-release.en.md @@ -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 ``` diff --git a/docs/getting-started/installing/from-source.en.md b/docs/getting-started/installing/from-source.en.md index 47267d638..fd9a7ecac 100644 --- a/docs/getting-started/installing/from-source.en.md +++ b/docs/getting-started/installing/from-source.en.md @@ -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 diff --git a/docs/getting-started/installing/from-test-release.en.md b/docs/getting-started/installing/from-test-release.en.md index 4a4f19e92..90a8c4a49 100644 --- a/docs/getting-started/installing/from-test-release.en.md +++ b/docs/getting-started/installing/from-test-release.en.md @@ -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 +``` diff --git a/docs/getting-started/settings.en.md b/docs/getting-started/settings.en.md index 98f474277..6297c9217 100644 --- a/docs/getting-started/settings.en.md +++ b/docs/getting-started/settings.en.md @@ -96,7 +96,7 @@ Here you choose between Thermal, CNC or none (default). Leave this setting to "n -#### Touchscreen (Maix Amigo and Yahboom only) +#### Touchscreen (Maix Amigo, Yahboom and WonderMV only) 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. diff --git a/docs/img/maixpy_wonder_mv/logo-152.en.png b/docs/img/maixpy_wonder_mv/logo-152.en.png new file mode 100644 index 000000000..d419d6c5f Binary files /dev/null and b/docs/img/maixpy_wonder_mv/logo-152.en.png differ diff --git a/docs/index.en.md b/docs/index.en.md index b772d12eb..96d9ae2b1 100644 --- a/docs/index.en.md +++ b/docs/index.en.md @@ -9,10 +9,11 @@ hide: + 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. diff --git a/docs/parts.en.md b/docs/parts.en.md index c9a9955bf..df4229d4c 100644 --- a/docs/parts.en.md +++ b/docs/parts.en.md @@ -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 | @@ -95,6 +95,19 @@ Below is a list of some distributors where you can find this device: +### WonderMV + + +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) + + + ### Maix Dock and Maix Bit @@ -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. \ No newline at end of file +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/). \ No newline at end of file diff --git a/docs/snippets/camera-scan-tips.en.txt b/docs/snippets/camera-scan-tips.en.txt index bfbd8720c..e261dbebb 100644 --- a/docs/snippets/camera-scan-tips.en.txt +++ b/docs/snippets/camera-scan-tips.en.txt @@ -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. \ No newline at end of file +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. \ No newline at end of file diff --git a/simulator/assets/maixpy_wonder_mv.png b/simulator/assets/maixpy_wonder_mv.png index dd02760f8..bfe4392b5 100644 Binary files a/simulator/assets/maixpy_wonder_mv.png and b/simulator/assets/maixpy_wonder_mv.png differ diff --git a/simulator/assets/maixpy_wonder_mv_mask.png b/simulator/assets/maixpy_wonder_mv_mask.png index 0b9b1c43f..9fb364257 100644 Binary files a/simulator/assets/maixpy_wonder_mv_mask.png and b/simulator/assets/maixpy_wonder_mv_mask.png differ diff --git a/simulator/kruxsim/devices.py b/simulator/kruxsim/devices.py index cdedc55fc..53a6c4748 100644 --- a/simulator/kruxsim/devices.py +++ b/simulator/kruxsim/devices.py @@ -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 diff --git a/simulator/sequences/wonder-mv/_load-12-word-mnemonic.txt b/simulator/sequences/wonder-mv/_load-12-word-mnemonic.txt new file mode 100644 index 000000000..67fe6743d --- /dev/null +++ b/simulator/sequences/wonder-mv/_load-12-word-mnemonic.txt @@ -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 diff --git a/simulator/sequences/wonder-mv/_load-12-word-mnemonic_b.txt b/simulator/sequences/wonder-mv/_load-12-word-mnemonic_b.txt new file mode 100644 index 000000000..b1fbdc29c --- /dev/null +++ b/simulator/sequences/wonder-mv/_load-12-word-mnemonic_b.txt @@ -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 diff --git a/simulator/sequences/wonder-mv/_load-24-word-mnemonic.txt b/simulator/sequences/wonder-mv/_load-24-word-mnemonic.txt new file mode 100644 index 000000000..dc5fbcdfc --- /dev/null +++ b/simulator/sequences/wonder-mv/_load-24-word-mnemonic.txt @@ -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 diff --git a/simulator/sequences/wonder-mv/_mnemonic-24-word.txt b/simulator/sequences/wonder-mv/_mnemonic-24-word.txt new file mode 100644 index 000000000..a80fddfcd --- /dev/null +++ b/simulator/sequences/wonder-mv/_mnemonic-24-word.txt @@ -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 \ No newline at end of file diff --git a/simulator/sequences/wonder-mv/_sign-psbt.txt b/simulator/sequences/wonder-mv/_sign-psbt.txt new file mode 100644 index 000000000..a32a6d89b --- /dev/null +++ b/simulator/sequences/wonder-mv/_sign-psbt.txt @@ -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 diff --git a/simulator/simulator.py b/simulator/simulator.py index 2bc221bed..a1a729ab4 100644 --- a/simulator/simulator.py +++ b/simulator/simulator.py @@ -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"