-
Notifications
You must be signed in to change notification settings - Fork 6
AWS Provision Setup
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:
- Create and registered the Signer CA with AWS IoT account
- Request a Certificate Signing Request (CSR) from the board.
- Create a device certificate using the CSR and signer CA.
- 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
- Copy the file "...demo_ECC.bin" from folder "/mcu-firmware/saml21g18b_sensor_board_demo/saml21g18b_sensor_board_demoDebug" -> folder "ProvisionScripts/"
- 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:
- You create a certCA (rootCA.crt) with its private key (root-ca.key, if this one already exist, it will reuse it)
- 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)
- The root-ca will then sign the signer-ca.csr and create signer-ca.crt
- This signer-ca.crt is then uploaded to your AWS IoT account
D) Program the firmware in project saml21g18b_sensor_board_demo_ECC.atsln
- RESET the Sensor board while holding SW1. This will put it in Bottloader mode\
- 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:
- Script commission the ECC608 with SSID and PASSWORD for the WiFi connection.
- Script request the ECC508 to generate a signing certificate (with its private key remaining private in the ECC)
- The script receives the CSR and signs it with the signer-ca private key signer-ca.key
- Script sends it back to the ECC608 that stores it.
G) Program the firmware in project saml21g18b_sensor_board_demo_JITR.atsln
- RESET the Sensor board while holding SW1. This will put it in Bottloader mode\
- 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