This article covers the supplies wanted, set up, configuration and operation of a Bitcoin node linked by way of satellite tv for pc utilizing a Raspberry Pi and a Blockstream satellite tv for pc package.
Special thanks to Igor Freire from Blockstream, his persistence and a spotlight to element had been super assets for the creator by way of this train.
This information has the next sections:
- Recommended Materials
- Satellite Selection And Rough Pointing Angles
- Antenna Installation
- Raspberry Pi OS Image
- Configuring The SSD
- Installing And Configuring BlockSat-CLI And Bitcoin Satellite
- Dialing In The Antenna Pointing Angles
- Running Bitcoin Satellite
- Conclusion
Recommended Materials:
All collectively, a setup like this may price lower than $800 for all of the required supplies. You will even profit from having a laptop computer with WiFi capabilities.
Everything wanted for the Raspberry Pi comes within the CanaKit listed above, apart from the SSD.
Make certain to first set up the equipped warmth sinks as proven right here:
Then, begin with the decrease portion of the case and place the Raspberry Pi circuit board on it. Then, place the center of the case on the circuit board as proven right here:
Then, join the crimson lead from the fan to pin #2, which is the five-volt direct present energy provide pin. Connect the black lead from the fan to pin #6, which is the bottom pin. The fan itself snaps into place on the underside of the highest of the case.
Then, snap the highest of the case onto the center half and the Raspberry Pi meeting is completed. You can set this apart for now and we’ll come again to it later.
Satellite Selection And Rough Pointing Angles
Navigate to the Blockstream Satellite community protection website and make observe of the satellite tv for pc with the strongest sign on your geographic location. You will need to both drop a pin on the map, enter the handle the place the satellite tv for pc will probably be put in, or use a satellite tv for pc pointer cell app to get essentially the most correct elevation, azimuth and polarity numbers that you’ll want to arrange your mounting bracket and antenna.
For instance, utilizing the Denver Federal Reserve financial institution handle:
1020 sixteenth Street Mall, Denver, Colorado, 80202, United States
Enter this handle into the satellite tv for pc map web site, it can reveal the perfect numbers for the elevation, azimuth and polarity. Then, use these numbers to arrange the right angles on the mounting bracket and antenna. If you are utilizing the flat panel antenna just like the one on this information, then you want to ensure your chosen satellite tv for pc has the inexperienced test mark, just like the Galaxy 18 for instance.
You may obtain the Satellite Pointer app for iOS or Android to make the most of an augmented actuality software to assist get your whole angles proper. With this app, you could find the satellite tv for pc you need to level your antenna at by scanning the sky round you. Then, you’ll be given the perfect azimuth and elevation to use while you align the cross-hair pointer on display screen with the satellite tv for pc you need to join with. You may discover the perfect polarity to use by choosing the suitable satellite tv for pc from the listing possibility and scrolling down by way of the small print. It helps too for those who permit the app entry to your location, or you may also enter the placement manually.
Make certain to notate the perfect pointer angles. You will want to rigorously arrange your mounting bracket based mostly on these angles as described within the subsequent part; in any other case you could not obtain good reception from the satellite tv for pc.
Also, you may comply with the @BlockstreamHelp Twitter account to keep up to date with scheduled satellite tv for pc upkeep that will briefly interrupt service. The bulletins will appear like this:
Antenna Installation
The antenna is shipped in an not noticeable field that has no point out of Blockstream or Bitcoin on it. The label on the skin of the field merely signifies that there is a flat panel antenna inside, which is generally used for web reception and televisions, amongst different issues. You can view the whole handbook here.
Upon opening the field, you can find that it comprises the antenna, the Ethernet energy provide, literature, mounting brackets for a number of purposes, a compass, {hardware} and a flat wrench.
Be cautious whereas dealing with the antenna; attempt not to scratch the floor or drop it. Also don’t apply any paint, stickers or the rest to the face of the unit. The again of the unit has the legacy-style coax cable connections and the Ethernet connection.
In this information, I will probably be demonstrating the Ethernet connection. The benefit right here is that the satellite tv for pc sign is being transformed right into a digital sign internally and I don’t want further outboard {hardware} with this antenna.
There are a number of completely different mounting choices, reminiscent of window mounting, railing mounting and floor mounting. The proper selection for you’ll rely in your distinctive scenario. For me, I had an outdated DirecTV satellite tv for pc dish put in on my home, so I made a decision to use the prevailing stand for it and I went with the railing mounting {hardware} within the package.
After eradicating the outdated satellite tv for pc dish, I mocked up the mounting bracket with the {hardware} to ensure I had all the things I wanted earlier than going again up onto the roof.
Next, I put in the naked mounting bracket onto the prevailing mounting pole on the roof, leaving the satellite tv for pc protected on the bottom.
After I had the brand new mounting bracket put in and solely fixed hand-tight, then I mounted the satellite tv for pc antenna onto the mounting bracket.
Now that all the things is in place and nonetheless solely hand-tight, the pointing angles all want to be roughly set, these angles will probably be fine-tuned as soon as it is powered up. Based on the geographic location instance utilizing the Denver Federal Reserve financial institution, the perfect pointing angles for the antenna are going to be:
Elevation: 40.37°
Azimuth: 206.94°
Polarity: 20.39°
Geometry is not my sturdy go well with, however right here is my greatest rationalization: This graphic helps illustrate the three-dimensional planes. The vertical XZ aircraft defines elevation, the flat XY aircraft defines azimuth and the horizontal YZ aircraft defines polarity.
Elevation is the vertical levels of X from Z, with Z being 0.
Azimuth is levels on the XY aircraft of Y from X, with X being equal to north. With my antenna, I set the principle mounting bracket roughly right after which used the smaller adjustment to tremendous tune the setting:
Polarity is the horizontal levels of Z from Y, with Y being equal to 0.
The notches on the mounting {hardware} will solely get you thus far. To get as correct as I may, I used the Satellite Pointer app to present the angles whereas my cell phone was bodily positioned on the antenna. Since the Satellite Pointer app would not show real-time polarity, I used the Level Tool app on my cell machine for this. Also, to help with the azimuth studying, I used the Compass app on my cell machine. As every angle was as correct as I may get it, I might tighten down the {hardware} with the included flat wrench.
With the antenna put in and the pointer angles roughly set, all that is left for the set up piece is to run the Ethernet cable. About a year ago I ran a brand new coax cable from this satellite tv for pc dish to my workplace within the basement on the opposite aspect of the home. Due to stocking ranges at Blockstream, Lightning Network fee routing points on my finish and getting busy with different tasks, I by no means did find yourself ordering the Satellite Kit regardless of working the cabling for it. I’m glad that I waited although, as a result of the flat panel antenna has a inbuilt LNB and inside satellite tv for pc sign converter. Running a brand new Ethernet cable from the brand new antenna to my workplace was a worthwhile chore, since I didn’t need to use the legacy sign and purchase a further piece of {hardware} to convert it.
If you are not comfy putting in your individual cable, then name a licensed skilled. Depending in your set up, you could want to terminate your individual cables, drill holes in your partitions, and crawl inside your attic.
I went to a ironmongery shop and acquired 100 toes of outdoor-rated CAT5e Ethernet cable, a field of RJ45 connectors and the crimping software.
Then, you want to determine which commonplace you need to use on your Ethernet cable. I could not discover the usual used for the SelfSat>IP22 antenna however contemplating it is new, I made a protected assumption that it was the T568B configuration. So lengthy as you terminate each ends of the cable with the identical configuration, I do not assume it actually issues how the machine’s inside configuration is arrange. All of the wires are the identical colour on the within, in spite of everything.
There are some good guides on-line for making your individual Ethernet cables, reminiscent of this one. I will not go into the complete particulars right here on how to terminate your Ethernet cables, since there are so many good videos and guides on-line. But only a few issues I do need to level out: Make certain your wire colour order is the identical on each ends. Make certain the wires go all the way in which to the tip of the RJ45 connector. And ensure there is a few of the insulated outer jacket the place the pinch level clamps down on the cable within the RJ45 connector.
Before terminating the tip of your Ethernet cable that will get plugged into the antenna, ensure you slip the cord-grip connector over the cable so that when you do have the tip terminated, you may nonetheless plug it in and tighten down the cord-grip to hold and climate out of the connection.
Next, I used some zip ties to run the cable down alongside the aspect of my home after which drilled an not noticeable gap to cross the cable by way of to the attic. Then, I crawled contained in the attic and ran the cable alongside the size of the home to the alternative aspect after which down by way of the inside wall after which by way of the ground into the basement the place I terminated the opposite finish of the cable in my workplace. If you are uncomfortable with crawling into confined areas to do any such work, then I might advocate contacting an expert installer.
With the cable put in, merely plug it into the Power over Ethernet (PoE) adaptor, ensuring that the cable linked to the antenna is within the right port and that the opposite port is linked to your Raspberry Pi.
Raspberry Pi OS Image
There are three essential steps lined on this part:
- Installing a Raspberry Pi Image
- Installing the Blockstream Satellite command-line interface (CLI)
- Installing the Bitcoin Satellite utility, which is a fork of Bitcoin Core with the added capabilities to obtain Bitcoin community information from satellites
First, the Raspberry Pi wants an Operating System (OS). To obtain this, the OS picture will probably be downloaded after which flashed to the 32 GB microSD card that got here within the CanaKit. Navigate to this web site and choose the picture you need, I like to recommend downloading the most recent accessible ARM 64 picture; you could want to navigate again up the dad or mum listing to get to the most recent pictures. I selected the “2021-05-07-raspios-buster-arm64.zip.” Then, you additionally need to obtain the SHA-256 file, in addition to the signature file as proven right here:
You will even want the Raspberry Pi imager executable file to flash the OS picture onto the microSD card. The imager utility might be downloaded from here. Unfortunately, I wasn’t ready to discover any PGP verification instruments for the imager executable file.
Save the entire recordsdata in the identical folder. It is necessary to confirm the software program that you could. This is why the SHA-256 file and the signature file had been additionally downloaded as well as to the OS picture. I’ll present you the way to use a PGP signature and a hash worth to cryptographically confirm the integrity of the OS picture you simply downloaded earlier than putting in it in your Raspberry Pi. For this, I will probably be utilizing the Kleopatra key supervisor.
First, import the Raspberry Pi public PGP key into your key supervisor after which certify it. The PGP key might be downloaded right here:
https://www.raspberrypi.org/raspberrypi_downloads.gpg.key
Then, merely proper click on on the signature file, choose “More GpgEX options” after which choose “Verify.”
The software will run for a moment and it should return a green verified dialog. Now, you know the downloaded .ZIP file is verified with the Raspberry Pi signature.
Now, you can run a SHA-256 hashing algorithm on the .ZIP file and compare that to the hash value in the downloaded hash file. I like to use a hex editing program called HxD for calculating hash values. Always be sure to get the latest hash files from the same archive you downloaded the image file.
Now that everything is verified, you can delete the SHA-256 hash file and the signature file from that folder, so the only items left are the imager executable file and the .ZIP file. Leave the .ZIP file compressed, the imager executable will take care of decompressing it. Load the microSD card in the USB adaptor and make sure that is available for your computer to communicate with it. Then double click on the imager executable file and the flashing process should start.
The microSD card that comes with the CanaKit already has an image loaded on it. But there is a preference to use the downloaded image in this case. Simply formatting the microSD card is only going to clear out the data in the available disk volume, just to be sure there are no hidden partitions, I’ll do this with the Disk Manager instead. Open the Computer Manager by right clicking on “This PC” from a file explorer. Then navigate to the Disk Manager and then right click on the disk volume in question and select “delete quantity.” A warning will pop up indicating that this will delete all the data, select “sure.”
Next, right click on the unallocated volume and select “begin new quantity.” Then, follow the prompts in the wizard, leaving all of the default settings as they are. Formatting for FAT32 is fine.
Navigate back to the folder containing only the .ZIP file and the imager executable, and double click on the executable. Then, follow the prompts to install it and then run it. If everything went according to plan, you should be looking at this screen:
Select “Choose OS” then scroll down to “Use Custom” after which navigate to your .ZIP file:
Select “Choose Storage” and then select your microSD card. Then click on “Write” and select “Yes” to the warning that each one information will probably be erased.
Then the writing and verification processes will start. This should take approximately ten minutes. When it is finished, you should receive the success notification.
Once you hit “Continue,” it will eject the microSD card from the computer. However, a blank Secure Shell (SSH) file needs to be written to the root directory of the microSD card so that it can be connected to remotely. Upon reinserting the microSD card, your computer may tell you that the microSD card needs to be reformatted. Do not reformat it, just select “cancel.”
Using the file explorer, navigate to the root folder on the microSd card, it is probably called “boot.” Then, simply right click in that folder and select “new,” then “textual content doc.” Then, just name it “ssh” without any file extension. You should receive a dialog warning you about changing file extensions, just select “sure.”
That’s it, you’re done flashing the Raspberry Pi image, you can eject the microSd card. Insert the microSD card into the Raspberry Pi microSD card port, not into the USB port using the adaptor, but on the opposite side of the circuit board from the USB ports, there is a microSD card port. Then, connect an Ethernet cable to your router or switch, and the power cable.
Now you are ready to turn on the Raspberry Pi and next I’ll show you how to remote in via SSH connection and install the Blockstream Satellite command-line interface (CLI) tool.
Do not connect your SSD yet.
Software Compiling
In this step, you will see how to make the SSH connection from your desktop computer to your Raspberry Pi computer. Once this connection is established, you will then build the OS Image, install the Blockstream Satellite CLI, and compile the Bitcoin Satellite application.
I recommend using a simple SSH tool like Putty.exe. Learn more about Putty right here and obtain it here. Verify the obtain, then run the .MSI file and comply with the set up wizard prompts.
Once you run Putty, you will need to enter the IP address of your Raspberry Pi. To find this, log into your home router from a web browser, usually by simply entering 192.168.0.1 in the URL dialog box. Most routers have basic log in credentials like Admin/1234, check online for your brand of router and login instructions.
Once logged into your router, you should be able to locate a list of connected devices on your home network. For example, the connected devices on my home network and their IP address can be viewed from navigating to: “Basic Router” to “DHCP.”
Then in Putty, in the Host Name dialog box, enter your user, which will be “pi” the “@” symbol followed by your RaspberryPi IP local address. For example, all together, mine was: “[email protected]” and then select “Open” on the backside.
A terminal window will automatically open on your desktop, then you may get a warning about the host key not being registered. Select “Yes” to add this key to your registry.
Then, you will be asked for the password: “raspberry.”
Then, you should be ready to continue when you see this screen:
Configuring The SSD
Here is how I configured my SSD. There might be better and/or more efficient ways to do this, but here are the steps I took:
$sudo apt update;
$sudo apt upgrade -y;
A script will run for a few moments and then run the following commands:
$sudo apt install git -y;
$sudo apt install htop -y;
$sudo apt install curl -y;
$sudo apt install bash-completion -y;
$sudo apt install jq -y;
$sudo apt install qrencode -y;
$sudo apt install dphys-swapfile -y;
$sudo apt install hdparm -y;
Now, there are a few things that need to done in order to set up the SSD such as formatting it, mounting it, and setting the permissions:
$sudo dmesg -C;
$sudo dmesg -w;
Now, connect your external drive. Make note of “idVendor” and “idProduct.” For example, “idVendor = 1058” and “idProduct = 0748”
$ctl+c;
$lsblk -o NAME,MOUNTPOINT,UUID,FSTYPE,SIZE,LABEL,MODEL;
Make note of the partition name. For example: “sda” or “sda1.”
Test your external drive’s performance with:
$sudo hdparm -t –direct /dev/XXX;
(Where “XXX” is your partition name).
You should get a result that reads something like: “Timing O_DIRECT disk reads: 902 MB in 3.0 seconds = 300.13 MB/s.”
If your results are less than 50 MB per second (MB/s), then follow the next step with your idvendor and idproduct from above. Otherwise, skip ahead to “$sudo mkfs.ext4…”
First, edit the cmdline text file:
$sudo nano /boot/cmdline.txt;
At the very beginning of the text in the file, insert:
usb-storage.quirks=XXXX:YYYY:u
Where “XXXX” is idVendor and “YYYY” is idProduct. Make sure you leave a single space after the “u” and earlier than the unique textual content.
Save the text file by hitting “control” and “x,” “y” for yes, and then “enter” on your keyboard.
$sudo reboot;
Once you’re all logged back in and back in the shell, re-run the performance test.
$sudo hdparm -t –direct /dev/sda1;
You should have increased performance. If not, get a new external drive and start again.
Format the partition on the external drive.
$sudo mkfs.ext4 /dev/XXX;
Where “XXX” is your partition name, such as “sda.”
In case your external drive was previously mounted, you can use “$ sudo umount /dev/sda” to unmount.
Next, you need the UUID, so run:
$lsblk -o NAME,MOUNTPOINT,UUID,FSTYPE,SIZE,LABEL,MODEL;
Make note of your external drive’s UUID, this should be on the same line as the partition name (sda).
$sudo nano /etc/fstab;
Create a new line below the others that reads the following: where “{tab}” is you hitting the “tab” key in your keyboard.
UUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXX {tab} /mnt/ext {tab} ext4 {tab} defaults,noatime {tab} 0 {tab} 2
Where the “UUID” is what you copied from above. Hit “control” and “x,” “y” for yes, and then “enter” on your keyboard to save.
$sudo mkdir -p /mnt/ext;
$sudo mount -a;
$df -h /mnt/ext;
It should return something like:
Filesystem Size Used Avail Use% Mounted On
#/dev/sda 916G 77M 870G 1% /mnt/ext
Set the owner:
$sudo chown -R pi:pi /mnt/ext/;
$cd /mnt/ext;
$sudo mkdir -p .bitcoin;
$ls -la;
If “owner” and “group” for the new bitcoin folder are “root” and “root,” then run:
$sudo chown -R pi:pi /mnt/ext/.bitcoin;
$ls -la;
The bitcoin folder should now be owned by pi.
Edit swap file:
$sudo nano /etc/dphys-swapfile;
Scroll down to “CONF_SWAPSIZE=100” and put a (#) hashtag in front of it. Hit “control” and “x,” “y” for yes, and then “enter” on your keyboard to save.
$sudo dphys-swapfile install;
$cd ../..;
Install BlockSat CLI
$sudo apt update;
$sudo pip3 install blocksat-cli;
Install BitcoinSatellite
$blocksat-cli deps install –btc;
$blocksat-cli btc -d /mnt/ext/.bitcoin;
Enter “y” for yes to save the bitcoin.conf file to your bitcoin directory on your SSD.
Configure BlockSat CLI
After that runs for a moment, run the following command and launch the configuration dialog. The terminal will ask you if you want to run the configuration file now, select “y” for yes.
$blocksat-cli sat-ip;
First, you will select the appropriate satellite for your location and then the model of receiver you have. For example, option “0” for Galaxy 18, followed by option “3” for the Base Station receiver.
Next run this command:
blocksat-cli instructions
Following the instructions, now you can connect the Ethernet cable coming from the satellite to the PoE adapter. Then, plug the other Ethernet port into your router or switch. And then plug the PoE adapter into power. Ensure you have the Ethernet cables connected to the right ports, otherwise you can cause damage to your hardware.
When that is connected and powered on, hit “enter” on the terminal window and then you will receive instructions giving you a couple commands you can run once you get back to the main terminal window to complete the configuration.
Now you should be able to run this command:
blocksat-cli sat-ip
And get a return like this:
2021-08-05 04:16:53 Lock = False; Level = -71.67dBm; Signal Quality = 0.0%;
This means that you are ready to run this terminal on your laptop and monitor the values to make the fine tuning alignment adjustments on the satellite receiver.
Dialing In The Antenna Pointing Angles
With your laptop in hand and a connection to your antenna, you can start dialing in the exact angles on your receiver. This is the most time-consuming part of this entire project. Make sure you attempt this when you have plenty of time and are not in a rush. Ensure that you do this on a day when you have a clear, unobstructed view of the sky, preferably with no clouds, smoke or smog in the air.
My basic approach was to loosen the bolts for the azimuth adjustments and then slowly move the antenna side to side ever so slightly, like half a degree at a time. Then, I would wait a few seconds to see if the readings in the terminal window changed to “Lock = True.” If not, then I would move the antenna half of a degree and wait again.
I repeated this process again and again and again. Sweeping from center to one side, then starting back at center and sweeping the other side. When I couldn’t get a locked signal, then I would loosen the elevation adjusting bolts, adjust the elevation angle by half a degree, and lock the elevation adjusting bolts back down. Then, I would start sweeping the azimuth again.
I repeated this process several times over the course of several days. The windows of opportunity to try this were few and far between because of all the wildfire smoke in the air where I lived during this time. My attempts were spread out over several weeks. But finally, during a clear evening around sunset, I got my terminal to print “Lock = True.”
Once you achieve “Lock = True,” make sure to tighten down all the hardware. The connection should remain locked. Also, keep an eye on the signal quality. If you are not getting 100% quality in clear sky conditions, try adjusting the polarity to dial this in. Be careful not to lose your locked signal.
Running Bitcoin Satellite
With your signal locked, you are now ready to start downloading the Bitcoin blockchain data. You can either use your internet connection to facilitate a quicker Initial Blockchain Download (IBD). Or, if you want to strictly download Bitcoin blocks from the satellite connection and not use any internet connection, you can run bitcoind with the “join=0” flag. Be aware that if you are doing this for your IBD, this will take approximately 40 days.
You’re going to have three terminal windows open during this part.
1. In the first terminal window you need to have the blocksat-cli running:
$blocksat-cli sat-ip;
“Lock” should “= True” and “Quality” should be as close to 100% as possible.
2. In the second window, you can run Bitcoin Satellite. You want to run this from the directory where you created the /.bitcoin folder on your SSD:
$sudo bitcoind -datadir=/mnt/ext/.bitcoin -connect=0;
In this step you may have encountered an error regarding the maximum receive buffer size. To fix this first check what the buffer size is set to by running:
$sysctl web.core.rmem_max;
If the size is set smaller than 24660008, you can increase it by running:
$ sudo sysctl -w net.core.rmem_max=24660008;
Now, try running this command again:
$sudo bitcoind -datadir=/mnt/ext/.bitcoin -connect=0;
You should see the application start and then it should hesitate on the line ending with “udpread thread begin,” like this:
3. Now you can open the third terminal window and run a couple of commands to check if everything is working as expected.
$sudo bitcoin-cli -datadir=/mnt/ext/.bitcoin getudpmulticastinfo;
And then this command…
$sudo bitcoin-cli -datadir=/mnt/ext/.bitcoin getchunkstats;
…should return something like this:
Now you can just let the IBD run. Remember that this will take roughly a month or longer, so check on it often and make sure to address any issues if they happen.
Conclusion
After I get the blockchain synchronized, I plan on setting this up so that my other Bitcoin nodes will continue receiving blockchain data from my satellite node over my local network during an internet outage. But because I’m strictly downloading from satellite signal, this will take roughly a month or longer to get a full sync. That is why I think this is a good stopping point for this guide and I will follow up with shorter guides on useful things you can do with a satellite-connected receiving node.
Having a Bitcoin node configured to receive blockchain data over satellite connection is a censorship-resistant tool that can help mitigate government-enforced internet shutdown like we have been seen in Myanmar recently. Even though the current satellite node configuration only allows for receiving blockchain data and not broadcasting transactions back to the network yet, this can still be a valuable tool to facilitate keeping other internet-connected nodes up to date during times of internet outages, so that when internet communications are back online, valuable time is not wasted syncing.
As this technology continues to develop and get into the hands of those who need it, development of application use cases will grow.
Thanks for reading! I hope that this article helped you get your own Bitcoin Satellite node up and running. Whether you are using a Blockstream satellite kit or sourcing the materials from other places, this is a powerful censorship-resistant tool that helps strengthen the Bitcoin network and helps transfer power from the hands of the few to the hands of the many.
This is a guest post by Econoalchemist. Opinions expressed are entirely their own and do not necessarily reflect those of BTC Inc or Bitcoin Magazine.