Skip to content
This SDK only works with devices released within the past 3 years. We regularly optimize and update the SDK to ensure compatibility and performance. We do not guarantee compatibility or provide technical support for devices older than 3 years.

# NET_SDK_SetDeviceIP

### Interface Definition

C++C#

    1
    2
    3
    4
    5
    6
    7
    8
    BOOL NET_SDK_SetDeviceIP(
        const char* mac,
        const char* password,
        const char* ipAddr,
        const char* netmask,
        const char* gateway,
        const char* DNSServer1,
        const char* DNSServer2);

    1
    2
    3
    4
    5
    6
    7
    8
    public static extern Boolean NET_SDK_SetDeviceIP(
        string pMac,
        string password,
        string ipAddr,
        string netmask,
        string gateway,
        string DNSServer1,
        string DNSServer2);

### Function Description

Set the device IP address.

### Parameter Description

Parameters | Type | Remark
--- | --- | ---
macin | const char* | The MAC address of the device.
passwordin | const char* | Device administrator password
ipAddrin | const char* | IP address to set
netmaskin | const char* | Subnet mask to set
gatewayin | const char* | Gateway to set
DNSServer1in | const char* | The preferred DNS server to set up
DNSServer2in | const char* | Alternative DNS server to set up

### Return Value

- Type：BOOL

- Remark：Returns TRUE if successful, FALSE if failed.

### Remarks

None

Error Code