Listening to advertising messages via the Bluetooth channel. The data from the received message is placed into the RXD buffer.
This function uses the RXD and TXD buffers
To use this function, the following configuration must be set in the device:
Configuration
➜Bluetooth
➜Use Bluetooth module
In the function menu | On the diagram |
---|---|
![]() |
![]() |
Name | Value Type | Description |
---|---|---|
enable |
bool |
If True is applied to this input, the function listens for advertising messages. |
Name | Value Type | Description |
---|---|---|
active |
bool |
Set to True for one cycle when new data is received. |
rssi |
int32 |
Signal strength of received data in dBm. |
mac lo |
int32 |
Lower 4 bytes of the MAC address of the device from which data was received. |
mac hi |
int32 |
Upper 2 bytes of the MAC address of the device from which data was received. |
mac valid |
bool |
If the MAC address of the sending device is in the list of trusted device identifiers, this output is True. |
size |
int32 |
Number of bytes from the advertising message written into the RXD buffer. |
None
As an example, it is best to explore a ready-made program for working with BLE devices: