SeedSigner / seedsigner

Use an air-gapped Raspberry Pi Zero to sign for Bitcoin transactions! (and do other cool stuff)
MIT License
712 stars 163 forks source link

Have anyone tried to deploy Seed Signer to a Raspberry Pi Pico? #244

Closed irae closed 2 years ago

irae commented 2 years ago

The Raspberry Pi Pico has a considerable processing power, as compared to Arduino and other microcrontrolers.

Some advantages would be having no linux, small power draw to run from batteries, smaller downloads, but more importantly, the Pico is about $4 USD instead of the $5 if you manage to find the Zero 1.3, or $15 if you go for the Zero 2 W. The downside might be harder to source camera for the Pico.

Just to illustrate, in some parts of the world it is difficult to source the Zero. I can't find the 1.3 here in Brazil or sellers that would ship it from China. Sellers from china do have the Zero 2 but it costs ~ R$400 (around $79 USD), while I can find the Pico for ~ R$35 + ~R$10 shipping (about $10 USD total).

So I researched a bit, found the WaveShare Pico LCD-1.3, which is ~ R$40 and the Arducam Pico supported cameras, which would be the most expensive hardware at $20 ~ $40 USD.

If I understood correctly, in theory other SPI cameras could work, some start at ~$3 USD. But I haven't found any camera that has supported drivers for the Pico, so I won't risk it, unless someone more experienced offers some guidance.

I already oredered the pieces and I intend to hack around it. While I wait about 20 days for the 3 parts to arrive, I was wondering...

Anyone has any insight on the idea? Or if you know of anyone that already tried that? If those more engaged with the project considered it and had a good reason to drop the idea? If Micro-Python can run the bitcoin libraries or I would need to go down to C (which I am less familiar) And if there is any top of your head advice about it? Any comment whatsoever would be appreciated. Thanks!

kdmukai commented 2 years ago

I've been working on a custom MicroPython firmware, but mostly targeting the ESP32-S2. MicroPython is definitely SeedSigner's future and I think over time we'll be able to run on a broader array of hardware.

But the Raspi Pico / RP2040 only has 265kB of RAM that can't be expanded. That would make it very difficult for us to use for things like live video scanning for QR cods.

You can see most of my MicroPython + ESP32 + secp256k1 progress here: https://github.com/kdmukai/micropython-esp32

I do include some notes for compiling the custom firmware for RP2040 and I have tested it on a few.

irae commented 2 years ago

Oh wow!

Thanks for the reply. Yes! Indeed the ESP32 seems to be a better option. I can source an ESP32-Cam + FTDI + OLED screen for about R$100 with included shipping (<$20 USD). It is readly available and can be delivered to my place in less than 24h. Perfect. I'll take a look at that instead! And your docker images will be very handy as opposed to installing all the dependencies on my OS.

It is a bit more nerdy for sure. But it is probably an interesting option to have ready-made tiny seed signers built and sold by the community. Verry happy to know you are already looking to microcrontrolers as a possible future for the project!

newtonick commented 2 years ago

Question answered, closing issue.

ffrediani commented 5 months ago

@kdmukai @irae just added a Feature Request for ESP32 with some details and options. Please check out and comment if you have anything to add - https://github.com/SeedSigner/seedsigner/issues/560