<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Yokogawa-Nilesh</title>
    <description>The latest articles on DEV Community by Yokogawa-Nilesh (@yokogawanilesh).</description>
    <link>https://dev.to/yokogawanilesh</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F635310%2F0173ecc2-1ac1-4829-8e61-d5148e75810f.png</url>
      <title>DEV Community: Yokogawa-Nilesh</title>
      <link>https://dev.to/yokogawanilesh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yokogawanilesh"/>
    <language>en</language>
    <item>
      <title>Installing AWS IoT Greengrass on e-RT3 Plus</title>
      <dc:creator>Yokogawa-Nilesh</dc:creator>
      <pubDate>Wed, 02 Jun 2021 18:34:17 +0000</pubDate>
      <link>https://dev.to/yokogawa-yts_india/installing-aws-iot-greengrass-on-e-rt3-plus-j1l</link>
      <guid>https://dev.to/yokogawa-yts_india/installing-aws-iot-greengrass-on-e-rt3-plus-j1l</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;AWS IoT Greengrass is a software that renders enhanced cloud capabilities to field devices. This enables the devices to collect and analyze data locally, react to local events independently, and communicate securely on local networks. The devices can also communicate securely with AWS IoT Core and export IoT data to the AWS Cloud.&lt;/p&gt;

&lt;p&gt;In this article, we will create a Greengrass Group on AWS Cloud and install AWS IoT Greengrass Core on the Edge device (e-RT3 Plus). Additionally, we will deploy a sample package to verify the connection with AWS Cloud.&lt;/p&gt;

&lt;p&gt;For more information on AWS IoT Greengrass, refer to &lt;a href="https://docs.aws.amazon.com/greengrass/index.html" rel="noopener noreferrer"&gt;AWS IoT Greengrass official website&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev.to/yokogawa-yts_india/send-telemetry-data-from-e-rt3-plus-to-azure-iot-hub-41i"&gt;Azure IoT Edge&lt;/a&gt; article is also available for your reference.&lt;/p&gt;

&lt;h2&gt;
  
  
  Environment
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;e-RT3 Plus F3RP70-2L（Ubuntu 18.04 32-bit）
This is the Edge controller of Yokogawa Electric Corporation. It is registered in the AWS IoT Greengrass.&lt;/li&gt;
&lt;li&gt;Raspberry Pi 4 Model B （Ubuntu Server 20.04 32-bit)&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: These devices can execute &lt;code&gt;armhf&lt;/code&gt; architecture packages.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Preparation
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Creation of AWS account
&lt;/h3&gt;

&lt;p&gt;If you do not have an AWS account, create one using this &lt;a href="https://aws.amazon.com/en/" rel="noopener noreferrer"&gt;link&lt;/a&gt;.&lt;br&gt;
Limited usage slots are available for free.&lt;br&gt;
For more information on using free slots, click &lt;a href="https://aws.amazon.com/free/?nc2=h_ql_pr_ft&amp;amp;all-free-tier.sort-by=item.additionalFields.SortRank&amp;amp;all-free-tier.sort-order=asc&amp;amp;awsf.Free%20Tier%20Categories=categories%23iot&amp;amp;awsf.Free%20Tier%20Types=*all" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Installation of WinSCP
&lt;/h3&gt;

&lt;p&gt;Transferring files from PC to the device requires installation of WinSCP.&lt;br&gt;
For more information on installing and using WinSCP, refer to the &lt;a href="https://winscp.net/eng/index.php" rel="noopener noreferrer"&gt;official website&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;
  
  
  Installation of Python3.8
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: This setting is required only when using e-RT3. When using e-RT3, &lt;a href="https://dev.to/yokogawa-yts_india/send-telemetry-data-from-e-rt3-plus-to-azure-iot-hub-41i#enabling-sudo-user"&gt;sudo setting&lt;/a&gt; is required for common users to use the &lt;em&gt;sudo&lt;/em&gt; command.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Run the following commands to install Python3.8 to be used in Lambda of Greengrass.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;python3.8
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;li&gt;

&lt;p&gt;To confirm whether installation is successful, run the following command to check the version.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight shell"&gt;&lt;code&gt;username@ubuntu:~&lt;span class="nv"&gt;$ &lt;/span&gt;python3.8 &lt;span class="nt"&gt;--version&lt;/span&gt;
Python 3.8.0
&lt;/code&gt;&lt;/pre&gt;




&lt;/li&gt;

&lt;/ol&gt;

&lt;h3&gt;
  
  
  Installation of Java8
&lt;/h3&gt;

&lt;p&gt;Java8 is required for using the Stream Manager of Greengrass.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;To install Java8, run the following commands:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;openjdk-8-jdk
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To establish the connection, run the following command:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo ln&lt;/span&gt; /etc/alternatives/java /usr/bin/java8
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To verify if Java8 is installed properly, run the following commands:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;username@ubuntu:~&lt;span class="nv"&gt;$ &lt;/span&gt;java8 &lt;span class="nt"&gt;-version&lt;/span&gt;
openjdk version &lt;span class="s2"&gt;"1.8.0_292"&lt;/span&gt;
OpenJDK Runtime Environment &lt;span class="o"&gt;(&lt;/span&gt;build 1.8.0_292-8u292-b10-0ubuntu1~18.04-b10&lt;span class="o"&gt;)&lt;/span&gt;
OpenJDK Client VM &lt;span class="o"&gt;(&lt;/span&gt;build 25.292-b10, mixed mode&lt;span class="o"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Validation of cgroup
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: This setting is required only when using Raspberry Pi.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Validate cgroup for running Lambda in the container.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Open &lt;code&gt;/boot/firmware/cmdline.txt&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vi /boot/firmware/cmdline.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add the following value to the end of the existing row.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;cgroup_enable&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;memory &lt;span class="nv"&gt;cgroup_memory&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;1
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Restart the device.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;reboot
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Creating Greengrass Group
&lt;/h2&gt;

&lt;p&gt;Follow these steps to create a Greengrass Group in AWS Cloud:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;In the upper-right corner of the &lt;em&gt;AWS Management Console&lt;/em&gt; page, select your region from the menu bar.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fow6xkkhzgh3vrk6h7icw.jpg" alt="AWS Management Console" width="800" height="421"&gt; &lt;/li&gt;
&lt;li&gt;On the menu bar, click the &lt;strong&gt;Service&lt;/strong&gt; menu, and in the &lt;strong&gt;Search&lt;/strong&gt; box, type &lt;code&gt;iot greengrass&lt;/code&gt;.
From the list of services that appear, select IoT Greengrass.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F21p4or8zcrq96isho9f8.jpg" alt="AWS Management Console_Search" width="800" height="472"&gt;
&lt;/li&gt;
&lt;li&gt;On the navigation pane, expand &lt;strong&gt;Greengrass &amp;gt; Classic (V1)&lt;/strong&gt; and select &lt;strong&gt;Groups&lt;/strong&gt;, and then click &lt;strong&gt;Create Group&lt;/strong&gt; on the right pane.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fx2v94yhnggev678m5s9b.jpg" alt="AWS Management Console_CreateGroup" width="709" height="328"&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Use default creation&lt;/strong&gt;.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fj3u14520b8yjqrmn89z2.jpg" alt="AWS Management Console_useDefault" width="712" height="375"&gt;
&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Group Name&lt;/strong&gt; box, type your group name and click &lt;strong&gt;Next&lt;/strong&gt;.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fejdeewwkiu54m04ibcgr.jpg" alt="AWS Management Console_Groupname" width="800" height="398"&gt;
&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Name&lt;/strong&gt; box, type the name of the Greengrass Core for the group and click &lt;strong&gt;Next&lt;/strong&gt;. By default, “_Core” is appended with the group name.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhsxrwj7nw3fhqh025a3l.jpg" alt="AWS_managementConsole_Corename" width="800" height="422"&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create Group and Core&lt;/strong&gt;.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6rp6q1biricduyj1n1fl.jpg" alt="AWS_managementConsole_CreateCore" width="800" height="683"&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Click &lt;strong&gt;Download these resources as tar.gz&lt;/strong&gt; to download the security resource for connecting the device to the cloud.&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4lyp4k0wxmm2w8dz4ra7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4lyp4k0wxmm2w8dz4ra7.jpg" alt="AWS_managementConsole_Download" width="626" height="662"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: The tar.gz file cannot be downloaded later and hence, you must download the file before proceeding to the next step.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;After downloading the file, click &lt;strong&gt;Finish&lt;/strong&gt;.&lt;br&gt;
The Greengrass Group is created.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Installing Greengrass Core on e-RT3 Plus
&lt;/h2&gt;

&lt;p&gt;There are several methods to install Greengrass Core on the e-RT3 Plus device. In this exercise, we will install Greengrass Core from the APT repository.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Installing Greengrass Core from APT repository does not support OTA updates. Follow other installation methods if you want to use OTA updates.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;To install Greengrass Core, we will first configure the security settings on the e-RT3 Plus device.&lt;/p&gt;

&lt;h3&gt;
  
  
  Configuring security settings on e-RT3 Plus
&lt;/h3&gt;

&lt;p&gt;Let us install the security resources and CA certificates on the e-RT3 Plus device. This is required to connect the device to AWS Cloud.&lt;/p&gt;

&lt;h4&gt;
  
  
  Installing security resources
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;Open WinSCP and connect to the device by logging on to the e-RT3 terminal.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsxryy515g2z59vmsozdb.jpg" alt="AWS_Winscp" width="800" height="344"&gt;
&lt;/li&gt;
&lt;li&gt;Copy the security resource (tar.gz file), which you downloaded while creating Greengrass Group, to the e-RT3 terminal in WinSCP.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following command and install the security resource. Replace the {hash} part to match the file name of the security resource.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo mkdir&lt;/span&gt; &lt;span class="nt"&gt;-p&lt;/span&gt; /greengrass
&lt;span class="nb"&gt;sudo tar&lt;/span&gt; &lt;span class="nt"&gt;-xzvf&lt;/span&gt; ~/&lt;span class="o"&gt;{&lt;/span&gt;&lt;span class="nb"&gt;hash&lt;/span&gt;&lt;span class="o"&gt;}&lt;/span&gt;&lt;span class="nt"&gt;-setup&lt;/span&gt;.tar.gz &lt;span class="nt"&gt;-C&lt;/span&gt; /greengrass
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Downloading root CA certificate
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Move to &lt;code&gt;/greengrass/certs&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; /greengrass/certs/
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Download the Amazon Root CA 1 certificate with the name &lt;code&gt;root.ca.pem&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;wget &lt;span class="nt"&gt;-O&lt;/span&gt; root.ca.pem https://www.amazontrust.com/repository/AmazonRootCA1.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Ensure that the downloaded &lt;code&gt;root.ca.pem&lt;/code&gt; file is not empty (downloaded correctly). If the file is empty, try downloading again.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cat &lt;/span&gt;root.ca.pem
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Installing Greengrass Core software
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create system account for Greengrass.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;adduser &lt;span class="nt"&gt;--system&lt;/span&gt; ggc_user
&lt;span class="nb"&gt;sudo &lt;/span&gt;addgroup &lt;span class="nt"&gt;--system&lt;/span&gt; ggc_group
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Install AWS IoT Greengrass keyring package and add repository.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;cd&lt;/span&gt; ~
&lt;span class="nb"&gt;sudo &lt;/span&gt;wget &lt;span class="nt"&gt;-O&lt;/span&gt; aws-iot-greengrass-keyring.deb https://d1onfpft10uf5o.cloudfront.net/greengrass-apt/downloads/aws-iot-greengrass-keyring.deb
&lt;span class="nb"&gt;sudo &lt;/span&gt;dpkg &lt;span class="nt"&gt;-i&lt;/span&gt; aws-iot-greengrass-keyring.deb
username@ubuntu:~&lt;span class="nv"&gt;$ &lt;/span&gt;&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"deb https://dnw9lb6lzp2d8.cloudfront.net stable main"&lt;/span&gt; | &lt;span class="nb"&gt;sudo tee&lt;/span&gt; /etc/apt/sources.list.d/greengrass.list
deb https://dnw9lb6lzp2d8.cloudfront.net stable main
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Update package list and install Greengrass Core software.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;aws-iot-greengrass-core
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Start Greengrass Demon.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start greengrass.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following commands to check if Demon is running correctly. (If the displayed &lt;code&gt;Active&lt;/code&gt; status is &lt;code&gt;active(running)&lt;/code&gt;, it means that Demon is running.)&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;username@ubuntu:~&lt;span class="nv"&gt;$ &lt;/span&gt;systemctl status greengrass.service
&lt;span class="k"&gt;*&lt;/span&gt; greengrass.service - Greengrass Daemon
Loaded: loaded &lt;span class="o"&gt;(&lt;/span&gt;/lib/systemd/system/greengrass.service&lt;span class="p"&gt;;&lt;/span&gt; disabled&lt;span class="p"&gt;;&lt;/span&gt; vendor preset: enabled&lt;span class="o"&gt;)&lt;/span&gt;
Active: active &lt;span class="o"&gt;(&lt;/span&gt;running&lt;span class="o"&gt;)&lt;/span&gt; since Fri 2021-03-05 06:31:07 UTC&lt;span class="p"&gt;;&lt;/span&gt; 14min ago
Process: 2159 &lt;span class="nv"&gt;ExecStart&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;/greengrass/ggc/core/greengrassd start &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;code&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;exited, &lt;span class="nv"&gt;status&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;0/SUCCESS&lt;span class="o"&gt;)&lt;/span&gt;
Main PID: 2163 &lt;span class="o"&gt;(&lt;/span&gt;5&lt;span class="o"&gt;)&lt;/span&gt;
Tasks: 10 &lt;span class="o"&gt;(&lt;/span&gt;limit: 2366&lt;span class="o"&gt;)&lt;/span&gt;
CGroup: /system.slice/greengrass.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;To start the software automatically when the device is started, run the following command:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl &lt;span class="nb"&gt;enable &lt;/span&gt;greengrass.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: If the device is in a proxy environment, proxy settings must be configured.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Deployment
&lt;/h2&gt;

&lt;p&gt;Now we will deploy a sample package to check if the device is connected to AWS Cloud.&lt;/p&gt;

&lt;p&gt;Follow these steps to test the connection in AWS Greengrass:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;On the navigation plane, select &lt;strong&gt;Groups&lt;/strong&gt;, and click the created group.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq12g8hn4xwdsauppy2s5.jpg" alt="AWS_Deployment_Groups" width="718" height="336"&gt;
&lt;/li&gt;
&lt;li&gt;From the &lt;strong&gt;Actions&lt;/strong&gt; menu, click &lt;strong&gt;Deploy&lt;/strong&gt; to deploy the group.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwtlbze96mathrfwliw92.jpg" alt="AWS_Deployment_Actions" width="712" height="456"&gt;
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Automatic detection&lt;/strong&gt;.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkqasneqf5fzvs4do5p0c.jpg" alt="AWS_Deployment_automaticDetection" width="800" height="563"&gt;
&lt;/li&gt;
&lt;li&gt;Wait for a few minutes until the deployment is complete.
If the group is deployed successfully, the connection status is displayed in green.
&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fqhxu3yuqn5aeorovvjs3.jpg" alt="Alt Text" width="800" height="344"&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;As demonstrated in this article, it is easy to install and run AWS IoT Greengrass on e-RT3 Plus. In the subsequent articles, we will explore further on deploying applications on e-RT3 Plus using AWS Cloud.&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional information
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Proxy settings
&lt;/h3&gt;

&lt;p&gt;If the device is in proxy environment, configuring proxy setting is mandatory. Although the settings differ based on environment, we will focus on configuring environment variables and Greengrass Core settings.&lt;/p&gt;

&lt;h4&gt;
  
  
  Configuring environment variables
&lt;/h4&gt;

&lt;p&gt;Refer &lt;a href="https://dev.to/yokogawa-yts_india/send-telemetry-data-from-e-rt3-plus-to-azure-iot-hub-41i#proxy-settings"&gt;this article&lt;/a&gt; to configure environment variables.&lt;/p&gt;

&lt;h4&gt;
  
  
  Configuring Greengrass Core settings
&lt;/h4&gt;

&lt;p&gt;Refer &lt;a href="https://docs.aws.amazon.com/greengrass/v1/developerguide/gg-core.html" rel="noopener noreferrer"&gt;this article&lt;/a&gt; to configure Greengrass Core  settings and then perform these steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Stop Greengrass if it is already running.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl stop greengrass.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add write permission to /greengrass/config/config.json and open.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo chmod&lt;/span&gt; +w /greengrass/config/config.json
&lt;span class="nb"&gt;sudo &lt;/span&gt;vi /greengrass/config/config.json
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Add &lt;code&gt;iotMqttPort&lt;/code&gt; object and &lt;code&gt;networkProxy&lt;/code&gt; object to the &lt;code&gt;coreThing&lt;/code&gt; object.&lt;/p&gt;

&lt;p&gt;The file after adding objects is shown below.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;/greengrass/config/config.json
&lt;span class="o"&gt;{&lt;/span&gt;
&lt;span class="s2"&gt;"coreThing"&lt;/span&gt; : &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="s2"&gt;"caPath"&lt;/span&gt; : &lt;span class="s2"&gt;"root.ca.pem"&lt;/span&gt;,
    &lt;span class="s2"&gt;"certPath"&lt;/span&gt; : &lt;span class="s2"&gt;"3283c6f04d.cert.pem"&lt;/span&gt;,
    &lt;span class="s2"&gt;"keyPath"&lt;/span&gt; : &lt;span class="s2"&gt;"3283c6f04d.private.key"&lt;/span&gt;,
    &lt;span class="s2"&gt;"thingArn"&lt;/span&gt; : &lt;span class="s2"&gt;"arn:aws:iot:ap-northeast-1:xxxxxxxxxxxx:thing/eRT3Group_Core"&lt;/span&gt;,
    &lt;span class="s2"&gt;"iotHost"&lt;/span&gt; : &lt;span class="s2"&gt;"xxxxxxxxxxxx-ats.iot.ap-northeast-1.amazonaws.com"&lt;/span&gt;,
    &lt;span class="s2"&gt;"iotMqttPort"&lt;/span&gt; : 443,
    &lt;span class="s2"&gt;"ggHost"&lt;/span&gt; : &lt;span class="s2"&gt;"greengrass-ats.iot.ap-northeast-1.amazonaws.com"&lt;/span&gt;,
    &lt;span class="s2"&gt;"keepAlive"&lt;/span&gt; : 600,
    &lt;span class="s2"&gt;"networkProxy"&lt;/span&gt;:&lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="s2"&gt;"proxy"&lt;/span&gt;:&lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="s2"&gt;"url"&lt;/span&gt; : &lt;span class="s2"&gt;"http://username:password@example.com:port/"&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;,
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Remove write permission for the file and restart Greengrass.&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo chmod&lt;/span&gt; &lt;span class="nt"&gt;-w&lt;/span&gt; /greengrass/config/config.json
&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl start greengrass.service
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;a href="https://www.yokogawa.com/solutions/products-platforms/control-system/ert3-embedded-controller/ert3-products/ert3-products-cpu/" rel="noopener noreferrer"&gt;e-RT3 Products - CPU&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devices.amazonaws.com/" rel="noopener noreferrer"&gt;AWS Partner Device Catalog&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/greengrass/v1/developerguide/gg-config.html" rel="noopener noreferrer"&gt;Configure AWS IoT Greengrass on AWS IoT&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/greengrass/v1/developerguide/install-ggc.html#ggc-package-manager" rel="noopener noreferrer"&gt;Install the AWS IoT Greengrass Core software from an APT repository&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.aws.amazon.com/greengrass/v1/developerguide/gg-core.html#alpn-network-proxy" rel="noopener noreferrer"&gt;Connect on port 443 or through a network proxy&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>aws</category>
      <category>iotgreengrass</category>
      <category>edgedevice</category>
      <category>ert3plus</category>
    </item>
  </channel>
</rss>
