You are here

Single Device Opening

There is a number of functions that you can use to open the DLN-series adapter (to establish the connection with this adapter). We will review the simplest functions here. Use these functions if your application is designed to work with a single device. The others will be described in the next chapters.

When the device is opened by a process, the DLN library allocates resources required to maintain the connection and associates a device handle with this device. The device handle is used to identify the adapter in many function calls. The device handle is valid until either the process terminates, or the handle is closed using the DlnCloseHandle() or DlnCloseAllHandles() function.

Depending on the connectivity between PC and DLN adapter you would need to call one of the following functions:

  • DlnOpenUsbDevice() opens the DLN adapter connected with USB cable to the same PC where the application is running. The function accepts a single parameter – a pointer to the HDLN type variable that receives the device handle.

  • DlnOpenTcpDevice() opens the DLN adapter accessible through TCP/IP connectivity. It has two additional parameters – the IP address and port number to establish the TCP connection.

  • DlnOpenBleDevice() opens the DLN adapter accessible through Bluetooth Low Energy connectivity.

Rating: 
Average: 5 (1 vote)

User login