PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Implementing the management of Bluetooth Low Energy devices
  • Necessary conditions
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Managing the Bluetooth Low Energy devices
Overview
The Bluetooth LE standard (for Low Energy) is used to manage devices with low energy consumption.
It is fundamental for the "IoT" technology (Internet of Things). The purpose of this standard is to allow the connected objects to operate for several months without changing battery!
Implementing the management of Bluetooth Low Energy devices
Several WLanguage functions and types can be used to implement the management of Bluetooth Low Energy devices in a WINDEV Mobile application.
The principle for using these functions and types is as follows:
  1. Initialize the Bluetooth Low Energy with BTLEInitialize.
    Android This function is useless.
  2. Load the list of accessible devices (BTLEListDevice).
  3. Select the requested device and ask to establish the connection to the device (BTLEConnect). The status of the connection can be checked by BTLEConnectionStatus.
  4. If the connection is established with the device, you have the ability to find out the list of its services (BTLEGetAllServices).
    Note: To get a specific service, use BTLEGetAService.
  5. Select the requested device and load the list of service characteristics (BTLEGetAllCharacteristics).
    Note: To get a characteristic, use BTLEGetACharacteristic.
  6. Select the requested characteristic. You can:
  7. For each characteristic, you also have the ability to retrieve the associated descriptor. This descriptor describes the data exchanged between two devices compatible with Bluetooth Low Energy: unit of the value, range of values, ... You can:
Summary diagram:
Click the thumbnail to enlarge it
Click the thumbnail to enlarge it
Necessary conditions
  • Android The WLanguage Bluetooth Low Energy functions are available for the devices running an Android version greater than or equal to version 4.3 (api level 18).
    • A fatal error will occur if the function is used with an earlier system version.
    • To find out the version of Android system on which the application is run, use SysAndroidVersion.
  • iPhone/iPad The WLanguage Bluetooth Low Energy functions are available from iOS 9.
See also
Minimum required version
  • Version 21
Comments
Click [Add] to post a comment