Component: Bluetooth (EB024, Generic AT) (Wireless)
| Author | Matrix Ltd. | 
| Version | 2.0 | 
| Category | Wireless | 
Contents
Bluetooth (EB024, Generic AT) component
Low level routines for controlling a standard AT Bluetooth interface. Also available in the form of the EB024 Bluetooth E-block.
Component Source Code
Please click here to download the component source project: FC_Comp_Source_Bluetooth.fcfx
Please click here to view the component source code (Beta): FC_Comp_Source_Bluetooth.fcfx
Detailed description
No detailed description exists yet for this component
Examples
Making a device discoverable
Example program to set up the Bluetooth module to be discoverable with a pair key. Any data received is then output onto the LCD component. You can connect to the Bluetooth device using a PC with Bluetooth connection and using software such as Flowcode 6, RealTerm or HyperTerminal. Alternatively you can connect using a smart phone running a terminal emulator app or via another embedded Bluetooth board.
 Bluetooth Discover
Script 1 contains the AT commands to setup the Bluetooth device to be discoverable with pair key "1234".
Bluetooth Discover
Script 1 contains the AT commands to setup the Bluetooth device to be discoverable with pair key "1234".
Searching for a device
Example program to scan for local discoverable Bluetooth devices. For each device found the MAC address is displayed on to the LCD.
 Bluetooth Inquiry
Bluetooth Inquiry
Connecting to a device
Example program to connect to a specific Bluetooth device address and send data to the device.
 Bluetooth Connect
The device MAC address is specified using the "CreateCommandString" and "SendCommand" macros.
Bluetooth Connect
The device MAC address is specified using the "CreateCommandString" and "SendCommand" macros.
Macro reference
CreateCommand
CreateCommandString
Initialise
|   | Initialise | 
| Required to be used whenever the Bluetooth component is used in a program. Initialises the Bluetooth component ready for use. | |
|  - VOID | Return | 
SendCommand
SendScript
Send_byte
|   | Send_byte | 
|  - BYTE | ByteVal | 
|  - VOID | Return | 
StringRead
StringReceive
|   | StringReceive | 
| Checks for a response string. Returns the length of the response string if one is present otherwise returns 0. | |
|  - BYTE | Return | 
WaitForResponse











