Page 1
Furthermore, Ehong Technologies reserves the right to alter the hardware, software, and/or specifications detailed herein at any time without notice, and does not make any commitment to update the information contained herein. Ehong Technologies’ products are not authorized for use as critical components in life support devices or systems.
EH-MA41 User Guide 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.
EH-MA41 User Guide For the examples in this document, only the characters in grey background color are the real content of a command or indicator. Ex. 2.2 AT+CS=00189600ABCD<CR><LF> establish SPP connection with the device which address is 00:18:96:00:AB:CD.
EH-MA41 User Guide Indicator Short Description Comments General Indicators Indicates a command was adopted by the module. Indicates there is an error detected in the command sent by the host. State of Bluetooth module as an application. Bluetooth address of the module.
EH-MA41 User Guide 5.1. General Commands 5.1.1. PF—Query or configure the profiles 5.1.1.1. Description: This command can query or configure the profiles of Bluetooth module. Once configured, the configuration will take effect immediately and until the next time the module is configured by this command. It means the Bluetooth module will remember the configuration, and even if the Bluetooth module has been powered off, the configuration will not be lost.
EH-MA41 User Guide AT+AD<CR><LF> 5.1.2.3. Examples: Ex. 5.4. To query the Bluetooth address of local module: AT+AD<CR><LF> query the Bluetooth address of local module. AD=00189600ABCD<CR><LF> report the Bluetooth address is 00:18:96:00:AB:CD. 5.1.3. TP—Query or change the Tx Power 5.1.3.1.
EH-MA41 User Guide 5.1.4.2. Syntax: Synopsis: AT+CD[=Cod]<CR><LF> 5.1.4.3. Parameter Description: Parameter Description Mandatory or Optional Comments The Cod of the Bluetooth module Value:a 6 digits number Default: per firmware version Notes: 1. The default COD has been configured properly by the Bluetooth firmware stack, so it is not necessary for user to configure it in general.
Page 9
EH-MA41 User Guide The attempt times of reconnect after link lost. Value: 00h—FFh 00: No reconnect attempt will be AT Link Lost performed after link lost. 01-FE: The attempt times of reconnect after link lost. FF: The reconnect attempt will be performed permanently.
EH-MA41 User Guide 5.1.6. MM—Query or configure Man-In-The-Middle protection feature 5.1.6.1. Description: This command can query or configure the Man-In-The-Middle protection feature of Bluetooth module. Once configured, the configuration will take effect immediately and until the next time the module is configured by this command. It means the Bluetooth module will remember the configuration, and even if the Bluetooth module has been powered off, the configuration will not be lost.
EH-MA41 User Guide MM=00<CR><LF> report the Man-In-The-Middle protection is deactivated currently. Ex. 5.12. To active Man-In-The-Middle protection feature: AT+MM=01<CR><LF> active Man-In-The-Middle protection feature. OK<CR><LF> response from the module to indicate the command is adopted.
Bluetooth module force to be master device. 2. Ehong’s Bluetooth module can act as either Master or Slave device, i.e. it can either initiate a Bluetooth connection or accept a connection request.
Ex. 5.26. To query current local friendly name of Bluetooth module: AT+NM<CR><LF> query current local friendly name. NM=EH-MA41<CR><LF> report current local friendly name, it’s “EH-MA41”. Ex. 5.27. To change the local friendly name of Bluetooth module: AT+NM=MY_BT_DEVICE<CR><LF> change the local friendly name to “MY_BT_DEVICE”...
EH-MA41 User Guide The new baud rate of the The default baud Bluetooth module. rate may not be Baud Rate Value: 01h—15h 9600 per software 01: 1200 version. 02: 1800 03: 2400 04: 4800 05: 7200 06: 9600 07: 14400...
EH-MA41 User Guide no response output because the UART indicator output has been disabled Ex. 5.37. To enable the UART indicator output: AT+UI=01<CR><LF> enable the UART indicator output OK<CR><LF> response from the module to indicate the command is adopted.
EH-MA41 User Guide If the parameter is not presented, the Bluetooth module will report current discover status by the Indicator MD. 5.1.15.2. Syntax: Synopsis: AT+MD[=Status]<CR><LF> 5.1.15.3. Parameter Description: Parameter Description Mandatory Comments The new status of discoverable. Default: 00 (Not...
EH-MA41 User Guide If the parameter is not presented, the Bluetooth module will report current state of connectable mode by the Indicator CA. 5.1.17.2. Syntax: Synopsis: AT+CA[=State]<CR><LF> 5.1.17.3. Parameter Description: Parameter Description Mandatory Comments The new state of connectable mode.
EH-MA41 User Guide Name ID The name ID of this connection. Once This is only available connected, the host can use the name ID when both of the two sides are Ehong’s to identify the source or destination. Value: 40h—4xh (x is the maximum SPP software.
EH-MA41 User Guide AT+DS=00189600000A<CR><LF> disconnect with the specified device 00:18:96:00:00:0A. SS=00<CR><LF> the SPP channel 0 of Bluetooth module is now disconnected and is connectable. 5.2.3. SS—Query the state of each SPP channel 5.2.3.1. Description: This command is used to query the state of each SPP channel.
EH-MA41 User Guide 5.3.1. CI—Connect to the remote HID host 5.3.1.1. Description: This command will make the Bluetooth module to connect to the remote Bluetooth HID host. If the Bluetooth address parameter is not presented, the Bluetooth module will attempt to connect to the last connected HID host.
EH-MA41 User Guide 5.3.3.1. Description: This command is used to query the state of HID channel. 5.3.3.2. Syntax: Synopsis: AT+IS<CR><LF> 5.3.3.3. Examples: Ex. 5.89. To query the state of HID channel: AT+IS<CR><LF> query the state of HID channel.
Page 23
EH-MA41 User Guide AT+KR=A1,01,00,00,00,00,00,00,00,00<CR><LF> send a keyboard report to the HID host. The pressed key is released. OK<CR><LF> response from the module to indicate the command is adopted. 2. Consumer Key Report: LowByte HighByte The LowByte and HighByte are bit mask interpreted as shown :...
Page 24
EH-MA41 User Guide OK<CR><LF> response from the module to indicate the command is adopted. AT+KR=A1,02,00,00<CR><LF> send a consumer key report to the HID host. The pressed key is released. OK<CR><LF> response from the module to indicate the command is adopted.
EH-MA41 User Guide Ex. 5.100. To set the Throttle to 5, Left X to -2, Left Y to 3, Right X to 2, Right Y to -5, the joystick report should be: A1 04 05 FE 03 02 FB 08 00 00...
Page 26
response from the module to indicate the command is adopted. Ex. 5.106. To send a ASCII string to HID host: AT+AS=Hello\tWorld!\b\rThis is \\Ehong\\<CR><LF> send an ASCII string to the HID host. OK<CR><LF> response from the module to indicate the command is adopted.
Need help?
Do you have a question about the EH-MA41 and is the answer not in the manual?
Questions and answers