element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
RoadTests & Reviews
  • Products
  • More
RoadTests & Reviews
Blog HARTING MICA: Connect to Amazon Web Services
  • Blog
  • RoadTest Forum
  • Documents
  • RoadTests
  • Reviews
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join RoadTests & Reviews to participate - click to join for free!
  • Share
  • More
  • Cancel
  • Author Author: Jan Cumps
  • Date Created: 13 Jun 2019 11:38 AM Date Created
  • Views 1001 views
  • Likes 2 likes
  • Comments 2 comments
Related
Recommended
  • harting
  • aws
  • cloud
  • iot

HARTING MICA: Connect to Amazon Web Services

Jan Cumps
Jan Cumps
13 Jun 2019

I road-tested the Harting MICA Complete IIoT Starter Kit.

In this follow up blog, I'm connecting the Mica to AWS (Amazon Web Services).

image

The goal if this blog is to register the device and test a message from and to the AWS IoT service.

 

 

Set Up the Thing

 

Prerequisite: have a free tier AWS account

 

You have to let AWS IoT know that you want to connect the Mica to it. The process involves creating certificates and setting up rights.

 

In your browser, log in to the AWS console and Open the AWS IoT Core service

Let's first make a security policy that allows our device to publish and subscribe to all topics on our AWS IoT service.

When running the AWS test kit later, a stricter policy will be generated.

Navigate to Secure -> Policy

image

Then go to Secure -> Certificates.

Sect your certificate, and attach the policy to it, via the Action menu.

 

Create a new Thing.

image

Only the name is mandatory. I created a group, but that - and other settings on this page, are optional.

image

Then click on Create Certificate. Download all certificates, and the root certificate "RSA 2048 bit key: Amazon Root CA 1".

Store them in a safe place.

 

Click Activate, then Attach Policy.

 

Select the policy you created earlier.

 

 

Prepare the Test Kit

 

Open your Thing in AWS IoT, and select Interact

Click on Connect to the Device, then Get Started.

Select Node.js and Linux:

 

image

Then Next

 

Then download your kit. We'll deploy it on a to-be-created Mica container.

Click on Next the last time, and keepthe window open. Once we have the Mica set up, we can see traffic arriving on this page.

image

The messages will display where the red arrow is in the image above, once we configured the Mica.

 

Configure the Mica

 

For this exercise, create a fresh Alpine container, called AWS.

Enable DHCP for IPv4.

 

First change the default root password.

passwd

 

We're going to use AWS' javascript test package. Install node.js on your container:

 

apk update
apk add --upgrade apk-tools
apk upgrade --available

apt-get add nodejs
apt-get add curl

 

 

Test the install

 

node --version

 

go to your home directory, and create a subdir clled aws.

 

cd ~
mkdir aws
cd aws

 

Move your downloaded tst kit to that folder. I used winSCP and the SCP protocol for that.

Then execute the list of commands that are listed on the AWS page that you left open from the previous activities.

 

unzip connect_device_package.zip
chmod +x start.sh
./start.sh

 

Hooray! Messages arrive.

image

 

Also send a message to the device:

image

 

Stop the application after some time with ctrl-c, to avoid an AWS invoice!

 

Happy messaging.

 

Related Blog
HARTING MICA: Develop and Debug a C GPIO Example in Eclipse - Part 1: User Experience
HARTING MICA: Develop and Debug a C GPIO Example in Eclipse - Part 2: MICA Debian Stretch Setup
HARTING MICA: Develop and Debug a C GPIO Example in Eclipse - Part 3: Eclipse Configuration on Windows
HARTING MICA: Develop and Debug a C GPIO Example in Eclipse - Part 4: Build and Debug the GPIO Example
HARTING MICA: Make a Safe(r) MQTT Container with Certificate and TLS/SSL
HARTING MICA: Manage Access to USB and other Devices
HARTING MICA: SD Card as Shared Storage
HARTING MICA: Alpine Linux and another MQTT Container with Certificate and TLS/SSL
HARTING MICA: Connect to Amazon Web Services
HARTING MICA: Connect Node-RED to Amazon Web Services
HARTING MICA: Install Java 8 VM in a Debian Stretch Container
HARTING MICA: Read BOSCH CISS Sensor with Java - part 1: USB Connect and Listen
  • Sign in to reply
  • Jan Cumps
    Jan Cumps over 6 years ago in reply to Jan Cumps

    Success: a message generated in the Mica Node Red flow arrived at Amazon Web Services. Yay!

     

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • Jan Cumps
    Jan Cumps over 6 years ago

    I’ve spent a few evenings to try and get the AWS nodes working on Node Red. No success yet.

     

    image

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube