UPDATE: 04/11/2021 : [copied from helium discord] Any new DIY will not earn HNT. If you build a DIY packet forwarder today, it will only transfer data on the Helium network. There is no plan to resume the alpha program. If you would like to earn HNT, please visit helium.com/mine.
- Raspberry Pi 4 link
- USBC power adapter link
- 64GB Micro SD card link
- RAK2245 Pi HAT link While purchasing please check frequency of your country.
- Free Balena Cloud account link
- Mac or Windows ( I tested on Mac )
- BalenaEtcher to flash image download
- Balena CLI install
- jq install
Running Helium on balenaCloud is a breeze. Just click the Deploy with balena button below:
Alternatively, you can install manually on balenaCloud using the instructions below.
As you got your hardwares and softwares let's get started and turn your Pi into a helium hotspot
Log into balena cloud website and click on "Create Application" button
This wil bring a modal window as below. Type a name as you desire, choose device type as "Raspberry Pi 4" , application type as "Starter" and hit "Create new application" button.Once the application is created, it will take you to the application page. You need to add a device now.
Click on "Add device" button which will open below modal. Turn on "Wifi+Ethernet" and put your wifi credential there. After that click on "Download BalenaOS" button which will download a zip file on your comuter. Next, click on Environment variable menu from left pane and create a new variable as "REGION" with value "US915" (you may need to change as per your region. This repo supports US915, EU868 and IN865. Please create PR if with your region)
Plug micro SD card into your computer. Open balenaEtcher software, select the downloaded zip file from your computer and select the SD card to format and click on "Flash"
Once completed, unplug SD card from your computer and insert in your Raspberry Pi and power up your Pi. In about 20-30 seconds your device should appear on balena cloud application as below.
Very exciting so far! Isn't is?
Now the fun begins. Stack your RAK2245 HAT on your Pi. From balena cloud , generate a session token ( Preferences -> Access Tokens )
Next, clone this repo somewhere on your computer
git clone https://github.com/just4give/helium-dyi-hotspot-balena-pi4 && cd helium-dyi-hotspot-balena-pi4
Next log into balena cli
balena login
Choose "Authetication Token" from the list. This will ask you to enter the token you grabbed from balena cloud website. Paste and hit enter. You should receive successful login message.
Next, issue below commands one by one
chmod +x build.sh
./build.sh
balena push helium_diy_hotspot_pi4
Please note - the command is balena push <application_name>. If you have used different name in step 1, then use that.
If everything goes fine, you will see a nice unicorn :)
And in few minutes, both gateway and miner will be distrubuted to your device. You should see some logs like. Now if you have a LoRa node, test it out.
22.07.20 12:05:36 (-0400) gateway INFO: [up] PUSH_ACK received in 0 ms
22.07.20 12:05:40 (-0400) gateway INFO: [down] PULL_ACK received in 0 ms
GPS is not a hard requirement to run your DIY hotspot. So you may entirely skip GPS setup. Make sure in global config JSON file GPS is set to false.
You need to activate UART and modify dtoverlay
varible. Go to "Device Configuration" tab from left menu and modify dtoverlay value to pi3-disable-bt and activate UART.
-
If you are not on Mac, you may see some issue running
build.sh
file. If so , remove''
fromsed
command. -
If you are on Windows and are unable to build the run the bash script 'build.sh':
- First check the sed version using the command
sed --version
- If GNU sed version 3.02 is the version installed it wont support the -i option for sed, so update to the latest version of sed and try running it.
- Or replace the contents of the 'build.sh' file with the following one:
cp docker-compose-template.yml docker-compose.yml export MINER_TAG=$(curl -s 'https://quay.io/api/v1/repository/team-helium/miner/tag/?limit=100&page=1&onlyActiveTags=true' | jq -c '[ .tags[] | select( .namecontains("arm")) ][0].name' | cut -d'"' -f2) sed.exe s/MINER_TAG/$MINER_TAG/g docker-compose.yml > docker-temp.yml cp docker-temp.yml docker-compose.yml
- First check the sed version using the command
Execute below commands from the repo. This will fetch the latest miner image from the hub.
rm docker-compose.yml
./build.sh
balena push helium_diy_hotspot_pi4
Open your browser and navigate to http://<Your_Device_IP>. This is work in progress. You will see some useful metrics and can download swam key easily for backup.
I like to thank Marc from Balena and PastaGringo. They are the creators of the multi conatiner docker images which I reused.