How to identify the device on the network
=========================================

When you start a remote app on a third party device, and want to communicate with an AwoX Striim's API, you want to know whether it is present on your network or not. Get the IP address and the Port of API. To do so, several solutions are possible :

- Searching for the device on ``UPnP``
    - Searching for the device during 2x 10 seconds seems reasonable (searching for 5 seconds, and if the device has not been found issue another request. This is sometimes helpful because the discovery process is based on UDP, which is unreliable interms of data transmission). With the ''UPnP'' stack, you can get the IP addess of the Device. the API port is always 34000.

- Direct connect on the Access Point of the Device.
    - If a the Striim device is not connected to any devive an Access Point is exposed.
    - Connect a Device to the AP Verifying the name of the access point
    - Verifying the underlying subnetwork an IP address you are using
    - Verifying if the device is reachable on the ``192.168.0.1`` address (this is the predefined address used to mount the access point).

- Searching for the device on ``mDNS``
    - The device broadcasts the “_awox-api._tcp.” service.
        - On iOS devices, you can use a NSNetServiceBrowser.
        - On Android devices, you can use Network Service Discovery or JmDNS.
    - On the TXT record you can obtain the following information:
        - api_version: The current API version on the
        - Dashboard: Contains the URI of th dashboard of the Device (Web App)

        

Building the API request URL
----------------------------

Once you’ve discovered a Device on the local network you can access the API at the following URL:

http://[device_ip]:[api_port]/[api_url]

Example:
::

	http://192.168.0.1:34000/System/DeviceInfo.json


Dashboard
---------
The Device contains a Web App do access to all the settings and the information of the device.
This Web App is a View of the API exposed by the Device.

::

	http://[x.x.x.x]:34000/dashboard/
