Difference between revisions of "Component: Bluetooth BLE (ESP32 SPP Client) (Wireless)"
From Flowcode Help
Jump to navigationJump to search (Created page with "{| style="width:50%" |- | width="20%" style="color:gray;" | Author | Matrix TSL |- | width="20%" style="color:gray;" | Version | 1.0 |- | width="20%" style="color:gray...") |
|||
| Line 239: | Line 239: | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u16-icon.png]] - UINT | ||
| + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===ReceiveINTArray=== | ||
| + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveINTArray''' | ||
| + | |- | ||
| + | | colspan="2" | Receives an array of 16-bit INT/UINT values and returns the number of values received. | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| + | | width="90%" | Data | ||
| + | |- | ||
| + | | colspan="2" | Array to store the incoming data | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | NumValues | ||
| + | |- | ||
| + | | colspan="2" | Maximum number of values to try and receive | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | ||
| + | | width="90%" | MSBfirst | ||
| + | |- | ||
| + | | colspan="2" | 0=Least significant byte first, 1=Most significant byte first | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | Timeout | ||
| + | |- | ||
| + | | colspan="2" | Max amount of time in ms to wait between bytes | ||
| + | |- | ||
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| width="90%" style="border-top: 2px solid #000;" | ''Return'' | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
|} | |} | ||
| Line 304: | Line 338: | ||
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
| + | |- | ||
| + | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
| + | | width="90%" style="border-top: 2px solid #000;" | ''Return'' | ||
| + | |} | ||
| + | |||
| + | |||
| + | ===SendINTArray=== | ||
| + | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
| + | |- | ||
| + | | width="10%" align="center" style="background-color:#D8C9D8;" align="center" | [[File:Fc9-comp-macro.png]] | ||
| + | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendINTArray''' | ||
| + | |- | ||
| + | | colspan="2" | Sends an array of 16-bit integers to the Bluetooth serial connection | ||
| + | |- | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u16-icon.png]] - UINT | ||
| + | | width="90%" | Data | ||
| + | |- | ||
| + | | colspan="2" | Data Array to send | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-u8-icon.png]] - BYTE | ||
| + | | width="90%" | NumValues | ||
| + | |- | ||
| + | | colspan="2" | Number of bytes to send | ||
| + | |- | ||
| + | | width="10%" align="center" | [[File:Fc9-bool-icon.png]] - BOOL | ||
| + | | width="90%" | MSBFirst | ||
| + | |- | ||
| + | | colspan="2" | 0=Least significant byte first, 1=Most significant byte first | ||
|- | |- | ||
| width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | | width="10%" align="center" style="border-top: 2px solid #000;" | [[File:Fc9-void-icon.png]] - VOID | ||
Revision as of 15:48, 5 January 2026
| Author | Matrix TSL |
| Version | 1.0 |
| Category | Wireless |
Contents
- 1 Bluetooth BLE (ESP32 SPP Client) component
- 2 Detailed description
- 3 Examples
- 4 Macro reference
- 4.1 CheckConnectionStatus
- 4.2 ConnectToDevice
- 4.3 DisconnectFromDevice
- 4.4 GetDiscoveredDeviceCount
- 4.5 GetDiscoveredDeviceMAC
- 4.6 GetDiscoveredDeviceName
- 4.7 Initialise
- 4.8 ReceiveArray
- 4.9 ReceiveByte
- 4.10 ReceiveCount
- 4.11 ReceiveINTArray
- 4.12 ReceiveString
- 4.13 SendArray
- 4.14 SendByte
- 4.15 SendINTArray
- 4.16 SendString
- 4.17 Uninitialise
- 5 Property reference
- 6 Component Source Code
Bluetooth BLE (ESP32 SPP Client) component
Bluetooth BLE client component designed to run on a ESP32 providing GATT SPP functionality. Designed to scan for and connect to an existing Bluetooth BLE GATT SPP server. BT BLE functionality must be switched on via the sdkconfig file.
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
CheckConnectionStatus
| CheckConnectionStatus | |
| Checks to see if the Bluetooth device is connected. Returns 1 if connected. | |
| Return | |
ConnectToDevice
| ConnectToDevice | |
| Manually connect to the specified discovered device. Returns true if the device connected successfully. | |
| index | |
| Return | |
DisconnectFromDevice
| DisconnectFromDevice | |
| Manually disconnect from the connected device | |
| Return | |
GetDiscoveredDeviceCount
| GetDiscoveredDeviceCount | |
| Returns the number of discovered devices. | |
| Return | |
GetDiscoveredDeviceMAC
| GetDiscoveredDeviceMAC | |
| Gets the 6 Byte MAC address of the discovered device at the selected index | |
| index | |
| MAC | |
| 6-byte Array to return the MAC address into | |
| Return | |
GetDiscoveredDeviceName
| GetDiscoveredDeviceName | |
| Gets the friendly name of the discovered device at the selected index | |
| index | |
| Return | |
Initialise
| Initialise | |
| Starts up the Bluetooth communications SPP service. | |
| Return | |
ReceiveArray
ReceiveByte
| ReceiveByte | |
| Attempts to receive a byte from the bluetooth serial port. 0-255 = a valid received value 256 = a timeout has occured | |
| Timeout | |
| Number of ms to wait for incoming data | |
| Return | |
ReceiveCount
| ReceiveCount | |
| Collects the number of bytes currently stored in the receive buffer. | |
| Return | |
ReceiveINTArray
ReceiveString
SendArray
| SendArray | |
| Sends a byte to the Bluetooth serial connection | |
| Data | |
| Data Array to send | |
| NumBytes | |
| Number of bytes to send | |
| Return | |
SendByte
| SendByte | |
| Sends a byte to the Bluetooth serial connection | |
| Data | |
| Return | |
SendINTArray
SendString
| SendString | |
| Sends a string to the Bluetooth serial connection | |
| Data | |
| Data Array to send | |
| Return | |
Uninitialise
| Uninitialise | |
| Shots down the Bluetooth communications SPP service. | |
| Return | |
Property reference
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Bluetooth_ESP32_BLE_GATT_SPP_Client.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Bluetooth_ESP32_BLE_GATT_SPP_Client.fcfx