EH-MA41 User Guide
3-26
1.
Introduction
The Ehong Control Interface (EHCI) is a set of ASCII commands and indicators with which the user can control the
Ehong’s Bluetooth module via UART interface by a host (PC, MCU, etc.).
The commands are used to control the Bluetooth module sent by host. The indicators are output from the Bluetooth
module to the host to indicate the status of the module.
In addition, there are some IO indicators available when the UART is used to transfer raw data (working in Bypass
mode). As a complement of ASCII commands and indicators, the IO indicators are also a part of EHCI.
1.1. Default UART Configuration
The default configuration of UART is given below:
Baud rate: 115200
Data bits: 8
Stop bits: 1
Parity: None
Flow control: None
2.
Command and Indicator Syntax
2.1. General Syntax
The general syntax of EHCI command is shown as below:
AT+CMD[=Para1][,Para2][,RawData][,…]<CR><LF>
The general syntax of EHCI indicator is shown as below:
IDC[=Para1][,Para2][,RawData][,…]<CR><LF>
Description of each field:
AT+ is the command line prefix.
CMD is the basic command. All of the commands are listed in section 3 .
IDC is the basic indicator. All of the indicators are listed in section 4 .
= is the separator between command/indicator and parameter.
It’s only needed if a parameter is presented.
Para1 is the first parameter. Not all of the commands have a parameter.
, is the separator between parameters.
It’s only needed if subsequent parameter is presented.
Para2 is the second parameter if available.
RawData is the raw data which will be sent by the command. Only parts of the commands have this field.
<CR><LF> is the terminator of the command line.
Notes:
1. If a parameter is mandatory, it will be surrounded by { }. If a parameter is optional, it will be surrounded by [ ].
2. <CR> means Carriage Return, and <LF> means Line-Feed.
3. All of the parameters are composed of ASCII characters while the RawData field can composed of any data contents.
2.2. Examples
Here is some examples show how to use the EHCI commands and indicators.
Ex. 2.1
AT+FT=01,00,00,0A,01,0078<CR><LF>
configure the module features.
OK<CR><LF>
response from the module to indicate the command is adopted.
Notes:
1.
For the examples in this document, the command sent to the Bluetooth module will be shown with
“
” at the
beginning of the line, while the indicator output by Bluetooth module will be shown with
“
” at the beginning of
the line.
2.
For the examples in this document, the comments will start with a
“
” and be written in italic.