Difference between revisions of "Component: Bluetooth (ESP32 SPP) (Wireless)"
Line 78: | Line 78: | ||
For problems sending strings or missing data bytes, please see this [https://www.flowcode.co.uk/forums/viewtopic.php?p=4466#p4466 forum topic]. | For problems sending strings or missing data bytes, please see this [https://www.flowcode.co.uk/forums/viewtopic.php?p=4466#p4466 forum topic]. | ||
+ | |||
+ | |||
Line 83: | Line 85: | ||
==Macro reference== | ==Macro reference== | ||
+ | ===ReceiveByte=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 101: | Line 104: | ||
+ | ===SendString=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 119: | Line 123: | ||
+ | ===ReceiveINTArray=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 152: | Line 157: | ||
+ | ===SendINTArray=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 180: | Line 186: | ||
+ | ===CheckConnectionStatus=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 193: | Line 200: | ||
+ | ===ReceiveCount=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 206: | Line 214: | ||
+ | ===ReceiveArray=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 234: | Line 243: | ||
+ | ===SendArray=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 257: | Line 267: | ||
+ | ===SendByte=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 275: | Line 286: | ||
+ | ===ReceiveString=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- | ||
Line 298: | Line 310: | ||
+ | ===Initialise=== | ||
{| class="wikitable" style="width:60%; background-color:#FFFFFF;" | {| class="wikitable" style="width:60%; background-color:#FFFFFF;" | ||
|- | |- |
Revision as of 11:48, 3 February 2023
Author | Matrix TSL |
Version | 1.0 |
Category | Wireless |
Contents
Bluetooth (ESP32 SPP) component
Bluetooth slave component designed to run on a ESP32 providing legacy SPP functionality. BT Legacy functionality must be switched on via the sdkconfig file.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Bluetooth_ESP32_SPP.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Bluetooth_ESP32_SPP.fcfx
Detailed description
No detailed description exists yet for this component
Examples
A simple example file showing how to send and receive data using the ESP32 Bluetooth Serial Port Profile.
The SPP legacy bluetooth mode must be enabled in the ESP32 config file to allow SSP to work. For details please see this forum topic.
For problems sending strings or missing data bytes, please see this forum topic.
Macro reference
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 |
SendString
![]() |
SendString |
Sends a string to the Bluetooth serial connection | |
![]() |
Data |
Data Array to send | |
![]() |
Return |
ReceiveINTArray
SendINTArray
CheckConnectionStatus
![]() |
CheckConnectionStatus |
Checks to see if the Bluetooth device is connected. Returns 1 if connected. | |
![]() |
Return |
ReceiveCount
![]() |
ReceiveCount |
Collects the number of bytes currently stored in the receive buffer. | |
![]() |
Return |
ReceiveArray
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 |
ReceiveString
![]() |
ReceiveString |
![]() |
MaxBytes |
Max number of bytes to try and read within the time | |
![]() |
Timeout |
Number of ms to wait for incoming data | |
![]() |
Return |
Initialise
![]() |
Initialise |
Starts up the Bluetooth communications SPP service. | |
![]() |
Return |