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.
- Remove the microsdhc card from the adapter.
![03-mlp-card-plus-adapter (1).jpg 03-mlp-card-plus-adapter (1).jpg](https://community.ptc.com/t5/image/serverpage/image-id/69481i7404EB696DB0AD0C/image-size/large?v=v2&px=999)
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 21-mlp-insert-pi.jpg](https://community.ptc.com/t5/image/serverpage/image-id/69482iE51C233F3286E8CE/image-size/large?v=v2&px=999)
- With the power supply NOT connected to a wall-socket, connect the power, monitor, USB keyboard, and USB mouse.
![00-mlp-pi (1).jpg 00-mlp-pi (1).jpg](https://community.ptc.com/t5/image/serverpage/image-id/69484i47585FDCE633AE55/image-size/large?v=v2&px=999)
- Plug-in the power-supply to a wall-socket and wait for the Pi to boot.
![22-mlp-pi-start.png 22-mlp-pi-start.png](https://community.ptc.com/t5/image/serverpage/image-id/69485i9D2E00808DF6BC31/image-size/large?v=v2&px=999)
Pi Initial Configuration
The Raspbian OS needs some initial configuration to set things such as your location and to connect to a WiFi network.
- Click Next on the initial Raspbian start pop-up.
- Set your Country, Language, TimeZone, Use English language (if applicable), and Use US keyboard (if applicable), then click Next.
![23-mlp-set-country.png 23-mlp-set-country.png](https://community.ptc.com/t5/image/serverpage/image-id/69486i0E78E3C825469C63/image-size/large?v=v2&px=999)
- Enter and Confirm a new password, then click Next.
![24-mlp-change-password.png 24-mlp-change-password.png](https://community.ptc.com/t5/image/serverpage/image-id/69487iD9CD491A35FFF05D/image-size/large?v=v2&px=999)
- If applicable, check the This screen shows a black border around the desktop checkbox, and click Next.
![25-mlp-set-up-screen.png 25-mlp-set-up-screen.png](https://community.ptc.com/t5/image/serverpage/image-id/69488iA0F1175133ABC3C4/image-size/large?v=v2&px=999)
- Select an appropriate WiFi network, and click Next.
![26-mlp-select-wifi.png 26-mlp-select-wifi.png](https://community.ptc.com/t5/image/serverpage/image-id/69490i6825644C31F9F580/image-size/large?v=v2&px=999)
- Enter the WiFi password, and click Next.
![27-mlp-wifi-password.png 27-mlp-wifi-password.png](https://community.ptc.com/t5/image/serverpage/image-id/69491iD70CA52F38D124AD/image-size/large?v=v2&px=999)
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 28-mlp-update-software.png](https://community.ptc.com/t5/image/serverpage/image-id/69492i6ED50A4DE9E5EA93/image-size/large?v=v2&px=999)
- 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 29-mlp-up-to-date.png](https://community.ptc.com/t5/image/serverpage/image-id/69493iE1CEF2660984DE91/image-size/large?v=v2&px=999)
When the Setup is complete, click Restart.
- After the reboot, you will be automatically re-logged into Raspbian.
![30-mlp-setup-complete.png 30-mlp-setup-complete.png](https://community.ptc.com/t5/image/serverpage/image-id/69494iCEB2513882529972/image-size/large?v=v2&px=999)
Step 5: Install EMS
Now that the Pi is fully setup, you want to download the Edge MicroServer (EMS) onto the Pi.
- 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.
- Click the download's options drop-down, and select Show in folder.
![32-mlp-show-in-folder.png 32-mlp-show-in-folder.png](https://community.ptc.com/t5/image/serverpage/image-id/69506i0A28A82F806C22DF/image-size/large?v=v2&px=999)
![33-mlp-downloaded-ems.png 33-mlp-downloaded-ems.png](https://community.ptc.com/t5/image/serverpage/image-id/69507iFF4E87C3ACE01C24/image-size/large?v=v2&px=999)
- Right-click on the .zip file and select Extract Here.
![34-mlp-right-click-extract.jpg 34-mlp-right-click-extract.jpg](https://community.ptc.com/t5/image/serverpage/image-id/69508iD83851EDC69902DF/image-size/large?v=v2&px=999)
![35-mlp-extracted-folder.png 35-mlp-extracted-folder.png](https://community.ptc.com/t5/image/serverpage/image-id/69582iE5B536C0AC0074D0/image-size/large?v=v2&px=999)
- Navigate into the newly-extracted /microserver folder.
![36-mlp-microserver-folder.png 36-mlp-microserver-folder.png](https://community.ptc.com/t5/image/serverpage/image-id/69583i0F8675B5B53D4E7F/image-size/large?v=v2&px=999)
The primary executables which enable the EMS functionality are the following:
File Name | Description |
wsems | An executable file that runs the Edge MicroServer. |
luascriptresource | The 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.
- In the /microserver folder, create a /logs directory.
- Create a /other directory.
- Create a /staging directory.
- Create a /tw directory.
- Create a /updates directory.
![37-mlp-new-folders.png 37-mlp-new-folders.png](https://community.ptc.com/t5/image/serverpage/image-id/69587i20648024797F92B6/image-size/large?v=v2&px=999)
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.
- In the /tw directory, create a text file named tw_test_01.txt.
- In the /other directory, create a text file named other_test_01.txt.
![38-mlp-new-files.png 38-mlp-new-files.png](https://community.ptc.com/t5/image/serverpage/image-id/69595i441E8A4320BFEF1F/image-size/large?v=v2&px=999)
Click here to view Part 3 of this guide.