Component: Bluetooth (BL0170) (E-blocks 2): Difference between revisions
Appearance
m Text replacement - "class="wikitable" style="width:60%; background-color:#FFFFFF;"" to "class="mtx-class-macrotable wikitable"" |
m Text replacement - "width="10%" align="center" style="background-color:#D8C9D8;" align="center"" to "width="10%" align="center" class="mtx-class-macrohead"" |
||
| Line 66: | Line 66: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConnectToMAC''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ConnectToMAC''' | ||
|- | |- | ||
| Line 85: | Line 85: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EnterCommandMode''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''EnterCommandMode''' | ||
|- | |- | ||
| Line 99: | Line 99: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetMACAddress''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''GetMACAddress''' | ||
|- | |- | ||
| Line 113: | Line 113: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''Initialise''' | ||
|- | |- | ||
| Line 127: | Line 127: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LeaveCommandMode''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''LeaveCommandMode''' | ||
|- | |- | ||
| Line 141: | Line 141: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReadString''' | ||
|- | |- | ||
| Line 160: | Line 160: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByte''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveByte''' | ||
|- | |- | ||
| Line 179: | Line 179: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveCount''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''ReceiveCount''' | ||
|- | |- | ||
| Line 193: | Line 193: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByte''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendByte''' | ||
|- | |- | ||
| Line 212: | Line 212: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendCommand''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendCommand''' | ||
|- | |- | ||
| Line 241: | Line 241: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''SendString''' | ||
|- | |- | ||
| Line 265: | Line 265: | ||
{| class="mtx-class-macrotable wikitable" | {| class="mtx-class-macrotable wikitable" | ||
|- | |- | ||
| width="10%" align="center" | | width="10%" align="center" class="mtx-class-macrohead" | [[File:Fc9-comp-macro.png]] | ||
| width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WaitForStringValue''' | | width="90%" style="background-color:#D8C9D8; color:#4B008D;" | '''WaitForStringValue''' | ||
|- | |- | ||
Revision as of 14:17, 13 July 2026
| Author | Matrix Ltd. |
| Version | 1.3 |
| Category | E-blocks 2 |
Bluetooth component
Low level routines for controlling a Microchip RN4677 Bluetooth Module. Also available in the form of the BL0170 Bluetooth E-block. Uses an interrupt to receive characters from the UART and improve reliability, Must be used with a hardware UART channel.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_EBlocks2_Bluetooth_RN4677_BL0170.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_EBlocks2_Bluetooth_RN4677_BL0170.fcfx
Detailed description
No detailed description exists yet for this component
Examples
No additional examples
Macro reference
ConnectToMAC
| ConnectToMAC | |
| Connects to a specific Bluetooth MAC address. Waits up to 5 seconds for connection to be established. Returns 1 if connection was successful. | |
| MACAddress | |
| Return | |
EnterCommandMode
| EnterCommandMode | |
| Enters command mode allowing commands to be sent using the SendCommand macro. Returns: 0 = No Reply / 1 = Command Mode OK | |
| Return | |
GetMACAddress
| GetMACAddress | |
| Gets the local Bluetooth device MAC address. | |
| Return | |
Initialise
| Initialise | |
| Sets up the Bluetooth module including: - Enabling the UART - Configuring the module (Name / Key / etc) Returns 1 for OK and 0 for no reply. | |
| Return | |
LeaveCommandMode
| LeaveCommandMode | |
| Leaves command mode allowing data to be passed back and forth, | |
| Return | |
ReadString
| ReadString | |
| Copies the incoming data from the data string array to a local string variable. | |
| NumBytes | |
| Maximum number of bytes to try and read | |
| Return | |
ReceiveByte
ReceiveCount
| ReceiveCount | |
| Returns the number of bytes currently sat waiting in the receive buffer. | |
| Return | |
SendByte
| SendByte | |
| Sends a single data byte out to the Bluetooth module. | |
| Data | |
| Return | |
SendCommand
SendString
| SendString | |
| Sends a string to the Bluetooth module. | |
| Command | |
| SendCR | |
| Return | |
WaitForStringValue