Connect Azure Sphere to Ethernet
You can connect an Ethernet-enabled Azure Sphere device to a public (internet-connected) network and communicate with Azure IoT or your own cloud services, or you can connect it to a private network and use network services.
Prepare Azure Sphere for Ethernet
To communicate through Ethernet, an Azure Sphere device requires an external Ethernet adapter and a board configuration image. The board configuration image contains information that the Azure Sphere Security Service requires to add support for Ethernet to the Azure Sphere OS.
Here is the list of supported Ethernet adapters with links to instructions for connecting and configuring each adapter and deploying the appropriate board configuration image:
Configure Azure Sphere for Ethernet
After connecting your Azure Sphere device to a supported Ethernet adapter and deploying the board configuration image, you can configure your Azure Sphere device to connect to a network from the command line (CLI) or from your application using the Azure Sphere SDK Application Libraries (Applibs).
Ethernet configuration using the CLI
To manage Ethernet configuration from the command line, you use the azsphere device network CLI commands. For example, the device network enable command enables an ethernet interface on the attached device.
azsphere device network enable --interface "eth0"
Ethernet configuration using Applibs
To configure Ethernet, your application must use the applibs networking API.
Include this header file in your application:
#include <applibs/networking.h>
The application manifest must include the NetworkConfig capability.
"Capabilities": {
"NetworkConfig" : true
}
Samples
Private network services demonstrates how to connect an Azure Sphere device to a private network and use network services.
Azure IoT demonstrates how to use the Azure IoT SDK C APIs in an Azure Sphere application to communicate with Azure IoT Hub or Azure IoT Central.
HTTPS cURL Easy demonstrates fetching content over HTTPS using cURL's 'easy' API
HTTPS cURL Multi demonstrates fetching content over HTTPS using cURL's 'multi' API.
Power Down high-level app demonstrates Power Down functionality for the Azure Sphere platform.
WolfSSL high-level app demonstrates using WolfSSL for SSL handshake in a high-level application.
[!NOTE]
The following samples are from the Azure Sphere Gallery, which is a collection of unmaintained software and hardware samples from Microsoft. For more information, see Azure Sphere Gallery.
Print MAC and IP address of network interface prints the MAC and IP addresses of a specified network interface.
OSNetworkRequirementChecker-HLApp performs two device (MT3620) networking diagnostic tests.
الملاحظات
إرسال الملاحظات وعرضها المتعلقة بـ