CXBTH Command - Bluetooth BLE Configuration
Configures the usage mode of the Bluetooth (BLE) module.
What is it for?
| Use case | Description |
|---|---|
| 📱 Wireless configuration | Send commands from smartphone |
| 🔧 Diagnostics | Access the device wirelessly |
| 📊 Data download | Get logs via Bluetooth |
| 📡 Report destination | Send reports to BLE device |
Description
It is very important to update the device with the appropriate version that includes this functionality. It can be updated via FOTA, replacing the update file extension with .nimble.ota.
Enabling the device to connect via BLE in SPP mode, with a master device. This master device will be able to send and receive commands through the generated virtual serial port as if it were another serial port of the device.
Commands
Configure
SCXBTHa,nombre,pinQuery
QCXBTHResponse
RCXBTHa,nombre,pinParameters
| Field | Description | Values |
|---|---|---|
| a | Enable | 0=Disabled, 1=Enabled |
| nombre | BLE device name (displayed) | Up to 16 characters |
| pin | Bluetooth access PIN | Up to 16 characters |
Examples
Enable Bluetooth module
>SCXBTH1,MiDispositivo,1234<Enables the Bluetooth module to be enabled, display the name MiDispositivo, and allow device connections using PIN 1234.
Disable reading
>SCXBTH0<BTH Destination for Reports
When the BTH module is enabled, the BTH destination is also enabled to generate reports to that destination.
For example, the command:
>SG1CQ000,BTH<Will generate a CQ report to the master device.
Connection Variable
The BTH_CONNECTED variable will be available for use in the event engine. When true, it will indicate an ongoing connection.
Compatibility
See Also
- BS Command (IOT) - BLE Scan
- BE Command (IOT) - BLE Beacons