How many people remember the 2015 “Super Handy Fun Computer” PocketCHIP from Next Thing? Powered by a 1Ghz R8 ARM processor, the PocketCHIP has a tiny touch screen, a rechargeable lithium battery and a wacky built in keyboard. All combined you have a portable linux computer you can kinda carry around in your pocket. It’s a neat toy that’s been relegated to desk decoration after I played with it for a month.
Today, for fun and definitely not profit, we’ll be compiling a bitcoin miner on the device and see if we can get it connected to a pool and hashing. I’ve never attempted such a feat (not even on my Raspberry Pi “farm” in the lab) and give it a 50/50 chance at working. Let’s burn some electricity!
Since we don’t have a GPU or ASIC connected to the PocketCHIP, we’ll be downloading and compiling a CPU-based Bitcoin miner. In this case, we’re going to try pooler’s CPU miner and see how far we can get. The instructions look pretty straight-forward!
I’ve already installed OpenSSH on my PocketCHIP, so I’ll be using a remote terminal to connect to the device. You could install and compile everything using the built-in keyboard, but I don’t hate myself enough to do that. The keyboard is super-cute and barely useable.
Let’s start by installing some standard tools that we’ll use later to compile our CPU miner. Feel free to play along if you have a CHIP laying around. First off, let’s update the PocketCHIP with the latest system upgrades:
sudo apt-get update sudo apt-get upgrade
This process took about an hour for me, likely because I’ve not fired the Pocket up for more than a year. Once it’s finished we’ll continue by installing the required dependencies:
sudo apt-get install make libcurl4-openssl-dev
Everything installed great, on to the next steps:
wget https://github.com/pooler/cpuminer/releases/download/v2.5.0/pooler-cpuminer-2.5.0.tar.gz tar xzf pooler-cpuminer-*.tar.gz cd cpuminer-* ./configure CFLAGS="-O3" make
Our first complication! The PocketCHIP didn’t have a C compiler installed and complained during the configure process. Let’s install the linux development package and see if that helps:
It did! Configuration completes successfully after installing the dev tools. After running make, the Pocket worked for a few minutes then completed with no errors. So far so good. Now let’s pick a pool and see how fast this R8 processor hashes. I started with Slush, but seemed to run into issues connecting:
Digging into the issue, I quickly learned that Slush does not support the minerd CPU mining software. Makes sense, considering the extremely low difficulty we would need to even submit one share. Let’s try a different pool and see if we can get to hashing. I picked Multipool next, mostly because I have an old account and don’t have to dig around so much:
Woohoo! Our CPU miner running on the PocketCHIP connects and receives work from the stratum server. Hashing with the SHA256 protocol nets us a whopping ~530 kh/s, faster than I expected! Minerd also supports the scrypt algorithm, which would allow us to mine Litecoins at a blazing speed of 0.65 kh/s.
Success, kind of….
After a few hours of fooling with my PocketCHIP, we’ve successfully installed a CPU-based miner and received work from a stratum pool! I know I don’t have to tell you that this will never be profitable. According to my calculations, earning 1 BTC would take approximately 3.7 million years.
I’ll keep my eye out for other toys to mine with. If you’ve got suggestions for “things that shouldn’t be mining but are” drop me a line in the comments and we’ll get hacking!