bleDisconnect (Function)

Top  Previous  Next

Architecture:

NX32L

Device support:

LX2

Firmware version:

2.25.00


 

This function makes the Bluetooth interface disconnect from a device.

The handle is invalid after this function is done.

 

Input:

dev: SYSHANDLE

Handle to the device to disconnect from.

 

 

Returns: INT

1

-

_BLE_OK


Success

0

-

_BLE_ERR_NOT_SUPPORTED


The API is not supported.

-1

-

_BLE_ERR_NOT_OPEN


The interface is not powered(see blePower).

-4

-

_BLE_ERR_NOT_FOUND


Failed to find device.

-20

-

_BLE_ERR_INVAL_HANDLE


Invalid handle.

 

 

Declaration:

FUNCTION bleDisconnect : INT;
VAR_INPUT
  dev   : ACCESS SYSHANDLE;
END_VAR;

 

Example:

...
  rc := bleDisconnect(dev := dev);
  DebugFmt(message:="bleDisconnect: \1", v1:=rc);
...