Difference between revisions of "Component: Bluetooth (EB024, Generic AT) (Wireless)"
(34 intermediate revisions by 2 users not shown) | |||
Line 14: | Line 14: | ||
==Bluetooth (EB024, Generic AT) component== | ==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. | Low level routines for controlling a standard AT Bluetooth interface. Also available in the form of the EB024 Bluetooth E-block. | ||
+ | |||
+ | ==Component Pack== | ||
+ | |||
+ | COMMSB | ||
==Detailed description== | ==Detailed description== | ||
− | ''No detailed description exists yet for this component | + | |
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ''No detailed description exists yet for this component'' | ||
==Examples== | ==Examples== | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
Line 42: | Line 146: | ||
[[File:ConnectToMAC.jpg]] | [[File:ConnectToMAC.jpg]] | ||
− | |||
− | |||
==Downloadable macro reference== | ==Downloadable macro reference== | ||
Line 239: | Line 341: | ||
| colspan="2" | Data to send for script 0, each command should be terminated with a carriage return | | colspan="2" | Data to send for script 0, each command should be terminated with a carriage return | ||
|- | |- | ||
− | | width="10%" align="center" style="background-color:# | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
− | | width="90%" style="background-color:# | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Connections |
|- | |- | ||
|- | |- | ||
Line 273: | Line 375: | ||
| colspan="2" | | | colspan="2" | | ||
|- | |- | ||
− | | width="10%" align="center" style="background-color:# | + | | width="10%" align="center" style="background-color:#EAE1EA;" | [[File:Fc9-conn-icon.png]] |
− | | width="90%" style="background-color:# | + | | width="90%" style="background-color:#EAE1EA; color:#4B008D;" | Simulation |
|- | |- | ||
|- | |- |
Latest revision as of 17:19, 9 November 2022
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 Pack
COMMSB
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".
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
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.
Downloadable macro reference
![]() |
StringReceive |
Checks for a response string. Returns the length of the response string if one is present otherwise returns 0. | |
![]() |
Return |
![]() |
Send_byte |
![]() |
ByteVal |
![]() |
Return |
![]() |
Initialise |
Required to be used whenever the Bluetooth component is used in a program. Initialises the Bluetooth component ready for use. | |
![]() |
Return |