Tue. Sep 27th, 2022

Start earning real Bitcoin by running a Bitping Bitcoin SV node, using a Raspberry Pi =)

This guide will explain how to install the Bitping software on a Raspberry Pi. Bitping is software that checks if websites are on- or offline. For every test (ping) you do, you will get payed in Bitcoin SV ($BSV). How much money you have made by ‘pinging’, can be seen in your portal on the Bitping website.

To make the installation as easy as possible, I will use screenshots, so you can exactly see what is going on.

Hardware

  • 1 x Raspberry Pi Model 3B(+), simply called ‘Pi’ in this guide;
  • 1 x UTP/ Ethernet cable;
  • 1 x USB mini cable(power);
  • 1 x SD card, for example SanDisk micro SDHC 16GB or 32GB;

I am using MacOSX to set up the Pi. I have no intentions to write this guide for Windows, so for you that want to configure the Pi with Windows, I added some refs here and there to help you out.

Step 1: Setup your Raspberry Pi

1.1 Download the operating system for your Raspberry Pi

Without an operating system, your Pi cannot operate. Since we will run the software from the command line, a desktop version is not necessary. Therefore we install Raspian Lite, the most simple and smallest version of Raspian, the official supported operating system for Raspberry Pi.

https://downloads.raspberrypi.org/raspbian_lite_latest

After downloading, unzip the package.

Download ZIP, Raspian Buster Lite (Buster is the version, so in time this name can change).

1.2 Download Etcher

Etcher is a very handy application for MacOSX that can be used to copy (flash) the Raspian Lite operating system on a SD card that you will use in your Raspberry Pi.

https://etcher.io/

1.3 Flash your SD card and enable remote access to your Pi

Using Etcher, select the Raspian Lite disk image and select the SD card you are going to flash.

Etcher running on MacosX. Select the Raspian Lite disk image you have downloaded earlier, select the SD card in your Mac and click “Flash!” Download: https://etcher.io/

When finished, eject your SD card securely and insert it again in your computer.

You can use Disk Utility to Eject the SD card (not mounted after flashing)

Now your SD card will be visible on your desktop.
Open a Terminal session. Terminal is an application (command line software) on MacOSX that we use to setup the Raspberry Pi.

This is the application Terminal that is part of MacOSX. In this screenshot you see that my computername is Phoenix and my username ratrace.

Now we are going to make the SD card we just inserted and therefore is visible on our desktop, the current directory in our Terminal (command prompt) window. The command to make something the current directory in Terminal is the cd (current directory) command.

cd /volumes/name_of_your_SD_card

Note: First type cd, then press spacebar. Using your mouse, you now drop the SD card in the Terminal window.

If you are not using MacOSX from Apple, you can use Putty (https://www.chiark.greenend.org.uk/~sgta…atest.htmlto connect to your pi using ssh.

1.4 Enable SSH

SSH, also known as Secure Socket Shell, is a network protocol that provides administrators with a secure way to access a remote computer. In our case a Raspberry Pi.

To enable ssh on the Pi, execute the following commands:

sudo touch ssh

This command creates a new empty file, ssh in the root folder of your Pi. This file will enable ssh on your Raspberry Pi. When you get a message that asks for your password, enter the password you use to log in to your Mac.

When finished, put the SD card in your Raspberry Pi and connect your Raspberry Pi to your local network using an UTP (Ethernet) cable. Power the Raspberry Pi with a USB mini cable.

If the Raspberry Pi is operating properly, the red and green lights of the Raspberry Pi will start to blink.

Connect your Raspberry Pi to your Mac using a USB mini cable. Insert the flashed SD card and connect it to your router that has dhcp enabled.

1.5 Find the IP address of the Raspberry Pi on your local network

To be able to find the Raspberry Pi on your local network, your router needs to be DHCP enabled. DHCP will make it possible for the Raspberry Pi to get a local IP number automatically. To find out what that IP number is, you can use the application Lanscan on a Mac. You can also check the IP address in your router, it should be visible in the interface.

https://www.iwaxx.com/lanscan/

With Lanscan it is easy to find the ip address of the Raspberry Pi.

1.6 Login to your Raspberry Pi

Following the steps above, you now know what the local IP address of your Pi is. Let’s say it’s 192.168.1.157
Time to login to this Pi. We are going to do that with SSH:

ssh pi@192.168.1.157

You will get a message about a key fingerprint. Choose yes, the ip address will be added to a hosts file, so you will not get this message again in the future.

Login as user pi (default) with password raspberry (default).

Update the default password:

passwd

This command will ask for your current password (raspberry) and 2 times for a new password. Best practice is to use a long, strong password.

Congrats, you set up a Raspberry Pi with an operating system that can be accessed and controlled by ssh. Your Pi is now ready for further configuration!

1.7 Update the Raspberry Pi

Now we need to update the Raspberry Pi with the latest software available.

sudo -i
apt-get update
apt-get upgrade -y
reboot

Step 2. Get a free Bitping account

2.1 Register

To earn real-time micropayments by running a ‘network intelligence node’, you need a Bitping account. Go to the Bitping website and SIGN UP for free:

https://app.bitping.com

Please note: The login and password you choose during Signup, you will also use when you install the Bitping node software on your Raspberry Pi.

https://app.bitping.com
The official website of Bitping can be found at bitping.com

2.2 Download and install the node software and make it autostart

Since we want to keep organised on our pi, we are going to create a directory in our user directory (pi):

mkdir bitping

We make this the current directory:

cd /home/pi/bitping

Now we are in the bitping folder, let us download the software:

wget https://uptimesv-artifacts.s3.amazonaws.com/go-node/latest/bitping-node-armv7-linux.zip
Downloading the software to your Pi using the command wget

The next step is to unzip the software:

unzip bitping-node-armv7-linux.zip

This will create a folder ‘release’, which contains the application bitping-node-arm7-linux

Unzip the archive

2.3 Run the software

We are going to run the software now. The application will ask for a login and a password. These are the same as the login and the password you use to login on the Bitping website.

sudo ./release/bitping-node-armv7-linux -server
Run the application for the first time. It will generate a file with your credentials on the Pi. The next time you boot, you do not have to enter them again.

After you executed this command, the application should run and you are making your first money. Congratulations!

2.3.1 Some additional information about what is happening

Please take care you execute the application with the sudo in front of the command. This will execute the application as user root and put generate a credentials file (credentials.json) that the application will use the next time you run the application. Since the command is executed as user root, the credentials will be put in a hidden folder in the root directory (.bitping). To verify, stop the application by pressing CTRL-C on Macintosh. Or open a new Terminal (command prompt) window and login again and then run the command:

sudo ls -a /root
sudo ls -a /root/.bitping

As you can see the credentials file is created automatically. Now with all setup, let’s get this thing auto running!

2.4 Make the Bitping application autorun after startup

Since we do not want to manual start the application after we start up our Pi, we are going to write a service that will startup our Bitping node automatically.

We are going to create 2 files, a service and the actual executing command:
1. bitping.sh
2. bitping.service

2.4.1 Create bitping.sh in directory /etc/init.d

We are going to create the script bitping.sh with the text editor Nano:

sudo -i
cd /etc/init.d
nano bitping.sh

Paste the following code into the editor:

#!/bin/sh
cd /root/release
./bitping-node-armv7-linux -server
echo "Bitping started."

Ctrl X and Y to save.

2.4.2 Create bitping.service in directory /lib/systemd/system/

sudo -i
nano /lib/systemd/system/bitping.service[Unit]
Description=Bitping
After=network.target[Service]
User=root
WorkingDirectory=/home/pi/
ExecStart=/bin/sh /etc/init.d/bitping.sh
Restart=always
RestartSec=60StandardOutput=inherit
StandardError=inherit[Install]
WantedBy=multi-user.target

Ctrl X and Y to save.

Now let us enable and start the service. This will make the application autorun every time your Pi is starting up.

systemctl enable bitping.service
systemctl start bitping.service
reboot

After reboot, login your Pi and check with the following command if the node is running:

systemctl status bitping.service

Congratulations!

Your node is active and RUNNING! Now check

https://app.bitping.com/earnings

on how much money you have made by doing… nothing! 😉

If for some reason you get an error, try to find what the error is by looking into your logfiles:

journalctl -xe

For questions or whatever else, join the Bitping Telegram group:

https://t.me/bitping

Disclaimer and Warning

This solution is without any warranties and I am not responsible for anything. This article is only for educational purposes. If you use this code, you use it at your own risk.

Always test your code on a spare pi with a spare SD card BEFORE you put it into production or use it!

Best Regards,
Ronny

HANDCASH:$RONNY

By Ronny

Leave a Reply

Your email address will not be published. Required fields are marked *