Connecting to Wi-fi

Am I supposed to be doing this in the Application>Device>Terminal window?

and where is says “BALENA_MACHINE_NAME” is that “falling-dream” for this device?

Hey Sam,
are you developing your application in your local machine and pushing your code with the command balena push?
or are you only using the Deploy with Balena button?
to add a new service to your application (like wifi-connect), you need to download the GIT Repository, add the service, and push it to your application using the balena CLI.
if you haven’t done that before, I’ll be happy to walk you through

So far all I have done is create the applications add the devices by downloading the image files and loading them on the SD cards. Beyond that I am first trying to figure out how to get them to connect to the WiFi. I haven’t used Balena before and I’m new to raspberry pi as well so any help would be appreciated! Is there a more comprehensive guide to getting started? (assume I know nothing)

soo… let’s see:
First of all you need to download the code to your local machine (PC)

wifi-connect:
  build:
    context: ./wifi-connect
  restart: always
  network_mode: host
  privileged: true
  labels:
    io.balena.features.dbus: '1'
    io.balena.features.firmware: '1'

IMPORTANT
the indentation (spaces at the beginning of each line) are very important!!!

If you are new to most of this, and you want to build awesome projects on your RaspberryPi, I will recommend the following:

  • Install VisualStudio Code to view/edit the Code: Download Visual Studio Code - Mac, Linux, Windows
  • Learn a little bit about Git it is a highly used tool for sharing projects https://git-scm.com/ (there are a lot of tutorials everywhere, just google them)
  • Have some basic understanding about Docker and Docker compose
  • Always ask questions, we are all here happy to help and we have a cool community going on

also check this out: https://hub.balena.io/ more projects to try out ready to be deployed

OK - So I have downloaded the balena-sound-master added the wifi-connect folder with the dockerfile.template inside, as well as modified the docker-compose.yml file as shown above. Am I supposed to move this whole balena-sound-master folder onto the sd card BEFORE putting it back in the Pi or is that going to happen with the balena-cli in the next step?

I was able to get the balena cli to connect via the command prompt on my PC, but when I run balena push MY_DEVICE I get

Error: no “Dockerfile[.*]”,“docker-compose.yml” or "Package.json"file found in source

Hi, you do not have to transfer applications to the SD card. You only flash it with the operating system - afterwards the OS will download your application from the cloud. That is when you do balena push APP_NAME, the CLI will push the application to our builders, they will create Docker/balenaEngine images which the OS will download afterwards from our Docker registry.

The error you get means that you need to execute the balena push command from the folder where the docker-compose.yml file you created is located.

OK lets make sure I have this part straightened out…

  1. download and extract balena-sound-master and wifi-connect-master.

  2. create a new folder in the root of balena-sound-master named “wifi-connect”.

  3. put the extracted folder wifi-connect-master into the new “wifi-connect” folder

  4. edit the balena-sound-master>docker-compose.yml file to add the wifi-connect service

  5. use Balena-cli to connect to the RasberryPi3 through my PC command prompt

Now I am confused as to how to push the balena-sound-master code to the device. How do I execute the push command from a specific folder?

EDIT I have successfully used the Balena-cli to push the balena-sound to the device. At the end I got a [Success] Release successfully created! And a blue unicorn (that seems like a good thing!)

Sounds perfect Sam. That means you built some new containers, pushed them to the cloud builders, and the Pi should have grabbed them and downloaded them from there. Now - using your phone, a tablet, or anything else with Wi-Fi, scan your wireless networks and look for the Pi, it will be broadcasting a network named WiFi Connect. Connect to that. After a moment, you will get a Captive Portal, that will list out all the networks that your Pi can see. Is you home WiFi listed? If so, try connecting. If not, that indicates the Pi cannot see your WiFi - which is the source of the problem.

Does it have to be so difficult to connect to WiFi?