ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Communication / BTLE functions
  • Miscellaneous
  • Required versions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Returns the list of accessible Bluetooth Low Energy devices.
Example
BTLEListDevice(ProcDetectDevice)
...
INTERNAL PROCEDURE ProcDetectDevice(ADevice)
// Process ADevice
END
Syntax
BTLEListDevice(<WLanguage procedure> [, <Timeout>])
<WLanguage procedure>: Procedure name
Name of the WLanguage procedure ("callback") called to list the devices. This procedure is used to get information about the devices found.
This procedure has the following format:
PROCEDURE <Procedure name> (<Device>, <Signal intensity>)

where:
  • <Device> is a btleDevice variable corresponding to the connected device.
  • <Signal intensity> is an integer corresponding to the intensity of signal expressed in decibel per meter.
If the procedure returns False, the analysis of accessible devices will be immediately stopped.
<Timeout>: Optional integer or optional Duration
Timeout for the search (in seconds). This parameter can be:
  • an integer corresponding to the number of seconds,
  • a Duration variable,
  • the duration in a readable format (e.g., 1 s).
If this parameter is not specified, the default timeout is set to 10 seconds.
Remarks

Miscellaneous

If BTLEListDevice is called when an analysis is in progress, the previous analysis will be stopped and a new analysis will be started.

Required versions

Related Examples:
WM Bluetooth 4 Cross-platform examples (WINDEV Mobile): WM Bluetooth 4
[ + ] This example explains how to use the Bluetooth Low Energy functions (Bluetooth LE): BTLExxx.

It is an application allowing you to find the nearby BTLE devices, to connect to them and to interact with the proposed services.
Business / UI classification: Business Logic
Component: wd290com.dll
Minimum version required
  • Version 21
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 06/27/2023

Send a report | Local help