Hardware requirements
Mini/micro USB cable
LPCXpresso55s69 board
Personal Computer
CMWC1ZZABR-107-EVB by muRata
OM- SE050ARD or OM- SE051ARD
Board settings
Jumper settings for OM- SE050ARD & OM- SE051ARD: -J14 3-4 (Default): EdgeLock SE05x_VCC pin routed to SE05X_VOUT pin -J15 3-4 (Default): I2C target SDA connection -J17 3-4 (Default): I2C target SCL connection
Prerequisites
Active azure account with iot hub created
The Plug & Trust MW package can be downloaded from https://www.nxp.com/products/security-and-authentication/authentication/edgelock-se050-plug-and-trust-secure-element-family-enhanced-iot-security-with-high-flexibility:SE050#design-resources
Any Serial communicator
Flash VCOM binary on the device at flash address 0x00000000. VCOM binary se05x_vcom-T1oI2C-
.bin can found in Plug & Trust MW package :simw-top\binaries\MCU folder.
Creating a device on azure IoT Hub portal
Navigate to the Dashboard –>
–> “Devices” Add a new device (e.g. device1), and for its authentication type choose X.509 CA Signed
Creating and updating device keys and certificates to SE
Check the vcom port number
Go to the EdgeLock SE05x Plug & Trust middleware ..\simw-top\binaries\PCWindows\ssscli folder and call:
Provision_AZURE.exe
note: is detected vcom port Certificates and Keys are generated at
simw-top/binaries/PCWindows/ssscli/azure
Uploading root certificates to IoT Hub
On Azure IoT Hub portal, Navigate to
Dashboard --> <Your IoT Hub> --> Certificates. Click on AddEnter a friendly name and upload the root certificate created in the previous step. Location -
simw-top\pycli\Provisioning\azure\RootCA.cer-> SaveYour certificate will show in the Certificate Explorer list. Click on certificate added
In Certificate Details, click Generate Verification Code
The provisioning service creates a Verification Code that you can use to validate the certificate ownership. Copy the code to your clipboard
Use the verification_certificate.py to generate a verify certificate (verifyCert4.cer) ::
cd simw-top\pycli\Provisioning python verification_certificate.py <RootCA_Certificate> <RootCA_Keypair> <Verification Code>
On
Azure portal -> Certificate Details, upload the verifyCert4.cer file generated and click Verify. STATUS of your certificate should change toVerifiedin the Certificate Explorer list
Running the Demo
Update
AZURE_IOT_HUB_NAMEandAZURE_DEVICE_NAMEin<PROJECT>\source\azure_iot_config.hwith your details.Update
clientcredentialWIFI_SSIDandclientcredentialWIFI_PASSWORDin<PROJECT>\se_hostlib\demos\ksdk\common\wifi_config.hwith your wifi credentials.Connect your board to open network on wifi.
Build the project and flash the binary on board.
The log below shows the output of the demo in the terminal window. The log can be different based on your local network configuration. App :INFO :PlugAndTrust_v04.04.00_20230811 sss :INFO :atr (Len=35) 01 A0 00 00 03 96 04 03 E8 00 FE 02 0B 03 E8 00 01 00 00 00 00 64 13 88 0A 00 65 53 45 30 35 31 00 00 00 sss :WARN :Communication channel is Plain. sss :WARN :!!!Not recommended for production use.!!! App :INFO :Azure Secure Element example …
App :INFO :Turning WIFI ON App :INFO :Connecting to network:iot_wifi_ssid App :INFO :Wi-Fi is connecting…
App :INFO :Wi-Fi is connecting…
App :INFO :Wi-Fi is connecting…
App :INFO :Wi-Fi is connecting…
App :INFO :Wi-Fi is connected to: iot_wifi_ssid, IP Address: 192.168.0.106
[INFO] Create a TCP connection to NXPPNT.azure-devices.net:8883. [INFO] (Network connection 0x20009288) TLS handshake successful. [INFO] (Network connection 0x20009288) Connection to NXPPNT.azure-devices.net established. [INFO] MQTT connection established with the broker. [INFO] MQTT connection successfully established with broker.
[INFO] A clean MQTT connection is established. Cleaning up all the stored outgoing publishes.
App :INFO :MQTT Connection successfully established [INFO] Attempt to subscribe to the MQTT topic devices/377819357023377568295309/messages/devicebound[DEBUG] Encoded size for length 60 is 1 bytes.
App :INFO :MQTT Subscribed [INFO] the published payload:{“msg” : “hello from SDK QOS0 : 0”} [INFO] PUBLISH sent for topic devices/377819357023377568295309/messages/events/ to broker with packApp :INFO :Published message {“msg” : “hello from SDK QOS0 : 0”} App :INFO :AZURE demo passed App :INFO :Demo Example Finished