WIZnet Azure Sphere Guardian 200 (ASG200) is a product which provides Ethernet interfaces to both Public and Private Network. This is how to set up ASG200 for data communication between your device and Azure IoT Cloud with ASG200.
complete the below steps to develop applications with Azure Sphere on a Windows or Linux system
You can select Azure Sphere development kit for your machine and install software.
- On Windows 10 (1st anniversary update or more)
- Visual Studio Enterprise, Professional or Community 2019
- Visual Studio Code
- On Linux
- Visual Studio Code
Download Azure Sphere SDK and install it.
Then complete Azure Sphere SDK Extension Install for development tool.
- For Visual Studio, Azure Sphere SDK Extension Install
- For Visual Studio Code, Azure Sphere SDK Extension Install
Below is example settings for Visual Studio Code:
...
"cmake.cmakePath": "C:\\Program Files\\CMake\\bin\\cmake.exe",
"cmake.configureSettings": {
"CMAKE_MAKE_PROGRAM": "C:\\ninja\\ninja-v1.10.0\\ninja.exe",
},
"AzureSphere.ArmGnuPath": "C:\\Program Files (x86)\\GNU Arm Embedded Toolchain\\9 >2020-q2-update\\bin",
"AzureSphere.SdkPath": "C:\\Program Files (x86)\\Microsoft Azure Sphere SDK",
...
The MT3620 exposes two dedicated UARTs and SWD interface for debugging. The Azure Sphere PC software tools require the use of a USB-to-UART interface that exposes these interfaces to a PC in away that allows the tools to recognize and interact with them. For this, ASG200 components have a ‘Debugger’ board which can attaches to 18pin headers on ASG200. To use this debugger board, user should init the interface information with FTDI tools.
Please follow these steps described in this link:
The azsphere.exe command-line utility supports commands that manage Azure Sphere elements. For the more details, enter the below link:
On Azure Sphere Developer Command Prompt Preview, the option, -?, helps to show the command information.
To manage Azure Sphere elements for development, log in Azure Sphere Developer Command Prompt Preview with Microsoft account. To use Azure Sphere Security Service, Microsoft Account is required.
-
Log in on
azsphere login
command (Needed the option, –-newuser, withazsphere login
command to register the account only have to sign in once.)``` azsphere login --newuser <MS account> ```
An Azure Sphere tenant provides a secure way for your organization to remotely manage its Azure Sphere devices in isolation from other customer’s devices. And it is accessed based on RBAC (Role Based Access Control). Only people with an account in that directory will be able to manage devices within your Azure Sphere tenant.
Follow these steps to select the role assigned Azure Sphere tenant:
-
Search the tenant list.
azsphere tenant list
-
Select the tenant from the list with tenant id.
azsphere tenant select -i <tenant id>
-
Check the selected tenant.
azsphere tenant show-selected
There is no existed Azure Sphere tenant or assigned role in it. User can create new Azure Sphere tenant.
- Create new tenant
azsphere tenant create -n <tenant name>
Check the selected tenant for development environment. Once ASG200 claimed to the Azure Sphere tenant, claiming to other tenant is prohibited followed Azure Sphere Security policy.
-
Claim ASG200 to the selected tenant
azsphere device claim
Once ASG200 is connected to the internet, Azure Sphere OS updates are initiated automatically via OTA (Over The Air) Wi-Fi interface. Also, user can manually update Azure Sphere OS with recovery. Recovery is the process of replacing the latest system software on the device using a special recovery bootloader instead of cloud update.
Follow these steps to update the latest Azure Sphere OS:
-
Set Wi-Fi interface
azsphere device wifi add –ssid <SSID> --psk <Password>
-
Check Wi-Fi Status
azsphere device wifi show-status
-
Recovery for Azure Sphere OS update
azsphere device recover
-
Check Azure Sphere OS version
azsphere device show-os-version
Connect Debugger board which is attached to ASG200 debug interface to PC and set development mode for debugging on In Azure Sphere Developer Command Prompt Preview.
On development mode, OTA is inactivated.
- Development mode for debugging (Add option for RT App debugging)
--enablertcoredebugging
option requires administrator privilege because it installs USB drivers for the debugger.
Right-click the Azure Sphere Developer Command Prompt shortcut and select More>Run as administrator.
azsphere device enable-development --enablertcoredebugging
For the ASG200 application, chapter 5, Development Environment, is preceded.
ASG200 application has two types of applications, High-level application and Real-time capable application.
$ git clone https://github.com/WIZnet-Azure-Sphere/ASG200_App
Refer each application page for details on how to use.