Unosquare
    Show / Hide Table of Contents

    Class NetworkSettings

    Represents the network information.

    Inheritance
    Object
    NetworkSettings
    Namespace: Unosquare.RaspberryIO.Computer
    Syntax
    public class NetworkSettings : SingletonBase<NetworkSettings>

    Properties

    HostName

    Gets the local machine Host Name.

    Declaration
    public string HostName { get; }
    Property Value
    Type Description
    String

    Methods

    GetCurrentAdapterName()

    Retrieves the current network adapter.

    Declaration
    public static Task<string> GetCurrentAdapterName()
    Returns
    Type Description
    Task<String>

    The name of the current network adapter.

    GetWirelessNetworkName()

    Retrieves current wireless connected network name.

    Declaration
    public Task<string> GetWirelessNetworkName()
    Returns
    Type Description
    Task<String>

    The connected network name.

    RetrieveAdapters()

    Retrieves the network adapters.

    Declaration
    public Task<List<NetworkAdapterInfo>> RetrieveAdapters()
    Returns
    Type Description
    Task<List<NetworkAdapterInfo>>

    A list of network adapters.

    RetrieveWirelessNetworks(String)

    Retrieves the wireless networks.

    Declaration
    public Task<List<WirelessNetworkInfo>> RetrieveWirelessNetworks(string adapter)
    Parameters
    Type Name Description
    String adapter

    The adapter.

    Returns
    Type Description
    Task<List<WirelessNetworkInfo>>

    A list of WiFi networks.

    RetrieveWirelessNetworks(String[])

    Retrieves the wireless networks.

    Declaration
    public Task<List<WirelessNetworkInfo>> RetrieveWirelessNetworks(string[] adapters = null)
    Parameters
    Type Name Description
    String[] adapters

    The adapters.

    Returns
    Type Description
    Task<List<WirelessNetworkInfo>>

    A list of WiFi networks.

    SetupWirelessNetwork(String, String, String, String)

    Setups the wireless network.

    Declaration
    public Task<bool> SetupWirelessNetwork(string adapterName, string networkSsid, string password = null, string countryCode = "US")
    Parameters
    Type Name Description
    String adapterName

    Name of the adapter.

    String networkSsid

    The network ssid.

    String password

    The password (8 characters as minimum length).

    String countryCode

    The 2-letter country code in uppercase. Default is US.

    Returns
    Type Description
    Task<Boolean>

    True if successful. Otherwise, false.

    Comments

    Back to top Copyright © 2017-2019 Unosquare