This package contains all the files to run the Microchip Zero Touch Secure Provisioning Kit for AWS IoT.
Latest product information can be found at http://www.microchip.com/developmenttools/productdetails.aspx?partno=at88ckecc-aws-xstk-b
The full user guide can be found at http://microchipdeveloper.com/iot:ztpk
This section serves as a quick reference for the setup required. The full user manual referenced above will give more detailed instructions.
Clone or Download the AWS IOT Zero-Touch Secure Provisioning kit software.
Note- CryptoAuthLib is a submodule and is not automatically included and will need to be cloned recursively or downloaded separately from the kit software. If downloaded separately, the files will need to be placed in firmware\SAMG55\AWS_IoT_Zero_Touch_SAMG55\src\cryptoauthlib folder
Install AWS CLI. Used to configure AWS credentials for the python scripts.
Install serial terminal emulator, like PuTTY. Used to view status/debug information from the SAMG55.
Install Python 3. Make sure to include pip and tcl/tk. PC side work is all done from python scripts.
Install Python packages (pip install –r requirements.txt
)
required for the kit python scripts.
Maybe install Visual C++ 2017 Build Tools. Microsoft Visual C++ Build Tools 14.0 may be required for the hidapi python package. This is a big download/install and it is not needed if the previous step completed without error.
See AWS CloudFormation templates and documentation in the cloud-formation-templates folder.
Log into the AWS Console for your account and select the region you want to run the kit from.
Create an IAM user to demo/run the kit from:
aws configure
from the command line on your PC to configure
the AWS credentials for the ZTUser account. Make sure the enter the same
region as selected in the previous step.Create JITR Lambda Function Policy
Policy Document:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"iot:UpdateCertificate",
"iot:CreatePolicy",
"iot:AttachPrincipalPolicy",
"iot:CreateThing",
"iot:CreateThingType",
"iot:DescribeCertificate",
"iot:DescribeCaCertificate",
"iot:DescribeThing",
"iot:DescribeThingType",
"iot:GetPolicy"
],
"Resource": "*"
}
]
}
Create JITR Lambda Function Role
aws configure
from the
command line. (part of the AWS CLI download)The central hub of the kit is the SAMG55 Xplained Pro board.
While the revision B kit comes with the appropriate firmware loaded, the original (rev A) kit will need firmware updates to work. Additionally, new firmware updates may be released.
This section serves as a quick reference for the steps required. The full user manual referenced above will give more detailed instructions.
These steps will be performed from the IAM user, ZTUser, created for demonstrating this kit.
Note - If the AWS CloudFormation template was used these two steps can be skipped.
Create the Just In Time Registration (JITR) Lambda Function
ZTLambdaJITR/lambda_function.py
into the code entry area.Create IoT Rules Engine Rule for triggering the JITR lambda function.
python ca_create_root.py
to create a root CA.python ca_create_signer_csr.py
to create a CSR for a signer.python ca_create_signer.py
to sign the signer CSR with the root CA.python aws_register_signer.py
to register the signer with AWS IoT.Run python kit_set_wifi.py --ssid wifi-name --password wifi-password
to configure wifi settings on the board. This network must have internet
access with ports 123 (UDP, time server) and 8883 (TCP, secure MQTT) open.
Run python kit_provision.py
to provision the ATECCx08A on the board
for AWS IoT. After this command, the board will automatically attempt to
connect to AWS IoT.
python aws_interact_gui.py
to interact with the board and toggle
LEDs. Pressing the buttons on the board will also update their state in the
GUI.