Syntax
int32_t scan(
    uint32_t timeout
);
ContentsIndex
PreviousUpNext
LGATTClient::scan Method
LGATTClient Class | Example
Syntax
int32_t scan(
    uint32_t timeout
);
Description

The LGATTClient scan function scans for Bluetooth 4.0 devices. The maximum number of Bluetooth 4.0 devices that can be captured by the scan function is 10. The scan function will return an integer value indicating the number of devices scanned or a timeout message, which ever comes first.

Parameters
Parameters 
Description 
uint32_t timeout 
The timeout value in seconds 
Returns

The number of Bluetooth 4.0 devices that are captured by scan(). 

The maximum number of devices is 10.

Example
int32_t numOfDevice = scan(20); // timeout is set to 10 seconds.
File

LGATTClient.h

Class