Begin Lookup

Role

This command activates the device discovery task on the specified communication channel (namely network or BLE).

Use the end_lookup route to terminate the discovery task and retrieve the list of devices that have been found.

Prototype

URL : /lookup/begin

Method : POST

URL Params : None

Request data :

Field name Type Status Description
"Channel" string mandatory Communication channel: ble or network
"Timeout" integer option Duration of the discovery task, specified in seconds between 1 and 60.
If this value is not set, it defaults to 5 seconds.

Example

{
	"Channel": "network",
	"Timeout": 3
}

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.