Network Setup

Role

Use this command to change the network settings (address, mask etc) of a device that has been previously found using the begin_lookup / end_lookup command pair.

Prototype

URL : /setup/{$id}/network

Method : PUT

URL Params : {$id} : the TemporaryId of the device that has been returned by the last end_lookup.

Request data :

Field name Type Status Description
"Dhcp" boolean mandatory true or false
"IpAddress" string option Static IPv4 address. Do not set this value if Dhcp is true
"IpMask" string option Static IPv4 subnet mask. Do not set this value if Dhcp is true
"IpGateway" string option Static IPv4 default gateway. Do not set this value if Dhcp is true
"DnsServers" string option List of DNS servers, separated by a semi-colon. Do not set this value if Dhcp is true or if the device does not need to resolve host names.
"WritePassword" string option Password to unlock write access to the device

Example

{
	"TemporaryId": "i3DU48vD02aTNl0oSXzxM8",
	"Dhcp": true
}

Success Response

Code : 200 OK

Content : a SUCCESS object.

Error Response

See Error Responses.

Specific error messages are:

  • "AlreadyRunning": the discovery task is already running. Wait until its timeout occurs or call the end_lookup route to terminate it earlier.
  • "BleNotAvailable": the computer running the Companion Service does not seem to have a BLE interface.
  • "BleAccessDenied": the Companion Service failed to open the BLE interface.
  • "NetworkNotAvailable": the computer running the Companion Service does not seem to have a network connection.
  • "NetworkNdduPortAlreadyInUse": the UDP port used by the NDDU protocol (SpringCard Network Device Discovery Utility) has already been opened by another software.