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 on 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.
Plugging in your Ethernet cables
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.”
Getting 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 “connect=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 net.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 start,” like this:
Running the command again
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:
Checking that everything is working
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.