Skip to content

AWS Provision Setup

benpoon-microchip edited this page Aug 29, 2018 · 2 revisions

The boards from Master Conference 2018 are provisioned with the credentials required to connect and communicate with Microchip AWS IoT account.

If the board did not provision with the credentials or you want to provision the board to connect to other AWS IoT account, AWS Provisioning steps need to be performed. During AWS Provisioning procedure, below tasks are performed:

  1. Create and registered the Signer CA with AWS IoT account
  2. Request a Certificate Signing Request (CSR) from the board.
  3. Create a device certificate using the CSR and signer CA.
  4. Send the device certificate, signer certificate and AWS connection information to the board.

The pythons scripts in /ProvisionScripts are used to perform the above tasks.

Steps

A) Go to folder /ProvisionScripts

B) Copy the latest firmware to folder /ProvisionScripts

  1. Copy the file "...demo_ECC.bin" from folder "/mcu-firmware/saml21g18b_sensor_board_demo/saml21g18b_sensor_board_demoDebug" -> folder "ProvisionScripts/"
  2. Copy the file "...demo_JITR.bin" from folder "/mcu-firmware/saml21g18b_sensor_board_demo/saml21g18b_sensor_board_demoDebug" -> folder "ProvisionScripts/"

C) Command prompt: python _CreateCertsAndRegister2AWS.py --profile <your-aws-cli-profile>

IMPORTANT: Make sure you provide your account profile fro "AWS CLI" to configure your AWS IoT account.
To configure AWS account profile, you can make reference of https://docs.aws.amazon.com/cli/latest/reference/configure/

This command do the below task:

  1. You create a certCA (rootCA.crt) with its private key (root-ca.key, if this one already exist, it will reuse it)
  2. You then create a signing certificate (signer-ca.csr)and its private key (signer-ca.key, if this one already exist, it will reuse it)
  1. The root-ca will then sign the signer-ca.csr and create signer-ca.crt
  2. This signer-ca.crt is then uploaded to your AWS IoT account

D) Program the firmware in project saml21g18b_sensor_board_demo_ECC.atsln

  1. RESET the Sensor board while holding SW1. This will put it in Bottloader mode\
  2. CMD prompt : _SendBrdAppProgramUSB.bat "saml21g18b_sensor_board_demo_ECC.bin"

You can just use Atmel ICE tooling to program the firmware if your board do not have boot-loader

E) LED on board will go RED -> YELLOW -> GREEN -> BLUE
When done a Notepad file will open. Close it!
RESET the board. The LED should slow blink Yellow.

F) Command prompt : python _Commission_WiFi_ECC_2AWS.py --ssid --password

This command do the below task:

  1. Script commission the ECC608 with SSID and PASSWORD for the WiFi connection.
  2. Script request the ECC508 to generate a signing certificate (with its private key remaining private in the ECC)
  3. The script receives the CSR and signs it with the signer-ca private key signer-ca.key
  4. Script sends it back to the ECC608 that stores it.

G) Program the firmware in project saml21g18b_sensor_board_demo_JITR.atsln

  1. RESET the Sensor board while holding SW1. This will put it in Bottloader mode\
  2. CMD prompt : _SendBrdAppProgramUSB.bat "saml21g18b_sensor_board_demo_JITR.bin"

H) LED on board will go RED -> YELLOW -> GREEN -> BLUE.
When done a Notepad file will open. Close it!
RESET the board. The LED will slow blink blue, fast blink green and steady green when connected.

I) If commissionong OTHER Sensor Board, just run D,E,F,G,H again. No need to create a new CERT