AYUDA EN LÍNEA
 WINDEVWEBDEV Y WINDEV MOBILE

Este contenido se ha traducido automáticamente.  Haga clic aquí  para ver la versión en inglés.
Ayuda / WLanguage / Funciones WLanguage / Comunicación / Funciones BTLE
  • Presentación
  • Implementación de la gestión de dispositivos Bluetooth Low Energy
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReportes y ConsultasCódigo de Usuario (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Código Navegador
WINDEV Mobile
AndroidWidget Android iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Otros
Procedimientos almacenados
Gestión de los dispositivos Bluetooth Low Energy (sintaxis del prefijo)
Presentación
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 connected objects to operate for several months without changing batteries!
Implementación de la gestión de dispositivos Bluetooth Low Energy
Several WLanguage functions and types can be used to manage Bluetooth Low Energy devices in a WINDEV or WINDEV Mobile application.
The principle for using these functions and types is as follows:
  1. Declare the device in Windows Bluetooth configuration.
    AndroidiPhone/iPadIOS WidgetMac Catalyst This step is unnecessary.
  2. Initialize the Bluetooth Low Energy with BTLEInitialize.
    Android This function is useless.
  3. Load the list of accessible devices (BTLEListDevice).
  4. Select the desired device.
    • AndroidiPhone/iPadIOS WidgetMac Catalyst Request a connection to the device (.Connect).
    • Windows Select the desired device and initialize it with .Initialize.
    The status of the connection can be checked by ConnectionStatus.
  5. If the connection is established with the device, you have the ability to find out the list of its services (GetAllServices).
    Remark: To get a specific service, use .GetAService.
  6. Select the requested device and load the list of service characteristics (GetAllCharacteristics).
    Remark: To get a characteristic, use .GetACharacteristic.
  7. Select the requested characteristic. You can:
    • Read the value of the characteristic (.ReadValue).
    • Write the value of the characteristic (WriteValue).
    • Enable the notification whenever the value of a characteristic changes (.ChangeOfValue).
  8. 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
Versión mínima requerida
  • Versión 24
Esta página también está disponible para…
Comentarios
Haga clic en [Agregar] para publicar un comentario

Última modificación: 15/02/2024

Señalar un error o enviar una sugerencia | Ayuda local