cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X

Setup a Raspberry Pi as an IoT Device Part 2

100% helpful (1/1)

 

 

Step 4: Connect Peripherals and Initial Configuration

 

Connect Peripherals

 

Now that we have a working microsdhc flash card with the Raspbian OS, we want to insert it into the Pi, as well as connect our other peripherals and power.

 

  1. Remove the microsdhc card from the adapter.
     

    03-mlp-card-plus-adapter (1).jpg

     

     
  2. With the power supply NOT connected, insert the microsdhc card into the Pi.

    • Note that it may help to turn the Pi over.
     

    21-mlp-insert-pi.jpg

     

  3. With the power supply NOT connected to a wall-socket, connect the power, monitor, USB keyboard, and USB mouse.
     


    00-mlp-pi (1).jpg

     

     

  4. Plug-in the power-supply to a wall-socket and wait for the Pi to boot.
     


    22-mlp-pi-start.png

     

Pi Initial Configuration

 

The Raspbian OS needs some initial configuration to set things such as your location and to connect to a WiFi network.

 

  1. Click Next on the initial Raspbian start pop-up.

  2. Set your Country, Language, TimeZone, Use English language (if applicable), and Use US keyboard (if applicable), then click Next.

     

    1. 23-mlp-set-country.png
     

     

  3. Enter and Confirm a new password, then click Next.


    24-mlp-change-password.png


  4. If applicable, check the This screen shows a black border around the desktop checkbox, and click Next.


    25-mlp-set-up-screen.png

     

     
  5. Select an appropriate WiFi network, and click Next.

    26-mlp-select-wifi.png
     
  6. Enter the WiFi password, and click Next.

    27-mlp-wifi-password.png

     

     
  7. On the Update Software screen, it is recommended to click Skip.

    • If you have a microsdhc card with 16GB or more, then you may click Next to peform an OS update.

    • Note that this process may be time-intensive... 30+ minutes.

      28-mlp-update-software.png

       

     
  8. If you performed an OS update, and it has completed with a System is up to date pop-up, click OK.


    29-mlp-up-to-date.png

     

     
  9. When the Setup is complete, click Restart.

    • After the reboot, you will be automatically re-logged into Raspbian.
     

    30-mlp-setup-complete.png

     

     

Step 5: Install EMS

 

Now that the Pi is fully setup, you want to download the Edge MicroServer (EMS) onto the Pi.

  1. On the Raspberry Pi, open a web browser and navigate to this guide, then download MED-61060-CD-054_SP10_Microserver-Linux-arm-hwfpu-openssl-5-4-10-1509.zip.
     
  2. Click the download's options drop-down, and select Show in folder.
     

    32-mlp-show-in-folder.png

     


    33-mlp-downloaded-ems.png

     

  3. Right-click on the .zip file and select Extract Here.
     

    34-mlp-right-click-extract.jpg

     

    35-mlp-extracted-folder.png

     

  4. Navigate into the newly-extracted /microserver folder.
     

    36-mlp-microserver-folder.png

     

The primary executables which enable the EMS functionality are the following:

File NameDescription
wsemsAn executable file that runs the Edge MicroServer.
luascriptresourceThe Lua utility that is used to run Lua scripts, configure remote things, and integrate with the host system.

 

 

Create Additional Directories

 

New folders may be added to the /microserver directory for various purposes.

Some of these will be utilized within this guide, while others may be utilized in future guides using the EMS.

 

  1. In the /microserver folder, create a /logs directory.

  2. Create a /other directory.

  3. Create a /staging directory.

  4. Create a /tw directory.

  5. Create a /updates directory.

    37-mlp-new-folders.png

     

Create Test Files

 

It can also be helpful during testing to have some small files in these folders to further demonstrate connectivity.

 

As these files were custom-created for the guide, seeing them within ThingWorx Foundation ensures that the connection between Foundation and the EMS is real and current.

 

  1. In the /tw directory, create a text file named tw_test_01.txt.

  2. In the /other directory, create a text file named other_test_01.txt.

    38-mlp-new-files.png

     

 

Click here to view Part 3 of this guide.

Version history
Last update:
‎Nov 04, 2022 02:06 PM
Updated by:
Labels (1)
Attachments
Contributors