Skip to end of banner
Go to start of banner

Tutorial: Onboarding a Raspberry Pi to netFIELD

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

In this tutorial, we demonstrate how easy it is to get started using netFIELD Cloud. As an example, we will onboard a Raspberry Pi to the Hilscher netFIELD Cloud. It takes no longer than 10 minutes to get started (unless you still need to order a Raspberry Pi). 

netFIELD Extension for Linux is a lightweight runtime, which can be installed on a standard Linux system to connect an edge device with netFIELD Cloud. Supported Linux distributions are e.g. Ubuntu, Debian, or Raspbian. In this tutorial, we show how to install and configure netFIELD Extension for Linux on a Raspberry Pi running a regular Raspbian Linux distribution. 


If you are interested, you can find the installer script for the netFIELD Linux extension in Github at https://github.com/HilscherAutomation/netFIELD-extension-linux . You will also find detailed information and instructions there in a README file. But don't worry - we will go through the necessary steps together in this tutorial. You may just continue reading. 

Prerequisites

  • You need a Raspberry Pi device, e.g. a Raspberry Pi 3 or Raspberry Pi 4 with a Raspbian OS version 10 or 11. The device needs to be connected to the internet.
  • You need a netFIELD user account. If you don't have one yet, please register a trial account for free at https://netfield.io/

Raspberry Pi




Optional step 1: Register a netFIELD trial account 

If you already have a netFIELD user account, please skip this step and proceed to the next one below.

If you don't have an account, you can create a free trial account for netFIELD Cloud for a duration of six weeks.

Please follow these steps to register your trial account:

  • To register your trial account, visit https://netfield.io/signup
  • Fill in the form – at least all mandatory fields, including your name, organization, email address, and password
  • You will receive an email with a request to verify your email address. Please click on “Verify Email” in the email that you have received. Your web browser will open, and your account will get verified.
  • After verification, you will receive a second email that your account has been verified.
  • Now you can log in to https://netfield.io with the email address and password that you have set during registration

Optional step 2: install Raspbian on your Raspberry Pi device

If your Raspberry Pi does not have a fresh Raspbian OS installed, please follow the following steps:


  • Download the Raspberry Pi Imager from https://www.raspberrypi.com/software/
  • Use Raspberry Pi Imager to install the standard Raspberry Pi OS (Raspbian) to your SD card
  • Inject the SD card with the freshly installed Raspbian OS into your Raspberry Pi device



Install the netFIELD Linux extension and onboard your device

Now that you have a clean Raspberry Pi with Raspbian Linux and a netFIELD user account, we can install the netFIELD environment on your Raspberry and onboard the device to https://netfield.io   

Follow the following steps to download the installer script:

  • Power up your Raspberry Pi and login into the Linux shell
  • Run the shell command “sudo -i” to switch to the root user

  • Run the shell command “apt update” to update the package sources list of the package manager to the latest state

  • Run the shell command "sudo git clone https://github.com/hilschernetiotedge/netFIELD-extension-linux.git" to download the installer script from GitHub

Run the installer script to onboard your Raspberry Pi device

The installer script is now available on your Raspberry Pi device in the folder “netFIELD-extension-linux” of the root user’s home directory.

The installer script can be invoked with two commands: “onboard” and “offboard”. There are two different options for authentication: either authentication with username and password (options “-u <username>” and “-p <password>”) or authentication with an API key (option “-a <apikey>). We will use the installer script with username and password in this example.

Run the following commands to onboard your device to netFIELD Cloud:

  • Run “cd netFIELD-extension-linux” to switch to the directory that contains the installer script

  • Run the script to onboard the device (using username and password: "sudo ./netfield-extension-linux-installer.sh -u <username> -p <password> onboard" (please replace the placeholders with your actual username and password in the placeholders)

When you run the installer script for the first time, it downloads and installs some required packages to your device. Afterwards, it establishes a connection to the netfield.io server and onboards your device. You should see a success message in the console.


Check that your device is available in netFIELD Cloud

After onboarding, the edge device will be connected to netFIELD Cloud.

Login to https://netfield.io/ again. You can see your Raspberry Pi device in the Device Manager now. Directly after onboarding, the device status might still be red in the Device Manager. It will take a short moment to download the required system containers to the Raspberry Pi device and launch them. After a short while, the status will change to green.

Congratulations! You have successfully onboarded your first IIoT edge device to netFIELD Cloud!

Now you can start exploring the device management functionality of netFIELD Cloud. For example, you can remotely deploy one of our ready-made app containers to your device. Or you may add your own smart edge application as a container in the Container Manager, and then deploy your app to the device. Have fun!

  • No labels